text
stringlengths
1
1.04M
language
stringclasses
25 values
--- title: Łączenie z usługą VSTS description: Azure SQL Data Warehouse zapytań w programie Visual Studio. services: sql-data-warehouse author: kevinvngo manager: craigg ms.service: sql-data-warehouse ms.topic: conceptual ms.subservice: development ms.date: 08/15/2019 ms.author: kevin ms.reviewer: igorstan ms.custom: seo-lt-2019 ms.openlocfilehash: e2d37b2d71f605077903197d25b5da2803e34ad3 ms.sourcegitcommit: 609d4bdb0467fd0af40e14a86eb40b9d03669ea1 ms.translationtype: MT ms.contentlocale: pl-PL ms.lasthandoff: 11/06/2019 ms.locfileid: "73685575" --- # <a name="connect-to-sql-data-warehouse-with-visual-studio-and-ssdt"></a>Nawiązywanie połączenia z usługą SQL Data Warehouse przy użyciu programu Visual Studio i narzędzi SSDT > [!div class="op_single_selector"] > * [Power BI](sql-data-warehouse-get-started-visualize-with-power-bi.md) > * [Azure Machine Learning](sql-data-warehouse-get-started-analyze-with-azure-machine-learning.md) > * [Program Visual Studio](sql-data-warehouse-query-visual-studio.md) > * [sqlcmd](sql-data-warehouse-get-started-connect-sqlcmd.md) > * [SSMS](sql-data-warehouse-query-ssms.md) > > Używając programu Visual Studio, można w kilka minut utworzyć zapytanie do usługi Azure SQL Data Warehouse. Ta metoda używa rozszerzenia SQL Server Data Tools (SSDT) w programie Visual Studio 2019. ## <a name="prerequisites"></a>Wymagania wstępne Aby użyć tego samouczka, potrzebne są następujące elementy: * Istniejący SQL Data Warehouse. Aby go utworzyć, zobacz artykuł [Tworzenie bazy danych w usłudze SQL Data Warehouse][Create a SQL Data Warehouse]. * Rozszerzenie SSDT dla programu Visual Studio. Jeśli masz program Visual Studio, prawdopodobnie masz też to rozszerzenie. Aby uzyskać instrukcje instalacji i informacje na temat dostępnych opcji, zobacz artykuł [Instalowanie programu Visual Studio i narzędzi SSDT][Installing Visual Studio and SSDT]. * W pełni kwalifikowana nazwa serwera SQL. Aby ją znaleźć, zobacz [Nawiązywanie połączenia z usługą SQL Data Warehouse][Connect to SQL Data Warehouse]. ## <a name="1-connect-to-your-sql-data-warehouse"></a>1. Połącz się z SQL Data Warehouse 1. Otwórz program Visual Studio 2019. 2. Otwórz Eksplorator obiektów SQL Server. W tym celu wybierz pozycje **Widok** > **Eksplorator obiektów SQL Server**. ![Eksplorator obiektów SQL Server][1] 3. Kliknij **ikonę dodawania serwera SQL**. ![Dodawanie serwera SQL][2] 4. Wypełnij pola w oknie łączenia z serwerem. ![Łączenie z serwerem][3] * **Nazwa serwera**. Wprowadź wcześniej ustaloną **nazwę serwera**. * **Uwierzytelnianie**. Wybierz opcję **Uwierzytelnianie na serwerze SQL Server** lub **Zintegrowane uwierzytelnianie usługi Active Directory**. * **Nazwa użytkownika** i **Hasło**. Wprowadź nazwę użytkownika i hasło, jeżeli powyżej wybrano uwierzytelnianie na serwerze SQL Server. * Kliknij przycisk **Połącz**. 5. W celach poznawczych rozwiń węzeł serwera Azure SQL. Możesz przejrzeć skojarzone z serwerem bazy danych. Rozwiń węzeł AdventureWorksDW, aby zobaczyć tabele w przykładowej bazie danych. ![Poznawanie bazy danych AdventureWorksDW][4] ## <a name="2-run-a-sample-query"></a>2. Uruchom przykładowe zapytanie Teraz, po nawiązaniu połączenia z bazą danych, napiszemy zapytanie. 1. Kliknij prawym przyciskiem myszy bazę danych w Eksploratorze obiektów SQL Server. 2. Wybierz pozycję **Nowe zapytanie**. Otworzy się okno nowego zapytania. ![Nowe zapytanie][5] 3. Skopiuj to zapytanie TSQL do okna zapytania: ```sql SELECT COUNT(*) FROM dbo.FactInternetSales; ``` 4. Uruchom zapytanie. W tym celu kliknij zieloną strzałkę lub użyj następującego skrótu: `CTRL`+`SHIFT`+`E`. ![Uruchamianie zapytania][6] 5. Przejrzyj wyniki zapytania. W tym przykładzie tabela FactInternetSales ma 60398 wierszy. ![Wyniki zapytania][7] ## <a name="next-steps"></a>Następne kroki Teraz, kiedy umiesz nawiązywać połączenia i wykonywać zapytania, spróbuj wykonać [wizualizację danych przy użyciu usługi Power BI][visualizing the data with PowerBI]. Aby skonfigurować środowisko do uwierzytelniania usługi Azure Active Directory, zobacz artykuł [Uwierzytelnianie w usłudze SQL Data Warehouse][Authenticate to SQL Data Warehouse]. <!--Arcticles--> [Connect to SQL Data Warehouse]: sql-data-warehouse-connect-overview.md [Create a SQL Data Warehouse]: sql-data-warehouse-get-started-provision.md [Installing Visual Studio and SSDT]: sql-data-warehouse-install-visual-studio.md [Authenticate to SQL Data Warehouse]: sql-data-warehouse-authentication.md [visualizing the data with PowerBI]: sql-data-warehouse-get-started-visualize-with-power-bi.md <!--Other--> [Azure portal]: https://portal.azure.com <!--Image references--> [1]: media/sql-data-warehouse-query-visual-studio/open-ssdt.png [2]: media/sql-data-warehouse-query-visual-studio/add-server.png [3]: media/sql-data-warehouse-query-visual-studio/connection-dialog.png [4]: media/sql-data-warehouse-query-visual-studio/explore-sample.png [5]: media/sql-data-warehouse-query-visual-studio/new-query2.png [6]: media/sql-data-warehouse-query-visual-studio/run-query.png [7]: media/sql-data-warehouse-query-visual-studio/query-results.png
markdown
<filename>MindLink-Eumpy/document/Eumpy.data_collection_framework.util.html <!DOCTYPE html> <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Eumpy.data_collection_framework.util package &mdash; Eumpy documentation</title> <link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <script src="_static/js/modernizr.min.js"></script> </head> <body class="wy-body-for-nav"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search"> <a href="index.html" class="icon icon-home"> Eumpy </a> <div role="search"> <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> <!-- Local TOC --> <div class="local-toc"><ul> <li><a class="reference internal" href="#">Eumpy.data_collection_framework.util package</a><ul> <li><a class="reference internal" href="#submodules">Submodules</a></li> <li><a class="reference internal" href="#module-Eumpy.data_collection_framework.util.EEG_record">Eumpy.data_collection_framework.util.EEG_record module</a></li> <li><a class="reference internal" href="#module-Eumpy.data_collection_framework.util.GUI_control">Eumpy.data_collection_framework.util.GUI_control module</a></li> <li><a class="reference internal" href="#module-Eumpy.data_collection_framework.util.creat_subject">Eumpy.data_collection_framework.util.creat_subject module</a></li> <li><a class="reference internal" href="#module-Eumpy.data_collection_framework.util.face_record">Eumpy.data_collection_framework.util.face_record module</a></li> <li><a class="reference internal" href="#module-Eumpy.data_collection_framework.util.record">Eumpy.data_collection_framework.util.record module</a></li> <li><a class="reference internal" href="#module-Eumpy.data_collection_framework.util">Module contents</a></li> </ul> </li> </ul> </div> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> <nav class="wy-nav-top" aria-label="top navigation"> <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="index.html">Eumpy</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="breadcrumbs navigation"> <ul class="wy-breadcrumbs"> <li><a href="index.html">Docs</a> &raquo;</li> <li>Eumpy.data_collection_framework.util package</li> <li class="wy-breadcrumbs-aside"> <a href="_sources/Eumpy.data_collection_framework.util.rst.txt" rel="nofollow"> View page source</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <div class="section" id="eumpy-data-collection-framework-util-package"> <h1>Eumpy.data_collection_framework.util package<a class="headerlink" href="#eumpy-data-collection-framework-util-package" title="Permalink to this headline">¶</a></h1> <div class="section" id="submodules"> <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2> </div> <div class="section" id="module-Eumpy.data_collection_framework.util.EEG_record"> <span id="eumpy-data-collection-framework-util-eeg-record-module"></span><h2>Eumpy.data_collection_framework.util.EEG_record module<a class="headerlink" href="#module-Eumpy.data_collection_framework.util.EEG_record" title="Permalink to this headline">¶</a></h2> <p>Created on Thu Oct 18 11:42:40 2018</p> <p>&#64;author: <NAME></p> <dl class="class"> <dt id="Eumpy.data_collection_framework.util.EEG_record.EEGRecorder"> <em class="property">class </em><code class="descclassname">Eumpy.data_collection_framework.util.EEG_record.</code><code class="descname">EEGRecorder</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.EEG_record.EEGRecorder" title="Permalink to this definition">¶</a></dt> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">data_collection_framework.util.record.AbstractRecorder</span></code></p> <blockquote> <div>This class gives an example of how to use AbsRecorder to record EEG data. Specially, the devices we used is emotiv insight. It should be noted that this code may not work well for your envirnoment,</div></blockquote> <p>since the device (emotiv insight) is relied on different platform and different verson of progarm language. I used windows64 ana python 3.5 for my development.</p> <blockquote> <div>You may noticed that the code here is very complexe. However, I just copied</div></blockquote> <p>the code that emotiv company released and modify just a litte bit, basically.</p> <dl class="method"> <dt id="Eumpy.data_collection_framework.util.EEG_record.EEGRecorder.record_one_sample"> <code class="descname">record_one_sample</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.EEG_record.EEGRecorder.record_one_sample" title="Permalink to this definition">¶</a></dt> <dd><blockquote> <div>This method is supposed to read one data sample from information</div></blockquote> <p>source. For EEG using emotiv insight, it means recording signal from 5 different channel (i.e, IED_AF3, IED_AF4, IED_T7, IED_T8, IED_Pz) and each channel’s PSD features (i.e. theta, alpha, low_beta, high_beta, gamma). 25 features totally to be treated as a sample.</p> </dd></dl> <dl class="method"> <dt id="Eumpy.data_collection_framework.util.EEG_record.EEGRecorder.release_resourse_in_one_trial"> <code class="descname">release_resourse_in_one_trial</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.EEG_record.EEGRecorder.release_resourse_in_one_trial" title="Permalink to this definition">¶</a></dt> <dd><p>You will implement this method to release resourse when one trial ends.</p> </dd></dl> </dd></dl> </div> <div class="section" id="module-Eumpy.data_collection_framework.util.GUI_control"> <span id="eumpy-data-collection-framework-util-gui-control-module"></span><h2>Eumpy.data_collection_framework.util.GUI_control module<a class="headerlink" href="#module-Eumpy.data_collection_framework.util.GUI_control" title="Permalink to this headline">¶</a></h2> <p>Created on Fri Oct 19 12:46:36 2018</p> <p>&#64;author: <NAME></p> <dl class="function"> <dt id="Eumpy.data_collection_framework.util.GUI_control.close_browser"> <code class="descclassname">Eumpy.data_collection_framework.util.GUI_control.</code><code class="descname">close_browser</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.GUI_control.close_browser" title="Permalink to this definition">¶</a></dt> <dd><blockquote> <div>This method is used for closing the browser TODO: make it work even in Linux, it only works in windows because the</div></blockquote> <p>commond belongs to windows.</p> </dd></dl> <dl class="function"> <dt id="Eumpy.data_collection_framework.util.GUI_control.find_pid_from_name"> <code class="descclassname">Eumpy.data_collection_framework.util.GUI_control.</code><code class="descname">find_pid_from_name</code><span class="sig-paren">(</span><em>process_name</em><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.GUI_control.find_pid_from_name" title="Permalink to this definition">¶</a></dt> <dd><p>This method is used for finding the process id by their name. Some process’ name corresponds multiple process, we only return the first one because when the first one is killed, the other will die too.</p> <p>Arguments:</p> <blockquote> <div>process_name: the name of the process</div></blockquote> <p>Returns:</p> <blockquote> <div><p>process_exist: whether the process_exist, return True if exist</p> <p>pid: the process’ id, string</p> </div></blockquote> </dd></dl> <dl class="function"> <dt id="Eumpy.data_collection_framework.util.GUI_control.find_pid_from_output"> <code class="descclassname">Eumpy.data_collection_framework.util.GUI_control.</code><code class="descname">find_pid_from_output</code><span class="sig-paren">(</span><em>output</em><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.GUI_control.find_pid_from_output" title="Permalink to this definition">¶</a></dt> <dd><p>This method is used for finding the pid from commond’s one-line output. We only kill the process whose status is listening.</p> <p>Arguments:</p> <blockquote> <div>output: a string from commond</div></blockquote> <p>Returns:</p> <blockquote> <div>the pid</div></blockquote> </dd></dl> <dl class="function"> <dt id="Eumpy.data_collection_framework.util.GUI_control.kill_process_by_port"> <code class="descclassname">Eumpy.data_collection_framework.util.GUI_control.</code><code class="descname">kill_process_by_port</code><span class="sig-paren">(</span><em>port</em><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.GUI_control.kill_process_by_port" title="Permalink to this definition">¶</a></dt> <dd><p>This method is used for killing the process by its port Specially, we use it to kill the falsk when the experiment is over.</p> <p>TODO: apply it in Linux. Note that this method works only for Windows so far, since its API belongs to Windows. Specially, ‘the kill_commond’</p> <p>Arguments:</p> <blockquote> <div>port: a string describes the number of the port the process is taking.</div></blockquote> </dd></dl> </div> <div class="section" id="module-Eumpy.data_collection_framework.util.creat_subject"> <span id="eumpy-data-collection-framework-util-creat-subject-module"></span><h2>Eumpy.data_collection_framework.util.creat_subject module<a class="headerlink" href="#module-Eumpy.data_collection_framework.util.creat_subject" title="Permalink to this headline">¶</a></h2> <p>Created on 2017/11/3</p> <p>&#64;author: hyr</p> <dl class="function"> <dt id="Eumpy.data_collection_framework.util.creat_subject.creat_subject"> <code class="descclassname">Eumpy.data_collection_framework.util.creat_subject.</code><code class="descname">creat_subject</code><span class="sig-paren">(</span><em>name</em>, <em>age</em>, <em>gender</em>, <em>trial_num</em><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.creat_subject.creat_subject" title="Permalink to this definition">¶</a></dt> <dd><p>Create a subject csv file for each subject when they fill their information</p> <p>Arguments:</p> <blockquote> <div><p>name: the subject’s name in English, a string</p> <p>age: the subject’s age, a interger</p> <p>gender: the subject’s gender, female or male</p> <p>trial_num: the number of trial subject intend to do, ranges from 1 to 40</p> </div></blockquote> </dd></dl> <dl class="function"> <dt id="Eumpy.data_collection_framework.util.creat_subject.make_trial_dir"> <code class="descclassname">Eumpy.data_collection_framework.util.creat_subject.</code><code class="descname">make_trial_dir</code><span class="sig-paren">(</span><em>path</em>, <em>trial_num</em><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.creat_subject.make_trial_dir" title="Permalink to this definition">¶</a></dt> <dd><p>Create trial’s directory for subjects</p> <p>Arguments:</p> <blockquote> <div><p>path: the target path</p> <p>trial_num: how much trail this subject will do.</p> </div></blockquote> </dd></dl> <dl class="function"> <dt id="Eumpy.data_collection_framework.util.creat_subject.makedir"> <code class="descclassname">Eumpy.data_collection_framework.util.creat_subject.</code><code class="descname">makedir</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.creat_subject.makedir" title="Permalink to this definition">¶</a></dt> <dd><p>Create a subject’s directory in target path from configuration.py</p> </dd></dl> <dl class="function"> <dt id="Eumpy.data_collection_framework.util.creat_subject.save_SAM_label"> <code class="descclassname">Eumpy.data_collection_framework.util.creat_subject.</code><code class="descname">save_SAM_label</code><span class="sig-paren">(</span><em>trial_id</em>, <em>valence</em>, <em>arousal</em><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.creat_subject.save_SAM_label" title="Permalink to this definition">¶</a></dt> <dd><p>Creat a csv file to storage the ground truth lable of the subject</p> <p>Arguments:</p> <blockquote> <div><p>trial_id: which trial it is.</p> <p>valence: the ground truth label in valence space, between 1 and 9</p> <p>arousal: the ground truth label in arousal space, between 1 and 9</p> </div></blockquote> </dd></dl> </div> <div class="section" id="module-Eumpy.data_collection_framework.util.face_record"> <span id="eumpy-data-collection-framework-util-face-record-module"></span><h2>Eumpy.data_collection_framework.util.face_record module<a class="headerlink" href="#module-Eumpy.data_collection_framework.util.face_record" title="Permalink to this headline">¶</a></h2> <p>Created on Thu Oct 18 10:56:13 2018</p> <p>&#64;author: <NAME></p> <dl class="class"> <dt id="Eumpy.data_collection_framework.util.face_record.FacialExpressionRecorder"> <em class="property">class </em><code class="descclassname">Eumpy.data_collection_framework.util.face_record.</code><code class="descname">FacialExpressionRecorder</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.face_record.FacialExpressionRecorder" title="Permalink to this definition">¶</a></dt> <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">data_collection_framework.util.record.AbstractRecorder</span></code></p> <blockquote> <div>This class gives an example of how to use AnstractRecorder to record</div></blockquote> <dl class="docutils"> <dt>faces data.</dt> <dd>We just need to implement the function ‘record_one_sample’, to collect</dd> </dl> <p>one sample of data from camera. Please notes that here we collected the whole image without finding one’s face, if you intend to use the collected, you will have to find the faces from the image using opencv or other tools.</p> <blockquote> <div>As for release resourse, we have no resourse to release here.</div></blockquote> <dl class="method"> <dt id="Eumpy.data_collection_framework.util.face_record.FacialExpressionRecorder.record_one_sample"> <code class="descname">record_one_sample</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.face_record.FacialExpressionRecorder.record_one_sample" title="Permalink to this definition">¶</a></dt> <dd><blockquote> <div>This method is supposed to read one data sample from information</div></blockquote> <p>source. For facial expression, we use opencv API to read one image from camera. In my demo, the camera is the standard camera from my laptop. The steps are simply as follows.</p> <blockquote> <div><ol class="arabic simple"> <li>opencv a handle</li> <li>read an image from the handle</li> <li>return the image</li> </ol> </div></blockquote> </dd></dl> <dl class="method"> <dt id="Eumpy.data_collection_framework.util.face_record.FacialExpressionRecorder.release_resourse_in_one_trial"> <code class="descname">release_resourse_in_one_trial</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.face_record.FacialExpressionRecorder.release_resourse_in_one_trial" title="Permalink to this definition">¶</a></dt> <dd><p>You will implement this method to release resourse when one trial ends.</p> </dd></dl> </dd></dl> </div> <div class="section" id="module-Eumpy.data_collection_framework.util.record"> <span id="eumpy-data-collection-framework-util-record-module"></span><h2>Eumpy.data_collection_framework.util.record module<a class="headerlink" href="#module-Eumpy.data_collection_framework.util.record" title="Permalink to this headline">¶</a></h2> <p>Created on Wed Oct 17 14:45:35 2018</p> <p>&#64;author: <NAME></p> <dl class="class"> <dt id="Eumpy.data_collection_framework.util.record.AbstractRecorder"> <em class="property">class </em><code class="descclassname">Eumpy.data_collection_framework.util.record.</code><code class="descname">AbstractRecorder</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.record.AbstractRecorder" title="Permalink to this definition">¶</a></dt> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <blockquote> <div>If you want to create your own recorder. For example, you want to</div></blockquote> <p>record ECG (Electrocardiogram), you just need to inherit this class and implement two method (record_one_sample and release_resourse_in_one_trial). In most time, you just need to implement one method record_one_sample.</p> <dl class="docutils"> <dt>Attributes:</dt> <dd><blockquote class="first"> <div><p>trial_id: the current id of the trial, it will change during recording</p> <p>queue: the queue for sharing data in different process.</p> <p>data_list: the list for saving data in RAM. Everytime one trial ends,</p> </div></blockquote> <p>its data will be written into harddisk and then be clear.</p> <blockquote> <div>sub_process: the sub-process for read data from sensor. We need the</div></blockquote> <p>father process to provide GUI during recording.</p> <blockquote class="last"> <div><p>save_file_name: the data file’s name, a string</p> <p>base_bath: the path that saves the data</p> </div></blockquote> </dd> </dl> <dl class="method"> <dt id="Eumpy.data_collection_framework.util.record.AbstractRecorder.end_one_trial"> <code class="descname">end_one_trial</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.record.AbstractRecorder.end_one_trial" title="Permalink to this definition">¶</a></dt> <dd><p>When one trial ends, we follow these steps.</p> <ol class="arabic simple"> <li>retrieve data from queue and put them into data_list.</li> <li>terminate the process.</li> <li>save the data in data_list into hard disk.</li> <li>reset data_list.</li> <li>release all resourse in one trial.</li> </ol> </dd></dl> <dl class="method"> <dt id="Eumpy.data_collection_framework.util.record.AbstractRecorder.record"> <code class="descname">record</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.record.AbstractRecorder.record" title="Permalink to this definition">¶</a></dt> <dd><blockquote> <div>This method starts in a new process. I use a loop to continue reading data into queue from sensor. It</div></blockquote> <p>wiil be terminated when the trial ends.</p> </dd></dl> <dl class="method"> <dt id="Eumpy.data_collection_framework.util.record.AbstractRecorder.record_one_sample"> <code class="descname">record_one_sample</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.record.AbstractRecorder.record_one_sample" title="Permalink to this definition">¶</a></dt> <dd><blockquote> <div>This is the key method you should implement. It is used for reading</div></blockquote> <p>one sample from your sensor. For example, you will return an image if your minimum data unit (one sample) in your model is an image. Similarly, you will return a vedio if your minimum data unit (one sample) in your model is a vedio. Please check how I implement it in face_record.py.</p> <dl class="docutils"> <dt>Returns:</dt> <dd>One sample, the minimum data unit for training.</dd> </dl> </dd></dl> <dl class="method"> <dt id="Eumpy.data_collection_framework.util.record.AbstractRecorder.release_resourse_in_one_trial"> <code class="descname">release_resourse_in_one_trial</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.record.AbstractRecorder.release_resourse_in_one_trial" title="Permalink to this definition">¶</a></dt> <dd><p>You will implement this method to release resourse when one trial ends.</p> </dd></dl> <dl class="method"> <dt id="Eumpy.data_collection_framework.util.record.AbstractRecorder.save"> <code class="descname">save</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.record.AbstractRecorder.save" title="Permalink to this definition">¶</a></dt> <dd><p>save the data in data_list into hard disk</p> </dd></dl> <dl class="method"> <dt id="Eumpy.data_collection_framework.util.record.AbstractRecorder.start_one_trial"> <code class="descname">start_one_trial</code><span class="sig-paren">(</span><em>trail_id</em><span class="sig-paren">)</span><a class="headerlink" href="#Eumpy.data_collection_framework.util.record.AbstractRecorder.start_one_trial" title="Permalink to this definition">¶</a></dt> <dd><p>when one trial starts, we clear the queue and start a new process to read data.</p> <p>Aruguments:</p> <blockquote> <div>trial_id: the current trial’s id</div></blockquote> </dd></dl> </dd></dl> </div> <div class="section" id="module-Eumpy.data_collection_framework.util"> <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-Eumpy.data_collection_framework.util" title="Permalink to this headline">¶</a></h2> </div> </div> </div> </div> <footer> <hr/> <div role="contentinfo"> <p> &copy; Copyright 2019, <NAME> </p> </div> Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. </footer> </div> </div> </section> </div> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT:'./', VERSION:'', LANGUAGE:'None', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt' }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/js/theme.js"></script> <script type="text/javascript"> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> </body> </html>
html
var feedback = function (res) { if (res.success === true) { var wahaha = res.data.link.replace("http", "http"); console.log(wahaha); document.querySelector('.status').classList.add('text-success'); document.querySelector('.status').innerHTML = '上傳成功! : ' + '<br><input class="image-url" name="PicImg" readonly="readonly" value=' + wahaha + '/>' + '<br><img src="' + wahaha + '" class="img-fluid">'; } else { var wahaha = res.data.link.replace("http", "http"); console.log(wahaha); document.querySelector('.status').classList.add('text-success'); document.querySelector('.status').innerHTML = 'Image : ' + '<br><input class="image-url" name="PicImg" value=' + '圖片上傳失敗' + '/>'; } }; new Imgur({ clientid: '4409588f10776f7', //You can change this ClientID callback: feedback });
javascript
<reponame>FudanYuan/neo4j<filename>src/main/resources/static/mas_json/2015_infocom_1220748214303863834.json {"title": "Fine-grained sleep monitoring: Hearing your breathing with smartphones.", "fields": ["computer network", "real time computing", "breathing", "respiratory rate", "sleep apnea"], "abstract": "Sleep monitoring has drawn increasingly attention as the quality and quantity of the sleep are important to maintain a person's health and well-being. For example, inadequate and irregular sleep are usually associated with serious health problems such as fatigue, depression and cardiovascular disease. Traditional sleep monitoring systems, such as PSG, involve wearable sensors with professional installations, and thus are limited to clinical usage. Recent work in using smartphone sensors for sleep monitoring can detect several events related to sleep, such as body movement, cough and snore. Such coarse-grained sleep monitoring however is unable to detect the breathing rate which is an important vital sign and health indicator. This work presents a fine-grained sleep monitoring system which is capable of detecting the breathing rate by leveraging smartphones. Our system exploits the readily available smartphone earphone placed close to the user to reliably capture the human breathing sound. Given the captured acoustic sound, our system performs noise reduction to remove environmental noise and then identifies the breathing rate based on the signal envelope detection. Our system can further detect detailed sleep events including snore, cough, turn over and get up based on the acoustic features extracted from the acoustic sound. Our experimental evaluation of six subjects over six months time period demonstrates that the breathing rate monitoring and sleep events detection are highly accurate and robust under various environments. By combining breathing rate and sleep events, our system can provide continuous and noninvasive fine-grained sleep monitoring for healthcare related applications, such as sleep apnea monitoring as evidenced by our experimental study.", "citation": "Citations (20)", "departments": ["Stevens Institute of Technology", "Stevens Institute of Technology", "Florida State University", "Stevens Institute of Technology"], "authors": ["<NAME>.....http://dblp.org/pers/hd/r/Ren:Yanzhi", "<NAME>.....http://dblp.org/pers/hd/w/Wang_0009:Chen", "<NAME>.....http://dblp.org/pers/hd/y/Yang_0003:Jie", "<NAME>.....http://dblp.org/pers/hd/c/Chen_0001:Yingying"], "conf": "infocom", "year": "2015", "pages": 9}
json
import { IMultipleValidationClient } from './interfaces/MultipleValidation'; import { ValidationResult, ValidationResponse, ValidationQuery } from './interfaces/Validate'; import Request from './request'; export default class ValidateClient { public multipleValidation; request: Request; constructor(request: Request, multipleValidationClient: IMultipleValidationClient) { this.request = request; this.multipleValidation = multipleValidationClient; } async get(address: string): Promise<ValidationResult> { const query: ValidationQuery = { address }; const result: ValidationResponse = await this.request.get('/v4/address/validate', query); return result.body as ValidationResult; } }
typescript
<gh_stars>10-100 {"template":{"small":"https://static-cdn.jtvnw.net/emoticons/v1/{image_id}/1.0","medium":"https://static-cdn.jtvnw.net/emoticons/v1/{image_id}/2.0","large":"https://static-cdn.jtvnw.net/emoticons/v1/{image_id}/3.0"},"channels":{"aeonicarchangel":{"title":"AeonicArchangel","channel_id":25153021,"link":"http://twitch.tv/aeonicarchangel","desc":null,"plans":{"$4.99":"86419","$9.99":"86423","$24.99":"86424"},"id":"aeonicarchangel","first_seen":"2017-06-28 16:25:04","badge":null,"badge_starting":null,"badge_3m":null,"badge_6m":null,"badge_12m":null,"badge_24m":null,"badges":null,"bits_badges":null,"cheermote1":null,"cheermote100":null,"cheermote1000":null,"cheermote5000":null,"cheermote10000":null,"set":86419,"emotes":[{"code":"aeonicOkay","image_id":215684,"set":86419},{"code":"aeonicPotato","image_id":216053,"set":86423},{"code":"aeonicChug","image_id":216103,"set":86424}]}}}
json
He said: “Davido is someone that has been supporting me right from the beginning of my career even before I came out in 2021. He met me in 2020; heard some of my songs and liked it. He has been creating awareness for my song even before I released my first song. Burna Boy has also supported in his way in O2 2021.”Read more:
english
LONDON: An own goal by Michael Keane proved the difference as Tottenham Hotspur beat visitors Everton 1-0 in a dour clash on Monday to move up to eighth in the standings and hand manager Jose Mourinho a 200th Premier League win. Defeat would have dropped Spurs below the visitors into the bottom half of the table but they won fairly comfortably to stretch their unbeaten league run versus Everton to 15 games. Midfielder Giovani Lo Celso thought he had scored his first Premier League goal for Tottenham in the 23rd minute but his shot on the turn took a decisive deflection off Keane to leave keeper Jordan Pickford with no chance. Spurs keeper Hugo Lloris was hardly tested although he was involved in the night's flashpoint, having a furious row with team mate Son Heung-min as the players walked off at halftime. Tottenham have 48 points from 33 games, one behind Arsenal and nine adrift of fourth-placed Chelsea. Everton's first defeat since the resumption of the season left them 11th. Mourinho questioned his side's desire after a lacklustre 3-1 defeat by Sheffield United last week and there was nothing wrong with their application on Monday, even if it was hardly a performance to set the pulse racing. What he could not have envisaged, however, was the sight of Lloris and Son being held apart by teammates, shortly after Everton's Richarlison had gone close to an equaliser for Carlo Ancelotti's side. Lloris was clearly angry at Son not tracking back in the build-up for the Richarlison chance. All was well at the end though as they hugged. "What happened between me and Sonny is part of football sometimes. There's no problem. At the end of the game you could see we were more than happy," the Frenchman said. It at least provided a talking point in a game that for long periods felt like a training ground game. The night's only goal rather summed it up. Son played the ball to Kane in a congested area and when his shot rebounded across to Lo Celso the Argentine's shot on the turn was heading wide before it hit Keane and nestled into the net.
english
{ "about": "O programie", "contribute": "Contribute on GitHub", "difficulty": "Ilość", "difficulty_easy": "Niski", "difficulty_hard": "Loty", "difficulty_impossible": "Niewielki", "difficulty_medium": "Średni", "extension": "Rozszerzenie Google Chrome", "extensionguide": "Rozszerzenie Dot Przewodnik", "extensionp1": "", "extensionp2": "", "extensionp3": "", "extensionp4": "", "extensionp5": "", "extensionp6": "", "footercredits": "Wykonane przez", "footerlicense": "Ta praca jest licencjonowana na licencji Creative Commons Attribution 4.0 International License.", "guide": "Przewodnik", "guideeasy": "Zbierają mało danych", "guideexplanations": "Powyższe linki są oznaczone kolorem w celu wskazania liczby danych zgromadzonych przez te spółki. Uwaga: mierzymy ilość danych poprzez ilość typów danych, a nie samych danych. Ponadto, niejednoznaczna (czarna) etykieta odnosi się do tych firm, których strony z zasadami są trudne do odczytania/zrozumienia, niezależnie od ilości zebranych danych :", "guidehard": "Zbierają wiele danych", "guideimpossible": "Polityka prywatności jest niejednoznaczna", "guidemedium": "Zbierają jakieś dane", "hideinfo": "ukryj informacje...", "link_jdm": "Visit JustGetMyData", "mikerogers": "<NAME>", "name": "Polish", "noinfo": "Brak dostępnych informacji", "noresults": "Nie możesz znaleźć tego, czego szukasz?", "noresultshelp": "Pomóż ulepszyć JustWhatsTheData", "popular": "Popularne", "pullrequest": "Zgłoś Pull Request na GitHub", "reset": "Reset", "sendmail": "Wyślij e-mail", "showinfo": "pokaż informacje...", "tagline": "Katalog informacji dla ciebie w celu potwierdzenia ilości danych, które usługi sieciowe zbierają od ciebie.", "title": "Co to jest dane - katalog informacji dla Ciebie, aby potwierdzić ilość danych, które usługi internetowe zbierają od ciebie.", "translate": "Tłumacz na Crowdin", "twitter": "Tweetuj JWTD", "whatisthis": "Co to jest?", "whatisthis1": "Wiele firm używa", "whatisthis2": "ciemny wzór", "whatisthis3": "techniki, dzięki którym udostępniasz więcej informacji, do których naprawdę zamierzasz. JustWhatsTheData ułatwia użytkownikowi poznanie ilości i rodzaju informacji, które usługi internetowe gromadzą podczas korzystania z nich.", "whatisthis4": "Masz witrynę, którą uważasz, że powinna zostać dodana?", "info1": "Podstawowe dane osobowe (nazwisko, data urodzenia, e-mail, numer telefonu...).", "info2": "Adresy.", "info3": "Podatne dane osobowe (identyfikacja podatkowa, DNI, narodowość, sytuacja w zakresie zatrudnienia...).", "info4": "Podstawowe informacje o urządzeniu (adres IP, przeglądarka, pływka urządzenia...).", "info5": "Dane płatności.", "info6": "Analiza treści (analiza danych wykorzystanych lub wysłanych w ich sieci/aplikacji).", "info7": "Przeglądanie danych i korzystanie z ich stron internetowych/aplikacji (odwiedzane strony i linki, gry...).", "info8": "Ciasteczka.", "info9": "Używa Google Analytics.", "info10": "Przybliżona lokalizacja.", "info11": "Dokładne umiejscowienie (za pomocą gps i (lub) Bluetooth).", "info12": "Czaty i prywatne wiadomości.", "info13": "Wszelkie treści przesłane przez web/aplikację (posty, komentarze...).", "info14": "Kategoryzacja użytkowników (np.: „mężczyzna w średnim wieku od 20 do 49 lat w samochodach”).", "info15": "Dane z możliwych linków do innych stron internetowych/aplikacji (facebook, google, jabłko...).", "info16": "Głośność (za pomocą AI lub po prostu za pomocą mikrofonu podczas korzystania z nich) i dane obrazów z kamery.", "info17": "Połączenia (Internet, bluetooth ...)", "info18": "Książka kontaktowa, dane kalendarza...", "info19": "Sygnały internetowe, śledzenie pikseli, odcisk palców przeglądarki i odcisk palców urządzenia.", "info20": "Uzyskaj informacje o innych firmach.", "info21": "Informacje o aplikacjach urządzeń.", "info22": "Posty w mediach społecznościowych.", "info23": "Odniesienie do strony internetowej." }
json
import React from 'react'; import ReactTooltip from "react-tooltip"; import { ComposableMap, Geographies, Geography, } from "react-simple-maps" import * as Utils from './utils'; // url to a valid topojson file const geoUrl = 'https://raw.githubusercontent.com/zcreativelabs/react-simple-maps/master/topojson-maps/world-110m.json'; const colorGradient = { start: {r: 255, g: 204, b: 102}, end: {r: 128, g: 0, b: 0}, } export const GeoMap = props => { const { data, setTooltipContent } = props; const isos = data.map(_ => _.iso2); const getProps = (geoProp) => { const iso2 = geoProp.ISO_A2 const idx = isos.indexOf(iso2); if(idx > -1) { const {n} = data[idx]; const fill = Utils.rgbToStyle(Utils.fRGB(colorGradient.start, colorGradient.end, Math.log(n), Math.log(50000))); const tooltip = `${geoProp.NAME}, ${n} cases`; return { fill, tooltip}; } return {fill: 'grey', tooltip: null}; } return (<ComposableMap data-tip="" projectionConfig={{ scale: 180 }}> <Geographies geography={geoUrl}> {({geographies}) => geographies.map(geo => { const {fill, tooltip} = getProps(geo.properties); return <Geography onMouseEnter={() => setTooltipContent(tooltip)} onMouseLeave={() => setTooltipContent('')} key={geo.rsmKey} geography={geo} fill={fill} /> })} </Geographies> </ComposableMap>); } export const GeoMapWTooltip = props => { const [ content, setContent ] = React.useState(''); const { data } = props; return <> <GeoMap data={data} setTooltipContent={setContent}/> <ReactTooltip>{content}</ReactTooltip> </> } export default GeoMapWTooltip;
javascript
Posted On: The International Financial Services Centres Authority (IFSCA) has been established as a unified financial sector regulator at GIFT-IFSC, Gandhinagar, Gujarat for the development and regulation of financial products, financial services and financial institutions in the International Financial Services Centres (IFSCs) in India. IFSCA seeks to implement a state-of-the-art Information Technology (IT) platform that would leverage technology to promote ease of doing business for the stakeholders, reduce the cost of compliance for supervised entities and position IFSCA as a progressive regulator with a best-in-class Supervisory Technology (SupTech) system. The SupTech system shall cover administrative, compliance, supervision, and enforcement framework for its regulated entities. The SupTech system will enable IFSCA to collaborate with other sectoral financial regulators in India and abroad through Application Programming Interface (API) based machine to machine communication or integration, as appropriate. In this regard, IFSCA intends to select an IT Service Provider (SP) to design, develop, implement, operate, and maintain the Supervisory Technology (SupTech) System of IFSCA and has issued RFP for the said purpose. The project duration is planned to be around 72 months comprising 12 months of implementation from the date of onboarding of SP, and 60 months of operations and maintenance. The detailed scope of RFP is available at e-Procurement portal https://ifsca.enivida.com. The notice inviting tender for Selection of Service Provider for SupTech System of IFSCA can be accessed at https://ifsca.gov.in/home/TenderList.
english
<gh_stars>0 package server import ( "encoding/json" "fmt" "strconv" "strings" ) type SyncClient struct { ClientID string `json:"client_id,omitempty"` Topic string `json:"topic,omitempty"` Group string `json:"group,omitempty"` Host string `json:"host,omitempty"` Port int `json:"port,omitempty"` } type TopicGroup struct { Limit int `json:"limit"` Clients map[string][][]*SyncClient `json:"clients"` Snapshot map[string][]int `json:"snapshot"` } // to json func (t *TopicGroup) ToJson() string { d, _ := json.Marshal(t) return string(d) } // judge the client in the array func IsArray(arr []*SyncClient, cli *SyncClient) (int, bool) { for idx, item := range arr { if item.ClientID == cli.ClientID && item.Topic == cli.Topic { return idx, true } } return -1, false } // add client to array func (t *TopicGroup) Add(client *SyncClient, isAuto bool) { if isAuto { t.addClientAutoGroup(client) } else { t.addClientByGroup(client) } } // delete client from array func (t *TopicGroup) Delete(client *SyncClient, isAuto bool) { if isAuto { t.delClientAutoGroup(client) } else { t.delClientAutoGroup(client) } } // add client info to array func (t *TopicGroup) AddClient(clientId, topic, group, host string, port int, isAuto bool) { client := &SyncClient{ClientID: clientId, Topic: topic, Group: group, Host: host, Port: port} if isAuto { t.addClientAutoGroup(client) } else { t.addClientByGroup(client) } } // delete client info from array func (t *TopicGroup) DelClient(clientId, topic string, isAuto bool) { client := &SyncClient{ClientID: clientId, Topic: topic, Group: "", Host: "", Port: 0} if isAuto { t.delClientAutoGroup(client) } else { t.addClientByGroup(client) } } // add new client to Topic Group func (t *TopicGroup) addClientAutoGroup(client *SyncClient) { snapshot := t.Snapshot[client.Topic] clients := t.Clients[client.Topic] // Init Some Info if snapshot == nil && clients == nil { t.Snapshot = make(map[string][]int) t.Clients = make(map[string][][]*SyncClient) clients = make([][]*SyncClient, 0) snapshot = make([]int, 0) t.Snapshot[client.Topic] = snapshot t.Clients[client.Topic] = clients } if len(snapshot) == 0 { snapshot = append(snapshot, 1) clientTmp := make([]*SyncClient, 0) client.Group = "G0" clientTmp = append(clientTmp, client) clients = append(clients, clientTmp) } else { for idx, cli := range clients { group := fmt.Sprintf("G%v", idx) if len(cli) < t.Limit { if _, ok := IsArray(cli, client); ok { continue } client.Group = group cli = append(cli, client) snapshot[idx]++ clients[idx] = cli break } else { if len(snapshot)-1 >= idx+1 { continue } else { group := fmt.Sprintf("G%v", idx+1) client.Group = group newCliList := make([]*SyncClient, 0) newCliList = append(newCliList, client) clients = append(clients, newCliList) snapshot = append(snapshot, 1) } } } } t.Snapshot[client.Topic] = snapshot t.Clients[client.Topic] = clients } // delete client from Topic Group Map func (t *TopicGroup) delClientAutoGroup(client *SyncClient) { clients := t.Clients[client.Topic] snapshot := t.Snapshot[client.Topic] for idx, cliList := range clients { index, ok := IsArray(cliList, client) if ok { tmp := append(cliList[:index], cliList[index+1:]...) clients[idx] = tmp snapshot[idx]-- } } t.Snapshot[client.Topic] = snapshot } func (t *TopicGroup) GetClient(clientID string, subject string) *SyncClient { clients := t.Clients[subject] for _, cliList := range clients { for _, client := range cliList { if client.ClientID == clientID { return client } } } return nil } // add client by input group name // need implement func (t *TopicGroup) addClientByGroup(client *SyncClient) { panic("addClientByGroup not implement") } // delete client by input group name // need implement func (t *TopicGroup) delClientByGroup(client *SyncClient) { panic("addClientByGroup not implement") } // get group client by single client func (t *TopicGroup) GetClientGroup(client *SyncClient) []*SyncClient { clients := t.Clients[client.Topic] if client.Group != "" { tmp := strings.Split(client.Group, "G") index, _ := strconv.Atoi(tmp[len(tmp)-1]) return clients[index] } return nil } // get group client by group_name and topic func (t *TopicGroup) GetGroupClientsByGroup(group, subject string) []*SyncClient { clients := t.Clients[subject] if group != "" { tmp := strings.Split(group, "G") index, _ := strconv.Atoi(tmp[len(tmp)-1]) return clients[index] } return nil }
go
If you have an aptitude for people skills, selling skills and are passionate about solving people’s problems and providing them financial security, then Insurance is your way. However, you must not choose Insurance as a career merely for the sake of making money. Instead, the importance of Insurance the real world must be understood at the very outset. Insurance is an agreement between the insurer and the insured, where the latter pays a certain amount of money known as the premium on a monthly or annual basis. The former in turn commits that a large amount of amount of money would be paid to the insured in case of an adversity.. It is better to have an insurance as it helps bail out of difficult situations like someone in the family falling sick or in case of an accident or robbery. Insurance companies have different policies for almost any kind of situation one could imagine. The most popular forms of Insurance policies sold by companies are Life Insurance, Travel Insurance, Vehicle Insurance, Health or Mediclaim Insurance and Home Insurance. There are several government bodies viz. Life Insurance Corporation, National Insurance Company and private companies such as ICICI Prudential, Max New York, Birla Sun Life, Bajaj Allianz, and Tata AIG amongst others, which sell Insurance policies. As a student, you may want to take up Insurance as a career after graduation. However, a few students prefer to take up the subject after twelfth standard itself. Several companies these days offer part-time jobs to students after school. Although, it is recommended that you finish college and then pursue a Master’s in Insurance Management to be thorough with the subject. The following is the course content that a Master’s Degree in Insurance broadly offers; The aim and objective of this study is to introduce you thoroughly to the various facets of Insurance. Is it the Right Career for Me? As a student, in college or after having completed school, if you feel you have good selling skills and people skills, then Insurance most definitely is the right subject for you. You may join one of the popular Insurance companies as an Insurance Agent or a Sales Executive- Insurance. For this, you will need to clear the agent exam conducted by IRDA (Insurance Regulatory Authority of India). After working for a few years you can look forward to becoming an Insurance Manager. There are primarily two skills required for taking up Insurance as a career option: First is the ability to easily befriend people. The second important skill required is the ability to see their problems clearly and make them understand the need for insurance. You can clearly explain to them that Insurance provides a safe cover for any untoward events that may occur in future. At least money-wise, Insurance can make people feel secure. What would it Cost Me? The average annual fee of the MBA Insurance program can vary from Rs 1.0 lacto Rs2.0 lacs depending on the university and school you choose. Some of the best Insurance schools in India include ICFAI, NIA and Birla Institute of Management besides several others which provide distance education courses, diploma programmes and regular courses as well. There are no separate loans available for Insurance courses alone as such. However, working professionals may study through their company sponsorships. Similarly, education loans of up to Rs. 7.5 lacs are available through banks such as State Bank of India. The job prospects for an Insurance professional are increasing day by day. You may join as an Insurance agent where your main responsibilities would include selling insurance policies to people. For this task, you would be given target amounts, which you will have to earn through premiums. On a commission basis, you will be compensated in turn. Other jobs include Sales Manager- Insurance wherein you would handle a team of Insurance agents for selling Insurance policies. Besides, you may join as an Insurance Underwriter as well. The pay package of a fresher in an insurance company varies approximately from Rs. 10,000 to Rs. 30,000. For higher positions, you may look upto Rs. 1 lac per month. If you have passed out of prestigious B-Schools after completing your Master of Business Administration in Insurance, you may expect a higher salary during the first job itself. Insurance professionals are highly in demand these days. According to statistics, only 14% of world population has been covered by Insurance professionals, which means there is much potential in the 86% population that is still untapped. So basically, the demand is much higher when compared with the supply. What is needed is people with passion for the subject and business acumen. As they say, “Insurance is a subject matter of solicitation”. So clearly, a lot of revenue can be generated using this field if the policies and systems are laid fair and correct. In the past few years, several popular Insurance companies such as Max New York, ICICI Lombard, Bajaj Allianz and others have come up with new policies to attract buyers. Most of the policies are reliable and of benefit to public. The market has only seen an upswing for the Insurance industry except during the slowdown of 2009, when there was a steep decline in financial position of all top companies. Insurance is a very popular method of securing one’s finances, assets, life and properties. The sector is highly trusted and systematic in developed countries such as the United States and the United Kingdom. In India, the systems are developing and will take some time to gain importance. However, companies such as LIC (Life Insurance Corporation of India Ltd.) and GIC (General Insurance Company of India Ltd.) are two of the most trusted companies. Besides these, all private companies work under the Insurance Regulatory Development Authority (IRDA) Act. Insurance can be sold with different names but ultimately the aim is to insure somebody against untoward incidents such as accidents, thefts and natural calamities. The different types of insurance policies include Life Insurance, Health and Mediclaim Insurance, Home Insurance and Vehicle Insurance to name a few. You may follow the below mentioned tips to get selected as an Insurance professional after completing your bachelor’s or master’s degree in Insurance: - Check the websites of the best Insurance companies for the job openings and apply for the same. - Develop an excellent friend and contact circle to avail their reference in future for negotiating in Insurance deals. - Read necessary books on selling skills, business etiquette and business communication. - Upgrade yourself with latest world Insurance scenario and new strategies that aren being introduced. - Update yourself with the various laws and regulations such as IRDA act and the following amendments that may be applicable to Insurance policies. - Update yourself with the top-notch finance companies and their stock exchange status so that you can plan your selling and negotiating accordingly. - The industry growth is on an upsurge. The opportunities are increasing day by day for people with strong people skills and selling skills. - The overall industry growth is assumed to touch an all time high in the coming years. Insurance is seen as the career of the future for students et al. - There are several professional institutes such as NIA in Pune that provide excellent courses in Insurance for students. Besides, there are institutes such as Birla Schools and ICFAI that provide different courses to students, both regular and distance education-wise. - The students or Insurance professionals need high convincing skills to persuade people in buying insurance policies. Sometimes, this may be disliked. - There are several companies venturing into this business day by day. For instance, Reliance is one recent company to have ventured into Insurance business. Due to this, sometimes it may be difficult to trust the reliability of the organization. On the job front, based on random statistical information, the following are the top 10 Insurance companies in India: Life Insurance Corporation of India (LIC), Bajaj Allianz General Insurance, ICICI Lombard General Insurance, ICICI Prudential Life Insurance, Birla Sunlife Insurance, Tata AIG General Insurance, New India Assurance Co., Iffco Tokyo General Insurance, Oriental Insurance Co., and HDFC Standard Life Insurance.
english
# Vue2 ![vue-lifecycle](https://vue.docschina.org/images/lifecycle.png) [详见Vue 生命周期](https://vue.docschina.org/v2/guide/instance.html#%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F%E7%A4%BA%E6%84%8F%E5%9B%BE) [选项 / 生命周期钩子](https://vue.docschina.org/v2/api/#%E9%80%89%E9%A1%B9-%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F%E9%92%A9%E5%AD%90) 我们通过`Vue`提供的生命周期钩子对`Vue`的整个生命周期来加深我们对它的理解。 [测试代码地址](https://codesandbox.io/s/y0117q1y41) **App.vue** ```js <template> <div id="app"> <el-button type="primary" size="small" @click="update">Update</el-button> <el-button type="danger" size="small" @click="destory">Destory</el-button> <div>Input Lazy: <input v-model.lazy="message" /></div> <div>Input: <input v-model="message" /></div> <div>{{ message }}</div> </div> </template> <script> import ChildLifeCycle from "./components/ChildLifeCycle.vue"; export default { name: "App", data() { return { message: "hello" }; }, beforeCreate() { console.group("beforeCreate"); console.log(` el: ${this.$el}`); console.log(` data: ${this.$data}`); console.log(` message: ${this.message}`); }, created() { console.group("created"); console.log(` el: ${this.$el}`); console.log(` data: ${this.$data}`); console.log(` message: ${this.message}`); }, beforeMount() { console.group("beforeMount"); console.log(` el: ${this.$el}`); console.log(this.$el); console.log(` data: ${this.$data}`); console.log(` message: ${this.message}`); }, mounted() { console.group("mounted"); console.log(` el: ${this.$el}`); console.log(this.$el); console.log(` data: ${this.$data}`); console.log(` message: ${this.message}`); }, beforeUpdate() { console.group("beforeUpdate"); console.log(` el: ${this.$el}`); console.log(this.$el); console.log(` data: ${this.$data}`); console.log(` message: ${this.message}`); }, updated() { console.group("updated"); console.log(` el: ${this.$el}`); console.log(this.$el); console.log(` data: ${this.$data}`); console.log(` message: ${this.message}`); }, beforeDestroy() { console.group("beforeDestroy"); console.log(` el: ${this.$el}`); console.log(this.$el); console.log(` data: ${this.$data}`); console.log(` message: ${this.message}`); }, destroyed() { console.group("destroyed"); console.log(` el: ${this.$el}`); console.log(this.$el); console.log(` data: ${this.$data}`); console.log(` message: ${this.message}`); }, methods: { update() { this.message = "update hello"; }, destory() { this.$destroy(); } }, components: { ChildLifeCycle } }; </script> <style></style> ``` ## create + mounted ![create+mounte](./images/create+mounte.png) 从上面的执行结果我们可以知道,`beforeCreate`和`created`,在这两个`hook`之间,`Vue`实例会进行事件初始化, 配置`Event`和`watch`,对`data`, `props`,`computed`进行数据观测(`data observer`)。此时,`$el`还不存在,但在`create`时`data`属性已经存在,所以,如果我们的数据不依赖`dom`,我们可以在这个`hook`中进行`API`数据获取。 从生命周期图和`console`上我们看出,在`create`时`this.$el`还是`undefined`,所以此处会等待`Vue`实例调用`vm.mounted($el)`,接着判断是否有`template`配置,有就使用`template`作为`render`函数,没有就通过编辑`outHTML`作为`template`,`render`函数选项 > `template`选项 > `outer HTML`。此时`mounted`中`el`,`data`都已经初始化了,当我们的数据对`DOM`有相对应的依赖时,我们可以在这个`hook`下进行数据请求。 `create`钩子数据请求`demo`: ![created-axios](./images/created-axios.png) ![axios-methods](./images/axios-methods.png) ## update + destory ![update+destory](./images/update+destory.png) `beforeDestroy`钩子函数在实例销毁之前调用。在这一步,实例仍然完全可用, this仍能获取到实例。 `destroyed`钩子函数在`Vue `实例销毁后调用。调用后,`Vue `实例指示的所有东西都会解绑定,所有的事件监听器会被移除,所有的子实例也会被销毁。组件上几乎没有任何东西。 与之相关的一切都被销毁了。 | 生命周期钩子 | 详细说明 | 使用场景 | | --------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | | `beforeCreate` | `Vue`: 在实例初始化之后,立即同步调用,在数据观察(`data observer`)和 `event/watcher` 配置之前被调用。<br />在组件的初始化时运行。 `data`尚未被反应,`event`尚未建立。 | 常用于初始化非响应式变量 | | `created` | `Vue`: 实例已经创建完成之后被调用。在这一步,实例已完成以下的配置:数据观测(`data observer`),属性和方法的运算, `watch/event `事件回调。然而,挂载阶段还没开始,`$el` 属性目前不可见。<br />在这个钩子中能够访问被动数据并且`event`处于活动状态。 模板和虚拟`DOM`尚未`mounted`或`render`。 | 简单的`ajax`请求,页面的初始化 | | `beforeMount` | `Vue`: 在挂载开始之前被调用:相关的 `render` 函数首次被调用。<br />`beforeMount hook`:在初始渲染发生之前以及编译模板或渲染函数之后运行。 | 很可能你永远不需要使用这个钩子。 | | `mounted` | `Vue` : 在实例挂载之后调用,其中 `el` 被新创建的 `vm.$el` 替代。如果 root 实例挂载了一个文档内元素,当 `mounted` 被调用时 `vm.$el` 也在文档内。<br />`mounted hook`,可以完全访问被动组件,模板和呈现的DOM(通过`this.$el`)。 `Mounted`是最常用的生命周期钩子。 | 通过`ajax`获取组件的数据(为此创建的用途)和修改`DOM`,通常用于集成非`Vue`库。 | | `beforeupdate` | `Vue`: 在 DOM 被 patch 之前调用数据修改。这是在 DOM 更新之前,访问已有 DOM 的最佳时机,例如,手动地移除之前添加的事件监听器。<br />`beforeUpdate hook`在组件上的数据更改和更新周期开始之后运行,就在`patched`和`re-render DOM`之前。 它允许您在组件实际呈现之前获取组件上任何被动数据的新状态。 | | | `updated` | `Vue`: 由于数据更改导致的虚拟 DOM 重新渲染和打补丁,在这之后会调用该钩子。当这个钩子被调用时,组件 DOM 已经更新,所以你现在可以执行依赖于 DOM 的操作。然而在大多数情况下,你应该避免在此期间更改状态。如果要相应状态改变,通常最好使用[计算属性](https://vue.docschina.org/v2/api/#computed)或 [watcher](https://vue.docschina.org/v2/api/#watch) 取而代之。 | 如果您需要在更改属性后访问`DOM`,这可能是最安全的地方。 | | `beforeDestroy` | 实例销毁之前调用。在这一步,实例仍然完全可用,this仍能获取到实例。 | 常用于销毁定时器、清理事件或者被动订阅、销毁插件对象等操作 | | `destroyed` | `Vue`: Vue 实例销毁后调用。调用后,Vue 实例指示的所有东西都会解绑定,所有的事件监听器会被移除,所有的子实例也会被销毁。<br />使用`destroyed`时,组件上几乎没有任何东西。 与之相关的一切都被销毁了。 | | `Note`: 1. `mounted`, `updated`不能确保所有子组件也被`mounted or updated `,如果你想要等到整个视图都渲染完毕,请使用`vm.$nextTick`: ```js mounted: function () { this.$nextTick(function () { // Code that will run only after the // entire view has been rendered }) } // or updated: function () { this.$nextTick(function () { // Code that will run only after the // entire view has been rendered }) } ``` 2. 在服务器端渲染期间不被调用: `beforeMount`, `mounted`,`beforeupdate`(在服务器端只执行初始渲染),`updated` ,`beforeDestroy`, `destroyed`
markdown
Sachin Dave, Former Senior Editor with The Economic Times (ET) has joined Thomson Reuters today as Asia Editor for Asian Legal Business (ALB), a platform aimed at corporate legal coverage. This newly created role will oversee the flagship ALB Asia title, along with ALB Japan and ALB India. ALB focusses on sharp news, features and opinions aimed at the corporate lawyers and those looking to keep abreast of the legal fraternity and the changes in the global law. Sachin was formerly senior editor with ET in Mumbai and was responsible for tracking corporate finance, consultancies, corporate law, digital economy and financial frauds. Prior to joining ET, Sachin has worked with organisations such as The Times of India, The Indian Express and Hindustan Times. As Asia Editor he will set the editorial agenda, assign and guide writers on stories, edit and proofread content, rewrite as needed. “The editor will oversee the production process and ensure deadlines are met. Responsibilities also include assisting in the production of videos and podcasts,” a Thomson Reuters job posting for the role said. Sachin has joined the team headed by Ranajit Dam. Ranajit Dam is the managing editor of Thomson Reuters’ Legal Media Group and is based in Singapore. He heads editorial teams with members based in India, Singapore, Hong Kong, Beijing and Manila. Thomson Reuters is said to be expanding its India presence drastically and has been roping in high profile journalists and editors.
english
<gh_stars>0 import { Database } from '../'; import { Model } from '../schema'; import { Subscriber } from './subscribers'; export type Action = | 'beforeCreate' | 'afterCreate' | 'beforeFindOne' | 'afterFindOne' | 'beforeFindMany' | 'afterFindMany' | 'beforeCount' | 'afterCount' | 'beforeCreateMany' | 'afterCreateMany' | 'beforeUpdate' | 'afterUpdate' | 'beforeUpdateMany' | 'afterUpdateMany' | 'beforeDelete' | 'afterDelete' | 'beforeDeleteMany' | 'afterDeleteMany'; export interface Params { select?: any; where?: any; _q?: any; orderBy?: any; groupBy?: any; offset?: any; limit?: any; populate?: any; data?: any; } export interface Event { action: Action; model: Model; params: Params; } export interface LifecycleProvider { subscribe(subscriber: Subscriber): () => void; clear(): void; run(action: Action, uid: string, properties: any): Promise<Map<any, any>>; run(action: Action, uid: string, properties: any, states: Map<any, any>): Promise<Map<any, any>>; createEvent(action: Action, uid: string, properties: any): Event; } export function createLifecyclesProvider(db: Database): LifecycleProvider;
typescript
/* * Copyright 2015, <NAME> & Tinbytes, Inc. * * 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.tinbytes.samples.showhidetoolbar; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.annotation.TargetApi; import android.os.Build; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.view.animation.LinearInterpolator; import android.widget.TextView; import com.tinbytes.samples.showhidetoolbar.util.AndroidUtils; import com.tinbytes.samples.showhidetoolbar.util.CityUtils; import com.tinbytes.samples.showhidetoolbar.util.HelpUtils; public class MainActivity extends AppCompatActivity { // The elevation of the toolbar when content is scrolled behind private static final float TOOLBAR_ELEVATION = 14f; // To save/restore recyclerview state on configuration changes private static final String STATE_RECYCLER_VIEW = "state-recycler-view"; private static final String STATE_VERTICAL_OFFSET = "state-vertical-offset"; private static final String STATE_SCROLLING_OFFSET = "state-scrolling-direction"; private static final String STATE_TOOLBAR_ELEVATION = "state-toolbar-elevation"; private static final String STATE_TOOLBAR_TRANSLATION_Y = "state-toolbar-translation-y"; // We need a reference to the toolbar for hide/show animation private Toolbar tToolbar; // We need a reference to the recyclerview to save/restore its state private RecyclerView rvCities; // Keeps track of the overall vertical offset in the list private int verticalOffset; // Determines the scroll UP/DOWN offset private int scrollingOffset; @TargetApi(Build.VERSION_CODES.LOLLIPOP) @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main_activity); // Assign Toolbar to the activity tToolbar = (Toolbar) findViewById(R.id.tToolbar); setSupportActionBar(tToolbar); getSupportActionBar().setTitle(R.string.app_name); // RecyclerView with sample data rvCities = (RecyclerView) findViewById(R.id.rvCities); rvCities.setLayoutManager(new LinearLayoutManager(this)); rvCities.setAdapter(new CitiesAdapter(CityUtils.CITIES)); if (savedInstanceState != null) { if (AndroidUtils.isLollipop()) { tToolbar.setElevation(savedInstanceState.getFloat(STATE_TOOLBAR_ELEVATION)); } tToolbar.setTranslationY(savedInstanceState.getFloat(STATE_TOOLBAR_TRANSLATION_Y)); verticalOffset = savedInstanceState.getInt(STATE_VERTICAL_OFFSET); scrollingOffset = savedInstanceState.getInt(STATE_SCROLLING_OFFSET); rvCities.getLayoutManager().onRestoreInstanceState(savedInstanceState.getParcelable(STATE_RECYCLER_VIEW)); } // We need to detect scrolling changes in the RecyclerView rvCities.addOnScrollListener(new RecyclerView.OnScrollListener() { @Override public void onScrollStateChanged(RecyclerView recyclerView, int newState) { if (newState == RecyclerView.SCROLL_STATE_IDLE) { if (scrollingOffset > 0) { if (verticalOffset > tToolbar.getHeight()) { toolbarAnimateHide(); } else { toolbarAnimateShow(verticalOffset); } } else if (scrollingOffset < 0) { if (tToolbar.getTranslationY() < tToolbar.getHeight() * -0.6 && verticalOffset > tToolbar.getHeight()) { toolbarAnimateHide(); } else { toolbarAnimateShow(verticalOffset); } } } } @Override public final void onScrolled(RecyclerView recyclerView, int dx, int dy) { verticalOffset = rvCities.computeVerticalScrollOffset(); scrollingOffset = dy; int toolbarYOffset = (int) (dy - tToolbar.getTranslationY()); tToolbar.animate().cancel(); if (scrollingOffset > 0) { if (toolbarYOffset < tToolbar.getHeight()) { if (verticalOffset > tToolbar.getHeight()) { toolbarSetElevation(TOOLBAR_ELEVATION); } tToolbar.setTranslationY(-toolbarYOffset); } else { toolbarSetElevation(0); tToolbar.setTranslationY(-tToolbar.getHeight()); } } else if (scrollingOffset < 0) { if (toolbarYOffset < 0) { if (verticalOffset <= 0) { toolbarSetElevation(0); } tToolbar.setTranslationY(0); } else { if (verticalOffset > tToolbar.getHeight()) { toolbarSetElevation(TOOLBAR_ELEVATION); } tToolbar.setTranslationY(-toolbarYOffset); } } } }); } @TargetApi(Build.VERSION_CODES.LOLLIPOP) @Override protected void onSaveInstanceState(Bundle outState) { if (AndroidUtils.isLollipop()) { outState.putFloat(STATE_TOOLBAR_ELEVATION, tToolbar.getElevation()); } outState.putFloat(STATE_TOOLBAR_TRANSLATION_Y, tToolbar.getTranslationY()); outState.putInt(STATE_VERTICAL_OFFSET, verticalOffset); outState.putInt(STATE_SCROLLING_OFFSET, scrollingOffset); outState.putParcelable(STATE_RECYCLER_VIEW, rvCities.getLayoutManager().onSaveInstanceState()); super.onSaveInstanceState(outState); } @TargetApi(Build.VERSION_CODES.LOLLIPOP) private void toolbarSetElevation(float elevation) { // setElevation() only works on Lollipop if (AndroidUtils.isLollipop()) { tToolbar.setElevation(elevation); } } private void toolbarAnimateShow(final int verticalOffset) { tToolbar.animate() .translationY(0) .setInterpolator(new LinearInterpolator()) .setDuration(180) .setListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { toolbarSetElevation(verticalOffset == 0 ? 0 : TOOLBAR_ELEVATION); } }); } private void toolbarAnimateHide() { tToolbar.animate() .translationY(-tToolbar.getHeight()) .setInterpolator(new LinearInterpolator()) .setDuration(180) .setListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { toolbarSetElevation(0); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main_menu, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.action_about: HelpUtils.showAbout(this); return true; } return super.onOptionsItemSelected(item); } /** * Cities adapter to hold sample data for our RecyclerView. */ static class CitiesAdapter extends RecyclerView.Adapter<CitiesAdapter.ViewHolder> { private String[] data; static class ViewHolder extends RecyclerView.ViewHolder { TextView tvName; ViewHolder(View v) { super(v); tvName = (TextView) v.findViewById(R.id.tvName); } } CitiesAdapter(String... data) { this.data = data; } @Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { return new ViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.city_item, parent, false)); } @Override public void onBindViewHolder(ViewHolder holder, int position) { holder.tvName.setText(data[position]); } @Override public int getItemCount() { return data.length; } } }
java
2018 - Everyone is a Hero is a Malayalam movie written and directed by Jude Anthony Joseph. The film features Asif Ali, Vineeth Sreenivasan, Aparna Balamurali, Kalaiyarasan, Narein, Lal, Indrans, Aju Varghese, Thanvi Ram, Shivada and Gauthami Nair. Touted to be as a disaster drama, it's a true depiction of Kerala floods 2018. The film is produced by Venu Kunnappilly, C K Padmakumar, Anton Joseph under the banner of Kavya Films. Nobin Paul will compose music for the film while Chamman Chacko is in charge of editor. The film was released in theaters on 5th May 2023. 2018 - Everyone, starring Tovino Thomas has been well-received by audiences since its release. The well-written screen play and visual effects are the major highlights of the movie. Actor Tovino Thomas stolen the audience hearts with his performance in the movie. 2018 has become the fastest Malayalam film to enter the coveted Rs 100 crore gross club after Romancham and Malikappuram. The film was released in theaters and had grossed more than 50 crores at the box office in the first nine days. As per the latest reports, Tovino Thomas-starrer survival drama '2018' will start streaming on SonyLiv from June 9, 2023.
english
WWE Hall of Famer Lita has parted ways with the WWE, according to Jim Ross. The former WWE announcer revealed on Twitter that he had spoken to Lita, who confirmed the news of her departure from the company. Here is the WWE Hall of Famer’s tweet: It seems WWE’s pre-show panel is all set to miss the legendary superstar’s presence in the time to come. We had earlier reported about WWE removing Lita and Jerry ‘The King' Lawler from the pre-show panel. When it comes to 'The King,' backstage sources claim he’s still with the company. Both Lita and Jerry Lawler have been working for the promotion under a legend’s contract; which is a non-wrestling deal offered to veteran names. After being inducted into the WWE Hall of Fame class of 2014, the former Women’s Champion transitioned into a coach’s role in Tough Enough’s sixth season alongside Billy Gunn and Booker T. She was later absorbed into the creative team of the company as a writer under a full-time contract. She was also used as a backstage liaison between talents and the management to facilitate a smooth flow of communication. Lita, who’s real name is Amy Dumas, made her television return on the pre-show of WrestleMania 32 to make a historic announcement. She announced the retirement of the now defunct WWE Divas’ Championship and unveiled the new WWE Women’s Championship. Ever since the monumental appearance, she’s been a regular fixture on the pre-shows of pay-per-views, RAW and SmackDown. Apart from her wrestling commitments, Lita is part of a band called The Luchagors. While her plans for the future are still under wraps and quite uncertain, a return to television can never be ruled out due to the unpredictable nature of WWE and pro wrestling as a whole. We wish one the revolutionary superstar the best of luck on her future endeavors. For latest WWE News, live coverage and rumours visit our Sportskeeda WWE section. Also if you are attending a WWE Live event or have a news tip for us drop us an email at fightclub (at) sportskeeda (dot) com.
english
"faculty": [ "nicai", "business", "arts", "edu", "eng", "law", "fmhs", "science", //Institutes and other groupings "abi", "compass", //really Arts, but they have a distinct figshare presence. "liggins", "nesi" ]
json
<filename>schema/Day.ts import { mongoose } from '../mongoose/connection'; import { Document, Model, Schema } from 'mongoose'; import { BuildingM, default as Building } from './Building'; import Hour, { HourC, HourM } from './Hour'; export class DayC { _id: String; date: Date; note: String; buildingId: String; hours: [HourC]; } const schema = new Schema({ date: { type: Date, required: true, }, note: { type: String, required: false, }, buildingId: { type: Schema.Types.ObjectId, required: false, }, _id: { type: Schema.Types.ObjectId, required: false, }, }); export interface IDay extends Document, DayC {} export interface IDayModel {} export type DayModel = Model<IDay> & IDayModel & IDay; export const DayM: DayModel = <DayModel>mongoose.model<IDay>( 'Day', schema, 'day', ); const Day = ` type Day{ _id:String, date:String, note:String, building:Building, hours(dayId: String):[Hour] } type DayPaginated{ page:Int, pageSize:Int, content:[Day] } `; export const DayResolver = { RootQuery: { async days(_, { buildingId, page, pageSize }) { return await { page, pageSize, content: DayM.find( { buildingId }, {}, { skip: pageSize * page, limit: pageSize }, ), }; }, async day(_, { buildingId, date }) { console.log(date); return await DayM.findOne({ buildingId, date }); }, }, Day: { async building(day: DayC) { return await BuildingM.findOne({ _id: day.buildingId }); }, async hours(day: DayC) { return await HourM.find({ dayId: day._id }); }, }, }; export default () => [Day, Building, Hour];
typescript
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import types import sys from mecabwrap.api import tokenize, str_token, mecab_batch, mecab_batch_iter, Token, MecabTokenizer class TestTokenize(unittest.TestCase): def test_tokenize(self): tokens = tokenize(u'すもももももももものうち') words = [a.surface for a in tokens] self.assertEqual( words, [u'すもも', u'も', u'もも', u'も', u'もも', u'の', u'うち'] ) class TestBatch(unittest.TestCase): def test_batch(self): x = [u"明日は晴れるかな", u"雨なら読書をしよう"] y = mecab_batch(x) self.assertEqual(len(x), len(y)) for a in y: self.assertEqual(type(a), list) for b in a: self.assertEqual(type(b), Token) def test_format(self): x = [u"明日は晴れるかな", u"雨なら読書をしよう"] y = mecab_batch(x, format_func=lambda x: x.surface) z = [[u"明日", u"は", u"晴れる", u"か", u"な"], [u"雨", u"なら", u"読書", u"を", u"しよ", u"う"]] for a, b in zip(y, z): for c, d in zip(a, b): self.assertEqual(c, d, msg=u"`{}` v `{}`".format(c, d)) def test_filter(self): x = [u"明日は晴れるかな", u"雨なら読書をしよう"] y = mecab_batch(x, format_func=lambda x: x.surface, pos_filter=(u"名詞", u"動詞")) z = [[u"明日", u"晴れる"], [u"雨", u"読書", u"しよ"]] for a, b in zip(y, z): for c, d in zip(a, b): self.assertEqual(c, d, msg=u"`{}` v `{}`".format(c, d)) y = mecab_batch(x, format_func=lambda x: x.surface, pos_filter=(u"名詞", u"動詞"), filter_func=lambda x: len(x.surface)==2) z = [[u"明日"], [u"読書", u"しよ"]] for a, b in zip(y, z): for c, d in zip(a, b): self.assertEqual(c, d, msg=u"`{}` v `{}`".format(c, d)) def test_batch_iter(self): x = [u"明日は晴れるかな", u"雨なら読書をしよう"] y = mecab_batch(x) z = mecab_batch_iter(x) self.assertEqual(type(z), types.GeneratorType) for a, b in zip(y, z): self.assertEqual(len(a), len(b)) for c, d in zip(a, b): self.assertEqual(c, d, msg=u"`{}` v `{}`".format(c, d)) def test_tokenizer(self): x = [u"明日は晴れるかな", u"雨なら読書をしよう"] tokenizer = MecabTokenizer(format_func=lambda x: x.surface) y = tokenizer.transform(x) self.assertEqual(type(y), list) z = [[u"明日", u"は", u"晴れる", u"か", u"な"], [u"雨", u"なら", u"読書", u"を", u"しよ", u"う"]] for a, b in zip(y, z): for c, d in zip(a, b): self.assertEqual(c, d, msg=u"`{}` v `{}`".format(c, d)) tokenizer = MecabTokenizer(format_func=lambda x: x.surface, return_generator=True) y = tokenizer.transform(x) self.assertEqual(type(y), types.GeneratorType) z = [[u"明日", u"は", u"晴れる", u"か", u"な"], [u"雨", u"なら", u"読書", u"を", u"しよ", u"う"]] for a, b in zip(y, z): for c, d in zip(a, b): self.assertEqual(c, d, msg=u"`{}` v `{}`".format(c, d)) def test_auto_separators(self): x = [u"テスト" + chr(1) + u"です" + chr(2), chr(2) + u"文頭のケース", u"文末のケース" + chr(2), u"文中" + chr(1) + u"のケース"] y = mecab_batch(x) self.assertEqual(len(y), 4) if __name__ == '__main__': unittest.main()
python
{ "extends": ["tslint:latest", "tslint-react"], "linterOptions": { "exclude": ["node_modules/**/*.ts"] }, "rules": { "object-literal-sort-keys": false, "jsx-no-lambda": false, "eofline": false, "no-consecutive-blank-lines": false, "no-var-requires": false, "quotemark": false, "space-within-parents": false, "no-submodule-imports": false, "no-implicit-dependencies": false, "ordered-imports": [false], "jsx-boolean-value": false, "no-trailing-whitespace": false, "semicolon": false, "trailing-comma": false, "space-in-parents": false, "typedef-whitespace": [false], "whitespace": [true], "interface-over-type-literal": true, "no-duplicate-imports": false, "no-namespace": true, "no-internal-module": true, "interface-name": false, "member-ordering": false, "no-console": false, "prefer-const": true, "no-string-literal": false, "object-shorthand": ["error", "never"] } }
json
Four non-Congress Opposition chief ministers on Saturday rallied behind Chief Minister Arvind Kejriwal in New Delhi, whose sit-in protest against Lieutenant Governor Anil Baijal entered the sixth day. The chief ministers of Andhra Pradesh, West Bengal, Kerala and Karnataka urged the Centre to “rise above politics”, solve the “constitutional crisis” and not “restrict the federal system”. A day before the NITI Aayog meeting Sunday, which Prime Minister Narendra Modi will chair, West Bengal Chief Minister Mamata Banerjee joined hands with Kerala CM Pinarayi Vijayan, Andhra CM N Chandrababu Naidu and Karnataka Chief Minister M Kumaraswamy to address a press conference at Kejriwal’s residence in New Delhi. They also said they would speak to Modi during tea at the NITI Aayog meeting and ask for the issue to be solved. The open support of four CMs for Kejriwal is also a significant signal for the Congress, which hopes to anchor the anti-BJP opposition at the national level. So far, the Congress has been critical of the AAP and Kejriwal’s sit-in protest in New Delhi, where it hopes to make a political comeback. Before arriving at Kejriwal’s residence Saturday evening, the four CMs were not given permission to meet either the Delhi CM or Lt Governor and sources said that they were discussing the NITI Aayog meeting, the ongoing situation at Delhi and the upcoming elections for the deputy chairperson for the Rajya Sabha, a post that will be vacated on June 30. “The TMC is likely to float a candidate and will look for support from other parties. This is usually a seat that goes with the Opposition. But this time, there is an effort to send a non-Congress, non-BJP leader to the post,” said a source. Banerjee demanding that the Centre give respect to the mandate given by Delhi’s citizens, “This is a constitutional crisis. But there should never be such crisis due to which a government and the common people have to suffer… there are two crore people in Delhi… L-G is the appointed leader, if not he then to with who will one to go to seek time and talk? ” she said. While Banerjee, Vijayan and Naidu are CM’s who AAP has been in touch with, sources confirmed that Kumaraswamy had only recently established contact with Kejriwal. “We came to support the Delhi CM, save the democratic system. We demand that the PM should interfere in the issue and take steps to solve the problem. The Central government must immediately resolve the problem,” Kumaraswamy said. While Kumaraswamy, whose government in Karnataka depends on Congress support, has used this opportunity to send a signal to the Congress of its autonomy at the national level, the coming together of four CMs, holds significance in the wake of political realignment at the national level against the ruling BJP. The unity on display Saturday also signals TMC chief Mamata Banerjee’s strong position against the Congress’s claim to lead the Opposition against the BJP at the national level. Her decision to join a chief minister of a state (Kerala) ruled by CPM, which is pitted in a bitter battle against the TMC in West Bengal underscored her message to the Congress.
english
#include "bench/Session.h" #include "objects/containers/FlatMap.h" #include <map> using namespace Sph; template <typename TMap> static void benchmarkMap(TMap& map, Benchmark::Context& context) { std::hash<int> hash; constexpr int num = 10000; while (context.running()) { Size sum = 0; for (Size i = 0; i < num; ++i) { Benchmark::doNotOptimize(sum += map[hash(i) % map.size()]); } Benchmark::clobberMemory(); } } BENCHMARK("std::map 10", "[flatmap]", Benchmark::Context& context) { std::map<int, std::size_t> map; for (Size i = 0; i < 10; ++i) { map.insert({ i, std::hash<int>{}(i) }); } benchmarkMap(map, context); } BENCHMARK("Sph::Map 10", "[flatmap]", Benchmark::Context& context) { FlatMap<int, std::size_t> map; for (Size i = 0; i < 10; ++i) { map.insert(i, std::hash<int>{}(i)); } benchmarkMap(map, context); } BENCHMARK("std::map 100", "[flatmap]", Benchmark::Context& context) { std::map<int, std::size_t> map; for (Size i = 0; i < 100; ++i) { map.insert({ i, std::hash<int>{}(i) }); } benchmarkMap(map, context); } BENCHMARK("Sph::Map 100", "[flatmap]", Benchmark::Context& context) { FlatMap<int, std::size_t> map; for (Size i = 0; i < 100; ++i) { map.insert(i, std::hash<int>{}(i)); } benchmarkMap(map, context); } BENCHMARK("std::map 1000", "[flatmap]", Benchmark::Context& context) { std::map<int, std::size_t> map; for (Size i = 0; i < 1000; ++i) { map.insert({ i, std::hash<int>{}(i) }); } benchmarkMap(map, context); } BENCHMARK("Sph::Map 1000", "[flatmap]", Benchmark::Context& context) { FlatMap<int, std::size_t> map; for (Size i = 0; i < 1000; ++i) { map.insert(i, std::hash<int>{}(i)); } benchmarkMap(map, context); } BENCHMARK("std::map 10000", "[flatmap]", Benchmark::Context& context) { std::map<int, std::size_t> map; for (Size i = 0; i < 10000; ++i) { map.insert({ i, std::hash<int>{}(i) }); } benchmarkMap(map, context); } BENCHMARK("Sph::Map 10000", "[flatmap]", Benchmark::Context& context) { FlatMap<int, std::size_t> map; for (Size i = 0; i < 10000; ++i) { map.insert(i, std::hash<int>{}(i)); } benchmarkMap(map, context); }
cpp
<reponame>krmbzds/nyzo-verifier-docker package co.nyzo.verifier.messages; import co.nyzo.verifier.*; import co.nyzo.verifier.util.PrintUtil; import java.nio.ByteBuffer; public class PreviousHashResponse implements MessageObject { private long height; private byte[] hash; public PreviousHashResponse() { height = BlockManager.getFrozenEdgeHeight(); Block frozenEdge = BlockManager.frozenBlockForHeight(height); if (frozenEdge == null) { hash = new byte[FieldByteSize.hash]; } else { hash = frozenEdge.getHash(); } } public PreviousHashResponse(long height, byte[] hash) { this.height = height; this.hash = hash; } public long getHeight() { return height; } public byte[] getHash() { return hash; } @Override public int getByteSize() { return FieldByteSize.blockHeight + FieldByteSize.hash; } @Override public byte[] getBytes() { byte[] result = new byte[getByteSize()]; ByteBuffer buffer = ByteBuffer.wrap(result); buffer.putLong(height); buffer.put(hash); return result; } public static PreviousHashResponse fromByteBuffer(ByteBuffer buffer) { PreviousHashResponse result = null; try { long height = buffer.getLong(); byte[] hash = new byte[FieldByteSize.hash]; buffer.get(hash); result = new PreviousHashResponse(height, hash); } catch (Exception ignored) { ignored.printStackTrace(); } return result; } @Override public String toString() { return "[PreviousHashResponse(height=" + height + ", hash=" + PrintUtil.compactPrintByteArray(hash) + "]"; } }
java
<gh_stars>0 { "userRole": { "customer": "customer", "staff": "staff", "systemAdministrator": "systemAdmin" }, "loginChannel": { "normal": "normal", "facebook": "facebook", "google": "google" } }
json
<reponame>hyunjoy/scripts<gh_stars>10-100 # Arguments listed in the doc comment must exist in the actual schema ## # @foo: # @a: a # @b: b ## { 'command': 'foo', 'data': {'a': 'int'} }
json
<reponame>pretty-wise/link<gh_stars>0 /* * Copywrite 2014-2015 <NAME>. All rights reserved. */ #include "monitor_plugin.h" #include "base/io/base_file.h" #include "common/json/json_writer.h" #include "link/plugin_log.h" #include "base/core/time_utils.h" #include "base/core/assert.h" #include <unistd.h> namespace Link { static const streamsize kProcBufferSize = 1024; struct CPUSample { u32 timestamp; // sample time. u32 user; // normal processes executing in user mode. u32 nice; // niced processes executing in user mode. u32 system; // processes executing in krenel mode. u32 idle; // twiddling thumbs. u32 iowait; // waiting for I/O to complete. u32 irq; // servicing interrupts. u32 softirq; // servicing softirqs. void InitMax() { timestamp = (u32)-1; user = (u32)-1; nice = (u32)-1; system = (u32)-1; idle = (u32)-1; iowait = (u32)-1; irq = (u32)-1; softirq = (u32)-1; } void GetMax(const CPUSample &a) { if(a.timestamp > timestamp) timestamp = a.timestamp; if(a.user > user) user = a.user; if(a.nice > nice) nice = a.nice; if(a.system > system) system = a.system; if(a.idle > idle) idle = a.idle; if(a.iowait > iowait) iowait = a.iowait; if(a.irq > irq) irq = a.irq; if(a.softirq > softirq) softirq = a.softirq; } void GetMin(const CPUSample &a) { if(a.timestamp < timestamp) timestamp = a.timestamp; if(a.user < user) user = a.user; if(a.nice < nice) nice = a.nice; if(a.system < system) system = a.system; if(a.idle < idle) idle = a.idle; if(a.iowait < iowait) iowait = a.iowait; if(a.irq < irq) irq = a.irq; if(a.softirq < softirq) softirq = a.softirq; } CPUSample &operator+=(const CPUSample &rhs) { timestamp += rhs.timestamp; user += rhs.user; nice += rhs.nice; system += rhs.system; idle += rhs.idle; iowait += rhs.iowait; irq += rhs.irq; softirq += rhs.softirq; return *this; } }; struct ProcessSample { u32 timestamp; u32 user; u32 system; }; float ToPercent(u32 stat, u32 time, u32 hz) { float dt_sec = static_cast<float>(time) * 0.001f; float denom = dt_sec * static_cast<float>(hz); if(denom == 0.f) { return 0.f; } return static_cast<float>(stat) / denom; } struct ProcessPercent { float user; float system; void Calculate(const ProcessSample &delta, u32 hz) { user = ToPercent(delta.user, delta.timestamp, hz); system = ToPercent(delta.system, delta.timestamp, hz); } }; template <> inline void JsonWriter::AppendValue(const ProcessPercent &info) { JsonWriter writer(m_destination); writer.Write("user", info.user); writer.Write("system", info.system); writer.Finalize(); } struct ProcessHistory { u32 num_samples; u32 current_sample; ProcessSample *data; ProcessHistory() : num_samples(0), current_sample(0), data(nullptr) {} ~ProcessHistory() { delete[] data; } void Resize(u32 _num_samples) { BASE_ASSERT(_num_samples > 0); num_samples = _num_samples; current_sample = 0; delete[] data; data = new ProcessSample[num_samples]; } ProcessSample *GetNextSample() { BASE_ASSERT(current_sample < num_samples, "sample out of range"); ProcessSample *res = &data[current_sample]; current_sample = (++current_sample) % num_samples; return res; } void LastSampleStats(u32 tick_per_sec, ProcessPercent *out) { ProcessSample diff; Diff(data[(current_sample - 1) % num_samples], data[(current_sample - 2) % num_samples], &diff); out->Calculate(diff, tick_per_sec); } void Diff(const ProcessSample &a, const ProcessSample &b, ProcessSample *res) { res->user = a.user - b.user; res->system = a.system - b.system; } }; struct CPUPercent { float user; float nice; float system; float idle; float iowait; float irq; float softirq; void InitMax() { user = 1.f; nice = 1.f; system = 1.f; idle = 1.f; iowait = 1.f; irq = 1.f; softirq = 1.f; } void GetMin(const CPUPercent &d) { if(d.user < user) user = d.user; if(d.nice < nice) nice = d.nice; if(d.system < system) system = d.system; if(d.idle < idle) idle = d.idle; if(d.iowait < iowait) iowait = d.iowait; if(d.irq < irq) irq = d.irq; if(d.softirq < softirq) softirq = d.softirq; } void GetMax(const CPUPercent &d) { if(d.user > user) user = d.user; if(d.nice > nice) nice = d.nice; if(d.system > system) system = d.system; if(d.idle > idle) idle = d.idle; if(d.iowait > iowait) iowait = d.iowait; if(d.irq > irq) irq = d.irq; if(d.softirq > softirq) softirq = d.softirq; } void Calculate(const CPUSample &delta, u32 hz) { user = ToPercent(delta.user, delta.timestamp, hz); nice = ToPercent(delta.nice, delta.timestamp, hz); system = ToPercent(delta.system, delta.timestamp, hz); idle = ToPercent(delta.idle, delta.timestamp, hz); iowait = ToPercent(delta.iowait, delta.timestamp, hz); irq = ToPercent(delta.irq, delta.timestamp, hz); softirq = ToPercent(delta.softirq, delta.timestamp, hz); } }; template <> inline void JsonWriter::AppendValue(const CPUPercent &info) { JsonWriter writer(m_destination); writer.Write("user", info.user); writer.Write("nice", info.nice); writer.Write("system", info.system); writer.Write("idle", info.idle); writer.Write("iowait", info.iowait); writer.Write("irq", info.irq); writer.Write("softirq", info.softirq); writer.Finalize(); } struct CPUHistory { u32 num_samples; u32 current_sample; struct CPUSample *data; struct CPUPercent min, max, avg; CPUHistory() : num_samples(0), current_sample(0), data(0) {} ~CPUHistory() { delete[] data; } void Resize(u32 _num_samples) { BASE_ASSERT(_num_samples > 0); num_samples = _num_samples; current_sample = 0; delete[] data; data = new CPUSample[num_samples]; } CPUSample *GetNextSample() { BASE_ASSERT(current_sample < num_samples, "sample out of range"); CPUSample *res = &data[current_sample]; current_sample = (++current_sample) % num_samples; return res; } void LastSampleStats(u32 tick_per_sec, CPUPercent *out) { CPUSample diff; Diff(data[(current_sample - 1) % num_samples], data[(current_sample - 2) % num_samples], &diff); out->Calculate(diff, tick_per_sec); } void Calculate(u32 tick_per_sec) { CPUSample sum = {}, diff; min.InitMax(); for(u32 i = 0; i < num_samples; ++i) { Diff(data[(i - 1) % num_samples], data[(i - 2) % num_samples], &diff); sum += diff; CPUPercent tmp; tmp.Calculate(diff, tick_per_sec); min.GetMin(tmp); max.GetMax(tmp); } avg.Calculate(sum, tick_per_sec); } void Diff(const CPUSample &a, const CPUSample &b, CPUSample *res) { res->timestamp = a.timestamp - b.timestamp; res->user = a.user - b.user; res->nice = a.nice - b.nice; res->system = a.system - b.system; res->idle = a.idle - b.idle; res->iowait = a.iowait - b.iowait; res->irq = a.irq - b.irq; res->softirq = a.softirq - b.softirq; } }; template <> inline void JsonWriter::AppendValue(const CPUSample &info) { JsonWriter writer(m_destination); writer.Write("timestamp", info.timestamp); writer.Write("user", info.user); writer.Write("nice", info.nice); writer.Write("system", info.system); writer.Write("idle", info.idle); writer.Write("iowait", info.iowait); writer.Write("irq", info.irq); writer.Write("softirq", info.softirq); writer.Finalize(); } char *GoToNextValue(char *cur) { // skip current value. while(*cur != ' ' && *cur != '\t') { ++cur; } // skip whitespaces. while(*cur == ' ' || *cur == '\t') { ++cur; } return cur; } char *GoToNextLine(char *cur) { while(*cur != '\n' && *cur != 0) { ++cur; } if(*cur == '\n') { ++cur; } return cur; } bool ReadCPUStatus(char *&pointer, struct CPUSample *stats, u32 timestamp) { // field definition: http://man7.org/linux/man-pages/man5/proc.5.html if(pointer[0] != 'c' || pointer[1] != 'p' || pointer[2] != 'u') { return false; } stats->timestamp = timestamp; pointer = GoToNextValue(pointer); Base::String::FromString(pointer, stats->user); pointer = GoToNextValue(pointer); Base::String::FromString(pointer, stats->nice); pointer = GoToNextValue(pointer); Base::String::FromString(pointer, stats->system); pointer = GoToNextValue(pointer); Base::String::FromString(pointer, stats->idle); pointer = GoToNextValue(pointer); Base::String::FromString(pointer, stats->iowait); pointer = GoToNextValue(pointer); Base::String::FromString(pointer, stats->irq); pointer = GoToNextValue(pointer); Base::String::FromString(pointer, stats->softirq); pointer = GoToNextLine(pointer); return true; } bool ReadCPUStats(struct CPUHistory *total, struct CPUHistory **cpu, int num_cpu) { Base::FileHandle file = Base::Open("/proc/stat", Base::OM_Read); if(file == -1) { PLUGIN_ERROR("failed opeining proc stat"); return false; } char buffer[kProcBufferSize]; size_t nbytes = Base::Read(file, buffer, kProcBufferSize); if(nbytes == static_cast<size_t>(-1)) { PLUGIN_ERROR("problem reading proc stat"); return false; } u32 timestamp = Base::Time::GetTimeMs(); char *pointer = buffer; if(!ReadCPUStatus(pointer, total->GetNextSample(), timestamp)) { PLUGIN_ERROR("problem reading cpu stats"); Base::Close(file); return false; } for(int i = 0; i < num_cpu; ++i) { if(!pointer || !ReadCPUStatus(pointer, cpu[i]->GetNextSample(), timestamp)) { PLUGIN_ERROR("problem reading %d cpu stats", i); Base::Close(file); return false; } } Base::Close(file); return true; } bool ReadProcessStats(struct ProcessHistory *hist) { Base::FileHandle file = Base::Open("/proc/self/stat", Base::OM_Read); char buffer[kProcBufferSize]; size_t nbytes = Base::Read(file, buffer, kProcBufferSize); if(nbytes == static_cast<size_t>(-1)) { PLUGIN_ERROR("problem reading proc stat"); return false; } char *pointer = buffer; for(int i = 0; i < 13; ++i) { pointer = GoToNextValue(pointer); } ProcessSample *sample = hist->GetNextSample(); Base::String::FromString(pointer, sample->user); pointer = GoToNextValue(pointer); Base::String::FromString(pointer, sample->system); Base::Close(file); return true; } struct CPUStatsCmd::PIMPL { u32 m_num_cpu; // number of processors u32 m_ticks_per_sec; // clock speed. ProcessHistory m_process; // process stat data. CPUHistory m_total; // all cpu stat data. CPUHistory *m_cpu; // stat data per cpu. u32 m_last_read_time; // last time stats were read. bool m_error; // true if there was a processing error PIMPL(u32 sample_count) : m_error(false) { m_num_cpu = sysconf(_SC_NPROCESSORS_ONLN); m_ticks_per_sec = sysconf(_SC_CLK_TCK); m_cpu = new CPUHistory[m_num_cpu]; m_total.Resize(sample_count); for(u32 i = 0; i < m_num_cpu; ++i) { m_cpu[i].Resize(sample_count); } m_process.Resize(sample_count); // init stats. ReadStats(); } ~PIMPL() { delete[] m_cpu; } void ReadStats() { ReadCPUStats(&m_total, &m_cpu, m_num_cpu); ReadProcessStats(&m_process); m_last_read_time = Base::Time::GetTimeMs(); } void Recalculate() { m_total.Calculate(m_ticks_per_sec); for(u32 i = 0; i < m_num_cpu; ++i) { m_cpu[i].Calculate(m_ticks_per_sec); } } }; CPUStatsCmd::CPUStatsCmd() { u32 sample_count = 10; m_pimpl = new PIMPL(sample_count); } CPUStatsCmd::~CPUStatsCmd() { delete m_pimpl; } void CPUStatsCmd::Sample() {} bool CPUStatsCmd::OnCommand(const std::string &query_string, const std::string &post_data, std::string *response_data) { u32 prev_read_time = m_pimpl->m_last_read_time; m_pimpl->ReadStats(); m_pimpl->Recalculate(); CPUPercent total; m_pimpl->m_total.LastSampleStats(m_pimpl->m_ticks_per_sec, &total); ProcessPercent process; m_pimpl->m_process.LastSampleStats(m_pimpl->m_ticks_per_sec, &process); JsonWriter writer(*response_data); writer.Write("platform", "linux"); writer.Write("error", m_pimpl->m_error); writer.Write("cpu_num", m_pimpl->m_num_cpu); writer.Write("ticks_per_sec", m_pimpl->m_ticks_per_sec); writer.Write("timestamp", m_pimpl->m_last_read_time); writer.Write("timeslice", m_pimpl->m_last_read_time - prev_read_time); writer.Write("total", total); writer.Write("process", process); writer.Finalize(); return true; } } // namespace Link
cpp
Everybody has a damn iPhone app nowadays, and why should NCAA programs be any different? Row27 Studios, a design firm that has 58 NCAA clients including the Cal Bears, UNC Tar Heels and Florida Gators, has begun to fill that void. They’ve created an iPhone app that is perfect for University sports programs, and provides them with a way of reaching their fans through the mobile device we all know and love (or not). They launched their first app for the University of Kansas Jayhawks, and it boasts great features such as live scoring, RSS feeds of team news and a couple cool minigames to occupy you during half-time. The Kansas Jayhawks app is just the first iteration of this platform, which can be re-purposed for any other NCAA sports program. According to Creative Director Jonathan Dusing, due to Row27’s close relationships with other NCAA sports teams, their iPhone app will probably soon be appear under many other college sports names. Perhaps even more interesting than the launch of the app is the fact that Row27 didn’t spend a dime of its own money on development. The app was built as a custom project for Kansas University and Row27 managed to keep the rights to re-purpose the same application for other college sports teams. Besides being a great way to run a business, it also means that no other sports team has to take the risk KU did when requesting development of the app. Granted, KU bit the bullet – but they also got the special attention of getting to decide all the features and the specifics of the app themselves. It’s a win-win. The app itself is pretty cool. Besides features that are available elsewhere such as live scoring and in-depth game-by-game statistics for all major sports, the app also has tons of additional features perfect for a University-specific sports application. For example, you can chat with other KU fans within the app – a great way to ask questions such as “What’s the best happy hour after the game” or “How do we make sure Cal doesn’t upset us during our game tomorrow?” Furthermore, it’s connected to KU’s news feeds so fans can get all of the sports news their hearts desire. But one of the real benefits is for fringe sports – if you’re interested in Volleyball, Soccer, Softball and Baseball, it can be hard to get real-time sports statistics at the collegiate level on mobile. Because this is a University-sanctioned application, Row27’s app can provide data that no other application can. They are integrated to the standard NCAA statistics management system (Stat Crew) so they can stream statistics for any game that have live statistics. It’ll be interesting to see if such turn-key branded applications do well on the App Store. With football season gone, it may be a while until the Kansas Jayhawks app will do a couple thousand sales, but I have no doubt that you’ll soon see branded apps across most NCAA programs. It’s just a matter of time.
english
<HTML><HEAD> <TITLE>Review for Moulin Rouge! (2001)</TITLE> <LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css"> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1 ALIGN="CENTER" CLASS="title"><A HREF="/Title?0203009">Moulin Rouge! (2001)</A></H1><H3 ALIGN=CENTER>reviewed by<BR><A HREF="/ReviewsBy?Shane+Burridge"><NAME></A></H3><HR WIDTH="40%" SIZE="4"> <PRE>Moulin Rouge (2001) 126m.</PRE> <P>There's a windmill that keeps popping up in MOULIN ROUGE every few minutes. It's not central to the plot: it's just there, decked out with pretty lights, turning around in circles and going nowhere. It's probably as good a metaphor for MOULIN ROUGE as any, although I'm tempted to think that director <NAME> originally intended it as a jokey aside to the Quixotic nature of his brash new undertaking. You will either love or hate MOULIN ROGUE, or more likely both. There's much that is wonderful and dynamic, and just as much that is irritating or hackneyed. There's certainly not much in the storyline: Ewan McGregor plays a would-be bohemian writer visiting Paris at the turn of the 20th century, where he becomes besotted with Satine (<NAME>), the star attraction of the infamous Moulin Rouge nightclub. The fate of the nightclub is in the hands of an unscrupulous Duke (<NAME>burgh) who also has his eye on Satine and will brook no competition from the lovesick McGregor.</P> <P>It took me a while to figure out exactly what Luhrmann was trying to do with MOULIN ROUGE. It's a natural, if predictable, progression from his previous two films STRICTLY BALLROOM and ROMEO + JULIET but at first glance seeks only to amplify them. It wasn't until the melodrama of the film's final reel that I remembered its great opening credits, and realized that MOULIN ROUGE is intended to be a silent film - with music. Luhrmann, who I suspect would be quite pleased to become heir apparent to the throne of Postmodern Cinema, throws every reference, in-joke and quotation imaginable into what he determines to be the 21st Century version of the Musical, a genre that was pretty much defunct after the 60s. It would not suit the viewing sensibilities of modern audiences to play the story straight, as would have been done in the days of Judy Garland or <NAME>, so instead Luhrmann chooses to be campy and flippant. This makes the film great fun, but also repeats the inconsistency of his previous ROMEO + JULIET: MOULIN ROUGE immerses us in a totally artificial (i.e. distinctly cinematic) world with over-the-top characters and then expects us to feel genuine emotion for them at the end simply by descending into pathos.</P> <P>The death scene, a less successful rehash of R+J, is tiresome, but not as tiresome as the film's other patent flaw. Luhrmann is a talented director with a wayward sense of humor, but in MOULIN ROUGE he has only one joke and it is repeated ad nauseam. Worse, it is that laziest recourse of humor, the anachronism joke. It first happens a few minutes into the film when Ewan McGregor bursts into a rendition of 'The Sound of Music'. It's a forgivable gag when it occurs, because it points out to us the direction the rest of the movie is heading. Twenty minutes later, when it becomes apparent that the characters are not going to stop quoting song lyrics as if they were prose, the joke has worn thin (and reminds us that Luhrmann had a better writer for his earlier picture!). It also raises some confusion - there is a specific audience that will be of the right age to recognize the quotes (mostly from 1970s tunes) so the spoofy nature of the dialogue will be lost on many viewers. It's one thing to have Prince's 'When Doves Cry' reformatted for choirboys in ROMEO + JULIET, but another to have McGregor and Kidman spouting <NAME>upin lyrics as if they were poetry and talking in conversations made up entirely of lines from <NAME>, David Bowie, The Sweet, Wings, and other artists. This might be the stuff of Postmodernism but it's also a depressing reminder that a number of new film-makers are cannibalistic: they don't make movies based on books any more, they make movies based on other movies. Just to show how intertextual Luhrmann gets, Kidman's opening scene starts with her belting out 'Diamonds are a Girl's Best Friend', which is abruptly interrupted by a phrase from Madonna's 'Material Girl'. Why? Because the original Madonna video clip was itself a parody of the 'Diamonds' number from the film GENTLEMEN PREFER BLONDES. At this stage Luhrmann isn't even making a movie based on a movie, but a movie based on a film clip based on a movie. In the end, MOULIN ROUGE is left strutting its stuff like a Frankenstein monster covered in glitter.</P> <P>Despite this pot-pourri approach, MOULIN ROUGE still manages to be refreshing and original. This doesn't mean it's an original musical - the songs are well-known pop tunes that have been incorporated, mostly for humorous effect, into the storyline. I don't have any complaint with this because it wasn't uncommon for musicals of the past to be made in a similar style, with tunes cobbled together from the likes of Gershwin, Porter and Berlin to ensure good box-office - even the classic SINGING IN THE RAIN is made up of songs taken from other films. When it comes down to the bottom line, only one question needs to be asked: is this film worth seeing? The answer is yes. The high points outnumber the flaws (or, more likely, overwhelm them) and it is a gloriously cinematic spectacle which deserves to be seen and especially heard in a theater. It outdoes everything Luhrmann has done to date, and while it may not be as cohesive as his earlier work it at least seems to have been the film he has always wanted to make. Besides, anything featuring a cameo of pop princess <NAME> as a hallucinatory green fairy has got to be worth checking out.</P> <P><A HREF="mailto:<EMAIL><HR>Get"><EMAIL><HR>Get</A> Your Private, Free E-mail from MSN Hotmail at <A HREF="http://www.hotmail.com.">http://www.hotmail.com.</A></P> <HR><P CLASS=flush><SMALL>The review above was posted to the <A HREF="news:rec.arts.movies.reviews">rec.arts.movies.reviews</A> newsgroup (<A HREF="news:de.rec.film.kritiken">de.rec.film.kritiken</A> for German reviews).<BR> The Internet Movie Database accepts no responsibility for the contents of the review and has no editorial control. Unless stated otherwise, the copyright belongs to the author.<BR> Please direct comments/criticisms of the review to relevant newsgroups.<BR> Broken URLs inthe reviews are the responsibility of the author.<BR> The formatting of the review is likely to differ from the original due to ASCII to HTML conversion. </SMALL></P> <P ALIGN=CENTER>Related links: <A HREF="/Reviews/">index of all rec.arts.movies.reviews reviews</A></P> </P></BODY></HTML>
html
A former Union minister and veteran parliamentarian, Loktantrik Janata Dal (LJD) chief Sharad Yadav is recovering, his daughther Subhashini Raj Rao said in her statement. By Poulomi Saha: Sharad Yadav, former Union minister is stable and recovering in the hospital, his daughter Subhashini Raj Rao said in a statement on Thursday. A veteran parliamentarian, Yadav has been elected to the Lok Sabha seven times and to the Rajya Sabha thrice. "My father Shri Sharad Yadav, former Union Minister has been unwell for quite some time. I would like to inform that he is stable and is being recovered in the hospital," the statement by his daughter said. It went on to add, "I am sure that he would return home with your blessings and prayers and of course his own will power. As you are aware, he is a fighter and has been fighting from the beginning of his political career for the welfare of the people of this country especially for the upliftment of underprivileged classes of the society. " "I am indebted to the Hon'ble Prime Minister Sh Narendra Modi, Shri Amit Shah, Hon'ble Home Minister, and Dr Harsh Vardhan, Hon'ble Minister of Health who have not only enquired about the health of my father but are also in regular touch with the hospital authorities. They have conveyed their blessings and support to the family also," Subhashini Raj Rao said in her statement. She added, "I am grateful to Shri Nitish Kumar, Hon'ble Chief Minister of Bihar who called up many times to enquire about his (Sharad Yadav's) health from us and the hospital authorities also. He too conveyed his affection and support towards the family. " The daughter of former Union minister and veteran MP Sharad Yadav, Subhashini also thanked senior leaders from the Congress and other parties, political workers and well-wishers who have been worried about her father's health. "I will keep in touch to convey the update about the health of my father," the statement added. Yadav had launched the Loktantrik Janata Dal (LJD) in May 2018 after he parted ways from the Janata Dal (United) owing to its coalition with the BJP.
english
<reponame>douglasduteil/native-image-diff<gh_stars>10-100 { "name": "native-image-diff-example", "dependencies": { "native-image-diff": "file:..", "node-libpng": "^0.2.0" } }
json
Pakistani Couple Kanwal Siddiq and Anam Siddiq got emotional while leaving India after the successful surgery of their Toddler. Doctors in Pakistan informed Kanwal (32), a civil engineer, that his 4-and-a-half Months Old Son Rohaan had a hole in his heart. External Affairs Minister Sushma Swaraj permitted Visa for the Couple to travel to India. They reached Jaypee Hospital in Sector 132 of Noida on June 12th for the surgery. After a 5-hour surgery on June 14th, AORTA and Pulmonary arteries were moved to the right place. The baby was put on ventilator support for several days and has been discharged after he recovered completely. A Teary-eyed Kanwal said: 'Thank you India. I have no words to express how much happy I am to see my son in good health. The big heart of Sushma Swaraj is the reason behind blood pumping into Rohaan's veins. I wish to launch an organization in Lahore to create awareness about taking care of heart health from a young age'.
english
<reponame>the-lotuseater/AirMapSDK-Android<filename>sample/src/main/java/com/airmap/airmapsdktest/ui/FlightPlanDetailsAdapter.java package com.airmap.airmapsdktest.ui; import android.content.Context; import android.content.DialogInterface; import android.support.v7.app.AlertDialog; import android.support.v7.widget.RecyclerView; import android.text.Editable; import android.text.TextWatcher; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.ImageButton; import android.widget.SeekBar; import android.widget.TextView; import com.airmap.airmapsdk.Analytics; import com.airmap.airmapsdk.models.AirMapBaseModel; import com.airmap.airmapsdk.models.flight.AirMapFlightFeature; import com.airmap.airmapsdk.models.flight.AirMapFlightPlan; import com.airmap.airmapsdk.models.flight.FlightFeatureConfiguration; import com.airmap.airmapsdk.models.flight.FlightFeatureValue; import com.airmap.airmapsdk.models.rules.AirMapRule; import com.airmap.airmapsdk.ui.views.ToggleButton; import com.airmap.airmapsdk.util.Utils; import com.airmap.airmapsdktest.R; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; public class FlightPlanDetailsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { private static final int BINARY_VIEW_TYPE = 2; private static final int FIELD_VIEW_TYPE = 4; private static final int TEXT_VIEW_TYPE = 5; private static final int SAVE_BUTTON_TYPE = 6; private Context context; private AirMapFlightPlan flightPlan; private Map<AirMapFlightFeature, List<AirMapRule>> flightFeaturesMap; private List<AirMapFlightFeature> flightFeatures; private List<AirMapFlightFeature> duplicateFlightFeatures; private Map<String, FlightFeatureConfiguration> flightFeaturesConfigMap; private FlightPlanChangeListener flightPlanChangeListener; public FlightPlanDetailsAdapter(Context context, AirMapFlightPlan flightPlan, Map<AirMapFlightFeature, List<AirMapRule>> flightFeaturesMap, Map<String, FlightFeatureConfiguration> flightFeaturesConfigMap, FlightPlanChangeListener flightPlanChangeListener) { this.context = context; this.flightPlan = flightPlan; this.flightFeaturesMap = flightFeaturesMap; this.flightFeaturesConfigMap = flightFeaturesConfigMap; this.flightPlanChangeListener = flightPlanChangeListener; this.flightFeatures = new ArrayList<>(flightFeaturesMap.keySet()); removeDuplicateFlightFeatures(); } private void removeDuplicateFlightFeatures() { duplicateFlightFeatures = new ArrayList<>(); for (AirMapFlightFeature flightFeature : new ArrayList<>(flightFeaturesMap.keySet())) { // don't displaying altitude flight features for now if (flightFeature.isAltitudeFeature()) { flightFeaturesMap.remove(flightFeature); flightFeatures.remove(flightFeature); duplicateFlightFeatures.add(flightFeature); } } Collections.sort(flightFeatures, new Comparator<AirMapFlightFeature>() { @Override public int compare(AirMapFlightFeature o1, AirMapFlightFeature o2) { if (o1.getInputType() != o2.getInputType()) { return o1.getInputType().value() - o2.getInputType().value(); } else { return o1.getFlightFeature().compareTo(o2.getFlightFeature()); } } }); } private void onFlightPlanChanged() { flightPlanChangeListener.onFlightPlanChanged(); } @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View view; switch (viewType) { case BINARY_VIEW_TYPE: view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_flight_plan_feature_binary, parent, false); return new FlightFeatureBinaryViewHolder(view); case FIELD_VIEW_TYPE: view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_flight_plan_feature_field, parent, false); return new FlightFeatureFieldViewHolder(view); case TEXT_VIEW_TYPE: view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_flight_plan_feature_text, parent, false); return new FlightFeatureTextViewHolder(view); case SAVE_BUTTON_TYPE: view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_flight_plan_next, parent, false); return new NextButtonViewHolder(view); } return null; } @Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { switch (getItemViewType(position)) { case BINARY_VIEW_TYPE: { final AirMapFlightFeature flightFeature = (AirMapFlightFeature) getItem(position); FlightFeatureValue<Boolean> savedValue = flightPlan.getFlightFeatureValues() != null ? flightPlan.getFlightFeatureValues().get(flightFeature.getFlightFeature()) : null; final FlightFeatureBinaryViewHolder binaryViewHolder = (FlightFeatureBinaryViewHolder) holder; binaryViewHolder.descriptionTextView.setText(flightFeature.getDescription()); binaryViewHolder.infoButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { showFlightFeatureInfo(flightFeature); } }); boolean noSelected = savedValue != null && !savedValue.getValue(); binaryViewHolder.noButton.setSelected(noSelected); binaryViewHolder.noButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { FlightFeatureValue featureValue = new FlightFeatureValue<>(flightFeature.getFlightFeature(), false); flightPlan.setFlightFeatureValue(featureValue); onFlightPlanChanged(); Analytics.logEvent(Analytics.Event.flightPlanCheck, Analytics.Action.change, flightFeature.getFlightFeature()); } }); boolean yesSelected = savedValue != null && savedValue.getValue(); binaryViewHolder.yesButton.setSelected(yesSelected); binaryViewHolder.yesButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { FlightFeatureValue featureValue = new FlightFeatureValue<>(flightFeature.getFlightFeature(), true); flightPlan.setFlightFeatureValue(featureValue); onFlightPlanChanged(); Analytics.logEvent(Analytics.Event.flightPlanCheck, Analytics.Action.change, flightFeature.getFlightFeature()); } }); break; } case FIELD_VIEW_TYPE: { final AirMapFlightFeature flightFeature = (AirMapFlightFeature) getItem(position); final FlightFeatureFieldViewHolder fieldViewHolder = (FlightFeatureFieldViewHolder) holder; final FlightFeatureValue<String> savedValue = flightPlan.getFlightFeatureValues() != null ? flightPlan.getFlightFeatureValues().get(flightFeature.getFlightFeature()) : null; fieldViewHolder.descriptionTextView.setText(flightFeature.getDescription()); if (fieldViewHolder.textWatcher != null) { fieldViewHolder.editText.removeTextChangedListener(fieldViewHolder.textWatcher); } if (savedValue != null) { fieldViewHolder.editText.setText(savedValue.getValue()); } TextWatcher textWatcher = new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { } @Override public void afterTextChanged(Editable s) { FlightFeatureValue flightFeatureValue; try { float floatValue = Float.parseFloat(s.toString()); flightFeatureValue = new FlightFeatureValue<>(flightFeature.getFlightFeature(), floatValue); } catch (NumberFormatException e) { flightFeatureValue = new FlightFeatureValue<>(flightFeature.getFlightFeature(), s.toString()); } flightPlan.setFlightFeatureValue(flightFeatureValue); onFlightPlanChanged(); Analytics.logEvent(Analytics.Event.flightPlanCheck, Analytics.Action.change, flightFeature.getFlightFeature()); } }; fieldViewHolder.textWatcher = textWatcher; fieldViewHolder.editText.addTextChangedListener(textWatcher); fieldViewHolder.infoButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { showFlightFeatureInfo(flightFeature); } }); break; } case TEXT_VIEW_TYPE: { final AirMapFlightFeature flightFeature = (AirMapFlightFeature) getItem(position); final FlightFeatureTextViewHolder fieldViewHolder = (FlightFeatureTextViewHolder) holder; fieldViewHolder.descriptionTextView.setText(flightFeature.getDescription()); fieldViewHolder.infoButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { showFlightFeatureInfo(flightFeature); } }); break; } case SAVE_BUTTON_TYPE: { NextButtonViewHolder nextButtonViewHolder = (NextButtonViewHolder) holder; nextButtonViewHolder.nextButton.setText("Save"); nextButtonViewHolder.nextButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Analytics.logEvent(Analytics.Event.flightPlanCheck, Analytics.Action.tap, Analytics.Label.BOTTOM_NEXT_BUTTON); flightPlanChangeListener.onFlightPlanSave(); } }); break; } } } private void showFlightFeatureInfo(final AirMapFlightFeature flightFeature) { List<AirMapRule> rules = flightFeaturesMap.get(flightFeature); Collections.sort(rules, new Comparator<AirMapRule>() { @Override public int compare(AirMapRule o1, AirMapRule o2) { return o1.getShortText().compareTo(o2.getShortText()); } }); StringBuilder rulesTextBuilder = new StringBuilder(); Set<String> ruleSet = new HashSet<>(); boolean learnMore = false; rulesTextBuilder.append("The following rule(s) apply:").append("\n").append("\n"); for (AirMapRule rule : rules) { if (!ruleSet.contains(rule.getShortText())) { if (!ruleSet.isEmpty()) { rulesTextBuilder.append("\n").append("\n"); } rulesTextBuilder.append(rule.getShortText()); ruleSet.add(rule.getShortText()); if (rule.getShortText() != null && !rule.getShortText().equals(rule.getDescription())) { learnMore = true; } } } AlertDialog.Builder builder = new AlertDialog.Builder(context) .setTitle("Why We're Asking") .setMessage(rulesTextBuilder.toString()) .setPositiveButton(android.R.string.ok, null); if (learnMore) { builder.setNegativeButton(R.string.learn_more, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); showDetailedRules(flightFeature); } }); } builder.show(); } private void showDetailedRules(AirMapFlightFeature flightFeature) { List<AirMapRule> rules = flightFeaturesMap.get(flightFeature); Collections.sort(rules, new Comparator<AirMapRule>() { @Override public int compare(AirMapRule o1, AirMapRule o2) { return o1.toString().compareTo(o2.toString()); } }); StringBuilder rulesTextBuilder = new StringBuilder(); Set<String> ruleSet = new HashSet<>(); for (AirMapRule rule : rules) { if (!ruleSet.contains(rule.toString())) { if (!ruleSet.isEmpty()) { rulesTextBuilder.append("\n").append("\n"); } rulesTextBuilder.append(rule.toString()); ruleSet.add(rule.toString()); } } new AlertDialog.Builder(context) .setTitle("Official Rule") .setMessage(rulesTextBuilder.toString()) .setPositiveButton(android.R.string.ok, null) .show(); } @Override public int getItemViewType(int position) { if (position == getItemCount() - 1) { return SAVE_BUTTON_TYPE; } AirMapBaseModel item = getItem(position); if (item instanceof AirMapFlightFeature) { switch (((AirMapFlightFeature) item).getInputType()) { case Double: return FIELD_VIEW_TYPE; case String: return FIELD_VIEW_TYPE; case Boolean: return BINARY_VIEW_TYPE; case Info: default: return TEXT_VIEW_TYPE; } } return TEXT_VIEW_TYPE; } private boolean showStatusIcon(AirMapRule rule) { for (AirMapFlightFeature flightFeature : rule.getFlightFeatures()) { if (flightPlan.getFlightFeatureValues() == null || !flightPlan.getFlightFeatureValues().containsKey(flightFeature.getFlightFeature())) { return true; } } return false; } private String getMeasurementWithUnits(double value, FlightFeatureConfiguration flightFeatureConfig) { String units = flightFeatureConfig.getValueConfig(false).getUnit(); //TODO: i18n support? if (value == (long) value) { return String.format("%d %s", (int) value, units); } else if (value % .5 == 0) { return String.format("%.1f %s", value, units); } else { return String.format("%.2f %s", value, units); } } public AirMapBaseModel getItem(int position) { return flightFeatures.get(position); } @Override public int getItemCount() { return flightFeaturesMap != null ? flightFeaturesMap.size() + 1 : 1; } private class FlightFeatureBinaryViewHolder extends RecyclerView.ViewHolder { TextView descriptionTextView; ToggleButton noButton; ToggleButton yesButton; ImageButton infoButton; FlightFeatureBinaryViewHolder(View itemView) { super(itemView); descriptionTextView = itemView.findViewById(R.id.description_text_view); noButton = itemView.findViewById(R.id.no_button); yesButton = itemView.findViewById(R.id.yes_button); infoButton = itemView.findViewById(R.id.info_button); } } private class FlightFeatureSeekbarViewHolder extends RecyclerView.ViewHolder { TextView descriptionTextView; TextView valueTextView; SeekBar seekBar; ImageButton infoButton; FlightFeatureSeekbarViewHolder(View itemView) { super(itemView); descriptionTextView = itemView.findViewById(R.id.description_text_view); valueTextView = itemView.findViewById(R.id.value_text_view); seekBar = itemView.findViewById(R.id.seekbar); infoButton = itemView.findViewById(R.id.info_button); } } private class FlightFeatureFieldViewHolder extends RecyclerView.ViewHolder { TextView descriptionTextView; EditText editText; ImageButton infoButton; TextWatcher textWatcher; FlightFeatureFieldViewHolder(View itemView) { super(itemView); descriptionTextView = itemView.findViewById(R.id.description_text_view); editText = itemView.findViewById(R.id.edit_text); infoButton = itemView.findViewById(R.id.info_button); } } private class FlightFeatureTextViewHolder extends RecyclerView.ViewHolder { TextView descriptionTextView; ImageButton infoButton; FlightFeatureTextViewHolder(View itemView) { super(itemView); descriptionTextView = itemView.findViewById(R.id.description_text_view); infoButton = itemView.findViewById(R.id.info_button); } } private class NextButtonViewHolder extends RecyclerView.ViewHolder { Button nextButton; NextButtonViewHolder(View itemView) { super(itemView); nextButton = itemView.findViewById(R.id.next_button); } } public interface FlightPlanChangeListener { void onFlightPlanChanged(); void onFlightFeatureRemoved(String flightFeature); void onFlightPlanSave(); } }
java
<reponame>rajitbanerjee/data-science-ucd { "danceability" : 0.567, "energy" : 0.267, "key" : 4, "loudness" : -6.502, "mode" : 1, "speechiness" : 0.0299, "acousticness" : 0.839, "instrumentalness" : 0.00000146, "liveness" : 0.0890, "valence" : 0.0592, "tempo" : 110.011, "type" : "audio_features", "id" : "1ZMiCix7XSAbfAJlEZWMCp", "uri" : "spotify:track:1ZMiCix7XSAbfAJlEZWMCp", "track_href" : "https://api.spotify.com/v1/tracks/1ZMiCix7XSAbfAJlEZWMCp", "analysis_url" : "https://api.spotify.com/v1/audio-analysis/1ZMiCix7XSAbfAJlEZWMCp", "duration_ms" : 240133, "time_signature" : 4 }
json
package com.example.littletreemusic.di.Component.navigation; import com.example.littletreemusic.di.scopes.PerFragment; import com.example.littletreemusic.presenter.navigation.NavHeadshotsContract; import com.example.littletreemusic.presenter.navigation.NavHeadshotsPresenter; import dagger.Module; import dagger.Provides; /** * Created by 春风亭lx小树 on 2018/2/21. */ @Module public class NavHeadshotsModule { NavHeadshotsContract.INavHeadshotsView mINavHeadshotsView; NavHeadshotsPresenter mNavHeadshotsPresenter; public NavHeadshotsModule(NavHeadshotsContract.INavHeadshotsView iNavHeadshotsView){ mINavHeadshotsView=iNavHeadshotsView; mNavHeadshotsPresenter=new NavHeadshotsPresenter(); } @PerFragment @Provides NavHeadshotsPresenter provideNavHeadshotsPresenter(){ return mNavHeadshotsPresenter; } @PerFragment @Provides NavHeadshotsContract.INavHeadshotsView provideINavHeadshotsView(){ return mINavHeadshotsView; } }
java
""" URL: https://codeforces.com/problemset/problem/49/A Author: <NAME> [safiulanik at gmail.com] """ s = ''.join(input().split()).lower() if s[-2] in ['a', 'e', 'i', 'o', 'u', 'y']: print('YES') else: print('NO')
python
{"nom":"Ornacieux","circ":"7ème circonscription","dpt":"Isère","inscrits":311,"abs":145,"votants":166,"blancs":15,"nuls":3,"exp":148,"res":[{"nuance":"REM","nom":"<NAME>","voix":83},{"nuance":"LR","nom":"<NAME>","voix":65}]}
json
Photographer Raghubir Singh once said that India knows colour through intuition. Colour in India is more than just visual aesthetics, it has its own seasons, its own symbolism and sociology. Each colour tells a complex story, and in our special series, Colours of India, we bring to life the stories of different colours. Saffron: It's striking that a colour can be so elevated in the aesthetic of a culture that it becomes one of three jewels of a land. Zaffran in Kashmir where it is cultivated. . . a colour favoured by Nawab Wajid Ali Shah in Awadh. . . The 'kasumbo' of Rajasthan becomes the 'bhagwa' of renunciation and purity in the robes of the Hindu and Buddhist saints. . . also an inspiration for contemporary fashion and designers. In Benares and BodhGaya, the colour dominates the landscape through very strong religious associations. And the colour enters the political discourse of the country through its association with the saffron of Hindutva.
english
As Russian President Vladimir Putin wrapped up his six-hour visit to New Delhi on December 6, most commentaries on India-Russia relations invariably termed it as the continuation of decades of romance that first blossomed in the Cold War era—a global geo-political scenario that is very different from what it is today. Few have noted the important coincidence that Putin's visit took place on the day India and Bangladesh celebrated "Maitri Divas" at a function held in New Delhi, addressed by Prime Minister Sheikh Hasina, albeit through a recorded video message. After all, it is the Liberation War of 1971, which led to the emergence of Bangladesh as an independent nation, that added a new depth in strategic ties between India and the then Soviet Union. During that time, the warming of ties between the US and China under the stewardship of Richard Nixon and Henry Kissinger, Pakistan's Operation Searchlight in then East Pakistan, and the grave security challenge posed by the Washington-Beijing tie-up pushed India and the Soviet Union to sign the landmark 1971 Treaty of Peace, Friendship and Cooperation, which envisaged each other's help in defending their territorial integrity. The international scenario has, of course, changed since 1971. But one thing that has remained constant between then and now is the flux in that scenario. No wonder that India's ruling establishment, irrespective of their ideological moorings, has not given up any opportunity to gush about how India-Russia ties have been tested through vicissitudes and changing times. The Cold War is long gone. Today, India has moved much closer to the US, and Russia and China have grown closer in the face of Russia's frayed relations with the US and Europe. But what has not changed is the sustained India-Russia engagement at the summit level—the meeting between Putin and Modi in Delhi on December 6 was the 21st top-level interaction, possibly unprecedented for any two countries. Three major takeaways from the Putin-Modi summit are in defence and trade. The two countries entered into a 10 year pact on military-technical cooperation, which includes a deal for manufacturing AK203 assault rifles in a factory in India's Uttar Pradesh state. Contrary to expectations, however, the two countries failed to ink an agreement on logistical support for each other's military because, as Indian Foreign Secretary Harsh Vardhan Shringla said, there were a "few issues" that remain to be sorted out. India already has such military logistics support agreements with a number of countries, including the US. To take defence and diplomatic ties forward, India and Russia have for the first time institutionalised meetings between their defence and foreign ministers, who held their first in-person and delegation-level talks under that format. India and the US already have the same institutional arrangement. On trade, the two sides acknowledged that this front has been somewhat lagging, as the volume of bilateral trade is not commensurate with the depth of the strategic partnership between India and Russia. They set a target of trebling the volume of trade in goods from USD 10 billion at present to USD 30 billion in the next four years, a tall order by any yardstick. The two countries looked to new areas for long-term cooperation to achieve this. By contrast, India's trade with the US and China are close to USD 100 billion, and Russia's trade with China is pegged at slightly over the same amount. But a robust trade is no guarantee for a burgeoning relationship in other areas. High stakes in trade do not always dampen political and military tensions—India-China, US-China and Japan-China are examples of that. It is a sign of maturity on the parts of India and Russia that they have not allowed the ties between New Delhi and Washington, and Beijing and Moscow, to come in the way of boosting and diversifying their own bilateral relations. For instance, India has gone ahead with procuring the S-400 Triumf air missile defence system from Russia despite the threats of sanctions from the US. Secondly, Indian Defence Minister Rajnath Singh, during the bilateral meeting with his Russian counterpart Sergei Shoigu on December 6, raised upfront the issue of China's combativeness on the unresolved border along the Himalayas. True, Rajnath did not name any names, but his reference to the military tensions in India's northern border with China left little doubt as to whom he had in mind. More importantly, Rajnath used this tension to seek greater military cooperation with Russia considering the "real, immediate and legitimate defence challenges" posed by China, and expressed the hope that Moscow will remain a major partner for New Delhi in these "changing circumstances. " India and Russia are also not entirely on the same page as far as the security scenario in Asia-Pacific—which China considers to be its backyard—is concerned. As both India and Russia seek new allies, the flames of their long-standing ties continue to burn brighter. Pallab Bhattacharya is a special correspondent for The Daily Star. He writes from New Delhi, India.
english
{ "HostingFlavours": { "Default": "Wotcha", "AvailableFlavours": "Hello", "HostingFlavours": [ { "Name": "Hello", "ContainerBuilders": [ { "Type": "InexRef.HostEnvironment.Tests.NullContainerConfigurationModule, InexRef.HostEnvironment.Tests" } ] } ] } }
json
<filename>README.md # hxgo A duell environment library for using Go libraries in Haxe. Uses the https://github.com/tardisgo/tardisgo transpiler to compile from Go to Haxe. # Usage Add the dependency: <duelllib name="hxgo" version="0.0.0+" /> Configure the go sources you want to compile to Haxe, example: <library-config> <hxgo> <go-src value="math" /> <go-src value="strconv"/> </hxgo> </library-config> Use it! example: ``` import tardis.*; class Main { public static function main() { Go_math_NNextafter.hx(2.0,3.0); } } ``` # Limitations - Only tested on mac! - There is a weird problem with big filenames, so if you see something wrong when Tardis runs, it's probably because of that.
markdown
import numpy as np import brainscore from brainio.assemblies import DataAssembly from brainscore.benchmarks._properties_common import PropertiesBenchmark, _assert_grating_activations from brainscore.benchmarks._properties_common import calc_spatial_frequency_tuning from brainscore.metrics.ceiling import NeuronalPropertyCeiling from brainscore.metrics.distribution_similarity import BootstrapDistributionSimilarity, ks_similarity from result_caching import store ASSEMBLY_NAME = 'schiller.Schiller1976c' REGION = 'V1' TIMEBINS = [(70, 170)] PARENT = 'V1-spatial_frequency' PROPERTY_NAMES = ['spatial_frequency_selective', 'spatial_frequency_bandwidth'] BIBTEX = """@article{Schiller1976, author = {<NAME> <NAME> <NAME>.}, doi = {10.1152/jn.1976.39.6.1352}, issn = {0022-3077}, journal = {Journal of neurophysiology}, number = {6}, pages = {1334--1351}, pmid = {825624}, title = {{Quantitative studies of single-cell properties in monkey striate cortex. III. Spatial Frequency}}, url = {http://www.ncbi.nlm.nih.gov/pubmed/825624}, volume = {39}, year = {1976} } """ RESPONSE_THRESHOLD = 5 def _MarquesSchiller1976V1Property(property_name): assembly = brainscore.get_assembly(ASSEMBLY_NAME) similarity_metric = BootstrapDistributionSimilarity(similarity_func=ks_similarity, property_name=property_name) ceil_func = NeuronalPropertyCeiling(similarity_metric) parent = PARENT return PropertiesBenchmark(identifier=f'dicarlo.Marques_schiller1976-{property_name}', assembly=assembly, neuronal_property=schiller1976_properties, similarity_metric=similarity_metric, timebins=TIMEBINS, parent=parent, ceiling_func=ceil_func, bibtex=BIBTEX, version=1) def MarquesSchiller1976V1SpatialFrequencySelective(): property_name = 'spatial_frequency_selective' return _MarquesSchiller1976V1Property(property_name=property_name) def MarquesSchiller1976V1SpatialFrequencyBandwidth(): property_name = 'spatial_frequency_bandwidth' return _MarquesSchiller1976V1Property(property_name=property_name) @store(identifier_ignore=['responses', 'baseline']) def schiller1976_properties(model_identifier, responses, baseline): _assert_grating_activations(responses) radius = np.array(sorted(set(responses.radius.values))) spatial_frequency = np.array(sorted(set(responses.spatial_frequency.values))) orientation = np.array(sorted(set(responses.orientation.values))) phase = np.array(sorted(set(responses.phase.values))) responses = responses.values baseline = baseline.values assert responses.shape[0] == baseline.shape[0] n_neuroids = responses.shape[0] responses = responses.reshape((n_neuroids, len(radius), len(spatial_frequency), len(orientation), len(phase))) responses = responses.mean(axis=4) max_response = responses.reshape((n_neuroids, -1)).max(axis=1, keepdims=True) spatial_frequency_bandwidth = np.zeros((n_neuroids, 1)) spatial_frequency_selective = np.ones((n_neuroids, 1)) for neur in range(n_neuroids): pref_radius, pref_spatial_frequency, pref_orientation = \ np.unravel_index(np.argmax(responses[neur, :, :, :]), (len(radius), len(spatial_frequency), len(orientation))) spatial_frequency_curve = responses[neur, pref_radius, :, pref_orientation] spatial_frequency_bandwidth[neur] = \ calc_spatial_frequency_tuning(spatial_frequency_curve, spatial_frequency, thrsh=0.707, filt_type='smooth', mode='ratio')[0] spatial_frequency_selective[np.isnan(spatial_frequency_bandwidth)] = 0 properties_data = np.concatenate((spatial_frequency_selective, spatial_frequency_bandwidth), axis=1) good_neuroids = max_response > baseline + RESPONSE_THRESHOLD properties_data = properties_data[np.argwhere(good_neuroids)[:, 0], :] properties_data = DataAssembly(properties_data, coords={'neuroid_id': ('neuroid', range(properties_data.shape[0])), 'region': ('neuroid', ['V1'] * properties_data.shape[0]), 'neuronal_property': PROPERTY_NAMES}, dims=['neuroid', 'neuronal_property']) return properties_data
python
Goddess Brahmacharini is worshipped on the second day of Navratri. Here is all you need to know about the second day of Navratri. By India Today Web Desk: Navratri Day 2: The second day of Navratri is dedicated to the worship of Goddess Brahmacharini- the 2nd form of NavDurga. After the Kushmanda form, Goddess Parvati took birth at the home of Daksha Prajapati. In this form, the Goddess Parvati was a great Sati. She did severe penance to get Lord Shiva as her husband. She performed hard austerity and due to which she was called Brahmacharini, Aparna and Uma. This year the second day of Shardiya Navratri will fall on October 18. Goddess Brahmacharini is depicted as walking on the bare feet. She has two hands, carrying Jap Mala in the right hand and Kamandal in the left hand. Goddess Brahmacharini is the unmarried form of Goddess Parvati. Devotees on the second day of Navratri get up early in the morning and after taking a bath, worship and offer prayers, do Atma puja for self-purification after that put sandalwood tilak on the deity and make a wish in front of the Goddess. At last, offer preased and perform arti. According to Hindu mythology, it is believed that Lord Mangal is governed by Goddess Brahmacharini. Hence, devotees worship Goddess Brahmacharini to get wisdom and knowledge. It is also believed that worshipping Goddess Brahmacharini on the second day gives good fortune and removes all the obstacles from one life. Brahmacharini is an amalgamation of two words where Brahma means penance and charni means conduct. Brahmacharini together means one who conducts tenacity. (Source: Drikpanchang)
english
<gh_stars>0 { "name": "quartz", "version": "0.0.1", "description": "Convert a public remote API into a local copy.", "main": "dist/quartz.js", "author": { "name": "<NAME>", "email": "<EMAIL>", "homepage": "http://mawhorter.net/" }, "repository": { "url": "https://github.com/cmawhorter/quartz.git", "type": "git" }, "license": "MIT", "dependencies": {}, "ignore": [ "**/.*", "node_modules", "bower_components", "tasks", "tmp", "tests" ] }
json
<reponame>adosib/youtube_content_analysis {"kind": "youtube#channel", "etag": "oOQSjMWVOae_EX57PzkKJ8y8bGM", "id": "UC3GoIgz6agdJzFNZWJrIR6g", "snippet": {"title": "<NAME>", "description": "Hey there, my name is <NAME> and I focus on software, finance and entrepreneurship. If you want to learn how to code, how to start a software business or how to automate your finances I'm your guy.", "publishedAt": "2008-09-16T22:45:25Z", "thumbnails": {"default": {"url": "https://yt3.ggpht.com/a/AATXAJy07rgMvCvfgxVUIqcV2goxcteOKY2ZltKLOg=s88-c-k-c0xffffffff-no-rj-mo", "width": 88, "height": 88}, "medium": {"url": "https://yt3.ggpht.com/a/AATXAJy07rgMvCvfgxVUIqcV2goxcteOKY2ZltKLOg=s240-c-k-c0xffffffff-no-rj-mo", "width": 240, "height": 240}, "high": {"url": "https://yt3.ggpht.com/a/AATXAJy07rgMvCvfgxVUIqcV2goxcteOKY2ZltKLOg=s800-c-k-c0xffffffff-no-rj-mo", "width": 800, "height": 800}}, "localized": {"title": "<NAME>", "description": "Hey there, my name is <NAME> and I focus on software, finance and entrepreneurship. If you want to learn how to code, how to start a software business or how to automate your finances I'm your guy."}, "country": "CA"}, "statistics": {"viewCount": "285605", "commentCount": "0", "subscriberCount": "6290", "hiddenSubscriberCount": false, "videoCount": "29"}, "brandingSettings": {"channel": {"title": "<NAME>", "description": "Hey there, my name is <NAME> and I focus on software, finance and entrepreneurship. If you want to learn how to code, how to start a software business or how to automate your finances I'm your guy.", "keywords": "runescape pking fish cross fire rumble fighter headshot m4a1 lol pwned fps first person shooter ak47 League of Legends LOL", "defaultTab": "Featured", "showRelatedChannels": true, "showBrowseView": true, "unsubscribedTrailer": "ID85lv_R54U", "profileColor": "#000000", "country": "CA"}, "image": {"bannerImageUrl": "https://yt3.ggpht.com/YjxsdWANvXOMOpt7cR0Jr8Vek5jh0t0H0oxQxgbFV3mdLTLAd1LQWJgPJveEI7_nY7IjieNx=w1060-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj", "bannerMobileImageUrl": "https://yt3.ggpht.com/YjxsdWANvXOMOpt7cR0Jr8Vek5jh0t0H0oxQxgbFV3mdLTLAd1LQWJgPJveEI7_nY7IjieNx=w640-fcrop64=1,32b75a57cd48a5a8-k-c0xffffffff-no-nd-rj", "bannerTabletLowImageUrl": "https://yt3.ggpht.com/YjxsdWANvXOMOpt7cR0Jr8Vek5jh0t0H0oxQxgbFV3mdLTLAd1LQWJgPJveEI7_nY7IjieNx=w1138-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj", "bannerTabletImageUrl": "https://yt3.ggpht.com/YjxsdWANvXOMOpt7cR0Jr8Vek5jh0t0H0oxQxgbFV3mdLTLAd1LQWJgPJveEI7_nY7IjieNx=w1707-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj", "bannerTabletHdImageUrl": "https://yt3.ggpht.com/YjxsdWANvXOMOpt7cR0Jr8Vek5jh0t0H0oxQxgbFV3mdLTLAd1LQWJgPJveEI7_nY7IjieNx=w2276-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj", "bannerTabletExtraHdImageUrl": "https://yt3.ggpht.com/YjxsdWANvXOMOpt7cR0Jr8Vek5jh0t0H0oxQxgbFV3mdLTLAd1LQWJgPJveEI7_nY7IjieNx=w2560-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj", "bannerMobileLowImageUrl": "https://yt3.ggpht.com/YjxsdWANvXOMOpt7cR0Jr8Vek5jh0t0H0oxQxgbFV3mdLTLAd1LQWJgPJveEI7_nY7IjieNx=w320-fcrop64=1,32b75a57cd48a5a8-k-c0xffffffff-no-nd-rj", "bannerMobileMediumHdImageUrl": "https://yt3.ggpht.com/YjxsdWANvXOMOpt7cR0Jr8Vek5jh0t0H0oxQxgbFV3mdLTLAd1LQWJgPJveEI7_nY7IjieNx=w960-fcrop64=1,32b75a57cd48a5a8-k-c0xffffffff-no-nd-rj", "bannerMobileHdImageUrl": "https://yt3.ggpht.com/YjxsdWANvXOMOpt7cR0Jr8Vek5jh0t0H0oxQxgbFV3mdLTLAd1LQWJgPJveEI7_nY7IjieNx=w1280-fcrop64=1,32b75a57cd48a5a8-k-c0xffffffff-no-nd-rj", "bannerMobileExtraHdImageUrl": "https://yt3.ggpht.com/YjxsdWANvXOMOpt7cR0Jr8Vek5jh0t0H0oxQxgbFV3mdLTLAd1LQWJgPJveEI7_nY7IjieNx=w1440-fcrop64=1,32b75a57cd48a5a8-k-c0xffffffff-no-nd-rj", "bannerTvImageUrl": "https://yt3.ggpht.com/YjxsdWANvXOMOpt7cR0Jr8Vek5jh0t0H0oxQxgbFV3mdLTLAd1LQWJgPJveEI7_nY7IjieNx=w2120-fcrop64=1,00000000ffffffff-k-c0xffffffff-no-nd-rj", "bannerTvLowImageUrl": "https://yt3.ggpht.com/YjxsdWANvXOMOpt7cR0Jr8Vek5jh0t0H0oxQxgbFV3mdLTLAd1LQWJgPJveEI7_nY7IjieNx=w854-fcrop64=1,00000000ffffffff-k-c0xffffffff-no-nd-rj", "bannerTvMediumImageUrl": "https://yt3.ggpht.com/YjxsdWANvXOMOpt7cR0Jr8Vek5jh0t0H0oxQxgbFV3mdLTLAd1LQWJgPJveEI7_nY7IjieNx=w1280-fcrop64=1,00000000ffffffff-k-c0xffffffff-no-nd-rj", "bannerTvHighImageUrl": "https://yt3.ggpht.com/YjxsdWANvXOMOpt7cR0Jr8Vek5jh0t0H0oxQxgbFV3mdLTLAd1LQWJgPJveEI7_nY7IjieNx=w1920-fcrop64=1,00000000ffffffff-k-c0xffffffff-no-nd-rj"}, "hints": [{"property": "channel.banner.mobile.medium.image.url", "value": "https://yt3.ggpht.com/YjxsdWANvXOMOpt7cR0Jr8Vek5jh0t0H0oxQxgbFV3mdLTLAd1LQWJgPJveEI7_nY7IjieNx=w640-fcrop64=1,32b75a57cd48a5a8-k-c0xffffffff-no-nd-rj"}, {"property": "channel.modules.show_comments.bool", "value": "True"}, {"property": "channel.featured_tab.template.string", "value": "Everything"}]}}
json
import React from 'react'; import { useLocale } from 'hooks/locales'; import { Container, Flex, Heading, Box, Grid, GridItem, Text } from '@chakra-ui/react'; import { FcMusic } from 'react-icons/fc'; import SEO from 'components/SEO'; import SideMenu from 'components/SideMenu/Documents'; const Home: React.FC = () => { const { t } = useLocale(); return ( <> <SEO path="/guideline/player" title={`${t.DOCUMENTS.GUIDE.PLAYER.TITLE}${t.DOCUMENTS.GUIDE.TITLE}`} description={t.DOCUMENTS.GUIDE.PLAYER.DESCRIPTION} thumbnail="" allowIndex={true} /> <Grid templateColumns={{ base: 'repeat(1, 1fr)', xl: 'repeat(4, 1fr)', '2xl': 'repeat(5, 1fr)' }} > <GridItem colSpan={1}> <SideMenu index={0} /> </GridItem> <GridItem mx={{ base: 0, xl: 8 }} colSpan={{ base: 1, xl: 3, '2xl': 4 }}> <Container variant="dashboard"> <Flex mt={4} mb={12} align="center" gap={2}> <Box fontSize="2em"> <FcMusic /> </Box> <Heading fontSize="1.4em">{t.DOCUMENTS.GUIDE.PLAYER.TITLE}</Heading> </Flex> <Box> <Heading my={4} fontSize="1.2em"> {t.DOCUMENTS.GUIDE.PLAYER.MEDIA.TITLE} </Heading> {t.DOCUMENTS.GUIDE.PLAYER.MEDIA.TEXT.map((text: string) => ( <Text key={text} my={2}> {text} </Text> ))} </Box> </Container> </GridItem> </Grid> </> ); }; export default Home;
typescript
In another statement of defiance, the BCCI decided to omit five major Lodha recommendations as it voted to adopt the remainder of the reform suggestions imposed by the Supreme Court-appointed committee in July 2016. It was decided at the July 26 Special General Meeting of the board that "contentious reforms" including the one-state-one-vote, strength of the national selection panel, the apex council size, age cap and the tenure cap for office bearers would not be adopted. "The BCCI has adopted Lodha panel reforms except five," said BCCI acting secretary Amitabh Choudhary after the meeting. BCCI received relief in its ongoing squabble with the Supreme Court over the proposed sweeping administrative reforms when the three-member bench comprising Justices Deepak Misra, AM Khanwilkar and DY Chandrachud agreed to reconsider certain proposals including the one-state-one-vote, selection committee strength and the concept of associate membership in its next hearing scheduled for August 18. However, by side-stepping other key reforms, BCCI and its constituent members, may have reopened the entire debate. The Lodha committee had recommended that a nine-member apex council would replace the existing 14-member working committee. According to the proposal, this council was to consist the five main office bearers (president, vice-president, secretary, joint secretary and treasurer), two members (one male, one female) nominated by a Players' Association, one member elected by the full members of BCCI and another by the CAG of India. There were oppositions to this nine-member panel in the past with the Tamil Nadu Cricket Association and the Mumbai Cricket Association standing chiefly against the two-member representation from Players Association while BCCI full members could nominate just one, and the presence of a CAG nominee in the apex council. The BCCI had previously argued in favour of having the CAG nominee in the finance committee instead. On Wednesday, the BCCI once again concluded that the number of BCCI nominated members be increased to five in order to have representation on the apex council from each of the five zones. The age (70) and tenure caps (three terms of three years each) and the cooling off period (three years) between successive terms had been continuously objected by various state associations, with several BCCI administrators including N. Srinivasan, Niranjan Shah and Sharad Pawar standing disqualified from continuing in their roles. BCCI has expressed its reservations over the eligibility criteria in the past and made it clear that it wanted the cooling off period and the age restrictions removed. The SGM was convened in New Delhi to discuss and approve the adoption of the new constitution as per the Lodha Committee recommendations. The BCCI and its constituent state associations had been directed by the Supreme Court to approve as many recommendations as practicable. The meeting got off to an intriguing start after Choudhary barred BCCI CEO Rahul Johri from participating, stating the same reason that the Supreme Court used to disqualify Srinivasan and Shah - "only office bearers of state associations could attend the meeting." BCCI's latest act of defiance is likely to elicit a reaction from both Committee of Administrators and the Supreme Court before the parties meet next in August.
english
<filename>Desktop App/moon_germs_app/application.windows64/source/moon_germs_app.java<gh_stars>1-10 import processing.core.*; import processing.data.*; import processing.event.*; import processing.opengl.*; import controlP5.*; import processing.serial.*; import java.util.HashMap; import java.util.ArrayList; import java.io.File; import java.io.BufferedReader; import java.io.PrintWriter; import java.io.InputStream; import java.io.OutputStream; import java.io.IOException; public class moon_germs_app extends PApplet { // Moon Germs Desktop App // V0.1 Processing Code // Hardware and software files can be found at: https://github.com/friedpies/moon-germs // Project Details: https://hackaday.io/project/161208-moon-germs // License: MIT PImage splashScreen; PImage appBackground; PImage[] buttonOnImages = new PImage[4]; PImage[] buttonOffImages = new PImage[4]; PImage triggerImage; PImage drawingOverlayImage; PFont sevenSegment; boolean runOnce = true; // boolean to run splash screen once ControlP5 cp5; Button closeButton; ScrollableList comPortList; Toggle connectionToggle; RadioButton oscAWaveformRadioButton; Knob oscAVolumeKnob; RadioButton oscBWaveformRadioButton; Knob oscBVolumeKnob; Knob oscBDetuneKnob; Knob lfoRateKnob; Knob lfoAmountKnob; Toggle lfoOnOffToggle; RadioButton lfoDestRadioButton; Toggle filterOnOffToggle; Knob filterCutoffKnob; Knob filterQKnob; Knob ampAttackKnob; Knob ampReleaseKnob; Knob masterVolumeKnob; CheckBox triggerDestCheckBox; Button loadButton; Button saveButton; CheckBox displayCheckBox; Serial mgPort; String portName; String incomingData = ""; boolean isDeviceConnected = false; // Colors int darkYellow = color(230, 169, 64); int lightYellow = color(255, 200, 50); int black = color(0); boolean keyBounce = true; //SYNCED VARIABLES WITH DEVICE String loadData = ""; // String to hold all incoming data int bankIndex = 0; final int numberOfBanks = 4; float[] MasterVolume = new float[numberOfBanks]; int[] OscAWaveform = new int[numberOfBanks]; float[] OscAVolume = new float[numberOfBanks]; int[] OscBWaveform = new int[numberOfBanks]; float[] OscBVolume = new float[numberOfBanks]; float[] OscBDetune = new float[numberOfBanks]; float[] NoiseVolume = new float[numberOfBanks]; int[] LFOOnOff = new int[numberOfBanks]; float[] LFORate = new float[numberOfBanks]; float[] LFOAmount = new float[numberOfBanks]; int[] LFODest = new int[numberOfBanks]; int[] FilterOnOff = new int[numberOfBanks]; float[] FilterQ = new float[numberOfBanks]; float[] FilterCutoff = new float[numberOfBanks]; int[][] TriggerDest = new int[numberOfBanks][4]; int[] AmpAttack = new int[numberOfBanks]; int[] AmpRelease = new int[numberOfBanks]; float[] defaultOscAWaveform = {0, 0, 1, 0, 0}; float[] defaultOscBWaveform = {1, 0, 0, 0, 0}; boolean[] buttonDisplays = {false, false, false, false}; //PImage[] buttonOffImages = {loadImage("button1-off.png"), loadImage("button2-off.png"), loadImage("button3-off.png"), loadImage("button4-off.png")}; int[][] buttonCoordinates = { {579, 151}, {679, 151}, {757, 152}, {828, 152}}; int triggerDelta; String appState = "SPLASH"; public void settings() { size(1000, 750); } public void setup() { noStroke(); splashScreen = loadImage("moon-germs-splash3d.png"); buttonOnImages[0] = loadImage("button1-on.png"); buttonOnImages[1] = loadImage("button2-on.png"); buttonOnImages[2] = loadImage("button3-on.png"); buttonOnImages[3] = loadImage("button4-on.png"); buttonOffImages[0] = loadImage("button1-off.png"); buttonOffImages[1] = loadImage("button2-off.png"); buttonOffImages[2] = loadImage("button3-off.png"); buttonOffImages[3] = loadImage("button4-off.png"); triggerImage = loadImage("trigger.png"); drawingOverlayImage = loadImage("drawing-overlay.png"); sevenSegment = loadFont("SevenSegmentRegular-53.vlw"); textFont(sevenSegment); textAlign(CENTER, CENTER); frameRate(60); // 60 fps cp5 = new ControlP5(this); } public void draw() { switch (appState) { case "SPLASH": // splash screen on start up splashSequence(0.5f, 1, 1.5f); // need to fix bug, not quite right if (frameCount > (30 * 2)) { appState = "NORMAL"; // switch states and setup GUI before moving to normal operation setupGui(); appBackground = loadImage("app-design.png"); } break; case "NORMAL": image(appBackground, 0, 0); image(triggerImage, 532 + triggerDelta, 419); image(drawingOverlayImage, 0, 0); fill(255, 0, 0); text(bankIndex, 430, 80); showButtons(buttonDisplays); fill(darkYellow); //if (incomingData.equals("CONNECTED~")) { // incomingData = ""; // println("CONNECTED"); // connectionToggle.setValue(1.0); // isDeviceConnected = true; //} if (comPortList.isMousePressed()) { comPortList.clear(); for (int i = 0; i < Serial.list().length; i++) { comPortList.addItem(Serial.list()[i], i); } } break; } } public void showButtons(boolean[] buttonDisplays) { for (int i = 0; i < buttonDisplays.length; i++) { if (buttonDisplays[i] == true) { image(buttonOnImages[i], buttonCoordinates[i][0], buttonCoordinates[i][1]); } else { image(buttonOffImages[i], buttonCoordinates[i][0], buttonCoordinates[i][1]); } } } public void serialEvent(Serial mgPort) { incomingData = mgPort.readString(); println("SERIAL EVENT: " + incomingData); String dataType = incomingData.substring(0, 4); // Check if incoming data contains information from Buttons Presses, Bank changes, Trigger Info, and Display Info, LOAD data etc. int bank; switch (dataType) { case "CONN": println("CONNECTED"); connectionToggle.setValue(1.0f); isDeviceConnected = true; incomingData = ""; mgPort.write("L~"); // auto Load data break; case "LOAD": bank = PApplet.parseInt(incomingData.substring(incomingData.indexOf(',') + 1, incomingData.length() - 1)); bankIndex = bank; parseData(incomingData); incomingData = ""; break; case "BUTT": String buttonSubstring = incomingData.substring(incomingData.indexOf(',') + 1, incomingData.length() - 1); int button = buttonSubstring.charAt(0) - '0'; boolean value = PApplet.parseBoolean(buttonSubstring.charAt(1) - '0'); buttonDisplays[button] = value; incomingData = ""; break; case "BANK": bank = PApplet.parseInt(incomingData.substring(incomingData.indexOf(',') + 1, incomingData.length() - 1)); bankIndex = bank; updateGui( MasterVolume[bankIndex], OscAWaveform[bankIndex], OscAVolume[bankIndex], OscBWaveform[bankIndex], OscBVolume[bankIndex], OscBDetune[bankIndex], NoiseVolume[bankIndex], LFOOnOff[bankIndex], LFORate[bankIndex], LFOAmount[bankIndex], LFODest[bankIndex], FilterOnOff[bankIndex], FilterQ[bankIndex], FilterCutoff[bankIndex], TriggerDest[bankIndex][0], TriggerDest[bankIndex][1], TriggerDest[bankIndex][2], TriggerDest[bankIndex][3], AmpAttack[bankIndex], AmpRelease[bankIndex] ); //bankNumberbox.setValue(bank); incomingData = ""; break; case "TRIG": int triggerValue = PApplet.parseInt(incomingData.substring(incomingData.indexOf(',') + 1, incomingData.length() - 1)); triggerDelta = PApplet.parseInt(map(triggerValue, 1019, 524, 0, 30)); break; } } // Event listener for all controller events public void controlEvent(ControlEvent e) { if (e.isFrom(comPortList)) { // if dropdown list has been clicked if (isDeviceConnected) { // clear and stop existing serial port if device is connected mgPort.clear(); mgPort.stop(); } portName = Serial.list()[PApplet.parseInt(e.getValue())]; // Connect to device mgPort = new Serial(this, portName, 115200); mgPort.bufferUntil('~'); mgPort.write("C~"); } else if (e.isFrom(connectionToggle)) { if (e.getValue() == 0.0f) { mgPort.write("D~"); mgPort.clear(); mgPort.stop(); isDeviceConnected = false; //println(e.getValue()); } } else if (e.isFrom(closeButton)) { if (isDeviceConnected) { mgPort.write("D~"); } exit(); } else if (e.isFrom(loadButton)) { if (isDeviceConnected) { mgPort.write("L~"); } } else { if (isDeviceConnected) { String value = ""; if (e.isFrom(triggerDestCheckBox)) { // if click is from checkbox, send array float[] checkBoxArray = e.getArrayValue(); for (int i = 0; i < checkBoxArray.length; i++) { value = value + str(PApplet.parseInt(checkBoxArray[i])); // send string of 4 bits representing each check box } } else if (isDeviceConnected) { value = str(e.getValue()); } mgPort.write('P' + e.getName() + "," + value + "~"); // P for parameter //println(e.getName() + "," + value + "~"); } } } public void stop() { if (isDeviceConnected) { mgPort.write("DISCONNECT~"); } } // Function to "Pixelize" an image for aesthetic effect, wink to Teenage Engineering's website public void pixelateImage(int pixelWidth, PImage image) { int ratio = width/height; int pixelHeight = pixelWidth * ratio; for (int x = 0; x < width; x += pixelWidth) { for (int y = 0; y < height; y += pixelHeight) { fill(image.get(x, y)); rect(x, y, pixelWidth, pixelHeight); } } } public void splashSequence(float time1, float time2, float time3) { image(splashScreen, 0, 0); // show splash screen for X amount of time if (frameCount < (30 * time1)) { pixelateImage(15, splashScreen); // pixelates splashscreen image (for fun) } else if (frameCount < (30 * time2)) { pixelateImage(5, splashScreen); } } // Function to Parse data dump from device public void parseData(String loadData) { String[] dataPerBank = new String[numberOfBanks]; for (int i = 0; i < numberOfBanks; i++) { // parse all incoming data into per-bank sections dataPerBank[i] = loadData.substring(loadData.indexOf("bank:" + str(i)), loadData.indexOf("bank:" + str(i + 1))); String[] splitData = split(dataPerBank[i], '\n'); // split up strings into individual variables // populate arrays with data, this needs to be refactored at some point MasterVolume[i] = PApplet.parseFloat(splitData[1].substring((splitData[1].indexOf(':') + 1), splitData[1].length())); OscAWaveform[i] = PApplet.parseInt(splitData[2].substring((splitData[2].indexOf(':') + 1), splitData[2].length())); OscAVolume[i] = PApplet.parseFloat(splitData[3].substring((splitData[3].indexOf(':') + 1), splitData[3].length())); OscBWaveform[i] = PApplet.parseInt(splitData[4].substring((splitData[4].indexOf(':') + 1), splitData[4].length())); OscBVolume[i] = PApplet.parseFloat(splitData[5].substring((splitData[5].indexOf(':') + 1), splitData[5].length())); OscBDetune[i] = PApplet.parseFloat(splitData[6].substring((splitData[6].indexOf(':') + 1), splitData[6].length())); NoiseVolume[i] = PApplet.parseFloat(splitData[7].substring((splitData[7].indexOf(':') + 1), splitData[7].length())); LFOOnOff[i] = PApplet.parseInt(splitData[8].substring((splitData[8].indexOf(':') + 1), splitData[8].length())); LFORate[i] = PApplet.parseFloat(splitData[9].substring((splitData[9].indexOf(':') + 1), splitData[9].length())); LFOAmount[i] = PApplet.parseFloat(splitData[10].substring((splitData[10].indexOf(':') + 1), splitData[10].length())); LFODest[i] = PApplet.parseInt(splitData[11].substring((splitData[11].indexOf(':') + 1), splitData[11].length())); FilterOnOff[i] = PApplet.parseInt(splitData[12].substring((splitData[12].indexOf(':') + 1), splitData[12].length())); FilterQ[i] = PApplet.parseFloat(splitData[13].substring((splitData[13].indexOf(':') + 1), splitData[13].length())); FilterCutoff[i] = PApplet.parseFloat(splitData[14].substring((splitData[14].indexOf(':') + 1), splitData[14].length())); TriggerDest[i][0] = PApplet.parseInt(splitData[15].substring((splitData[15].indexOf(':') + 1), splitData[15].length())); TriggerDest[i][1] = PApplet.parseInt(splitData[16].substring((splitData[16].indexOf(':') + 1), splitData[16].length())); TriggerDest[i][2] = PApplet.parseInt(splitData[17].substring((splitData[17].indexOf(':') + 1), splitData[17].length())); TriggerDest[i][3] = PApplet.parseInt(splitData[18].substring((splitData[18].indexOf(':') + 1), splitData[18].length())); AmpAttack[i] = PApplet.parseInt(splitData[19].substring((splitData[19].indexOf(':') + 1), splitData[19].length())); AmpRelease[i] = PApplet.parseInt(splitData[20].substring((splitData[20].indexOf(':') + 1), splitData[20].length())); } //println(LFOOnOff); } public void setupGui() { PFont smallFont; smallFont = loadFont("Avenir-Light-10.vlw"); // Setup Font ////////////////////////////////////////////////////////////// // GUI COMPONENTS FOR OSCILLATOR A closeButton = cp5.addButton("closeButton") .setImages(loadImage("close-button-off.png"), loadImage("close-button-off.png"), loadImage("close-button-on.png")) .setPosition(966, 3) ; oscAWaveformRadioButton = cp5.addRadioButton("oscAWaveform") .setPosition(33, 250) .setImages(loadImage("radio-button-off.png"), loadImage("radio-button-hover.png"), loadImage("radio-button-on.png")) .setSize(15, 15) .setItemsPerRow(1) .setSpacingColumn(20) .setSpacingRow(6) .addItem("SINE A", 0) // 0:Sine, 1:Sawtooth, 2:Square, 3:Triangle, 6:Reverse Saw .addItem("SAW A", 1) .addItem("REV SAW A", 6) .addItem("SQUARE A", 2) .addItem("TRIANGLE A", 3) .setArrayValue(defaultOscAWaveform) ; oscAVolumeKnob = cp5.addKnob("oscAVolume") .setPosition(132, 258) .setRange(0, 1.0f) .setColorBackground(darkYellow) .setColorForeground(0) .setColorActive(0) .setValue(0.5f) .setLabelVisible(false) .setRadius(35) .setDragDirection(Knob.VERTICAL) .setLabel("Volume") ; ////////////////////////////////////////////////////////////// // GUI COMPONENTS FOR OSCILLATOR B oscBWaveformRadioButton = cp5.addRadioButton("oscBWaveform") .setPosition(33, 440) .setImages(loadImage("radio-button-off.png"), loadImage("radio-button-hover.png"), loadImage("radio-button-on.png")) .setItemsPerRow(1) .setSpacingColumn(20) .setSpacingRow(5) .addItem("SINE B", 0) // 0:Sine, 1:Sawtooth, 2:Square, 3:Triangle, 6:Reverse Saw .addItem("SAW B", 1) .addItem("REV SAW B", 6) .addItem("SQUARE B", 2) .addItem("TRIANGLE B", 3) .setArrayValue(defaultOscBWaveform) ; oscBVolumeKnob = cp5.addKnob("oscBVolume") .setPosition(132, 443) .setRange(0, 1.0f) .setValue(0.5f) .setColorBackground(darkYellow) .setColorForeground(0) .setColorActive(0) .setLabelVisible(false) .setRadius(35) .setDragDirection(Knob.VERTICAL) .setLabel("Volume") ; oscBDetuneKnob = cp5.addKnob("oscBDetune") .setPosition(232, 443) .setColorBackground(darkYellow) .setColorForeground(0) .setColorActive(0) .setRange(0, 2) .setValue(1) .setLabelVisible(false) .setRadius(35) .setDragDirection(Knob.VERTICAL) .setLabel("Detune") ; ////////////////////////////////////////////////////////////// // GUI COMPONENTS FOR FILTER filterOnOffToggle = cp5.addToggle("filterOnOff") .setPosition(37, 651) .setImages(loadImage("toggle-off.png"), loadImage("toggle-on.png")) .setValue(0) .setSize(80, 80) ; filterCutoffKnob = cp5.addKnob("filterCutoff") .setPosition(132, 621) .setRange(0, 8000) .setColorBackground(darkYellow) .setColorForeground(0) .setColorActive(0) .setValue(5) .setLabelVisible(false) .setRadius(35) .setDragDirection(Knob.VERTICAL) .setLabel("Cutoff") ; filterQKnob = cp5.addKnob("filterQ") .setPosition(232, 621) .setRange(0.7f, 5) .setColorBackground(darkYellow) .setColorForeground(0) .setColorActive(0) .setLabelVisible(false) .setValue(0.707f) .setRadius(35) .setDragDirection(Knob.VERTICAL) .setLabel("Resonance") ; ////////////////////////////////////////////////////////////// // GUI COMPONENTS FOR LFO lfoOnOffToggle = cp5.addToggle("lfoOnOff") .setPosition(367, 651) .setImages(loadImage("toggle-off.png"), loadImage("toggle-on.png")) .setValue(0) .setSize(40, 40) ; lfoRateKnob = cp5.addKnob("lfoRate") .setPosition(458, 621) .setRange(0, 10) .setColorBackground(darkYellow) .setColorForeground(0) .setColorActive(0) .setLabelVisible(false) .setValue(0) .setRadius(35) .setDragDirection(Knob.VERTICAL) .setLabel("LFO Rate") ; lfoAmountKnob = cp5.addKnob("lfoAmount") .setPosition(564, 621) .setColorBackground(darkYellow) .setColorForeground(0) .setColorActive(0) .setLabelVisible(false) .setRange(0, 1.0f) .setValue(0.5f) .setRadius(35) .setDragDirection(Knob.VERTICAL) .setLabel("LFO Amount") ; ////////////////////////////////////////////////////////////// // GUI COMPONENTS FOR AMP ENVELOPE ampAttackKnob = cp5.addKnob("ampAttack") .setPosition(697, 621) .setRange(0, 1000) .setColorBackground(darkYellow) .setColorForeground(0) .setColorActive(0) .setLabelVisible(false) .setValue(0) .setRadius(35) .setDragDirection(Knob.VERTICAL) .setLabel("Attack") ; ampReleaseKnob = cp5.addKnob("ampRelease") .setPosition(795, 621) .setRange(0, 1000) .setColorBackground(darkYellow) .setColorForeground(0) .setColorActive(0) .setValue(0) .setLabelVisible(false) .setRadius(35) .setDragDirection(Knob.VERTICAL) .setLabel("Release") ; masterVolumeKnob = cp5.addKnob("masterVolume") .setPosition(895, 621) .setRange(0, 1) .setColorBackground(darkYellow) .setColorForeground(0) .setColorActive(0) .setValue(0.5f) .setLabelVisible(false) .setRadius(35) .setDragDirection(Knob.VERTICAL) .setLabel("Master Volume") ; /////////////////////////////////////////////////////////////// // GUI COMPONENTS FOR TRIGGER triggerDestCheckBox = cp5.addCheckBox("triggerDest") .setPosition(363, 465) .setImages(loadImage("radio-button-off.png"), loadImage("radio-button-hover.png"), loadImage("radio-button-on.png")) .setSize(15, 15) .setItemsPerRow(1) .setSpacingColumn(20) .setSpacingRow(6) .addItem("OSC B DETUNE", 0) // multiple destinations can be selected at once .addItem("FILTER", 1) .addItem("LFO RATE", 2) .addItem("LFO AMOUNT", 3) ; ////////////////////////////////////////////////////////////// // GUI COMPONENTS FOR LOAD SAVE //saveButton = cp5.addButton("saveButton") // .setPosition(859, 52) // .setSize(80, 60) // .setImages(loadImage("save-button-off.png"), loadImage("save-button-on.png"), loadImage("save-button-off.png")) // .setLabel("SAVE CHANGES") // .setLabelVisible(false) // ; //loadButton = cp5.addButton("loadButton") // .setPosition(723, 52) // .setSize(80, 60) // .setImages(loadImage("load-button-off.png"), loadImage("load-button-on.png"), loadImage("load-button-off.png")) // .setLabel("SAVE CHANGES") // .setLabelVisible(false) // ; // Graphical Components for Device displayCheckBox = cp5.addCheckBox("displayCheckBox") .setPosition(446, 245) .setSize(13, 13) .setItemsPerRow(8) .setSpacingColumn(3) .setSpacingRow(3) .setColorBackground(color(125, 125, 125)) .setColorActive(color(255, 0, 0)) .setColorForeground(color(255, 127, 127)) ; for (int i = 0; i < 64; i++) { displayCheckBox.addItem(str(i), i); } displayCheckBox.hideLabels(); // GUI Components for COM PORT comPortList = cp5.addScrollableList("comPortList") .setPosition(16, 69) .setItemHeight(20) .setFont(smallFont) .setImages(loadImage("radio-button-off.png"), loadImage("radio-button-hover.png"), loadImage("radio-button-on.png")) .setBarHeight(25) .setHeight(17) .setSize(225, 200) .setLabel("SELECT COM PORT") .setColorBackground(darkYellow) .setColorForeground(lightYellow) .setColorLabel(black) .setColorValue(black) ; connectionToggle = cp5.addToggle("connectionToggle") .setPosition(257, 127) .setSize(50, 50) .setImages(loadImage("connection-toggle-off.png"), loadImage("connection-toggle-hover.png"), loadImage("connection-toggle-on.png")) .setValue(0) ; } // updates values of buttons/knobs/sliders when bank is switched public void updateGui( float masterVolume, int oscAWaveform, float oscAVolume, int oscBWaveform, float oscBVolume, float oscBDetune, float noiseVolume, int lfoOnOff, float lfoRate, float lfoAmount, int lfoDest, int filterOnOff, float filterQ, float filterCutoff, int triggerDest0, int triggerDest1, int triggerDest2, int triggerDest3, int ampAttack, int ampRelease ) { masterVolumeKnob.setValue(masterVolume); float[] waveformSetArray = new float[5]; //0:Sine, 1:Sawtooth, 2:Square, 3:Triangle, 6:Reverse Saw switch(oscAWaveform) { // switch statement to map waveform values to an initialization array case 0: waveformSetArray[0] = 1; break; case 1: waveformSetArray[1] = 1; break; case 2: waveformSetArray[2] = 1; break; case 3: waveformSetArray[3] = 1; break; case 6: waveformSetArray[4] = 1; break; } oscAWaveformRadioButton.setArrayValue(waveformSetArray); oscAVolumeKnob.setValue(oscAVolume); waveformSetArray = new float[5]; switch(oscAWaveform) { case 0: waveformSetArray[0] = 1; break; case 1: waveformSetArray[1] = 1; break; case 2: waveformSetArray[2] = 1; break; case 3: waveformSetArray[3] = 1; break; case 6: waveformSetArray[4] = 1; break; } oscBWaveformRadioButton.setArrayValue(waveformSetArray); oscBVolumeKnob.setValue(oscBVolume); oscBDetuneKnob.setValue(oscBDetune); //noiseVolumeKnob lfoOnOffToggle.setValue(lfoOnOff); lfoRateKnob.setValue(lfoRate); lfoAmountKnob.setValue(lfoAmount); //lfoDestRadioButton.setValue(lfoDest); filterOnOffToggle.setValue(filterOnOff); filterQKnob.setValue(filterQ); filterCutoffKnob.setValue(filterCutoff); float[] triggerDestArray = {triggerDest0, triggerDest1, triggerDest2, triggerDest3}; triggerDestCheckBox.setArrayValue(triggerDestArray); ampAttackKnob.setValue(ampAttack); ampReleaseKnob.setValue(ampRelease); } static public void main(String[] passedArgs) { String[] appletArgs = new String[] { "moon_germs_app" }; if (passedArgs != null) { PApplet.main(concat(appletArgs, passedArgs)); } else { PApplet.main(appletArgs); } } }
java
package game; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import entity.Entity; public class KeyInput extends KeyAdapter { Handler handler; public KeyInput(Handler handler) { this.handler = handler; } public void keyPressed(KeyEvent e) { int key = e.getKeyCode(); for (int i = 0; i < handler.e.size(); i++) { Entity en = handler.e.get(i); if (en.getId() == ID.Player) { if (key == KeyEvent.VK_W) { handler.setUp(true); handler.setDown(false); handler.setLeft(false); handler.setRight(false); } if (key == KeyEvent.VK_S) { handler.setDown(true); handler.setUp(false); handler.setLeft(false); handler.setRight(false); } if (key == KeyEvent.VK_A) { handler.setLeft(true); handler.setDown(false); handler.setUp(false); handler.setRight(false); } if (key == KeyEvent.VK_D) { handler.setRight(true); handler.setDown(false); handler.setLeft(false); handler.setUp(false); } } } } }
java
Raipur: A teenager allegedly borrowed Rs 75,000 as a loan to buy additional features in a game and ended up paying with his life. The boy was allegedly murdered after he was unable to repay the loan. Reportedly, the 17-year-old boy went missing five days before he was found dead. The body of the missing teenager was found in the forests of Sarangarh region of Raigarh. As per the police, the teenager used to play games on his mobile phone. Whenever the teenager's mother confronted him, he claimed that he was attending online classes. The boy, who allegedly became addicted to the game, borrowed Rs 75,000 from his friend as he wanted to purchase additional features like guns and bullets for an online game. The teenager's friend Chavan Khunte started asking for the money in January but he always made excuses. Suspicious that the teen would never return the money, Khunte decided to teach him a lesson, The Times of India reported. On March 10, Khunte called the boy to meet him and forced him to consume alcohol. After consuming alcohol, the accused again asked the teenager for the money and he started making excuses. The two then had an argument and Chavan allegedly slit the teenager's throat with a blade, killing him. Following this, Chavan alleged cooked up a kidnapping story and sent a ransom message to the 17-year-old boy's mother. He demanded Rs 5 lakh for the release of the teenager. The teen's mother approached the cops and a probe was launched. The police used the CCTV footage of nearby areas to locate the accused and picked him for questioning. During the interrogation, the accused confessed to the crime and was arrested.
english
var _ = require("lodash"); var nand = function(a) { return function(b) { return a === 1 && b === 1 ? 0 : 1; }; }; var not = function(a) { return nand(a)(a); }; var and = function(a) { return function(b) { return not(nand(a)(b)); }; }; var andMBit = function(xs, ys) { return _.zipWith(xs, ys, function(x,y) { return and(x)(y); }); }; var or = function(a) { return function(b) { return nand(nand(a)(a))(nand(b)(b)); }; }; var xor = function(a) { return function(b) { return and(or(a)(b))(nand(a)(b)); }; }; var halfAdder = function(a, b) { return { sum: xor(a)(b), carry: and(a)(b) }; }; var fullAdder = function(c,a,b) { a = halfAdder(a, b); b = halfAdder(a.sum, c); return { sum: b.sum, carry: xor(a.carry)(b.carry) } } var addMBit = function(xs, ys) { var ret = [], width = xs.length, carry = 0; while (width--) { var obj = fullAdder(xs[width], ys[width], carry); ret[width] = obj.sum; carry = obj.carry; } return ret; }; module.exports = { nand: nand, not: not, and: and, andMBit: andMBit, or: or, xor: xor, halfAdder: halfAdder, fullAdder: fullAdder, addMBit: addMBit };
javascript
"JavaScript is a standard programming language that is included to provide interactive features, Kindly enable Javascript in your browser. For details visit help page" E-Book (bilingual) RTI Portal(website) Download FIle: RFP PMA DTIS V1.0 Published Date 15 Jul 2020.Pdf (767.1 KB)
english
import { EventEmitter } from 'events'; import { AgentConfig } from '../agent/AgentConfig'; import { ConnectionService, ConnectionStateChangedEvent } from '../protocols/connections/ConnectionService'; import { ConsumerRoutingService } from '../protocols/routing/ConsumerRoutingService'; import { ConnectionRecord } from '../storage/ConnectionRecord'; import { ConnectionState } from '../protocols/connections/domain/ConnectionState'; import { ConnectionInvitationMessage } from '../protocols/connections/ConnectionInvitationMessage'; import { MessageSender } from '../agent/MessageSender'; import { ConnectionEventType } from '..'; import { JsonTransformer } from '../utils/JsonTransformer'; export class ConnectionsModule { private agentConfig: AgentConfig; private connectionService: ConnectionService; private consumerRoutingService: ConsumerRoutingService; private messageSender: MessageSender; public constructor( agentConfig: AgentConfig, connectionService: ConnectionService, consumerRoutingService: ConsumerRoutingService, messageSender: MessageSender ) { this.agentConfig = agentConfig; this.connectionService = connectionService; this.consumerRoutingService = consumerRoutingService; this.messageSender = messageSender; } public async createConnection(config?: { autoAcceptConnection?: boolean; alias?: string }) { const connection = await this.connectionService.createConnectionWithInvitation({ autoAcceptConnection: config?.autoAcceptConnection, alias: config?.alias, }); if (!connection.invitation) { throw new Error('Connection has no invitation assigned.'); } // If agent has inbound connection, which means it's using a mediator, we need to create a route for newly created // connection verkey at mediator. if (this.agentConfig.inboundConnection) { this.consumerRoutingService.createRoute(connection.verkey); } return connection; } /** * Receive connection invitation and create connection. If auto accepting is enabled * via either the config passed in the function or the global agent config, a connection * request message will be send. * * @param invitationJson json object containing the invitation to receive * @param config config for handling of invitation * @returns new connection record */ public async receiveInvitation( invitationJson: Record<string, unknown>, config?: { autoAcceptConnection?: boolean; alias?: string; } ): Promise<ConnectionRecord> { const invitationMessage = JsonTransformer.fromJSON(invitationJson, ConnectionInvitationMessage); let connection = await this.connectionService.processInvitation(invitationMessage, { autoAcceptConnection: config?.autoAcceptConnection, alias: config?.alias, }); // if auto accept is enabled (either on the record or the global agent config) // we directly send a connection request if (connection.autoAcceptConnection ?? this.agentConfig.autoAcceptConnections) { connection = await this.acceptInvitation(connection.id); } return connection; } /** * Accept a connection invitation (by sending a connection request message) for the connection with the specified connection id. * This is not needed when auto accepting of connections is enabled. * * @param connectionId the id of the connection for which to accept the invitation * @returns connection record */ public async acceptInvitation(connectionId: string): Promise<ConnectionRecord> { const outboundMessage = await this.connectionService.createRequest(connectionId); // If agent has inbound connection, which means it's using a mediator, // we need to create a route for newly created connection verkey at mediator. if (this.agentConfig.inboundConnection) { await this.consumerRoutingService.createRoute(outboundMessage.connection.verkey); } await this.messageSender.sendMessage(outboundMessage); return outboundMessage.connection; } /** * Accept a connection request (by sending a connection response message) for the connection with the specified connection id. * This is not needed when auto accepting of connection is enabled. * * @param connectionId the id of the connection for which to accept the request * @returns connection record */ public async acceptRequest(connectionId: string): Promise<ConnectionRecord> { const outboundMessage = await this.connectionService.createResponse(connectionId); await this.messageSender.sendMessage(outboundMessage); return outboundMessage.connection; } /** * Accept a connection response (by sending a trust ping message) for the connection with the specified connection id. * This is not needed when auto accepting of connection is enabled. * * @param connectionId the id of the connection for which to accept the response * @returns connection record */ public async acceptResponse(connectionId: string): Promise<ConnectionRecord> { const outboundMessage = await this.connectionService.createTrustPing(connectionId); await this.messageSender.sendMessage(outboundMessage); return outboundMessage.connection; } public async returnWhenIsConnected(connectionId: string): Promise<ConnectionRecord> { const isConnected = (connection: ConnectionRecord) => { return connection.id === connectionId && connection.state === ConnectionState.Complete; }; const connection = await this.connectionService.find(connectionId); if (connection && isConnected(connection)) return connection; return new Promise(resolve => { const listener = ({ connection }: ConnectionStateChangedEvent) => { if (isConnected(connection)) { this.events().off(ConnectionEventType.StateChanged, listener); resolve(connection); } }; this.events().on(ConnectionEventType.StateChanged, listener); }); } public async getAll() { return this.connectionService.getConnections(); } public async find(connectionId: string): Promise<ConnectionRecord | null> { return this.connectionService.find(connectionId); } public async findConnectionByVerkey(verkey: Verkey): Promise<ConnectionRecord | null> { return this.connectionService.findByVerkey(verkey); } public async findConnectionByTheirKey(verkey: Verkey): Promise<ConnectionRecord | null> { return this.connectionService.findByTheirKey(verkey); } public events(): EventEmitter { return this.connectionService; } }
typescript
Security has been increased at Amitabh Bachchan and Jaya Bachchan's home a day after she slammed those who are tarnishing the image of Bollywood in parliament. The Mumbai Police has provided the additional security outside Jalsa, the Bachchans' bungalow in Juhu. According to police, it is a precautionary measure amid vicious trolling of Jaya Bachchan on social media after her speech. Even as Jaya received huge support from many in Bollywood after her speech, a large section of netizens criticised her statements, with hashtags such as #ShameOnJayaBachchan trending on Twitter. Reports state that security in the area has been increased as a precautionary measure, but the Bachchan's family will not receive any special protection.
english
TheSportsRush brings Chelsea’s expected lineup vs Cardiff City as Maurizio Sarri’s side aims to continue the winning run this season. Maurizio Sarri’s football philosophy, ‘Sarri-ball,’ has been well-adapted by Chelsea so far. They still look sloppy in defence, and Sarri needs to find a perfect balance for high-press and high-line. After heading to the international break with a perfect record in the league, the Blues return to Stamford Bridge as they host Cardiff City. Cardiff faces a tough challenge in the Premier League, as four of their six upcoming games are against top-six sides of 2017/18 campaign. They posed a tough fight against Unai Emery’s Arsenal, where they showed immense character in coming back twice into the match. However, they conceded a late goal to Alexandre Lacazette which made the difference in the end. As Chelsea takes another step towards closing-in with Liverpool for the first position in the table, theSportsRush takes a look at their expected lineup. The Spanish new recruit has so far been solid for Chelsea, and is likely to continue in front of the goal. Even though the defence has struggled with ‘Sarri-ball’ so far, the Italian manager would want his players to adapt to his philosophy and field the same defensive line-up against Cardiff City. N’Golo Kante seems to have assumed his new role quite efficiently in the middle of the pitch. The French midfielder, who played in a more defensive position under Antonio Conte, now makes penetrative runs into opposition’s half under Maurizio Sarri. With him, Jorginho and Kovacic make an effective midfield trio. Alvaro Morata could still keep his position as first-choice forward against Cardiff City. The Spanish forward may have not impressed the Blues so far, but Sarri might give him an opportunity in a relatively easier game. Willian and Hazard will continue on either wings. EXPECTED LINEUP:
english
{% extends "contrato.html" %} {% load static %} {% block dash_content %} <div class="container" > <div class="account-wall col" > <div class="row"> <div class="col-sm"> <img src="{% static 'img/eth.png' %}"> </div> <div class="col-sm-6"> <h1 class="text-center">Transferencia de Token</h1> </div> <div class="col-sm"></div> </div> <h2 class="text-center" style="color: black;">Escolha o Token</h2><br> <form class="form-signin text-center" method="POST"> {% csrf_token %} <fieldset class="resset" > <div class="geral_lin"> <div class="car_label" > Token </div> <div class="car_field"> <select name="token" required id="id_token"> <option value="" selected>---------</option> {% for car in token %} <option value="{{ car.id}}" >{{ car.token }}</option> {% endfor %} </select> </div> </div> <div ><br> <h2 class="text-center" style="color: black">Dados do Tomador</h2><br> </div> <div class="erro_login"> {{ form.non_field_errors }} </div> {% for field in form %} <div class="geral_lin"> <div class="car_label" > {{ field.label_tag }} </div> <div class="car_field"> {{ field }} </div> </div> <div class="erro_login"> {{ field.errors }} </div> {% endfor %} <div class="geral_lin"> <div class="car_label"> <label>Valor</label> </div> <div class="car_field"> <input type="text" name="valor" > </div> </div> <div ><br><br> <button class="btn btn-lg btn-secondary"> Enviar </button> <a href="{% url 'con:contrato' %}"> <button type="button" class="btn btn-lg btn-danger"> Cancelar </button> </a> </div> </fieldset> </form> </div> <br> </div> {% endblock %}
html
{ "id": 18990, "name": "the How-To Geek - News and comments (600px)", "description": "Removes all except news and user comments. Good for a narrow browser window.", "user": { "id": 25145, "name": "Zoltar", "email": "redacted", "paypal_email": null, "homepage": null, "about": null, "license": null }, "updated": "2009-07-16T20:45:57.000Z", "weekly_install_count": 0, "total_install_count": 429, "rating": null, "after_screenshot_name": "https://userstyles.org/auto_style_screenshots/18990-after.png?r=1586937837", "obsoleting_style_id": null, "obsoleting_style_name": null, "obsolete": 0, "admin_delete_reason_id": null, "obsoletion_message": null, "screenshots": null, "license": null, "created": "2009-06-25T10:03:02.000Z", "category": "site", "raw_subcategory": "howtogeek", "subcategory": "howtogeek", "additional_info": null, "style_tags": [], "css": "@namespace url(http://www.w3.org/1999/xhtml);\r\n\r\n@-moz-document domain(\"howtogeek.com\") {\r\n\r\n #tophead,\r\n #headerpanel,\r\n #ft,\r\n #hd,\r\n #JGRSmain,\r\n div[class=\"yui-g\"],\r\n div[class=\"yui-u\"],\r\n div[class=\"contsep\"],\r\n div[style^=\"margin-top\"],\r\n table[id=\"articleTable\"] {\r\n display: none!important;\r\n }\r\n \r\n #doc {\r\n margin: 1px!important;\r\n }\r\n\r\n body {\r\n background: none!important ;\r\n width: 570px!important ;\r\n }\r\n\r\n #bd, #doc4 {\r\n width: 600px!important ;\r\n }\r\n\r\n #doc, #doc2, #doc3, #doc4, .yui-t1, .yui-t2, .yui-t3, .yui-t4, .yui-t5, .yui-t6, .yui-t7{\r\n width: 570px!important ;\r\n min-width:570px!important ;\r\n margin: 1px !important;\r\n }\r\n\r\n .yui-ge div.first, .yui-gf .yui-g, .yui-gf .yui-u {\r\n width:100%!important;\r\n }\r\n\r\n .content {\r\n margin-right: 1px!important ;\r\n }\r\n\r\n div[class=\"content\"],\r\n ol[class=\"commentlist\"],\r\n div[class=\"yui-ge\"] {\r\n width: 595px !important;\r\n }\r\n\r\n textarea[id=\"comment\"] {\r\n width: 560px !important;\r\n }\r\n\r\n li[class=\"comment-alt\"],\r\n li[class=\"comment-def\"] {\r\n width: 560px !important;\r\n }\r\n}\r\n", "discussions": [], "discussionsCount": 0, "commentsCount": 0, "userjs_url": "/styles/userjs/18990/the-how-to-geek-news-and-comments-600px.user.js", "style_settings": [] }
json
package com.microservice.consumermicroservice; import org.springframework.amqp.rabbit.annotation.EnableRabbit; import org.springframework.amqp.rabbit.annotation.RabbitListenerConfigurer; import org.springframework.amqp.rabbit.listener.RabbitListenerEndpointRegistrar; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.context.annotation.Bean; import org.springframework.messaging.converter.MappingJackson2MessageConverter; import org.springframework.messaging.handler.annotation.support.DefaultMessageHandlerMethodFactory; @SpringBootApplication @EnableRabbit @EnableDiscoveryClient public class ConsumerMicroserviceApplication implements RabbitListenerConfigurer { public static void main(String[] args) { SpringApplication.run(ConsumerMicroserviceApplication.class, args); } @Bean public MappingJackson2MessageConverter jackson2Converter() { MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter(); return converter; } @Bean public DefaultMessageHandlerMethodFactory myHandlerMethodFactory() { DefaultMessageHandlerMethodFactory factory = new DefaultMessageHandlerMethodFactory(); factory.setMessageConverter(jackson2Converter()); return factory; } @Override public void configureRabbitListeners(RabbitListenerEndpointRegistrar listenerRegistrar) { listenerRegistrar.setMessageHandlerMethodFactory(myHandlerMethodFactory()); } }
java
There was, until a year ago, a little and very grimy-looking shop near Seven Dials, over which, in weather-worn yellow lettering, the name of "C. Cave, Naturalist and Dealer in Antiquities," was inscribed. The contents of its window were curiously variegated. They comprised some elephant tusks and an imperfect set of chessmen, beads and weapons, a box of eyes, two skulls of tigers and one human, several moth-eaten stuffed monkeys (one holding a lamp), an old-fashioned cabinet, a flyblown ostrich egg or so, some fishing-tackle, and an extraordinarily dirty, empty glass fish-tank. There was also, at the moment the story begins, a mass of crystal, worked into the shape of an egg and brilliantly polished. And at that two people, who stood outside the window, were looking, one of them a tall, thin clergyman, the other a black-bearded young man of dusky complexion and unobtrusive costume. [2]The dusky young man spoke with eager gesticulation, and seemed anxious for his companion to purchase the article. While they were there, Mr. Cave came into his shop, his beard still wagging with the bread and butter of his tea. When he saw these men and the object of their regard, his countenance fell. He glanced guiltily over his shoulder, and softly shut the door. He was a little old man, with pale face and peculiar watery blue eyes; his hair was a dirty grey, and he wore a shabby blue frock coat, an ancient silk hat, and carpet slippers very much down at heel. He remained watching the two men as they talked. The clergyman went deep into his trouser pocket, examined a handful of money, and showed his teeth in an agreeable smile. Mr. Cave seemed still more depressed when they came into the shop. II—THE CAVE BEAR In the days when Eudena and Ugh-lomi fled from the people of Uya towards the fir-clad mountains of the Weald, across the forests of sweet chestnut and the grass-clad chalkland, and hid themselves at last in ...Read Moregorge of the river between the chalk cliffs, men were few and their squatting-places far between. The nearest men to them were those of the tribe, a full day's journey down the river, and up the mountains there were none. Man was indeed a[89] newcomer to this part of the world in that ancient time, coming slowly along the rivers, III—THE FIRST HORSEMAN In the days before Ugh-lomi there was little trouble between the horses and men. They lived apart—the men in the river swamps and thickets, the horses on the wide grassy uplands between the chestnuts and the ...Read MoreSometimes a pony would come straying into the clogging marshes to make a flint-hacked meal, and sometimes the tribe would find one, the kill of a lion, and drive off the jackals, and feast heartily while the sun was high. These horses of the old time were clumsy at the fetlock and dun-coloured, with a rough tail and big head.
english
Janhvi Kapoor is an ace actor and a true fashionista. Actors are known to have entire entourages to manage their schedules, makeup and hair. However. every actor has to be prepared for things not in their control. Janhvi Kapoor took to Instagram to share her ordeal before her performance at Filmfare awards ceremony that was held yesterday. She captioned her post, “when the zip of your gown rips 5 minutes before the red carpet and 12 minutes before you have to perform on stage" Check the post here: A post shared by Janhvi Kapoor (@janhvikapoor) We know Janhvi Kapoor must have still aced the perfeormance. No doubts there!
english
<filename>app/routes/demo-2.js import Route from '@ember/routing/route'; import { task } from 'ember-concurrency'; import { get } from '@ember/object'; export default Route.extend({ model() { return { students: get(this, 'getRessource').perform('student'), books: get(this, 'getRessource').perform('book') }; }, getRessource: task(function * (modelName) { return yield this.store.findAll(modelName); }), // actions: { // onSync() { // this.refresh(); // } // } });
javascript
<gh_stars>0 from torch_snippets import * from PIL import Image import glob import os from utils import preprocess_image class OpenDataset(torch.utils.data.Dataset): w, h = 224, 224 def __init__(self, df, root_dir, label2target): self.root_dir = root_dir self.df = df self.label2target = label2target def __getitem__(self, ix): img_path = os.path.join(self.root_dir, self.df.iloc[ix, 0]) img = Image.open(img_path).convert("RGB") H, W, C = np.array(img).shape img = np.array(img.resize((self.w, self.h), resample=Image.BILINEAR)) / 255. bbox = (self.df.iloc[ix, 3:7].values) / [W, H, W, H] bbox = bbox * [self.w, self.h, self.w, self.h] bbox = np.expand_dims(bbox, axis=0) bbox = bbox.tolist() target = {} target['boxes'] = torch.Tensor(bbox).float() target['labels'] = torch.Tensor(self.label2target[self.df.iloc[ix, 0].split('/')[0]]).long() img = preprocess_image(img) return img, target def collate_fn(self, batch): return tuple(zip(*batch)) def __len__(self): return len(self.df)
python
After Indian National Congress, the Aam Aadmi Party has extended its support to the wrestlers' protest. The wrestlers moved Supreme Court on Monday asking FIR to be registered against the under-fire WFI president Brij Bhushan Sharan Singh over complaints of sexual harassment. The wrestlers will keep a 'maun' till 9 AM on Tuesday, April 25. The Aam Aadmi Party (AAP) on Monday extended its support to the country's top wrestlers , staging a protest here in Jantar Mantar against the chief of Wrestling Federation of India (WFI) Brij Bhushan Sharan Singh, demanding the registration of an FIR against him over complaints of sexual harassment by several women wrestlers. AAP's Haryana in-charge and Rajya Sabha member Sushil Gupta on Monday, who met the protesting wrestlers at Jantar Mantar, said the Delhi Police should immediately lodge an FIR against WFI president Singh. "Top athletes have levelled serious allegations of sexual harassment against Singh. The wrestlers had staged a sit-in at Jantar Mantar three months ago. Under pressure, the Sports Ministry set up an enquiry committee. "It's unfortunate that the wrestlers need to knock on the doors of the Supreme Court over FIR registration and also to demand justice," he said. The AAP leader said that even after three months, the enquiry report has not been made public. "Players are seeking an FIR against Singh, and that athletes are required to stage a protest again is proof that the BJP government does not take action against influential persons despite serious allegations," he said. Gupta further said no FIR has been lodged against Singh as "the Delhi Police is under the pressure of the Central government". He said the AAP stands with the wrestlers, adding the party wants the Central government to act on the demands of the wrestlers and lodge an FIR against Singh at the earliest.
english
{ "authority": "<KEY>", "mintWrapper": "<KEY>", "quarries": [ { "index": 0, "isReplica": false, "mergePool": "Db7stn3t2Y89GVMWCny7egDp3BoCe3CBghN7USv8F6eY", "primaryQuarries": [], "primaryToken": { "decimals": 6, "mint": "<KEY>" }, "primaryTokenInfo": { "address": "<KEY>", "chainId": 103, "decimals": 6, "name": "Token 5bZi", "symbol": "5bZis" }, "quarry": "8nHwKBvQ9zXPkF4pP8VP8sfanesP3zJsZQfg5ov6Ztu5", "replicaMint": "<KEY>", "replicaQuarries": [], "slug": "5bzis", "stakedToken": { "decimals": 6, "mint": "<KEY>" } }, { "index": 1, "isReplica": false, "mergePool": "HCy98dpkuvzhX5rD1FdBhGddAg8CgAm1B6PsQPgQPPpY", "primaryQuarries": [], "primaryToken": { "decimals": 6, "mint": "<KEY>" }, "primaryTokenInfo": { "address": "<KEY>", "chainId": 103, "decimals": 6, "name": "Token 9dUf", "symbol": "9dUfn" }, "quarry": "BqX7i4G4k7ryfkyZDejkbj5xmmHNrMy2QwxvZ2Ejx6X1", "replicaMint": "<KEY>", "replicaQuarries": [], "slug": "9dufn", "stakedToken": { "decimals": 6, "mint": "<KEY>" } } ], "rewardsToken": { "decimals": 6, "mint": "<KEY>" }, "rewardsTokenInfo": { "address": "<KEY>", "chainId": 103, "decimals": 6, "name": "Token J6As", "symbol": "J6AsW" }, "slug": "An79snXjBVu7bKWxeE7P8VtgCsPDFeNBbwyEvojiH2X1" }
json
/* * Copyright 2020 Google LLC * * 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.google.tsunami.plugins.detectors.cves.cve202129441; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.net.HttpHeaders.USER_AGENT; import static com.google.tsunami.common.data.NetworkEndpointUtils.toUriAuthority; import static com.google.tsunami.common.net.http.HttpRequest.get; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.common.flogger.GoogleLogger; import com.google.protobuf.util.Timestamps; import com.google.tsunami.common.data.NetworkServiceUtils; import com.google.tsunami.common.net.http.HttpClient; import com.google.tsunami.common.net.http.HttpHeaders; import com.google.tsunami.common.net.http.HttpResponse; import com.google.tsunami.common.time.UtcClock; import com.google.tsunami.plugin.PluginType; import com.google.tsunami.plugin.VulnDetector; import com.google.tsunami.plugin.annotations.PluginInfo; import com.google.tsunami.proto.DetectionReport; import com.google.tsunami.proto.DetectionReportList; import com.google.tsunami.proto.DetectionStatus; import com.google.tsunami.proto.NetworkService; import com.google.tsunami.proto.Severity; import com.google.tsunami.proto.TargetInfo; import com.google.tsunami.proto.Vulnerability; import com.google.tsunami.proto.VulnerabilityId; import java.io.IOException; import java.time.Clock; import java.time.Instant; import javax.inject.Inject; /** A {@link VulnDetector} that detects the CVE-2021-29441 vulnerability. */ @PluginInfo( type = PluginType.VULN_DETECTION, name = "CVE202129441VulnDetector", version = "0.1", description = "Nacos is a platform designed for dynamic service discovery and configuration and service" + " management. In Nacos before version 1.4.1, when configured to use authentication" + " (-Dnacos.core.auth.enabled=true) Nacos uses the AuthFilter servlet filter to" + " enforce authentication. This filter has a backdoor that enables Nacos servers to" + " bypass this filter and therefore skip authentication checks. This mechanism relies" + " on the user-agent HTTP header so it can be easily spoofed. This issue may allow any" + " user to carry out any administrative tasks on the Nacos server.", author = "hh-hunter", bootstrapModule = Cve202129441DetectorBootstrapModule.class) public final class Cve202129441VulnDetector implements VulnDetector { private static final GoogleLogger logger = GoogleLogger.forEnclosingClass(); private static final String CHECK_VUL_PATH = "nacos/v1/auth/users/?pageNo=1&pageSize=9"; @VisibleForTesting static final String DETECTION_STRING = "pageItems"; @VisibleForTesting static final String VULN_DESCRIPTION = "Nacos is a platform designed for dynamic service discovery and configuration" + " and service management. In Nacos before version 1.4.1, when configured" + " to use authentication (-Dnacos.core.auth.enabled=true) Nacos uses the" + " AuthFilter servlet filter to enforce authentication. This filter has a" + " backdoor that enables Nacos servers to bypass this filter and therefore" + " skip authentication checks. This mechanism relies on the user-agent" + " HTTP header so it can be easily spoofed. This issue may allow any user" + " to carry out any administrative tasks on the Nacos server."; private final HttpClient httpClient; private final Clock utcClock; @Inject Cve202129441VulnDetector(@UtcClock Clock utcClock, HttpClient httpClient) { this.httpClient = checkNotNull(httpClient); this.utcClock = checkNotNull(utcClock); } @Override public DetectionReportList detect( TargetInfo targetInfo, ImmutableList<NetworkService> matchedServices) { logger.atInfo().log("CVE-2921-29441 starts detecting."); return DetectionReportList.newBuilder() .addAllDetectionReports( matchedServices.stream() .filter(Cve202129441VulnDetector::isWebServiceOrUnknownService) .filter(this::isServiceVulnerable) .map(networkService -> buildDetectionReport(targetInfo, networkService)) .collect(toImmutableList())) .build(); } private boolean isServiceVulnerable(NetworkService networkService) { String targetUri = buildTargetUrl(networkService); try { HttpResponse httpResponse = httpClient.send( get(targetUri) .setHeaders(HttpHeaders.builder().addHeader(USER_AGENT, "Nacos-Server").build()) .build(), networkService); if (httpResponse.status().code() == 200 && httpResponse.bodyString().get().contains(DETECTION_STRING)) { return true; } } catch (IOException e) { logger.atWarning().withCause(e).log("Request to target %s failed", networkService); return false; } return false; } private DetectionReport buildDetectionReport( TargetInfo targetInfo, NetworkService vulnerableNetworkService) { return DetectionReport.newBuilder() .setTargetInfo(targetInfo) .setNetworkService(vulnerableNetworkService) .setDetectionTimestamp(Timestamps.fromMillis(Instant.now(utcClock).toEpochMilli())) .setDetectionStatus(DetectionStatus.VULNERABILITY_VERIFIED) .setVulnerability( Vulnerability.newBuilder() .setMainId( VulnerabilityId.newBuilder() .setPublisher("TSUNAMI_COMMUNITY") .setValue("CVE_2021_29441")) .setSeverity(Severity.CRITICAL) .setTitle("CVE-2021-29441 Nacos Authentication Bypass Via Backdoor") .setRecommendation( "Configure nacos.core.auth.enabled to true, upgrade nacos to the latest" + " version, configure custom authentication key-value pair information") .setDescription(VULN_DESCRIPTION)) .build(); } private static boolean isWebServiceOrUnknownService(NetworkService networkService) { return networkService.getServiceName().isEmpty() || NetworkServiceUtils.isWebService(networkService) || NetworkServiceUtils.getServiceName(networkService).equals("unknown"); } private static String buildTargetUrl(NetworkService networkService) { StringBuilder targetUrlBuilder = new StringBuilder(); if (NetworkServiceUtils.isWebService(networkService)) { targetUrlBuilder.append(NetworkServiceUtils.buildWebApplicationRootUrl(networkService)); } else { // Assume the service uses HTTP protocol when the scanner cannot identify the actual service. targetUrlBuilder .append("http://") .append(toUriAuthority(networkService.getNetworkEndpoint())) .append("/"); } targetUrlBuilder.append(CHECK_VUL_PATH); return targetUrlBuilder.toString(); } }
java
The Goa crime branch SIT has once again summoned former chief minister for questioning on November 21 in connection with the illegal mining case in which he is an accused, a senior official said on Wednesday. Kamat, who was state Mines Minister when the alleged illegality happened, had been quizzed by the crime branch in the past as well. The SIT had also questioned former State Principal Mines Secretary Rajiv Yaduvanshi last week as a part of its probe into the alleged multi-crore illegal mining scam. “Digambar Kamat has been asked to remain present before the Investigating Officer (IO) on November 21 as a part of the probe into the illegal mining (case),” Superintendent of Police (Crime Branch) Karthik Kashyap said. The SIT is investigating a complaint filed by the Mines and Geology department in July 2013 seeking to fix criminal liability on those involved in the illegal mining as pointed out by various committees, including the Centre-appointed Justice M B Shah Commission. The crime branch had registered an FIR in August 2013 against those named in reports prepared by Shah Commission and other committees, including Digambar Kamat, former Mines and Geology department director Arvind Lolienkar and some other officials of the department, besides officials of mining firms. The FIR was registered under sections 120 (b) (conspiracy), 166 (public servant disobeying law with intent to cause injury to any person) of the IPC and under Prevention of Corruption Act, Mines and Minerals Development Act, Mineral Conservation and Development Rules and Goa Prevention of Illegal Mining Transportation, Storage of Minerals Rules 2004.
english
New Year Eve is just a couple of days away and it’s time to party! If you have decided to host friends and family at the comfort of your home and treat them to yummy delicacies, we bring you these amazing appetizers that would leave your guests asking for more. Appetizers should be light, presented attractively, with great flavour and aroma and carry enormous nutritional value. Cook these appetizers that go easy on your tummy, so that you can enjoy main dinner. This spicy cauliflower dish is healthy and delicious. The unique sauce makes this snack hot, enhancing its unique flavour. Cauliflower is an excellent veggie loaded with impressive nutrients that is good for your health. - Grease the tray with oil and preheat oven to 230*C. - Take a bowl add rice flour, garlic powder, cumin, paprika, salt and pepper, blend together to form a thin batter. - Coat cauliflower florets completely with the batter. - Place them on the greased tray and bake for 10 minutes, simultaneously bake the other side until done for 10 minutes. - In a pan add butter and blend well with the barbecue sauce. Cook in a medium flame, stir occasionally until the butter is melted. - Coat the cauliflower florets with sauce and roll into bread crumbs, bake until the florets are crispy for another 10 minutes. - Serve with sliced carrots and garlic dip. Schezwan paneer is a great appetizer that is a combo of Indo Chinese culture. The spicy sauce coated with crunchy paneer takes your taste buds to next level. An ideal appetizer for the New Year eve loaded with protein, calcium, essential nutrient and good probiotics that are good for your tummy health. Other Ingredients: Make a batter by taking maida, corn flour 1⁄4 tsp pepper, 1/2 tsp schezwan sauce and salt. Blend well adding 1⁄2 cup of water until no lumps are formed. Dip paneer and coat well. Deep fry in hot oil until it turns golden brown. (For healthy option you can shallow fry or bake) Drain off the fried paneer to remove excess oil. Keep aside. In a kadai heat 3 tsp oil and saute garlic, ginger and green chilli on high flame for few minutes, then add 1⁄4 onion and spring onion for 3 minutes on high flame. To this add capsicum and continue to saute till it slightly changes colour. Finally add 2 tbsp schezwan sauce, 1 tbsp vinegar, 1 tbsp soy sauce, 1⁄4 tsp sugar and 1⁄4 tsp salt. Mix well and saute for a minute. Now add fried paneer, mix gently making sure the sauce has coated well uniformly.
english
<gh_stars>0 {"dbId":"170660","name":"Adenylate cyclase activating pathway","children":[],"size":1,"symbols":["ADCY8","GNAL","ADCY2","ADCY3","ADCY4","ADCY6","ADCY7","ADCY9","ADCY1","ADCY5"],"gallusOrth":{"sharedSymbols":["ADCY8","GNAL","ADCY2","ADCY3","ADCY4","ADCY6","ADCY7","ADCY9","ADCY1","ADCY5"],"count":10,"type":"Complete"}}
json
<filename>docker/version_definitions.json { "VersionDefinition": { "version_url":"http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.6.2.14/HDP-2.6.2.14-5.xml" } }
json
<gh_stars>10-100 'use strict'; import { expect } from 'chai'; import fs from 'fs'; import { tmpdir } from 'os'; import { join } from 'path'; import streamEqual from 'stream-equal'; import { Zip } from 'better-xlsx'; import htmlTo from '../src/index'; Zip.defaults.date = new Date(Date.UTC(2016, 10, 23, 0, 0, 0)); ; describe('Test: index.js', () => { it('should htmlToXlsx simple ok', (done) => { htmlTo(` <style type="text/css"> table th { color: #333; height: 20px; background-color: #f1f1f1; border: 1px solid #eee; } table td { color: #666; height: 20px; background-color: #f1f1f1; border: 1px solid #eee; } </style> <table name="Sheet1"> <tr> <td>foo</td> <td>bar</td> </tr> <tr> <td>hello</td> <td>world</td> </tr> </table> <table> <tr> <th>foo</th> <th>bar</th> </tr> <tr> <th>hello</th> <th>world</th> </tr> </table> `, (err, file) => { if (err) return done(err); const tmpfile = join(tmpdir(), 'simple.xlsx'); const expfile = join(__dirname, 'expect/simple.xlsx'); file .saveAs() .pipe(fs.createWriteStream(tmpfile)) .on('finish', () => { const expectFile = fs.createReadStream(expfile); const actualFile = fs.createReadStream(tmpfile); streamEqual(expectFile, actualFile, function (err, ok) { expect(err).to.be.null; expect(ok).to.be.true; done(); }); }); }); }); it('should htmlToXlsx complex ok', (done) => { htmlTo(` <style type="text/css"> table th, table td { font-size: 10px; } </style> <table cellspacing="0" cellpadding="0"> <tbody> <tr> <td valign="top" style="width: 114.0px; height: 15.0px; background-color: #a3917d; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p style="margin-bottom: 0px;"><font face="Avenir Next" color="#ffffff" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(255, 255, 255); -webkit-text-stroke-color: rgb(255, 255, 255);"><b>Category</b></font></p> </td> <td valign="top" style="width: 118.0px; height: 15.0px; background-color: #a3917d; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#ffffff" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(255, 255, 255); -webkit-text-stroke-color: rgb(255, 255, 255);"><b>Budget</b></font></p> </td> <td valign="top" style="width: 117.0px; height: 15.0px; background-color: #a3917d; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#ffffff" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(255, 255, 255); -webkit-text-stroke-color: rgb(255, 255, 255);"><b>Actual</b></font></p> </td> <td valign="top" style="width: 118.0px; height: 15.0px; background-color: #a3917d; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#ffffff" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(255, 255, 255); -webkit-text-stroke-color: rgb(255, 255, 255);"><b>Difference</b></font></p> </td> </tr> <tr> <td valign="top" style="width: 114.0px; height: 13.0px; background-color: #e5e2df; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p style="margin-bottom: 0px;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);"><b>Auto</b></font></p> </td> <td valign="top" style="width: 118.0px; height: 13.0px; background-color: #ffe380; background-color: rgba(255, 227, 128, 0.25); border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$200.00</font></p> </td> <td valign="top" style="width: 117.0px; height: 13.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$90.00</font></p> </td> <td valign="top" style="width: 118.0px; height: 13.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$110.00</font></p> </td> </tr> <tr> <td valign="top" style="width: 114.0px; height: 14.0px; background-color: #e5e2df; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p style="margin-bottom: 0px;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);"><b>Entertainment</b></font></p> </td> <td valign="top" style="width: 118.0px; height: 14.0px; background-color: #ffe380; background-color: rgba(255, 227, 128, 0.25); border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$200.00</font></p> </td> <td valign="top" style="width: 117.0px; height: 14.0px; background-color: #f2efec; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$32.00</font></p> </td> <td valign="top" style="width: 118.0px; height: 14.0px; background-color: #f2efec; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$168.00</font></p> </td> </tr> <tr> <td valign="top" style="width: 114.0px; height: 13.0px; background-color: #e5e2df; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p style="margin-bottom: 0px;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);"><b>Food</b></font></p> </td> <td valign="top" style="width: 118.0px; height: 13.0px; background-color: #ffe380; background-color: rgba(255, 227, 128, 0.25); border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$350.00</font></p> </td> <td valign="top" style="width: 117.0px; height: 13.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$205.75</font></p> </td> <td valign="top" style="width: 118.0px; height: 13.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$144.25</font></p> </td> </tr> <tr> <td valign="top" style="width: 114.0px; height: 13.0px; background-color: #e5e2df; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p style="margin-bottom: 0px;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);"><b>Home</b></font></p> </td> <td valign="top" style="width: 118.0px; height: 13.0px; background-color: #ffe380; background-color: rgba(255, 227, 128, 0.25); border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$300.00</font></p> </td> <td valign="top" style="width: 117.0px; height: 13.0px; background-color: #f2efec; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$250.00</font></p> </td> <td valign="top" style="width: 118.0px; height: 13.0px; background-color: #f2efec; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$50.00</font></p> </td> </tr> <tr> <td valign="top" style="width: 114.0px; height: 13.0px; background-color: #e5e2df; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p style="margin-bottom: 0px;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);"><b>Medical</b></font></p> </td> <td valign="top" style="width: 118.0px; height: 13.0px; background-color: #ffe380; background-color: rgba(255, 227, 128, 0.25); border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$100.00</font></p> </td> <td valign="top" style="width: 117.0px; height: 13.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$35.00</font></p> </td> <td valign="top" style="width: 118.0px; height: 13.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$65.00</font></p> </td> </tr> <tr> <td valign="top" style="width: 114.0px; height: 14.0px; background-color: #e5e2df; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p style="margin-bottom: 0px;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);"><b>Personal Items</b></font></p> </td> <td valign="top" style="width: 118.0px; height: 14.0px; background-color: #ffe380; background-color: rgba(255, 227, 128, 0.25); border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$300.00</font></p> </td> <td valign="top" style="width: 117.0px; height: 14.0px; background-color: #f2efec; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$80.00</font></p> </td> <td valign="top" style="width: 118.0px; height: 14.0px; background-color: #f2efec; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$220.00</font></p> </td> </tr> <tr> <td valign="top" style="width: 114.0px; height: 13.0px; background-color: #e5e2df; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p style="margin-bottom: 0px;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);"><b>Travel</b></font></p> </td> <td valign="top" style="width: 118.0px; height: 13.0px; background-color: #ffe380; background-color: rgba(255, 227, 128, 0.25); border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$500.00</font></p> </td> <td valign="top" style="width: 117.0px; height: 13.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$350.00</font></p> </td> <td valign="top" style="width: 118.0px; height: 13.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$150.00</font></p> </td> </tr> <tr> <td valign="top" style="width: 114.0px; height: 13.0px; background-color: #e5e2df; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p style="margin-bottom: 0px;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);"><b>Utilities</b></font></p> </td> <td valign="top" style="width: 118.0px; height: 13.0px; background-color: #ffe380; background-color: rgba(255, 227, 128, 0.25); border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$200.00</font></p> </td> <td valign="top" style="width: 117.0px; height: 13.0px; background-color: #f2efec; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$100.00</font></p> </td> <td valign="top" style="width: 118.0px; height: 13.0px; background-color: #f2efec; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$100.00</font></p> </td> </tr> <tr> <td valign="top" style="width: 114.0px; height: 14.0px; background-color: #e5e2df; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p style="margin-bottom: 0px;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);"><b>Other</b></font></p> </td> <td valign="top" style="width: 118.0px; height: 14.0px; background-color: #ffe380; background-color: rgba(255, 227, 128, 0.25); border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$50.00</font></p> </td> <td valign="top" style="width: 117.0px; height: 14.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">$60.00</font></p> </td> <td valign="top" style="width: 118.0px; height: 14.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);">($10.00)</font></p> </td> </tr> <tr> <td valign="top" style="width: 114.0px; height: 13.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);"><b>Total</b></font></p> </td> <td valign="top" style="width: 118.0px; height: 13.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);"><b>$2,200.00</b></font></p> </td> <td valign="top" style="width: 117.0px; height: 13.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);"><b>$1,202.75</b></font></p> </td> <td valign="top" style="width: 118.0px; height: 13.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #7f6b54 #7f6b54 #7f6b54 #7f6b54; padding: 4.0px 4.0px 4.0px 4.0px"> <p align="right" style="margin-bottom: 0px; text-align: right;"><font face="Avenir Next" color="#594b3b" style="font-variant-numeric: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: &quot;Avenir Next&quot;; font-kerning: none; font-variant-ligatures: common-ligatures; color: rgb(89, 75, 59); -webkit-text-stroke-color: rgb(89, 75, 59);"><b>$997.25</b></font></p> </td> </tr> </tbody> </table> `, (err, file) => { if (err) return done(err); const tmpfile = join(tmpdir(), 'complex.xlsx'); const expfile = join(__dirname, 'expect/complex.xlsx'); file .saveAs() .pipe(fs.createWriteStream(tmpfile)) .on('finish', () => { const expectFile = fs.createReadStream(expfile); const actualFile = fs.createReadStream(tmpfile); streamEqual(expectFile, actualFile, function (err, ok) { expect(err).to.be.null; expect(ok).to.be.true; done(); }); }); }); }); it('should htmlToXlsx merge ok', (done) => { htmlTo(` <table border="1" cellspacing="0"> <tr> <td rowspan="3">hello</td> <td colspan="2">test</td> <td colspan="2">world</td> </tr> <tr> <td rowspan="2">foo</td> <td>bar</td> <td>ok</td> <td>haha</td> </tr> <tr> <td colspan="3">foo foo</td> <td colspan="1">bar bar</td> </tr> </table> `, (err, file) => { if (err) return done(err); const tmpfile = join(tmpdir(), 'merge.xlsx'); const expfile = join(__dirname, 'expect/merge.xlsx'); file .saveAs() .pipe(fs.createWriteStream(tmpfile)) .on('finish', () => { const expectFile = fs.createReadStream(expfile); const actualFile = fs.createReadStream(tmpfile); streamEqual(expectFile, actualFile, function (err, ok) { expect(err).to.be.null; expect(ok).to.be.true; done(); }); }); }); }); it('should htmlToXlsx data type ok', (done) => { htmlTo(` <style type="text/css"> table th, table td { width: 400px; height: 50px; vertical-align: middle; text-align: right; } </style> <table> <tr> <td type="number">123</td> <td type="number">123.456</td> </tr> <tr> <td data-type="bool">true</td> <td data-type="bool">false</td> </tr> <tr> <td data-type="bool">1</td> <td data-type="bool">0</td> </tr> <tr> <td type="formula">SUM(A1:B1)</td> <td type="formula">A1-B1</td> </tr> <tr> <td type="date">2013-01-12T12:34:56+08:00</td> <td type="datetime">2013-01-12T12:34:56+08:00</td> </tr> <tr> <td>foo</td> <td>bar</td> </tr> </table> `, (err, file) => { if (err) return done(err); const tmpfile = join(tmpdir(), 'datatype.xlsx'); const expfile = join(__dirname, 'expect/datatype.xlsx'); file .saveAs() .pipe(fs.createWriteStream(tmpfile)) .on('finish', () => { const expectFile = fs.createReadStream(expfile); const actualFile = fs.createReadStream(tmpfile); streamEqual(expectFile, actualFile, function (err, ok) { expect(err).to.be.null; expect(ok).to.be.true; done(); }); }); }); }); });
javascript
<gh_stars>0 import { StringResultOptions } from "../../metadata/options"; import { IMethodResult } from "../../metadata/controller"; import { BonbonsConfigCollection as ConfigCollection } from "../../metadata/di"; export declare class StringResult implements IMethodResult { private value; private options; constructor(value: string, options?: StringResultOptions); toString(configs: ConfigCollection): string; }
typescript
A day after he sprang a surprise by stepping down as the Lt Governor of Delhi, Najeeb Jung met Prime Minister Narendra Modi on Friday and later praised him as a “visionary” and an “exceptional” person who “wants to take the minorities along”. Jung also indicated his unhappiness with the AAP government of Delhi, underlining that he had “distinct disagreements” with the latter. The Lt Governor, sources close to him said, was “sad and fed up” with the “manner in which the AAP government was attacking him on daily basis and that was also one of the reasons behind his resignation”. Jung met the Prime Minister at his South Block office for more than an hour but declined to divulge what was discussed at the meeting. But he later told The Indian Express that he is “completely convinced” of the Prime Minister’s “secular values as far as Hindu-Muslim relations are concerned”. “I believe he wants to take the minorities along,” Jung said. He said that it was his third resignation offer but he had continued earlier because the Prime Minister had asked him to carry on. He said he will not re-consider his decision this time. In his brief resignation statement Thursday, Jung had also thanked Modi for his help and cooperation. On his earlier resignation offers, Jung said that two days after the Modi government was sworn-in, he had offered to resign but was asked to continue. “At the end of three years in August this year, I again said that I have completed three years and though there is no tenure for Lt Governor, three years is a good period. So if you may wish, I move on. He (Modi) said no, no you should continue. And now in December, I said it’s three and half years, Sahab. I have another dimension to life. So I want to leave and that is when he agreed. This is the entire thing,” Jung said. Jung has had a running feud with Chief Minister Arvind Kejriwal and his AAP government. But on Friday, Kejriwal had an hour-long breakfast meeting with Jung, reminiscing their nearly two-year association in governing the city besides discussing other issues. Kejriwal said the Lt Governor had invited him to a breakfast meeting.
english
import * as React from 'react'; import MaybeBlank from './MaybeBlank'; import Provision, { ProvisionProps } from './Provision'; const toString = (date: Date): string => { if (date) { if (!isNaN(date.getFullYear()) && !isNaN(date.getMonth()) && !isNaN(date.getDate())) { return `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日`; } } return '(      )'; }; type ProvisionCreatorType = ((index: number) => ProvisionProps); const withCommas = (num: number) => ( num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') ); const consign = (materialDescription: string): ProvisionCreatorType => ( (index: number) => ( { index: index, title: '委託', details: [ { text: '乙は、甲に対し、以下のイラスト(以下「本著作物」という。)の作成を委託し、甲はこれを受託した。', items: [ materialDescription ] } ] } ) ); const delivery = (date: Date, way: string): ProvisionCreatorType => ( (index: number) => ( { index: index, title: '納入', details: [ { text: `甲は乙に対し、本著作物を以下の形式により、${toString(date)}までに、乙に対して納入する。`, items: [ way ] }, { text: '乙は、前項の納入を受けた後速やかに納入物を検査し、納入物に瑕疵がある場合や、' + '乙の企画意図に合致しない場合は、その旨甲に通知し、' + '当該通知を受けた甲は、速やかに乙の指示に従った対応をする。', items: [] }, { text: '納入物の所有権は、対価の完済により乙に移転する。', items: [] } ] } ) ); const transferCopyRights = (withDerivativeRights: boolean): ProvisionCreatorType => ( (index: number) => ( { index: index, title: '権利の帰属', details: [ { text: `本著作物の著作権(著作権法第27条及び第28条に規定する権利を${ withDerivativeRights ? '含む' : '除く' }。)は、対価の完済により乙に移転する。`, items: [] } ] } ) ); const notTransferCopyRights = (): ProvisionCreatorType => ( (index: number) => ( { index: index, title: '権利の帰属', details: [ { text: '本著作物の著作権は甲に帰属する。', items: [] } ] } ) ); const moralrights = (isAbandonExercise: boolean): ProvisionCreatorType => ( (index: number) => ( { index: index, title: '著作者人格権', details: [ { text: isAbandonExercise ? '乙は甲または甲が指定する第三者に対し著作者人格権を行使しないものとする。' : '乙が本著作物の内容・表現又はその題号に変更を加える場合(拡大、縮小、色調の変更等も含む。)には、あらかじめ甲の承諾を必要とする。', items: [] } ] } ) ); const license = (expiry: Date, homepage: string): ProvisionCreatorType => ( (index: number) => ( { index: index, title: '利用許諾', details: [ { text: '甲は乙に対し、本著作物を下記で利用することを許諾する。', items: [ homepage, `期限:${toString(expiry)}まで` ] } ] } ) ); const security = (): ProvisionCreatorType => ( (index: number) => ( { index: index, title: '保証', details: [ { text: '甲は、乙に対し、本著作物が第三者の著作権その他第三者の権利を侵害しないものであることを保証する。', items: [] } ] } ) ); const payment = (date: Date, price: number): ProvisionCreatorType => ( (index: number) => ( { index: index, title: '対価', details: [ { text: '乙は、甲に対し、イラスト作成業務及び本著作物の利用許諾の対価、その他本契約に基づく一切の対価として、' + '金' + ((price === -1) ? '(     )' : withCommas(price)) + `円(消費税込み)を、${toString(date)}までに支払う。`, items: [] } ] } ) ); const others = (): ProvisionCreatorType => ( (index: number) => ( { index: index, title: 'その他', details: [ { text: '本契約に定めのない利用態様については、甲乙別途協議の上、利用の可否、対価等につき決するものとする。', items: [] } ] } ) ); export interface SignatureProps { variable: string; } const Signature: React.SFC<SignatureProps> = (props: SignatureProps) => ( <div style={{display: 'flex', alignItems: 'center'}}> <div> <span>{props.variable}</span> </div> <div> <ul style={{listStyleType: 'none'}}> <li style={{paddingTop: '10px', paddingBottom: '10px', paddingRight: '250px'}}>住所</li> <li>氏名</li> </ul> </div> <div> <span>印</span> </div> </div> ); export interface ContractProps { creatorName: string; clientName: string; materialDescription: string; delivery: { way: string; date: Date; }; copyrights: { transfer: boolean; withDerivativeRights: boolean; }; moralrights: { abandon: boolean; }; license: { homepage: string; expiry: Date; }; payment: { price: number; date: Date; }; } const Contract: React.SFC<ContractProps> = (props: ContractProps) => { const provisions = props.copyrights.transfer ? [ consign(props.materialDescription), delivery( props.delivery.date, props.delivery.way), transferCopyRights(props.copyrights.withDerivativeRights), moralrights(props.moralrights.abandon), security(), payment( props.payment.date, props.payment.price), others() ] : [ consign(props.materialDescription), delivery( props.delivery.date, props.delivery.way), notTransferCopyRights(), license( props.license.expiry, props.license.homepage), moralrights(false), security(), payment( props.payment.date, props.payment.price), others() ]; return ( <div style={{paddingLeft: '50px', paddingRight: '50px', paddingTop: '30px', paddingBottom: '30px'}}> <h1 style={{textAlign: 'center', paddingTop: '50px', paddingBottom: '50px'}}>契約書</h1> <div> <div style={{paddingBottom: '30px'}}> <MaybeBlank text={props.creatorName}/> (以下「甲」という。)と <MaybeBlank text={props.clientName}/> (以下「乙」という。)とは、イラスト作成業務の委託に関し、以下のとおり契約を締結する。 </div> {provisions.map( (e, index) => { const provisionProps = e(index + 1); return <Provision key={index} {...provisionProps}/>; })} <div style={{paddingBottom: '50px'}}> 本契約締結の証として、本契約書2通を作成し、甲乙記名捺印の上、各自1通を保持する。 </div> </div> <div> <span style={{textDecoration: 'underline'}}>{'    '}</span>年 <span style={{textDecoration: 'underline'}}>{'  '}</span>月 <span style={{textDecoration: 'underline'}}>{'  '}</span>日 </div> <div style={{display: 'flex', flexDirection: 'column', alignItems: 'flex-end'}}> <Signature variable={'甲'}/> <Signature variable={'乙'}/> </div> </div> ); }; export default Contract;
typescript
<gh_stars>1-10 { "IndexId": 26, "Portraits": [ { "PortraitId": 0, "PortraitName": "STANDARD", "PortraitImageBase64": "<KEY> } ] }
json
Chende is a percussion instrument made of wood, parchment, and iron. It is a temple instrument found in Karnataka. Majorly used in ‘Yakshagana’. A wooden cylindrical drum with both the faces covered with skin. Tied with the help of iron hoops. Suspended from the neck and played with sticks. Used in ‘Yakshagana’.
english
Super Smash Bros. Ultimate for the Nintendo Switch may get Dragon Quest XI's hero as a playable fighter. According to reports, Nintendo's fighting game could see the addition of Erdrick as a playable fighter, Dragon Quest's Slim mascot appearing on screen, and the level being Alefgard. First reported by Persona Central, the site also claims that this collaboration is taking place to "the benefit of overseas marketing for the DQ [Dragon Quest] series". In addition to this, Super Smash Bros. Ultimate getting Dragon Quest XI's hero has been "achieved through active collaboration on Square [Enix]'s side". This isn't all, Persona Central also has details on what to expect when Persona 5's Joker is made available in Super Smash Bros. Ultimate. For one, the stage included is Momentos from Persona 5 and Persona mascot Jack Frost will be on screen with a skill too. The report also suggests that a complete edition of Persona 5 known as P5R is in the works alongside a Persona fighting game called Persona 5 Ultimate. The former is out in 2019 while the latter is delayed due to developer Arc System Works developing Granblue Fantasy Versus - a fighting game set in the popular mobile RPG universe. At The Game Awards 2018, Nintendo showed off Persona 5 protagonist Joker as the first addition to the Super Smash Bros. Ultimate roster post-launch outside of Piranha Plant. Joker will come with Super Smash Bros. Ultimate Challenge Pack 1. Each downloadable content (DLC) pack will be sold separately and contains a character, stage, and music. You can also buy the Super Smash Bros. Ultimate Fighters Pass to get them all. Sadly there were no details regarding how Joker would play or what else we could expect when he is added to the game. The Super Smash Bros. Ultimate Fighters Pass will include all downloadable content (DLC) for the game for $24.99 (around Rs. 1,750) with a promise of content until February 2020. As for the DLC itself, there will be five sets of it, each containing a character, stage, and music track. If bought separately, DLC would cost $5.99 (close to Rs. 420). In addition to this Nintendo of America boss Reggie Fils-Aime stated that all five Super Smash Bros. Ultimate DLC characters to be added until February 2020 are new to the series going as far to suggest that they would be those "who you wouldn't anticipate" being included in Smash. Joker from Persona 5 definitely fits the bill, making us wonder who is next. Super Smash Bros has a $60 price tag (around Rs. 4,200). Although Nintendo doesn't have an official India presence, that hasn't stopped parallel importers and grey market stores from taking pre-orders and planning to stock up on the game. This is in sharp contrast to past entries in the series that weren't as popular due to the small number of Nintendo home consoles install base in India. Several Mumbai-based game stores speaking to Gadgets 360 have confirmed that they would be selling Super Smash Bros. Ultimate cartridges in the range of Rs. 4,200 to Rs. 4,700, which isn't too bad when you consider that it's almost the same price for the game digitally and you get the added advantages of saving on Nintendo Switch storage space and selling your copy of the game when you're done. If you're a fan of video games, check out Transition, Gadgets 360's gaming podcast. You can listen to it via Apple Podcasts or RSS, or just listen to this week's episode by hitting the play button below. Catch the latest from the Consumer Electronics Show on Gadgets 360, at our CES 2024 hub.
english
<filename>package.json { "name": "blockstack-gaia-monorepo", "private": true, "license": "MIT", "engines": { "node": ">=12" }, "scripts": { "postinstall": "run-p postinstall:*", "postinstall:hub": "cross-env NODE_ENV=development npm install --prefix hub", "postinstall:reader": "cross-env NODE_ENV=development npm install --prefix reader", "postinstall:admin": "cross-env NODE_ENV=development npm install --prefix admin", "test": "run-p test:*", "test:hub": "npm test --prefix hub", "test:reader": "npm test --prefix reader", "test:admin": "npm test --prefix admin", "audit:all": "npm audit && npm audit --prefix hub && npm audit --prefix reader && npm audit --prefix admin", "clean": "rimraf ./node_modules ./*/node_modules ./*/lib", "codecovUpload": "codecov" }, "devDependencies": { "codecov": "^3.6.5", "cross-env": "^7.0.0", "npm-run-all": "^4.1.5", "rimraf": "^3.0.1" } }
json
<reponame>Mxime/reviewflow import Webhooks from '@octokit/webhooks'; import parse from '@commitlint/parse'; import { Context, Octokit } from 'probot'; import { contextPr } from '../../../context/utils'; import { PrContext } from '../utils/createPullRequestContext'; import syncLabel from './utils/syncLabel'; import { updateCommentBodyCommitsNotes } from './utils/body/updateBody'; import { updatePrIfNeeded } from './updatePr'; export const readCommitsAndUpdateInfos = async < E extends Webhooks.WebhookPayloadPullRequest >( prContext: PrContext<E['pull_request'] | Octokit.PullsGetResponse>, context: Context<E>, commentBody = prContext.commentBody, ): Promise<void> => { const pr = prContext.updatedPr || prContext.pr; const { repoContext } = prContext; // tmp.data[0].sha // tmp.data[0].commit.message const commits = await context.github.paginate( context.github.pulls.listCommits.endpoint.merge( contextPr(context, { // A custom page size up to 100. Default is 30. per_page: 100, }), ), (res) => res.data, ); const conventionalCommits = await Promise.all( commits.map((c) => parse(c.commit.message)), ); const breakingChangesCommits: any = conventionalCommits.reduce( (acc, c, index) => { const breakingChangesNotes = c.notes.filter( (note: any) => note.title === 'BREAKING CHANGE', ); if (breakingChangesNotes.length !== 0) { acc.push({ commit: commits[index], breakingChangesNotes }); } return acc; }, [], ); const breakingChangesLabel = repoContext.labels['breaking-changes']; const newCommentBody = updateCommentBodyCommitsNotes( commentBody, breakingChangesCommits.length === 0 ? '' : `Breaking Changes:\n${breakingChangesCommits .map(({ commit, breakingChangesNotes }: any) => breakingChangesNotes.map( (note: any) => `- ${note.text.replace('\n', ' ')} (${commit.sha})`, ), ) .join('')}`, ); await Promise.all([ syncLabel( pr, context, breakingChangesCommits.length !== 0, breakingChangesLabel, ), updatePrIfNeeded(prContext, context, { commentBody: newCommentBody }), ]); // TODO auto update ! in front of : to signal a breaking change when https://github.com/conventional-changelog/commitlint/issues/658 is closed };
typescript
<filename>test/src/t1.cpp #include <stdio.h> int main() { printf("$\n"); // start of test character printf("Hello\nWorld!\n"); printf("~\n"); // end of test character return 0; }
cpp
<reponame>jhavargashe/react-challenge-01 // eslint-disable-next-line import/prefer-default-export export const ShowMap = (payload) => ({ type: 'SHOW_MAP', payload, });
javascript
Tesla founder Elon Musk is known for his crisp opinions about literally everything. He generally voices them through his Twitter account. A professor at Berkeley and former United States Secretary of Labor, Robert Reich posted a video about the 'myth of self-made billionaires. ' According to the video posted by the professor, several self-made billionaires came from privileged backgrounds. Bill Gates’ mom helped Microsoft get a deal with IBM. Jeff Bezos’ garage-based start was funded by a quarter-million dollar investment from his parents. “To claim these fortunes are ‘self-made’ is to perpetuate a myth that blames the wealth gap on the choices of everyday Americans. Billionaires are not made by rugged individuals, they’re made by policy failures and a system that rewards wealth over work. ” he concludes. A lot of people on the internet dissed the professor's claims. Many supported all several self-made billionaires mentioned in the video including Elon Musk. One user said, "Elon Musk never owned an emerald mine. His father told the media a story abt a mine he partially owned which is what started the rumor. His father also abused his mother who left him & lived in poverty raising 3 kids. " In 2021, Elon Musk refuted such reports as well in a tweet. He had stated that there is no evidence of an emerald mine at all. He stated that he arrived in Canada with CA$2500 and paid his own way through college. By the end of it, he owed over $100,000 in student debt, wrote Musk. This article is false. What are your views? For the latest trending stories, follow us on Telegram.
english
<reponame>heartnetkung/react-code-blocks import Color from 'color'; export type ThemeColorParam = Color | string | ArrayLike<number> | number; export interface CodeBlockTheme { lineNumberColor?: ThemeColorParam; lineNumberBgColor?: ThemeColorParam; backgroundColor?: ThemeColorParam; textColor?: ThemeColorParam; substringColor?: ThemeColorParam; keywordColor?: ThemeColorParam; attributeColor?: ThemeColorParam; selectorTagColor?: ThemeColorParam; docTagColor?: ThemeColorParam; nameColor?: ThemeColorParam; builtInColor?: ThemeColorParam; literalColor?: ThemeColorParam; bulletColor?: ThemeColorParam; codeColor?: ThemeColorParam; additionColor?: ThemeColorParam; regexpColor?: ThemeColorParam; symbolColor?: ThemeColorParam; variableColor?: ThemeColorParam; templateVariableColor?: ThemeColorParam; linkColor?: ThemeColorParam; selectorAttributeColor?: ThemeColorParam; selectorPseudoColor?: ThemeColorParam; typeColor?: ThemeColorParam; stringColor?: ThemeColorParam; selectorIdColor?: ThemeColorParam; selectorClassColor?: ThemeColorParam; quoteColor?: ThemeColorParam; templateTagColor?: ThemeColorParam; deletionColor?: ThemeColorParam; titleColor?: ThemeColorParam; sectionColor?: ThemeColorParam; commentColor?: ThemeColorParam; metaKeywordColor?: ThemeColorParam; metaColor?: ThemeColorParam; functionColor?: ThemeColorParam; numberColor?: ThemeColorParam; } export type ThemeModes = 'light' | 'dark'; export interface Theme extends CodeBlockTheme { mode: ThemeModes; } export interface GlobalThemeTokens extends Theme {} export type ThemeProps = CustomThemeProps | NoThemeProps; export interface CustomThemeProps { theme: Theme; [index: string]: any; } export interface NoThemeProps { [index: string]: any; } export type DefaultValue = string | number; export type ThemedValue<V = DefaultValue> = (props?: ThemeProps) => V | ''; /* * These values all those are supported by ADF. * The comments show mappings of these values to the corresponding * language definition file, or to that of the most * syntactically similar language supported by highlightjs */ export type SupportedLanguages = | 'abap' // → sql | 'actionscript' | 'ada' | 'arduino' | 'autoit' | 'bash' | 'c' // → cpp | 'clojure' | 'cs' | 'c++' // → cpp | 'cpp' | 'coffeescript' | 'csharp' // → cs | 'css' | 'cuda' // → cpp | 'd' | 'dart' | 'delphi' | 'elixir' | 'elm' | 'erlang' | 'fortran' | 'foxpro' // → purebasic | 'fsharp' | 'go' | 'graphql' | 'gql' | 'groovy' | 'haskell' | 'haxe' | 'html' // → xml | 'java' | 'javascript' | 'json' | 'julia' | 'jsx' | 'js' | 'kotlin' | 'latex' // → tex | 'lisp' | 'livescript' | 'lua' | 'markup' | 'mathematica' | 'makefile' | 'matlab' | 'objectivec' | 'objective-c' // → objectivec | 'objective-j' // → objectivec | 'objectpascal' // → delphi | 'ocaml' | 'octave' // → matlab | 'perl' | 'php' | 'powershell' | 'prolog' | 'puppet' | 'python' | 'qml' | 'r' | 'racket' // → lisp | 'restructuredtext' // → rest | 'rest' | 'ruby' | 'rust' | 'sass' // → less | 'less' | 'scala' | 'scheme' | 'shell' | 'smalltalk' | 'sql' | 'standardml' // → sml | 'sml' | 'swift' | 'tcl' | 'tex' | 'text' | 'tsx' | 'ts' | 'typescript' | 'vala' | 'vbnet' | 'verilog' | 'vhdl' | 'xml' | 'xquery';
typescript
<reponame>Nates-World-Projects/Native .welcomeCTAButtonOuter-3pJkMq {display : none}
css
body { text-align: center; } button { border: none; margin: 5px; } p { font-size: 15px; } nav ul { list-style-type: none; font-size: 20px; padding-top: 15px; margin-right: 20px; } nav ul li { display: inline-block; margin-left: 25px; } li { list-style-type: decimal; } form { width: 200px; display: inline-block; } .display-4 { font-size: 40px; } .countDownContainer { font-size: 30px; margin-left: 10px; } .nav-item { float: right; } #userInput, #highScoreTable { display: none; } #result { font-style: italic; font-weight: lighter; } #countDown { font-weight: 500; }
css
The Samsung Galaxy Buds Pro truly wireless earphones bring several significant features to the table, such as Active Noise Control and 360 Audio. The best part is that the buds and the case look incredibly beautiful. If you want the case to stay in pristine condition, the odds are that you will have to put on a cover at some point, if not sooner. After all, you wouldn’t want to see tiny scratches on top of the cover. Besides lending a different look, protective cases also help to shield the earphones or the charging cases when dropped. The best part is that the Galaxy Buds Pro and the Buds Live look identical, both in shape and size. This means cases designed for the Buds Live would fit the Buds Pro just as well. So, here are some of our recommendations for the best protective cases and covers for the Samsung Galaxy Buds Pro. But before that, Simultaneously, it walks the fine line between thin and thick cases, thereby making it easy to carry. It also supports wireless charging (see best desk lamps with wireless charging). Speaking of charging, the Urban Fit case bundles a neat slit along the back which facilitates easy charging. However, it’s not all hale and hearty for fabric cases since they are prone to dust and dirt. If you do not take care of them well enough, they tend to lose their sheen pretty early. Nevertheless, if you want your Buds Pro earphones to stand out (and not mind paying a premium for a cover), the Urban Fit makes for a good buy. It’s available in two colors—Bronze and Black. The primary advantage over snap-on cases is that the closed design keeps the cover from accidentally opening, thereby preventing the earbuds from getting lost. Simultaneously, the fit is snug and secure, and several reviewers have backed this as part of their reviews on Amazon. Aside from that, this leather cover is thin enough to facilitate wireless charging. Lastly, many users have praised the material, and over time, it develops a unique look that is synonymous with most leather cases. This is a snap-on case and comes in two pieces. The fit is on-point, and the Buds Pro’s charging case easily slips onto the cover. And several users have backed this claim. Like its phone cases, Spigen also bundles air-cushions at the corners to help bear the brunt of falls and drops. Do note that these features will comes at a price, and in this case, it’s the heft. Though it’s not too thick, the Rugged Armor case adds a little bulk to the case. And there’s more. The rear of the case has a light texture which helps you grip the case better. The light gray of the protective case sits well with the Phantom Violet of the Samsung Galaxy Buds Pro, which is a huge plus. Do note that it’s a simple snap-on case and it prevents the charging case from opening when dropped. The elago GB5 case doesn’t have a cutout for the charging indicator, although some users have claimed the material lets the light pass through. The hinge offers another advantage since you won’t have to worry about losing or missing a part. Simultaneously, the area around the hinge has been designed to be completely clear, thereby letting you access the charging port without any issues. So far, it has received some impressive user reviews, with many users liking it for its sturdy nature and the quality of the material used. Quite a few users have praised this case for its durability and fit. At the same time, it does its job as advertised and protects the case from external damage. Out of the 80+ ratings, it has managed to do fairly well with people appreciating its sturdiness and durability, as noted earlier. There’s ample space at the back to fit in the USB-C charging cable, and even if the cable has a large head, the Witzon Hard Case will be able to accommodate that. It attaches via adhesives and stays anchored. It provides its share of drop protection as well, thanks to the odd shape. Reviews for this product have been decent so far, with people commending it for its looks and durability. It goes without a doubt that the Galaxy Buds Pro earphones are packed in a beautiful charging case, and as it happens, it does the job quite well in safeguarding the buds from surface damage. However, if you are constantly on the move and take your earphones with you virtually everywhere, a protective cover is exactly what you need to keep them out of harm’s way. Besides the case, the metal carabiners and hooks fill the gap by letting you loop them with your car keys or backpacks. The above article may contain affiliate links which help support Guiding Tech. However, it does not affect our editorial integrity. The content remains unbiased and authentic.
english
[ { "attack": null, "attack_mod": null, "battlefield": null, "code": "hypnotize", "conjuration_limit": null, "cost": "[main-action]", "is_conjured": false, "is_phoenixborn": false, "is_spell": true, "is_spell_action": false, "is_spell_alteration": false, "is_spell_reactive": false, "is_spell_ready": true, "is_unit": false, "life": null, "life_mod": null, "lifepool": null, "name": "Hypnotize", "placement": "Spellboard", "recover": null, "recover_mod": null, "spellboard": null, "text": "<i>[side-action] [exhaustion] 2[charm-class]<\/i>: Choose a target unit you control to gain the following ability for the remainder of the turn:\n\"Bypass: this unit cannot be blocked or guarded.\"", "type": "Ready Spell" } ]
json
package com.iut.as; public class Startpoint { }
java
<filename>lib/constants.ts export const PG_PUBSUB_CONNECTION_TOKEN = '<PASSWORD>'; export const PG_PUBSUB_OPTIONS_TOKEN = '<PASSWORD>';
typescript
{ "name": "graphql-blog-api", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "start": "node dist/index.js", "heroku-postbuild": "babel src --out-dir dist --copy-files", "dev": "env-cmd -f ./config/dev.env nodemon src/index.js --ext js,graphql --exec babel-node", "test": "echo \"Error: no test specified\" && exit 1", "get-schema": "graphql get-schema -p prisma --dotenv config/dev.env" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "@babel/runtime": "^7.7.4", "bcryptjs": "^2.4.3", "core-js": "^3.4.5", "env-cmd": "^10.0.1", "graphql-yoga": "^1.18.3", "jsonwebtoken": "^8.5.1", "prisma-binding": "^2.3.16" }, "devDependencies": { "@babel/cli": "^7.7.4", "@babel/core": "^7.7.4", "@babel/node": "^7.7.4", "@babel/plugin-transform-runtime": "^7.7.4", "@babel/preset-env": "^7.7.4", "nodemon": "^1.19.4" } }
json
Star Plus' Love Ka Hai Intezaar will soon see a leap, post which Preetika Rao, Heena Parmar and Mohit Sehgal will play the lead roles. The actors, who will begin shooting soon, will not only add more excitement and entertainment but will also add romance via their love triangle tale. Mohit talking to indianexpress. com shared his excitement and said that he has no apprehension about the show being in the afternoon slot. Preetika Rao is flummoxed by reports suggesting she is in a relationship with the director of her successful serial "Beintehaa". Preetika Rao is relieved that her serial "Beintehaa" has not been terminated because of the eighth season of "Bigg Boss". "I never imagined Aaliyah would become a role model for Muslim girls all over the world," said Preetika. Barcelona is Preetika's favourite holiday destination. Preetika Rao said that her elder sister Amrita is a keen follower of her debut show. Amrita Rao's sister Preetika Rao will be seen in television drama show titled 'Beintehaa'.
english
const {app, BrowserWindow, ipcMain} = require('electron') const path = require('path') const url = require('url') const {Game} = require('./src/game') let window app.once('ready', () => { window = new BrowserWindow({ frame: false, width: 200, height: 200 }) window.loadURL(url.format({ pathname: path.join(__dirname, 'index.html'), protocol: 'file:', slashes: true })) const game = new Game(ipcMain) game.start() })
javascript
import React from 'react' import withStyles from 'isomorphic-style-loader/lib/withStyles' import s from './faq-group-layout.scss' const FAQGroupLayout = props => ( <div className="faq-group-layout"> <div className="faq-group-layout__title"> <h3 className="xs-text-size-3 xs-text-size-3--trailer-2"> {props.title} </h3> </div> <div className="faq-group-layout__content"> {props.children} </div> </div> ) FAQGroupLayout.propTypes = { children: React.PropTypes.any } export default withStyles(s)(FAQGroupLayout)
javascript
{ "name": "node-portfolio-app", "description": "Portfolio sample app", "main": "app.js", "authors": [ "<NAME> <<EMAIL>>" ], "license": "MIT", "moduleType": [], "homepage": "http://www.paul-resume.com", "private": true, "ignore": [ "**/.*", "node_modules", "bower_components", "test", "tests" ] }
json
Barcelona and Real Madrid are reportedly still battling to sign Donny van de Beek as they resume their hunt for the Ajax midfielder after the Dutch giants warded off interest from a series of La Liga clubs last summer. The Netherlands international was heavily linked to both clubs before the start of the new campaign, with Real Madrid reportedly tabling a €35 million bid after failing to sign Paul Pogba from Manchester United. According to SPORT, Los Blancos have the upper hand over their Catalan rivals when it comes to the 22-year-old's signature and are believed to have already contacted Ajax and the player's representatives over the summer. Meanwhile, the Blaugrana are not ready to give up the fight just yet as they continue to push for the midfielder, who they believe will form a lethal partnership with Frenkie de Jong in the seasons to come. The Dutchman is now reported to be worth between €50 million (£41. 5m) and €60 million (£49. 9m), a number that Real Madrid would be more prepared to pay, especially as they continue their search for a successor to Luka Modric, who is entering the twilight years of his career. Barcelona, on the other hand, have reportedly requested Ajax's sporting director, Marc Overmars, for some time to sort out their priorities in time for the January transfer window. Ajax have already lost their Eredivisie-winning duo, Matthijs de Ligt, and Frenkie de Jong, and it looks like it will only be a matter of time before they witness yet another Amsterdam exit.
english
DSP World Gold Fund will now be known as DSP World Global Fund of Funds. Saving money is an art! Master it with our newsletter. COPYRIGHT © 2015-2023 Transamerica Direct Marketing Consultants Private Limited. All Rights Reserved.
english
<gh_stars>1-10 {"946788993707":{"type":"st"},"946788993869":{"type":"book open","bookName":"Epic%20Quest","subjectName":"school","fName":"users/<KEY>"},"946788997278":{"type":"bc"}}
json
MMA News Round Up: Get ready for the latest buzz in the world of mixed martial arts! This week is all about UFC 290, and we’ve got the inside scoop on what to expect during fight week. Plus, find out why a WWE superstar is earning praise from Fellice Herring and catch up on other exciting MMA news. Don’t miss out on all the action! MMA News Round Up: UFC 290 Fight Week Details: On July 8, 2023, the Ultimate Fighting Championship will hold UFC 290 at the T-Mobile Arena in Paradise, Nevada. The main event will feature a Featherweight Championship unification bout between Alexander Volkanovski and Yair Rodriguez. Read Also | UFC 290 Odds: Volkanovski vs Rodriguez, Moreno vs Pantoja, Whittaker vs DuPlessis- Which UFC Fighters are Favorite This Week ? Additionally, a Flyweight Championship bout between Brandon Moreno and Alexandre Pantoja is expected to take place, with Brandon Royval as a potential backup. A Middleweight title eliminator between Robert Whittaker and Dricus du Plessis is also scheduled. Finally, former Welterweight Champion Robbie Lawler is set to face Niko Price in his retirement fight. During the 2023 Money in the Bank event, Natalya, a WWE superstar and third-generation wrestler, was presented with six certificates by Guinness World Records. Although she was not performing at the O2 Arena in London, Official Adjudicator Mark was there to award her with record titles such as “Most WWE matches (female)” (1,514 matches), “Most WWE wins in a career (female)” (663 wins), “Most WWE PLE appearances (female)” (75 appearances), “Most WWE Wrestlemania appearances (female)” (8 appearances), “Most WWE RAW matches” (174 matches), and “Most WWE Smackdown matches” (200 matches). Natalya expressed her surprise and gratitude upon receiving the awards and joked about needing more luggage to take them home. Following his victory over Abus Magomedov in the main event of UFC Vegas 76, Strickland expressed his desire to compete for the UFC middleweight title, which is currently held by Israel Adesanya. Adesanya, who is from neighboring New Zealand, is without an opponent for his next fight. It is expected that a middleweight title fight will headline the card for UFC 293, which is scheduled to take place in Australia in August. “It needs to happen,” Strickland said at the UFC Vegas 76 post-fight press conference. “We know Izzy’s on f****** repeat. At UFC Vegas 76, Mike Perry found someone who shared his love for bare-knuckle boxing. Perry, who was once a UFC fighter, has now become the unofficial ruler of bare-knuckle boxing since joining Bare Knuckle Fighting Championship in 2022. With three wins under his belt, including a recent victory over former UFC middleweight champion Luke Rockhold, Perry has become the biggest attraction in the sport. His latest victory drew more attention than any other fight in the sport’s brief history. In fact, even UFC superstar Conor McGregor couldn’t resist attending BKFC 41 and even faced off with Perry in the ring after his win over Rockhold.
english
<filename>packages/material-ui/src/AppBar/appBarClasses.d.ts export interface AppBarClasses { root: string; positionFixed: string; positionAbsolute: string; positionSticky: string; positionStatic: string; positionRelative: string; colorDefault: string; colorPrimary: string; colorSecondary: string; colorInherit: string; colorTransparent: string; } declare const appBarClasses: AppBarClasses; export function getAppBarUtilityClass(slot: string): string; export default appBarClasses;
typescript