text:
# Module 9: Client-Side Development

# Lab: Client-Side Development

#### Scenario

You have been asked to create a web-based Ice Cream application for your organization's customers, you want
to create a page showing all kinds of ice cream in stock, and a purchase page to the web application
Which will allow customers to purchase ice cream.

You will style the application using Bootstrap and Sass files which will compile by the task runner named gulp.

#### Objectives

After completing this lab, you will be able to:

- Install gulp using Node.
- write tasks to bundle and minify files.
- Style the application using Saas and Bootstrap.

#### Lab Setup

Estimated Time: **60 minutes**

#### Preparation Steps
1. Ensure that you have cloned the **20486D** directory from GitHub. It contains the code segments for this course's labs and demos.
**(https://github.com/MicrosoftLearning/20486D-DevelopingASPNETMVCWebApplications/tree/master/Allfiles)**

### Exercise 1: Using gulp to Run Tasks

#### Scenario

In this exercise, you will first install gulp using npm. You will then create a JavaScript file named gulpfile.js. After that you will write tasks in the gulpfile.js file to bundle and minify JavaScript files. Finally, you will write a watcher task to track for any changes occurring in files which are located in the **Scripts** folder.

The main tasks for this exercise are as follows:

1. Use npm to install gulp.

2. Write a task to copy a js file.

3. Run the task.

4. Update the task to bundle and minify js file.

5. Write a task to bundle and minify an existing file js file.

6. Add a watcher task.

7. Run the task.

#### Task 1: Use npm to install gulp

1. In the **Command Prompt**, run the command **cd {The location of  Allfiles\Mod09\Labfiles\01_IceCreamCompany_begin folder on your machine}**

2. Run **npm install** command.

3. Close the  **Command Prompt** window.

4. Open the **IceCreamCompany.sln** file from the following location: **Allfiles\Mod09\Labfiles\01_IceCreamCompany_begin**.

5. In the **IceCreamCompany - Microsoft Visual Studio** window, on the **TOOLS** menu, click **Options**.

6. In the **Options** dialog box, search for **Web Package Management** and press **Enter**.

7. In the **Locations of external tools** list box, move the **$(PATH)** option to the top of the list, and then click **OK**.

8. Open the **package.json** file and view its content.

      >**Note:** There are dependencies to the **gulp**, **gulp-concat**, **gulp-uglify**, **gulp-watch-sass**, **gulp-sass**, **gulp-cssmin**, **jquery**, **bootstrap**, and **popper.js** packages.

#### Task 2: Write a task to copy a JavaScript file

1. Add a **JavaScript** **File** with the following information:

    - Folder: **/**
    - Name: **gulpfile**

2. In the **gulpfile.js** file, add a new variable named **gulp** with the value of **require('gulp')**.

3. Add a new variable named **paths** with the value of **{}**.

4. In the **paths** object, add the following properties :

    - webroot: **"./wwwroot/"**
    - nodeModules: **"./node_modules/"**

5. Assign the **jqueryjs** property of the **paths** variable the value of **paths.nodeModules + "jquery/dist/jquery.js"**.

6. Assign the **destinationJsFolder** property of the **paths** variable the value of **paths.webroot + "lib/"**.

7. Call the **task** method of the **gulp** variable.

8. Pass **"copy-js-file"** and an **anonymous function** as parameters to the **task** function.

9. In the **anonymous function** code block, return the **gulp.src(paths.jqueryjs)** function call result.

10. Chain a **pipe** function call to the **src** function call.

11. Pass **gulp.dest(paths.destinationJsFolder)** as a parameter to the pipe function.

#### Task 3: Run the task

1. Save all the changes.

2. Open **Task Runner Explorer**.

    >**Note:** If the **Tasks** list does not contain a task named **copy-js-file**, click **Refresh**.

3. Run the **copy-js-file** task.
    >**Note:** In **Solution Explorer**, under **wwwroot**, a new folder has been added named **lib** with js file named **jquery.js**

#### Task 4:  Update the task to bundle and minify a JavaScript file

1. In the **gulpfile.js**, after the **gulp** variable, add a variable named **concat** with the value of **require('gulp-concat')**.

2. Add a variable named **uglify** with the value of **require('gulp-uglify')**.

3. Before the **gulp.task** method call, assign the **vendorJsFileName** property of the **path** object the value of **"vendor.min.js"**.

4. Remove the **gulp.task** method call.

5. Call the **task** method of the **gulp** variable.

6. Pass **"min-vendor:js"** and an **anonymous function** as parameters to the **task** function.

7. In the **anonymous function** code block, return the **gulp.src(paths.jqueryjs)** function call result.

8. Chain a **pipe** function call to the **src** function call. Pass **concat(paths.vendorJsFileName)** as a parameter to the pipe function.

9. Chain a **pipe** function call to the **pipe** function call. Pass **uglify()** as a parameter to the pipe function.

10. Chain a **pipe** function call to the **pipe** function call. Pass **gulp.dest(paths.destinationJsFolder)** as a parameter to the pipe function.

#### Task 5: Write a task to bundle and minify an existing JavaScript file

1. Before the **gulp.task** method call, assign the **JsFiles** property of the **path** object the value of **"./Scripts/*.js"**.

2. Assign the **JsFileName** property of the **path** object, the value of **"script.min.js"**.

3. Assign the **destinationExistingJsFolder** property of the **path** object the value of **paths.webroot + "script/"**.

4. After the **gulp.task** method call, call the **task** method of the **gulp** variable. Pass **"min:js"** and an **anonymous function** as parameters to the **task** function.

5. In the **anonymous function** code block, return the **gulp.src(paths.JsFiles)** function call result.

6. Chain a **pipe** function call to the **src** function call. Pass **concat(paths.JsFileName)** as a parameter to the pipe function.

7. Chain a **pipe** function call to the **pipe** function call. Pass **uglify()** as a parameter to the pipe function.

8. Chain a **pipe** function call to the **pipe** function call. Pass **gulp.dest(paths.destinationExistingJsFolder)** as a parameter to the pipe function.

#### Task 6: Add a watcher task

1. After the **uglify** variable assigment, add a variable named **watch**, with the value of **require('gulp-watch-sass')**.

2. After the last **gulp.task** method call, call the **task** method of the **gulp** variable.

3. Pass **"js-watcher"** and an **anonymous function** as parameters to the **task** function.

4. In the **anonymous function** code block, return the **gulp.watch** function call result. Pass **"./Scripts/*.js"** and **["min:js"]** as parameters to the **gulp.watch** function.

5. After the last **gulp.task** method call, call the **task** method of the **gulp** variable. Pass **"sass-watcher"** and an **anonymous function** as parameters to the **task** function.

6. In the **anonymous function** code block, return the **gulp.watch** function call result. Pass **"./Styles/*.scss"** and **["min:scss"]** as parameters to the **gulp.watch** function.

#### Task 7: Run the task

1. Save all changes.

2. In the **Task Runner Explorer** window, run the **min-vendor:js** task.

3. Run the **min:js** task.

4. Run the **js-watcher** task.

>**Results**: After completing this exercise, you will be able to use **gulp** to copy, bundle and minify js files, furthermore add watcher tasks.

### Exercise 2: Styling Using Sass

#### Scenario

In this exercise, you will first add **gulp** task to bundle and minify **Saas** files. You will then create a **Sass** file named **main.scss**. After that you will add **Sass** variables mixin and functions. Finally, you will add a **Sass** nesting styles in the **main.scss** file.

The main tasks for this exercise are as follows:

1. Add gulp Sass task to compile bundle and minify.

2. Add a new Sass file to the project.

3. Add Sass variables mixin and functions.

4. Add a Sass nesting styles.

5. Run the task.

#### Task 1: Add gulp Sass task to compile bundle and minify

1. In the **gulpfile.js**, after the **watch** variable assigment, add a variable named **sass** with the value of **require('gulp-sass')**.

2. Add a variable named **cssmin** with the value of **require('gulp-cssmin')**.

3. Before the first **gulp.task** method call, assign the **sassFiles** property of the **path** object the value of **"./Styles/*.scss"**.

4. Assign the **compiledCssFileName** property of the **path** object the value of **""main.min.css"**.

5. Assign the **destinationCssFolder** property of the **path** object the value of **paths.webroot + "css/"**.

6. After the last **gulp.task** method call, call the **task** method of the **gulp** variable. Pass **"min:scss** and an **anonymous function** as parameters to the **task** function.

7. In the **anonymous function** code block, return the **gulp.src** function call result. Pass **paths.sassFiles** as a parameter to the **gulp.src** function.

8. Chain a **pipe** function call to the **src** function call. Pass **sass().on('error', sass.logError)** as a parameter to the **pipe** function.

9. Chain a **pipe** function call to the **pipe** function call. Pass **concat(paths.compiledCssFileName)** as a parameter to the pipe function.

10. Chain a **pipe** function call to the **pipe** function call. Pass **cssmin()** as a parameter to the pipe function.

11. Chain a **pipe** function call to the **pipe** function call. Pass **gulp.dest(paths.destinationCssFolder)** as a parameter to the pipe function.

#### Task 2: Add a new Sass file to the project

1. Create a new folder with the following information:

    - Folder name: **Styles**

2. Add a **SCSS Style Sheet (SASS)** file with the following information:

    - Folder: **Styles**
    - Name: **main.scss**

#### Task 3: Add Sass variables mixin and functions

1. Delete the contents of the **main.scss** file.

2. In the **main.scss** file, add a new variable named **$highlights** with the value of **#124eab**.

3. Add a new **mixin** with the name of **normalized-text**.

4. In the **normalized-text** mixin, add the following properties:

    - font-family: **"Playfair Display", Arial, Tahoma, sans-serif**
    - text-align: **center**

5. Add a new **mixin** with the name of **normalized-image**.

6. In the **normalized-image** mixin, add the following properties:

    - width: **100%**
    - height: **auto**

#### Task 4: Add a Sass nesting styles

1. After the **normalized-image** mixin definition, add a **DIV** selector.

2. Inside the **DIV** selector, add a **H1** nested selector.

3. Inside the **H1** selector, add the **normalized-text** mixin using the **@include** directive.

4. After the **@include** directive, add the following properties:

    - font-size: **45px**
    - line-height: **50px**
    - font-weight: **400**
    - letter-spacing: **1px**
    - color: **#736454**
    - margin: **60px**

5. After the **DIV** selector, add a **.main-title** selector with the following properties:

    - background-image: **url("/images/banner-1.jpg")**
    - width: **100%**
    - background-size: **cover**
    - background-position: **center center**
    - min-height: **400px**
    - display: **flex**
    - flex-direction: **column**
    - justify-content: **center**
    - align-items: **center**

6. Inside the **.main-title** selector, add a nested **H1** selector.

7. Inside the **H1** selector, add the **normalized-text** mixin using the **@include** directive.

8. After the **@include** directive, add the following properties:

    - color: **$highlights**
    - font-size: **50px**
    - text-shadow: **0px 2px 5px #aba8a8**
    - font-weight: **bolder**
    - text-align: **center**

9.  After the **H1** selector, add a **button** selector.

10. Inside the **button** selector, add the **normalized-text** mixin using the **@include** directive.

11. After the **@include** directive, add the following properties:

    - transition: **none**
    - color: **lighten(#ffffff,90%)**
    - text-align: **inherit**
    - line-height: **13px**
    - border: **1px solid #d3c0c0**
    - margin: **0px**
    - padding: **12px 24px**
    - letter-spacing: **0px**
    - font-weight: **400**
    - font-size: **16px**
    - font-weight: **bold**
    - background-color: **#736454**

12. After the **.main-title** selector, add a **.img-container** selector with the following properties:

    - display: **flex**
    - flex-wrap: **wrap**
    - justify-content: **space-around**
    - align-items: **flex-end**

13. Inside the **.img-container** selector, add a nested **.item** selector with the following properties:
    - color: **white**
    - width: **200px**
    - display: **flex**
    - flex-direction: **column**
    - justify-content: **space-between**

14. Inside the **.item** selector, add a nested **h3** selector.

15. Inside the **h3** selector, add the **normalized-text** mixin using the **@include** directive.

16. After the **@include** directive, add the following properties:
    - color: **#736454**
    - font-size: **20px**

17. After the **h3** selector, add a **DIV** selector.

18. Inside the **DIV** selector, add a nested **img** selector.

19. Inside the **img** selector, add the **normalized-image** mixin using the **@include** directive.

20. After the **DIV** selector, add a **DIV** selector.

21. Inside the **DIV** selector, add a nested **p** selector.

22. Inside the **p** selector, add the **normalized-text** mixin using the **@include** directive.

23. After the **@include** directive, add the following properties:
    - color: **#736454**
    - font-size: **20px**
    - margin: **70px**

24. After the **.img-container** selector, add a **.container** selector.

25. Inside the **.container** selector, add a nested **.checkout** selector with the following properties:
    - border: **1px solid #ccc**
    - box-shadow: **0 0 5px #ccc**
    - padding: **20px**
    - width: **800px**
    - margin: **0 auto**
    - border-radius: **4px**
    - background-color: **#f9f9f9**

26. Inside the **.checkout** selector, add a nested **.row justify-content-center intro-row** selector with the following properties:
    - font-weight: **bold**

27. After the **.container** selector, add a **.justify-content-center** selector with the following properties:
    -  justify-content: **center !important**
    -  align-items: **center**

28. After the **.justify-content-center** selector, add a **nav** selector with the following properties:
    -  width: **450px**

28. After the **nav** selector, add a **img** selector with the following properties:
    -  height: **35px**
    -  width: **35px**

29. After the **img** selector, add a **.navbar-nav > li** selector with the following properties:
    -  float: **left**
    -  position: **relative**

29. After the **.navbar-nav > li** selector, add a **.row** selector with the following properties:
    -  margin: **10px**

30. After the **.row** selector, add a **.imageDisplay** selector.

31. Inside the **imageDisplay** selector, add the **normalized-image** mixin using the **@include** directive.

#### Task 5: Run the task

1. Save all changes.

    > **Note**: In **Task Runner Explorer**, if the **Tasks** list is not updated click **Refresh**.

2. In the **Task Runner Explorer** window, right-click **min:scss**, and then click **Run**.

3. Right-click **sass-watcher**, and then click **Run**.

4. Right-click **js-watcher**, and then click **Run**.

    > **Note**: In **Solution Explorer**, under **wwwroot**, under **css**, a new css file has been added named **main.min.css**.

>**Results** : After completing this exercise, you will be able to use gulp Sass task to compile bundle and minify Sass file to css.

### Exercise 3: Using Bootstrap

#### Scenario

In this exercise, you will first update a task that bundle and minify js files then update the task to include **Bootstrap** js and then add a new task to handle css files also. You  will then style and link the layout to **Bootstrap**. After that you will apply the **Bootstrap** grid system. Finally, you will style the web application form.

The main tasks for this exercise are as follows:

1. Update js task to include bootstrap.

2. Add a new task to handle the bootstrap css.

3. Run the task.

4. Link the layout to Bootstrap.

5. Style the layout using Bootstrap.

6. Apply the Bootstrap grid system to make the site responsive.

7. Style a form using Bootstrap.

8. Run the application.

#### Task 1: Update js task to include bootstrap

1. In the **gulpfile.js** file, after the **jqueryjs** property assignment, assign the **popperjs** property of the **path** object the value of **paths.nodeModules + "popper.js/dist/umd/popper.js"**.

2. Assign the **bootstrapjs** property of the **path** object the value of **paths.nodeModules + "bootstrap/dist/js/bootstrap.js"**.

3. Assign the **vendorJsFiles** property of the **path** object the value of **[paths.jqueryjs, paths.popperjs, paths.bootstrapjs]**.

4. In the **gulp.task** method call with the **"min-vendor:js"** parameter, in the **return** statement, replace the **paths.jqueryjs** parameter with **paths.vendorJsFiles** parameter.

#### Task 2: Add a new task to handle the bootstrap css

1. After the **destinationCssFolder** property assignment, assign the **bootstrapCss** property of the **path** object the value of **paths.nodeModules + "bootstrap/dist/css/bootstrap.css"**.

2. Assign the **vendorCssFileName** property of the **path** object the value of **"vendor.min.css"**.

3. After the **gulp.task** method call with the **"min:scss"** parameter, call the **task** method of the **gulp** variable. Pass **"min-vendor:css** and an **anonymous function** as parameters to the **task** function.

4. In the **anonymous function** code block, return the **gulp.src** function call result. Pass **paths.bootstrapCss** as a parameter to the **gulp.src** function.

5. Chain a **pipe** function call to the **src** function call. Pass **concat(paths.vendorCssFileName)** as a parameter to the **pipe** function.

6. Chain a **pipe** function call to the **pipe** function call. Pass **cssmin()** as a parameter to the **pipe** function.

7. Chain a **pipe** function call to the **pipe** function call. Pass **gulp.dest(paths.destinationCssFolder)** as a parameter to the **pipe** function.

#### Task 3:  Run the task

1. Save all changes.

    > **Note**: In **Task Runner Explorer**, if the **Tasks** list is not updated click **Refresh**.

2. In the **Task Runner Explorer** window, right-click **min-vendor:css**, and then click **Run**.

     > **Note**: In **Solution Explorer**, under **wwwroot**, under **css**, a new css file has been added named **vendor.min.css**.

#### Task 4: Link the layout to Bootstrap

1. In the **_Layout.cshtml** file, after the **TITLE** element, add a **SCRIPT** with the following information:
    - Src: **~/lib/vendor.min.js**

2. After the **SCRIPT** element, add a **SCRIPT** with the following information:
    - Src: **~/script/script.min.js**

3. After the **SCRIPT** element, add a **LINK** with the following information:
    - Href: **~/css/main.min.css**
    - rel: **stylesheet**

4. After the **LINK** element, add a **LINK** with the following information:
    - Href: **~/css/vendor.min.css**
    - rel: **stylesheet**

#### Task 5: Style the layout using Bootstrap

1. In the **_Layout.cshtml** file, before the **DIV** element with @RenderBody() content, add a **DIV**.

2. In the new **DIV** element, add a **NAV** element with the following information:
    - Class: **navbar navbar-expand-lg navbar-light bg-light mx-auto**

3. In the **NAV** element, add a **A** element with the following information:
    - Class: **navbar-brand**
    - Href: **@Url.Action("Index", "IceCream")**
     Content: **Ice Cream of Dreams**

4. In the **A** element, before its content, add a **IMG** element with the following information:
    - Src: **~/images/brand.jpg**
    - Class: **d-inline-block align-top**
    - Alt: **""**

5. After the **A** element, add **DIV** element with the following information:

    - Class: **collapse navbar-collapse**
    - Id: **nav-content**

6. In the new **DIV** element, add **UL** element with the following information:

    - Class: **navbar-nav**
    - Id: **nav-content**

7. In the **UL** element, add **LI** element with the following information:

    - Class: **nav-item active**

8. In the **LI** element, add **A** element with the following information:

    - Class: **nav-link**
    - Href: **@Url.Action("Index", "IceCream")**
    - Content: **Home**

9. In the new **A** element, after its content, add a **SPAN** element with the following information:
    - Class: **sr-only**
    - Content: **(current)**

10. After the last **LI** element, add **LI** element with the following information:

    - Class: **nav-item**

11. In the **LI** element, add **A** element with the following information:

    - Class: **nav-link**
    - Href: **@Url.Action("Buy", "IceCream")**
    - Content: **Buy Ice Cream**

12. After the **DIV** element with the **NAV** element inside, add **DIV** element with the following information:

    - Class: **main-title**

13. In the **DIV** element, add **H1** element with the following information:

    - Content: **The Best Ice Cream You Will Taste in Your Life**

14. After the **H1** element, add **BUTTON** element with the following information:

    - Type: **button**
    - Onclick: **location.href='@Url.Action("Buy", "IceCream")'**
    - Content: **Buy Ice Cream**

#### Task 6: Apply the Bootstrap grid system to make the site responsive

1. In the **IceCreamController** class, right-click on the **Buy** action name, and then click **Add View**.

2. Create a new **View** using the **Add MVC View** dialog box, with the following information:

    - View Name: **Buy**
    - Template: **Empty (without model**
    - Create as Partial View: **False**
    - Use a layout page: **True**

3. At the beginning of the **Buy.cshtml** view, add a **@model** directive with the following information:

    - Type: **IceCreamCompany.Models.Customer**.

4. Remove the **H2** element.

5. Add **DIV** element with the following information:

    - Class: **container**

6. In the **DIV** element, add **H1** element with the following information:

    - Content: **Choose Your Flavor**

7. After the **H1** element, add **DIV** element with the following information:

    - Class: **checkout**

8. In the new **DIV** element, add **DIV** element with the following information:

    - Class: **row justify-content-center intro-row**

9. In the new **DIV** element, add **DIV** element with the following information:

    - Class: **col-4**
    - Content: **Ice Cream Flavors**

10. After the new **DIV** element, add **DIV** element with the following information:

    - Class: **col-2**
    - Content: **Buy Bulk(lbs)**

11. After the new **DIV** element, add **DIV** element with the following information:

    - Class: **col-2**
    - Content: **Total Amount**

12. After the new **DIV** element, add **DIV** element.

13. After the **DIV** element with the **row justify-content-center intro-row** classes, add **DIV** element with the following information:

    - Class: **row justify-content-center**

14. In the new **DIV** element, add **DIV** element with the following information:

    - Class: **col-4**

15. In the new **DIV** element, add **SELECT** element with the following information:

    - Class: **form-control**
    - Id: **flavor**

16. In the **SELECT** element, add **OPTION** element with the following information:

    - Content: **Select**

17. Add **OPTION** element with the following information:

    - Content: **Vanilla Ice Cream with Caramel Ripple and Almonds**

18. Add **OPTION** element with the following information:

    - Content: **Vanilla Ice Cream with Cherry Dark Chocolate Ice Cream**

19. Add **OPTION** element with the following information:

    - Content: **Vanilla Ice Cream with Pistachio**

20. After the last **DIV** element with the **col-2** class, add **DIV** element with the following information:

    - Class: **col-2**

21. In the new **DIV** element, add **SELECT** element with the following information:

    - Class: **form-control**
    - Id: **quantity**

22. In the **SELECT** element, add **OPTION** element with the following information:

    - Content: **1**

23. Add **OPTION** element with the following information:

    - Content: **2**

24. Add **OPTION** element with the following information:

    - Content: **3**

25. Add **OPTION** element with the following information:

    - Content: **4**

26. After the last **DIV** element with the **col-2** class, add **DIV** element with the following information:

    - Class: **col-2**

27. In the new **DIV** element, add **DIV** element with the following information:

    - Id: **totalAmount**

28. After the last **DIV** element with the **col-2** class, add **DIV** element with the following information:

    - Class: **col-2**

29.  In the new **DIV** element, add **DIV** element.

30.  In the new **DIV** element, add **IMG** element with the following information:

     - Class: **imageDisplay**
     - Src: **~/images/**
     - Id: **iceCreamImage**
     - Alt: **""**

#### Task 7: Style a form using Bootstrap

1. At the bottom of the **Buy.cshtml** view, add **DIV** element with the following information:

    - Class: **row justify-content-center**

2. In the new **DIV** element, add **DIV** element with the following information:

    - Class: **col-5**

3. In the new **DIV** element, add **FORM** element with the following information:

    - Method: **post**
    - Enctype: **multipart/form-data**
    - Asp-action: **Buy**

4. In the **FORM** element, add **DIV** element with the following information:

    - Class: **form-group row**

5. In the new **DIV** element, add **LABEL** element with the following information:

    - Asp-for: **FirstName**
    - Class: **col-sm-4 col-form-label**

6. After the **LABEL** element, add **DIV** element with the following information:

    - Class: **col-sm-6**

7. In the new **DIV** element, add **INPUT** element with the following information:

    - Asp-for: **FirstName**
    - Type: **text**
    - Class: **form-control**
    - Placeholder: **First Name**
    - Required: **required**

8. After the last **DIV** element with the **form-group row** class, add **DIV** element with the following information:

    - Class: **form-group row**

9. In the new **DIV** element, add **LABEL** element with the following information:

    - Asp-for: **LastName**
    - Class: **col-sm-4 col-form-label**

10. After the **LABEL** element, add **DIV** element with the following information:

    - Class: **col-sm-6**

11. In the new **DIV** element, add **INPUT** element with the following information:

    - Asp-for: **LastName**
    - Type: **text**
    - Class: **form-control**
    - Placeholder: **Last Name**
    - Required: **required**

12. After the last **DIV** element with the **form-group row** class, add **DIV** element with the following information:

    - Class: **form-group row**

13. In the new **DIV** element, add **LABEL** element with the following information:

    - Asp-for: **Address**
    - Class: **col-sm-4 col-form-label**

14. After the **LABEL** element, add **DIV** element with the following information:

    - Class: **col-sm-6**

15. In the new **DIV** element, add **INPUT** element with the following information:

    - Asp-for: **Address**
    - Type: **text**
    - Class: **form-control**
    - Placeholder: **Address**
    - Required: **required**

16. After the last **DIV** element with the **form-group row** class, add **DIV** element with the following information:

    - Class: **form-group row**

17. In the new **DIV** element, add **LABEL** element with the following information:

    - Asp-for: **Email**
    - Class: **col-sm-4 col-form-label**

18. After the **LABEL** element, add **DIV** element with the following information:

    - Class: **col-sm-6**

19. In the new **DIV** element, add **INPUT** element with the following information:

    - Asp-for: **Email**
    - Type: **email**
    - Class: **form-control**
    - Placeholder<EMAIL_ADDRESS>    - Required: **required**

20. After the last **DIV** element with the **form-group row** class, add **DIV** element with the following information:

    - Class: **form-group row**

21. In the new **DIV** element, add **LABEL** element with the following information:

    - Asp-for: **PhoneNumber**
    - Class: **col-sm-4 col-form-label**

22. After the **LABEL** element, add **DIV** element with the following information:

    - Class: **col-sm-6**

23. In the new **DIV** element, add **INPUT** element with the following information:

    - Asp-for: **PhoneNumber**
    - Type: **number**
    - Class: **form-control**
    - Placeholder: **Phone Number**
    - Required: **required**

24. After the last **DIV** element with the **form-group row** class, add **DIV** element with the following information:

    - Class: **form-group row**

25. In the new **DIV** element, add **DIV** element with the following information:

    - Class: **col-sm-10**

19. In the new **DIV** element, add **BUTTON** element with the following information:

    - Id: **formButton**
    - Type: **submit**
    - Class: **btn btn-outline-primary**

#### Task 8: Run the application

1. Save all changes.

2. Start the application without debugging.

3. Click **Buy Ice Cream**.

4. In the **Ice Cream Flavors** list, select _<An ice cream flavor of your choice>_.

5. In the **Buy Bulk(lbs)** list, select _<A bulk of your choice>_.

6. In the **First Name** text box, select _<A first name of your choice>_.

7. In the **Last Name** text box,, select _<A last  name of your choice>_.

8. In the **Address** text box, select _<A address of your choice>_.

9. In the **Email** text box, select _<A email of your choice>_.

10. In the **Phone Number** text box, select _<A phone number of your choice>_, and then click **Make a Purchase**.

11. On the **Thank you** page, in the **menu bar** click **Home**, and examine the browser content.

12. Close **Microsoft Edge**.

13. Close **Microsoft Visual Studio**.

>**Results** : After completing this exercise, you should have created a ice cream company application in which users can view ice cream details, and buy some as well.

©2018 Microsoft Corporation. All rights reserved.

The text in this document is available under the  [Creative Commons Attribution 3.0 License](https://creativecommons.org/licenses/by/3.0/legalcode), additional terms may apply. All other content contained in this document (including, without limitation, trademarks, logos, images, etc.) are  **not**  included within the Creative Commons license grant. This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes.

This document is provided "as-is." Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using it. Some examples are for illustration only and are fictitious. No real association is intended or inferred. Microsoft makes no warranties, express or implied, with respect to the information provided here.


text:
# Mustache Template Engine for Go

[![Build Status](https://img.shields.io/travis/cbroglie/mustache.svg)](https://travis-ci.org/cbroglie/mustache)
[![Go Doc](https://godoc.org/github.com/cbroglie/mustache?status.svg)](https://godoc.org/github.com/cbroglie/mustache)
[![Go Report Card](https://goreportcard.com/badge/github.com/cbroglie/mustache)](https://goreportcard.com/report/github.com/cbroglie/mustache)
[![codecov](https://codecov.io/gh/cbroglie/mustache/branch/master/graph/badge.svg)](https://codecov.io/gh/cbroglie/mustache)
[![Downloads](https://img.shields.io/github/downloads/cbroglie/mustache/latest/total.svg)](https://github.com/cbroglie/mustache/releases)
[![Latest release](https://img.shields.io/github/release/cbroglie/mustache.svg)](https://github.com/cbroglie/mustache/releases)

## Why a Fork?

I forked [hoisie/mustache](https://github.com/hoisie/mustache) because it does not appear to be maintained, and I wanted to add the following functionality:

- Update the API to follow the idiomatic Go convention of returning errors (this is a breaking change)
- Add option to treat missing variables as errors

## CLI Overview

```bash
➜  ~ go get github.com/cbroglie/mustache/...
➜  ~ mustache
Usage:
  mustache [data] template [flags]

Examples:
  $ mustache data.yml template.mustache
  $ cat data.yml | mustache template.mustache

Flags:
  -h, --help   help for mustache
➜  ~
```

## Package Overview

This library is an implementation of the Mustache template language in Go.

### Mustache Spec Compliance

[mustache/spec](https://github.com/mustache/spec) contains the formal standard for Mustache, and it is included as a submodule (using v1.1.3) for testing compliance. All of the tests pass (big thanks to [kei10in](https://github.com/kei10in)), though the optional lambda support has not been implemented.

## Documentation

For more information about mustache, check out the [mustache project page](http://github.com/defunkt/mustache) or the [mustache manual](http://mustache.github.com/mustache.5.html).

Also check out some [example mustache files](http://github.com/defunkt/mustache/tree/master/examples/)

## Installation

To install mustache.go, simply run `go get github.com/cbroglie/mustache`. To use it in a program, use `import "github.com/cbroglie/mustache"`

## Usage

There are four main methods in this package:

```go
Render(data string, context ...interface{}) (string, error)

RenderFile(filename string, context ...interface{}) (string, error)

ParseString(data string) (*Template, error)

ParseFile(filename string) (*Template, error)
```

There are also two additional methods for using layouts (explained below); as well as several more that can provide a custom Partial retrieval.

The Render method takes a string and a data source, which is generally a map or struct, and returns the output string. If the template file contains an error, the return value is a description of the error. There's a similar method, RenderFile, which takes a filename as an argument and uses that for the template contents.

```go
data, err := mustache.Render("hello {{c}}", map[string]string{"c": "world"})
```

If you're planning to render the same template multiple times, you do it efficiently by compiling the template first:

```go
tmpl, _ := mustache.ParseString("hello {{c}}")
var buf bytes.Buffer
for i := 0; i < 10; i++ {
    tmpl.FRender(&buf, map[string]string{"c": "world"})
}
```

For more example usage, please see `mustache_test.go`

## Escaping

mustache.go follows the official mustache HTML escaping rules. That is, if you enclose a variable with two curly brackets, `{{var}}`, the contents are HTML-escaped. For instance, strings like `5 > 2` are converted to `5 > 2`. To use raw characters, use three curly brackets `{{{var}}}`.

## Layouts

It is a common pattern to include a template file as a "wrapper" for other templates. The wrapper may include a header and a footer, for instance. Mustache.go supports this pattern with the following two methods:

```go
RenderInLayout(data string, layout string, context ...interface{}) (string, error)

RenderFileInLayout(filename string, layoutFile string, context ...interface{}) (string, error)
```

The layout file must have a variable called `{{content}}`. For example, given the following files:

layout.html.mustache:

```html
<html>
<head><title>Hi</title></head>
<body>
{{{content}}}
</body>
</html>
```

template.html.mustache:

```html
<h1>Hello World!</h1>
```

A call to `RenderFileInLayout("template.html.mustache", "layout.html.mustache", nil)` will produce:

```html
<html>
<head><title>Hi</title></head>
<body>
<h1>Hello World!</h1>
</body>
</html>
```

## Custom PartialProvider

Mustache.go has been extended to support a user-defined repository for mustache partials, instead of the default of requiring file-based templates.

Several new top-level functions have been introduced to take advantage of this:

```go

func RenderPartials(data string, partials PartialProvider, context ...interface{}) (string, error)

func RenderInLayoutPartials(data string, layoutData string, partials PartialProvider, context ...interface{}) (string, error)

func ParseStringPartials(data string, partials PartialProvider) (*Template, error)

func ParseFilePartials(filename string, partials PartialProvider) (*Template, error)

```

A `PartialProvider` is any object that responds to `Get(string)
(*Template,error)`, and two examples are provided- a `FileProvider` that
recreates the old behavior (and is indeed used internally for backwards
compatibility); and a `StaticProvider` alias for a `map[string]string`. Using
either of these is simple:

```go

fp := &FileProvider{
  Paths: []string{ "", "/opt/mustache", "templates/" },
  Extensions: []string{ "", ".stache", ".mustache" },
}

tmpl, err := ParseStringPartials("This partial is loaded from a file: {{>foo}}", fp)

sp := StaticProvider(map[string]string{
  "foo": "{{>bar}}",
  "bar": "some data",
})

tmpl, err := ParseStringPartials("This partial is loaded from a map: {{>foo}}", sp)
```

## A note about method receivers

Mustache.go supports calling methods on objects, but you have to be aware of Go's limitations. For example, lets's say you have the following type:

```go
type Person struct {
    FirstName string
    LastName string
}

func (p *Person) Name1() string {
    return p.FirstName + " " + p.LastName
}

func (p Person) Name2() string {
    return p.FirstName + " " + p.LastName
}
```

While they appear to be identical methods, `Name1` has a pointer receiver, and `Name2` has a value receiver. Objects of type `Person`(non-pointer) can only access `Name2`, while objects of type `*Person`(person) can access both. This is by design in the Go language.

So if you write the following:

```go
mustache.Render("{{Name1}}", Person{"John", "Smith"})
```

It'll be blank. You either have to use `&Person{"John", "Smith"}`, or call `Name2`

## Supported features

- Variables
- Comments
- Change delimiter
- Sections (boolean, enumerable, and inverted)
- Partials

repository: caicloud/cyclone

branch_name: refs/heads/master

extension: md

gha_language: Go

license_type: permissive

repo_name: caicloud/cyclone


text:
# BracketDumpers

This class was added by a mod with mod-id `contenttweaker`. So you need to have this mod installed if you want to use this feature.

## Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
```zenscript
import mods.contenttweaker.api.BracketDumpers;
```

## Methods

### getItemGroupBracketDump

Return Type: Collection<string>

```zenscript
BracketDumpers.getItemGroupBracketDump() as Collection<string>
BracketDumpers.getItemGroupBracketDump();
```

license: MIT

repository: noobanidus/CraftTweaker-Documentation

gha_language: CSS

gha_license_id: MIT

repo_name: noobanidus/CraftTweaker-Documentation


text:
# EigenRollup

EigenRollup provides a privacy-preserving smart contract on mixed layer 2 Rollup protocols of current main public blockchain, such as Ethereum. EigenRollup initiailly implements the protocol by referring to Arbitrum.

## [WIP] Add New Instructions for private computing

1. To use Arbitrum:

```bash
git clone -b dev https://github.com/ieigen/arbitrum
cd arbitrum

git submodule update --init --recursive

yarn
yarn build
```

2. Running on Local Blockchain

To run Arbitrum locally, you need several things:

  - Launching a Local Ethereum Blockchain (the L1)

  ```bash
  yarn docker:build:geth
  yarn docker:geth
  ```

  - Configuring your local Arbitrum chain (the L2)

  ```bash
  yarn demo:initialize
  ```

  - Firing up the Arbitrum L2 and Deploying your validator(s)

  ```bash
  yarn demo:deploy
  ```

3. Deploy contract by truffle in `eigen_call_sample`

```bash
# Install some dependencies
npm install @truffle/hdwallet-provider

# Deploy the contracts
truffle migrate --reset --network arbitrum

# Test our contracts
truffle console --network arbitrum
```

repository: bella-eigen/ieigen

branch_name: refs/heads/main

repo_name: bella-eigen/ieigen


text:
# xlsx to json w/ geocoding

Script to convert xlsx to json and geocode address field to coordinates suitable for MongoDB geospatial queries.

Developed specifically for the needs of [PlayUp](https://playup.coach). Could be adapted for other purposes.

## Dependencies
* [xlrd](https://pypi.org/project/xlrd/)
* [progress](https://pypi.org/project/progress/)

## Usage

* Add Google API Key
* Run with `python xlsxtojson.py`

## Nesting
Nesting is supported for a single level of depth. Concatenating parent and child keys with a `.` separator will result in the value being nested under the parent.

``` javascript
// Cell Heading
parent.child

// JSON Output
parent: {
    child: value
}
```
**Note**: Nesting is currently only supported for 1 level of depth, anything greater will likely lead to unexpected results.

## Arrays
Separating values with `|` will cause them to be output as an array.

``` javascript
// Cell Value
"One|Two|Three"

// JSON Output
["One", "Two", "Three"]
```

repository: BrettIRL/xlsxtojson

repo_name: BrettIRL/xlsxtojson


text:
# StringInPath

This gem allows you to check every file in a given directory for the presence
of a given substring and to replace that substring with a different substring.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'string_in_path'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install string_in_path

## Examples

### StringInPath.present("Doppler", "/home/wbuffett/test")
Recursively check to see if the string "Doppler" is present in any files
in /home/wbuffett/test:

### StringInPath.replace("Doppler", "Next Generation", "/home/wbuffett/test")
Recursively replace every instance of "Doppler" with "Next Generation"
in all files in /home/wbuffett/test:

## Contributing

1. Fork it ( https://github.com/jhsu802701/string_in_path/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request


text:
# surger
[![Version][npm-version-image]][npm-version-url] [![License][npm-license-image]][npm-license-url] [![Downloads][npm-downloads-image]][npm-downloads-url] [![Deps][npm-deps-image]][npm-deps-url] [![DevDeps][npm-devdeps-image]][npm-devdeps-url] [![Build Status][drone-build-image]][drone-build-url]

## about
Is there surge pricing around me right now? This little CLI utility will determine your location (currently OS X only) using location services and determine if surge pricing is active within your range.

## installation
```
$ npm -g install surger
$ surger

Location:   Nearby East 2nd Street

uberX       ✔ GOOD
uberXL      ✔ GOOD
UberBLACK   $ SURGE 2.8x
UberSUV     $ SURGE 2.8x
uberT       ✔ GOOD
```

> yaaaasss queen yaaaaasssss

[npm-version-url]: https://www.npmjs.com/package/surger
[npm-version-image]: https://img.shields.io/npm/v/surger.svg
[npm-license-url]: https://github.com/moimikey/shitty-uber/blob/master/LICENSE
[npm-license-image]: https://img.shields.io/npm/l/surger.svg
[npm-downloads-url]: https://www.npmjs.com/package/surger
[npm-downloads-image]: https://img.shields.io/npm/dm/surger.svg
[npm-deps-url]: https://david-dm.org/moimikey/shitty-uber
[npm-deps-image]: https://img.shields.io/david/moimikey/shitty-uber.svg
[npm-devdeps-url]: https://david-dm.org/moimikey/shitty-uber
[npm-devdeps-image]: https://img.shields.io/david/dev/moimikey/shitty-uber.svg
[drone-build-image]: https://drone.io/github.com/moimikey/shitty-uber/status.png
[drone-build-url]: https://drone.io/github.com/moimikey/shitty-uber/latest

repository: nivertech/shitty-uber

repo_name: nivertech/shitty-uber


text:
Servers
===

Creates Digitalocean images using Packer.

How to use
===

 - Run `bin/setup` to get started.
 - Run `bin/build [template] [github username (optional)]` to build an image.
    - `bin/build list` to list available templates
 - Requires `DIGITALOCEAN_API_TOKEN` environment variable to be set
 - Requires the Github username to be set and available in `ssh -T<EMAIL_ADDRESS>or passed in as the second parameter.


text:
![AppDragLogo](https://raw.githubusercontent.com/AppDrag/appdrag-vscode-extension/master/resources/logo.png)
# APPDRAG for Visual Studio Code
This is the VSCode extension for AppDrag. This extension much like the CLI will help you code your AppDrag projects locally and/or deploy them aswell.

## Setup
* Install
* Run `Appdrag: Login`
* Run `Appdrag: Init`
* You're ready to work !

## Features
### All commands start with 'AppDrag :'
![AppDragCommands](https://raw.githubusercontent.com/AppDrag/appdrag-vscode-extension/master/resources/appdrag-fullcommands.png)

### Filesystem

   `Filesystem Pull` 		         Pull folder or file from SERVER to LOCAL

   `Filesystem Push`	Push folder from LOCAL to SERVER

### Database - CloudBackend

   `Database Pull` 					                     Retrieves .sql file of your database from SERVER to LOCAL

   `Database Push` 			            Restore the database on SERVER from the LOCAL .sql backup provided

### Api - CloudBackend

   `CloudBackend Pull`		        Pull all functions of your CloudBackend to LOCAL

   `CloudBackend Pull (Single Function)`		        Pull one function of your CloudBackend to LOCAL

   `CloudBackend Push`		        Push all functions from LOCAL to your CloudBackend

   `CloudBackend Push (Single Function)`		        Push one functions from LOCAL to your CloudBackend

### Export

   `export  	<path>`		                    Export your project to the specified folder

## Usage

### Login
![LoginGif](https://raw.githubusercontent.com/AppDrag/appdrag-vscode-extension/master/resources/appdrag-login.gif)

### Init AppId
![AppIdGif](https://raw.githubusercontent.com/AppDrag/appdrag-vscode-extension/master/resources/appdrag-init.gif)

### Filesystem Pull
![PushGif](https://raw.githubusercontent.com/AppDrag/appdrag-vscode-extension/master/resources/appdrag-file-pull.gif)

### Filesystem Push
![PushGif](https://raw.githubusercontent.com/AppDrag/appdrag-vscode-extension/master/resources/appdrag-file-push.gif)

## Release Notes

### 1.0.0

Initial release of Appdrag-Vscode-Extension !

**Enjoy!**

repository: AppDrag/appdrag-vscode-extension

gha_language: TypeScript

repo_name: AppDrag/appdrag-vscode-extension


text:
---
layout: post
rel_link:  "11_2_1"
title:  "CMSSW_11_2_1"
date:   2021-01-29 14:24:10
categories: cmssw
relmajor: 11
relminor: 2
relsubminor: 1
---

# CMSSW_11_2_1
#### Changes since CMSSW_11_2_0:
[compare to previous](https://github.com/cms-sw/cmssw/compare/CMSSW_11_2_0...CMSSW_11_2_1)

1. [32730](http://github.com/cms-sw/cmssw/pull/32730){:target="_blank"}  from **@lwang046**: (Backport) Hcal: Fix the TDC Simulation Algorithm `simulation`  created: 2021-01-25 10:20:23 merged: 2021-01-27 05:04:56

2. [32719](http://github.com/cms-sw/cmssw/pull/32719){:target="_blank"}  from **@tlampen**: Update ECAL spike killer settings for Run 3, backport of #32701 `alca`  created: 2021-01-22 19:02:33 merged: 2021-01-25 00:42:28

3. [32712](http://github.com/cms-sw/cmssw/pull/32712){:target="_blank"}  from **@mmusich**: Updated phase 2 templates with extended angle space, backport of #32220 `alca`  `db`  `reconstruction`  created: 2021-01-22 08:58:03 merged: 2021-01-26 09:59:08

4. [32696](http://github.com/cms-sw/cmssw/pull/32696){:target="_blank"}  from **@mandrenguyen**: [11_2_X] Maintain access to genParticles from signal event in packed collection for HI miniAOD  `reconstruction`  `xpog`  created: 2021-01-20 12:25:23 merged: 2021-01-20 17:56:24

5. [32662](http://github.com/cms-sw/cmssw/pull/32662){:target="_blank"}  from **@mariadalfonso**: HBHE: avoid double counting of correlated term `reconstruction`  created: 2021-01-13 20:01:11 merged: 2021-01-18 08:34:24

6. [32639](http://github.com/cms-sw/cmssw/pull/32639){:target="_blank"}  from **@colizz**: [11_2_X] Fix the ExternalGeneratorFilter argument passing to python config `generators`  created: 2021-01-12 10:53:25 merged: 2021-01-12 14:39:45

7. [32619](http://github.com/cms-sw/cmssw/pull/32619){:target="_blank"}  from **@guitargeek**: [11_2_X] Correctly add HIPhotonIsolation to pat::photon `reconstruction`  created: 2021-01-08 15:06:29 merged: 2021-01-14 00:11:06

8. [32618](http://github.com/cms-sw/cmssw/pull/32618){:target="_blank"}  from **@mariadalfonso**: Nano modifiers in 112X `operations`  `pdmv`  `upgrade`  `xpog`  created: 2021-01-08 13:56:09 merged: 2021-01-13 13:44:39

9. [32580](http://github.com/cms-sw/cmssw/pull/32580){:target="_blank"}  from **@christopheralanwest**: Add low pT electron payloads to Run 3 prompt data GT [11_2_X] `alca`  created: 2020-12-24 03:06:21 merged: 2020-12-24 14:32:11

10. [32575](http://github.com/cms-sw/cmssw/pull/32575){:target="_blank"}  from **@ggovi**: Bug fix for coral MessageService wrapper `alca`  `db`  created: 2020-12-22 21:48:51 merged: 2021-01-11 15:27:38

11. [32536](http://github.com/cms-sw/cmssw/pull/32536){:target="_blank"}  from **@cms-tsg-storm**: HLT menu migration to CMSSW_11_2_0 `hlt`  created: 2020-12-18 09:32:51 merged: 2020-12-18 13:22:37

12. [32532](http://github.com/cms-sw/cmssw/pull/32532){:target="_blank"}  from **@christopheralanwest**: Use correct L1TMuonEndCapParams tag for 2017, 2018, Run 3 and Phase 2 MC [11_2_X] `alca`  created: 2020-12-17 20:20:06 merged: 2020-12-18 06:10:14

13. [32520](http://github.com/cms-sw/cmssw/pull/32520){:target="_blank"}  from **@SohamBhattacharya**: HGCal ID variables `hlt`  `reconstruction`  created: 2020-12-17 11:02:23 merged: 2021-01-11 09:57:01

14. [32515](http://github.com/cms-sw/cmssw/pull/32515){:target="_blank"}  from **@fwyzard**: Update HLT subtables after the migration to EOS (11.2.x) `hlt`  created: 2020-12-17 10:15:34 merged: 2020-12-18 00:30:17

#### CMSDIST Changes between Tags REL/CMSSW_11_2_0/slc7_amd64_gcc900 and REL/CMSSW_11_2_1/slc7_amd64_gcc900:
[compare to previous](https://github.com/cms-sw/cmsdist/compare/REL/CMSSW_11_2_0/slc7_amd64_gcc900...REL/CMSSW_11_2_1/slc7_amd64_gcc900)

1. [6566](http://github.com/cms-sw/cmsdist/pull/6566){:target="_blank"}  from **@cms-sw**: [11.2.X] Retrained particle ID model and energy regression for HLT TDR created: 2021-01-19 16:15:48 merged: 2021-01-21 09:30:48

2. [6517](http://github.com/cms-sw/cmsdist/pull/6517){:target="_blank"}  from **@cms-sw**: Fix source for 11_2 gcc9 created: 2020-12-18 13:48:26 merged: 2020-12-19 16:26:52

repository: cms-sw/ReleaseNotes

repo_name: cms-sw/ReleaseNotes


text:
---
path: 'batch-developer-guides/continuous-deployment/'
title: 'Continuous Deployment'
description: 'Continuous Deployment for task applications'
summary: true
---

# Continuous Deployment

Spring Cloud Data Flow provides native support for continuous deployment of task applications.

The application registry in Spring Cloud Data Flow lets you register multiple versions for the same task application.

When launching the task applications, you can choose which version of the task application you want to use for the launch. You can also re-use and update the deployment properties used from the previous launch of the same task.

This section shows how you can do continuous deployment of task applications with some examples.

gha_language: JavaScript


text:
# @react-pdf/render

## 3.2.6

### Patch Changes

- [#2320](https://github.com/diegomura/react-pdf/pull/2320) [`5385a43`](https://github.com/diegomura/react-pdf/commit/5385a438cb4876d1dc00d49d5fdd2e07c0d16167) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Fixed empty strings replaced with defaults in `creator` and `producer` props

- Updated dependencies [[`1e1fbdc`](https://github.com/diegomura/react-pdf/commit/1e1fbdc3c33ced46d8c7ebba7a196733cb789d59), [`8636812`](https://github.com/diegomura/react-pdf/commit/86368122ed87621d19ae3bc248080e17703d9fcb)]:
  -<EMAIL_ADDRESS>
## 3.2.5

### Patch Changes

- [#2311](https://github.com/diegomura/react-pdf/pull/2311) [`2e724df`](https://github.com/diegomura/react-pdf/commit/2e724dfaff3c9b39e9862d24b0d0e037c8a9e8c2) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Fixed crash on `transform="translate(1)"`

* [#2314](https://github.com/diegomura/react-pdf/pull/2314) [`d6018d5`](https://github.com/diegomura/react-pdf/commit/d6018d5a80492270ff5f5b4c00e694f7dc1cd93f) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Make `cx` and `cy` optional in `Circle` and `Ellipse`

* Updated dependencies [[`a25dbcb`](https://github.com/diegomura/react-pdf/commit/a25dbcb32b65c300f5b088e8b210bb0c1abca5c2)]:
  -<EMAIL_ADDRESS>
## 3.2.4

### Patch Changes

- Updated dependencies [[`47e91cb`](https://github.com/diegomura/react-pdf/commit/47e91cbd8016046bb4e8389ba0d1c7ede9edce59)]:
  -<EMAIL_ADDRESS>
## 3.2.3

### Patch Changes

- Updated dependencies [[`2db67a3`](https://github.com/diegomura/react-pdf/commit/2db67a38b9be98b7816a2b5aa4733446b95e3724), [`eff1ff0`](https://github.com/diegomura/react-pdf/commit/eff1ff0fefcd710994e4654904ef55843af76a17)]:
  -<EMAIL_ADDRESS>  -<EMAIL_ADDRESS>  -<EMAIL_ADDRESS>
## 3.2.2

### Patch Changes

- [#2205](https://github.com/diegomura/react-pdf/pull/2205) [`9a5e0be`](https://github.com/diegomura/react-pdf/commit/9a5e0befb89756db07ce053192a136df9d4ba905) Thanks [@jeetiss](https://github.com/jeetiss)! - update babel

- Updated dependencies [[`9a5e0be`](https://github.com/diegomura/react-pdf/commit/9a5e0befb89756db07ce053192a136df9d4ba905)]:
  -<EMAIL_ADDRESS>
## 3.2.1

### Patch Changes

- Updated dependencies [[`a5a933c`](https://github.com/diegomura/react-pdf/commit/a5a933c9733e4c77338ef76a2b3545b84a646a81), [`4bb97c3`](https://github.com/diegomura/react-pdf/commit/4bb97c3b92e82d7d7be2698c770f42560c6fcab6)]:
  -<EMAIL_ADDRESS>  -<EMAIL_ADDRESS>
## 3.2.0

### Minor Changes

- [#1892](https://github.com/diegomura/react-pdf/pull/1892) [`035d3f8`](https://github.com/diegomura/react-pdf/commit/035d3f8d24fa4f4af9f350950d81b51547858367) Thanks [@diegomura](https://github.com/diegomura)! - feat: add skew transformation support

### Patch Changes

- [#1906](https://github.com/diegomura/react-pdf/pull/1906) [`884695b`](https://github.com/diegomura/react-pdf/commit/884695b44feb974f155c83e0714e8e939b4f641b) Thanks [@diegomura](https://github.com/diegomura)! - feat: build textkit with rollup & define public api

- Updated dependencies [[`0fcc594`](https://github.com/diegomura/react-pdf/commit/0fcc594310d5af30ca1e752b3efc7a047e813dcb), [`37a9a74`](https://github.com/diegomura/react-pdf/commit/37a9a747f7677fa05e3ddf5669c0379aa65c1e39), [`884695b`](https://github.com/diegomura/react-pdf/commit/884695b44feb974f155c83e0714e8e939b4f641b)]:
  -<EMAIL_ADDRESS>
## 3.1.0

### Minor Changes

- [#1862](https://github.com/diegomura/react-pdf/pull/1862) [`1411d16`](https://github.com/diegomura/react-pdf/commit/1411d162e04ca237bad93729695c363fdf4bdbeb) Thanks [@diegomura](https://github.com/diegomura)! - feat: bookmarks support

* [#1869](https://github.com/diegomura/react-pdf/pull/1869) [`5d2c308`](https://github.com/diegomura/react-pdf/commit/5d2c3088cf438a8abf1038b14a21117fecf59d57) Thanks [@diegomura](https://github.com/diegomura)! - feat: variable dpi

### Patch Changes

- [#1863](https://github.com/diegomura/react-pdf/pull/1863) [`eecddbd`](https://github.com/diegomura/react-pdf/commit/eecddbda083561273eda21ee9b8d6107ad21800b) Thanks [@diegomura](https://github.com/diegomura)! - fix: dont use global image cache

* [#1864](https://github.com/diegomura/react-pdf/pull/1864) [`205aa03`](https://github.com/diegomura/react-pdf/commit/205aa0334c67e7436d0a35b95b919ecee189a192) Thanks [@diegomura](https://github.com/diegomura)! - fix: props undefiend access

- [#1857](https://github.com/diegomura/react-pdf/pull/1857) [`d958b0a`](https://github.com/diegomura/react-pdf/commit/d958b0ae06a61c157b2581488a9121a0464222f4) Thanks [@diegomura](https://github.com/diegomura)! - feat: embed same image once in final document

* [#1865](https://github.com/diegomura/react-pdf/pull/1865) [`24f5c77`](https://github.com/diegomura/react-pdf/commit/24f5c77706e12dbab45053cb704a2fe7cf60eb53) Thanks [@diegomura](https://github.com/diegomura)! - feat: add background color and border with Note support

- [#1855](https://github.com/diegomura/react-pdf/pull/1855) [`9347466`](https://github.com/diegomura/react-pdf/commit/9347466e8cd33d149678903cf4cf53850a8fc64a) Thanks [@diegomura](https://github.com/diegomura)! - fix: image dimension warning for JSON sources

* [#1861](https://github.com/diegomura/react-pdf/pull/1861) [`6730bc2`](https://github.com/diegomura/react-pdf/commit/6730bc210712e6fc67b94f89f23a3d86f6a203f9) Thanks [@diegomura](https://github.com/diegomura)! - fix: image opacity 0 rendering

- [#1859](https://github.com/diegomura/react-pdf/pull/1859) [`810f459`](https://github.com/diegomura/react-pdf/commit/810f45904e9abeaff5583ed4ceb6d77e123bbaea) Thanks [@diegomura](https://github.com/diegomura)! - feat: build render package as ES module

- Updated dependencies [[`1411d16`](https://github.com/diegomura/react-pdf/commit/1411d162e04ca237bad93729695c363fdf4bdbeb), [`4fadb48`](https://github.com/diegomura/react-pdf/commit/4fadb48983d7269452f89f80c7e341ece859aaee), [`ce8762f`](https://github.com/diegomura/react-pdf/commit/ce8762f6de5c796e69ec5a225c7f3ff9c619a960), [`5d2c308`](https://github.com/diegomura/react-pdf/commit/5d2c3088cf438a8abf1038b14a21117fecf59d57)]:
  -<EMAIL_ADDRESS>
## 3.0.0

### Major Changes

- [#1834](https://github.com/diegomura/react-pdf/pull/1834) [`7e97bb5`](https://github.com/diegomura/react-pdf/commit/7e97bb579aaa847e5a2de650b5b327ac90a465c7) Thanks [@diegomura](https://github.com/diegomura)! - refactor: remove ramda from render package

### Patch Changes

- [#1827](https://github.com/diegomura/react-pdf/pull/1827) [`7c1d373`](https://github.com/diegomura/react-pdf/commit/7c1d373a06b04369e762069be4b96d4e40371ecc) Thanks [@diegomura](https://github.com/diegomura)! - refactor: remove ramda from layout package

* [#1838](https://github.com/diegomura/react-pdf/pull/1838) [`9bdb5c9`](https://github.com/diegomura/react-pdf/commit/9bdb5c934a822340754cd4c892d399f91f6218de) Thanks [@diegomura](https://github.com/diegomura)! - feat: create fns package

* Updated dependencies [[`e938df0`](https://github.com/diegomura/react-pdf/commit/e938df0857642707b10b7f65f17ed22dc394ac1b), [`9bdb5c9`](https://github.com/diegomura/react-pdf/commit/9bdb5c934a822340754cd4c892d399f91f6218de), [`fe0f214`](https://github.com/diegomura/react-pdf/commit/fe0f214dbbf2f632b852ebfe65f886ecc4dd6953), [`9a2b935`](https://github.com/diegomura/react-pdf/commit/9a2b935cfe173f80425ed87d9f474da271c050d2)]:
  -<EMAIL_ADDRESS>  -<EMAIL_ADDRESS>  -<EMAIL_ADDRESS>  -<EMAIL_ADDRESS>
## 2.1.0

### Minor Changes

- [#1654](https://github.com/diegomura/react-pdf/pull/1654) [`ccf3bf2`](https://github.com/diegomura/react-pdf/commit/ccf3bf22867a9bd49668cdd3543ec32492a40e4b) Thanks [@jeetiss](https://github.com/jeetiss)! - added `@babel/runtime` to dependencies

### Patch Changes

- [#1648](https://github.com/diegomura/react-pdf/pull/1648) [`46a4b0c`](https://github.com/diegomura/react-pdf/commit/46a4b0c88836e0653db0c8bae6f71f969882277c) Thanks [@jeetiss](https://github.com/jeetiss)! - fixed render crush when a node has `debug` prop and `margin: auto`

* [#1581](https://github.com/diegomura/react-pdf/pull/1581) [`04449ab`](https://github.com/diegomura/react-pdf/commit/04449ab352db0cca2155024dd3e8c690e42193ca) Thanks [@jeetiss](https://github.com/jeetiss)! - added changelog with changesets

* Updated dependencies [[`04449ab`](https://github.com/diegomura/react-pdf/commit/04449ab352db0cca2155024dd3e8c690e42193ca), [`5d2d688`](https://github.com/diegomura/react-pdf/commit/5d2d688e18c830bb96c6e08446437d29f9f9c65f), [`ccf3bf2`](https://github.com/diegomura/react-pdf/commit/ccf3bf22867a9bd49668cdd3543ec32492a40e4b)]:
  -<EMAIL_ADDRESS>  -<EMAIL_ADDRESS>  -<EMAIL_ADDRESS>

repository: diegomura/react-pdf

repo_name: diegomura/react-pdf


text:
esb
===

The ECE297 Server Benchmark faclilitates quick and accurate distributed benchmarking. esb isolates a single variable and measures it's effect on server performance. It currently supports:

**Indepdent Variables**
 - Number of active keys
 - Number of concurrent clients
 - Total server throughput (IOPs/s)

**Depedent Variables**
 - Reuqest Latency (mean / 95% confidence interval)
 - Throughput
 - Memory Usage
 - CPU Usage

**Screenshots**
 - [CPU Utilization vs Concurrent Clients](http://i.imgur.com/frS7wFq.png)
 - [Memory vs Concurrent Clients](http://i.imgur.com/G9GENpZ.png)
 - [Throughput vs Number of Keys](http://i.imgur.com/gnfyEiZ.png)
 - [Latency vs Number of Keys](http://i.imgur.com/JG8L38z.png)

**How To Use**

Please see [the wiki](https://github.com/charliehorse55/esb/wiki) for detailed usage information

**Future Developments**
 - Measure network usage
 - Add more tests, such as repetitive add/remove cycles
 - Extend tester to support complex queries
 - Reduce number of threads spawned for high numbers of clients
 - It would be a great addition to esb to have a windows port of the client, to increase the number of client nodes available


text:
---
# Display name
title: Valentin Garnier

# Is this the primary user of the site?
superuser: true

# Role/position/tagline
role: Data Science student

# Organizations/Affiliations to show in About widget
organizations:
- name: EPFL
  url: https://www.epfl.ch/

# Short bio (displayed in user profile at end of posts)
# bio:.

# Interests to show in About widget
interests:
- Data Science
- Machine Learning
- Mobile Development

# Education to show in About widget
education:
  courses:
  - course: M.Sc in Data Science
    institution: EPFL, Switzerland
    year: 2019 - now
  - course: B.Sc in Communication Systems
    institution: EPFL, Switzerland
    year: 2015 - 2019
  - course: High School Diploma in Science
    institution: Lycée Polyvalent de Taravao, Tahiti
    year: 2015

# Social/Academic Networking
# For available icons, see: https://sourcethemes.com/academic/docs/page-builder/#icons
#   For an email link, use "fas" icon pack, "envelope" icon, and a link in the
#   form<EMAIL_ADDRESS>or "/#contact" for contact widget.
social:
- icon: envelope
  icon_pack: fas
  link: '/#contact'
- icon: github
  icon_pack: fab
  link: https://github.com/valentingarnier
- icon: linkedin
  icon_pack: fab
  link: https://www.linkedin.com/in/a-nice-profile/

# Link to a PDF of your resume/CV.
# To use: copy your resume to `static/media/resume.pdf`, enable `ai` icons in `params.toml`,
# and uncomment the lines below.
# - icon: cv
  # icon_pack: ai
   # link: media/resume.pdf

# Enter email to display Gravatar (if Gravatar enabled in Config)
email: ""

# Highlight the author in author lists? (true/false)
highlight_name: false
---

Hello! I am Valentin, a Data Science Master student from [EPFL](https://www.epfl.ch). I am from Tahiti and I moved to Switzerland for my studies. I enjoy solving problems using new technologies and using data to optimize business decisions. I am currently looking for Data Science or Machine Learning internships!

{{< icon name="download" pack="fas" >}} Download my {{< staticref "media/resume.pdf" "newtab" >}}resume{{< /staticref >}}.

repository: valentingarnier/onlineResume

repo_name: valentingarnier/onlineResume


text:
# Intro Exercise

## Assignment

### Cheatsheet

Make a [cheatsheet](./cheatsheet.md) of programming concepts from C# to Python

### Python introductory examples

Make a Python script for at least 3 of the following exercises:

1. ✅ What is the sum of all natural numbers between 0 and 10 000 divisible by 7 or 9?

    For example: 7,9,14,18 are those numbers between 0 and 20. Their sum is 48.

    [Python code](./sum.py) with following output:

    ```text
    11900244
    ```

1. ✅ The row of Lucas starts with 2 and 1 and each subsequent number is the sum of the two numbers preceding the number. What is the sum of all odd numbers in the row of Lucas smaller than 4 000 000?

    Hint the row of Lucas starts with: 2, 1, 3, 4, 7, 11, ...

    [Python code](./rowoflucas.py) with following output:

    ```text
    5445771
    ```

1. ✅ Make a class BinaryCounter which consists of 4 Leds, and define methods to represent the value it represents in binary, as a decimal and as a hexadecimal. Also provide a method to increment and decrement the value of the BinaryCounter.

    For example the value 7 is represented by led3: 0, led2: 1, led1: 1, led0: 1

    Hint the row of Lucas starts with: 2, 1, 3, 4, 7, 11, ...

    [Python code](./binarycounter.py) with following output:

    ```text
    Decimal value: 7
    Binary value: 0b111
    Hexadecimal value: 0x7
    led3: 0,  led2: 1,  led1: 1,  led0: 1
    ```

1. ✅ Define a Line class which consists of two Points. Points are defined by x and y coordinate values. Provide a method in the Line class which returns the length of the Line.

    [Python code](./line.py) with following output:

    ```text
    Point 1: [0, 0]    Point 2: [0, 8]
    Length: 8.0
    ```

1. ✅ A definite integral is defined by the area under the function. The Riemann sum is a approximation of this definite integral, by summing the areas of the rectangles which are defined by a chosen delta x. Delta x is the width of the approximate rectangle and the function value f(x) is the length of that rectangle. Write a function which calculates the Riemann sum for a given function for a given interval.

    ![Riemann sum example](./assets/riemann.png)

    [Python code](./riemannsum.py) with following output:

    My code includes 3 functions to calculate the left, right and middle Riemann sum for a given function over a given interval. You can see that the precision gets higher if n (number of rectangles) increases.

    ```text
    functie: f(x) = x² + 1    Interval: [0, 2]      n = 5
    Oppervlakte R:  5.5200000000000005
    Oppervlakte L:  3.920000000000001
    Oppervlakte M:  4.640000000000001
    ```

    ```text
    functie: f(x) = x² + 1    Interval: [0, 2]      n = 100000
    Oppervlakte R:  4.666706666794982
    Oppervlakte L:  4.666626666794983
    Oppervlakte M:  4.666666666594938
    ```

repository: JensVA/algorithms-python-jensva

repo_name: JensVA/algorithms-python-jensva


text:
# Amazon CodeGuru Profiler Python Demo Flask Web Application

![CodeGuru Profiler Console Screenshot](resources/CodeGuruProfilerPythonScreenshotDemoFlask.png)

### Code

The code for the Flask web application is based on the [Flask official tutorial](https://flask.palletsprojects.com/en/1.1.x/tutorial/), with modifications to make some network operations.

## Setup

Here is the summary of the steps that follow.

1. Make sure you have installed the latest version of [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html).
Use an IAM entity for the AWS CLI that has permissions to access CodeGuru Profiler, S3 and SQS to create all the required components for the demo application to run.
2. Create a profiling group in CodeGuru Profiler, named `PythonDemoFlaskApplication`.
3. Create a S3 bucket, e.g. `s3://python-demo-application-test-bucket`. Note, the bucket name must be unique across all of Amazon S3.
See [here](https://docs.aws.amazon.com/cli/latest/reference/s3/mb.html) for more details.
5. Create virtual environment with venv, e.g. `python3 -m venv ./venv`.
6. Activate the virtual environment, e.g. `source venv/bin/activate`.
7. Install the needed dependencies that are used for the demo application through `pip` using the `requirements.txt` file.

Here are the commands to run on your machine.

```bash
aws configure # Set up your AWS credentials and region as usual.
```

```bash
aws codeguruprofiler create-profiling-group --profiling-group-name PythonDemoFlaskApplication

# It is required to set the DEMO_APP_BUCKET_NAME environment applications for later running the demo application.

# Make sure you update `YOUR-BUCKET-NAME-REPLACE-ME`with a bucket name that is unique across all of Amazon S3.
export DEMO_APP_BUCKET_NAME=YOUR-BUCKET-NAME-REPLACE-ME
aws s3 mb s3://${DEMO_APP_BUCKET_NAME}
```

```bash
python3 -m venv ./venv
source venv/bin/activate
pip install -r requirements.txt
```

## How to run

The main entry point is in `sample-demo-flask-app/flaskr/__init__.py` that initializes applications, like the main one from `sample-demo-flask-app/flaskr/blog.py`.

* The configuration for gunicorn is in `gunicorn_conf.py`.

* There in the `gunicorn_conf.py` you can find the configuration for CodeGuru Profiler to start and to log.

### Initialize the local db

After the following command, there will now be a `flaskr.sqlite` file in the `instance/` folder in your project.
````bash
flask init-db
````

### Run the service.

Start the service using the gunicorn configuration.
```bash
# Start the service using a gunicorn server and 5 workers.
gunicorn "flaskr:create_app()" -c gunicorn_conf.py --log-level DEBUG --workers=5
```

### Generate traffic

Generate traffic by running the following script that will make thousands of requests to the local server started at `http://<IP_ADDRESS>:8000`.
```bash
./generate_traffic.sh
```

## How to see the results

Go to the [AWS CodeGuru Profiler console](https://console.aws.amazon.com/codeguru/profiler) to check the results.

The attached screenshot was captured by hiding the `gunicorn.workers.sync:SyncWorker:wait` frame because it covered more than half of the time.
```


text:
# Agora Miniapp Tutorial

*其他语言版本：[简体中文](README.CN.md)*

## Introduction

Built upon the Agora Miniapp SDK, the Agora Miniapp Sample App is an open-source demo that integrates video chat and live broadcast into your Wechat Mini Application.

With this sample app, you can:

* Integrate the Agora Miniapp SDK
* Join a channel
* Push your local stream to the channel
* Subscribe to remote streams in the same channel
* Leave a channel

## Preparing the Developer Environment

1. Ensure that you have installed the WeChat Developer Tool.
2. Ensure that you have a wechat OpenPlatform account that supports **live-pusher** and **live-player**. Only certified corporate accounts in certain industry have access to these two components. For details, click [here](https://developers.weixin.qq.com/miniprogram/dev/component/live-player.html) .
3. Ensure that you have granted access to the following domains in your OpenPlatform account:

 * https://miniapp.agoraio.cn
 * wss://miniapp.agoraio.cn

## Running the App

1. Create a developer account at [Agora.io](http://dashboard.agora.io/signin/), create a new project and obtain an App ID, and enable the App Certificate.
2. Download this project.
3. Fill in the App ID in *config.js* in the *utils* folder of this project:

    	const APPID = 'abcdefg'

4. Contact<EMAIL_ADDRESS>to abtain the Agora Miniapp SDK, and rename the SDK to "agora-miniapp-sdk.js".
5. Save the "agora-miniapp-sdk.js" under the *lib* folder of this project.
6. Start the WeChat Developer Tool and import this project.
7. Enter a channel name and join a channel. Invite your friend to join in the same channel and you will be able to see each other.

## About the Token/Dynamic Key

If you have enabled the App Certificate, you will need to generate the Token/Dynamic Key at the server for authentication purposes. Use it in the following method:

    	//...
    	client.join(<your key/access token here>, channel, uid, () => {
    	//...

See [Token](https://docs.agora.io/en/2.2/product/Video/Agora%20Basics/key_native?platform=Android) or [Dynamic Key](https://docs.agora.io/en/2.2/product/Video/Agora%20Basics/key_web?platform=Web) for generating the Token or Key at the server.

## Feedback

If you have any problems or suggestions regarding the sample projects, feel free to file an [issue](https://github.com/AgoraIO/Agora-Miniapp-Tutorial/issues).

## Related resources

- Check our [FAQ](https://docs.agora.io/en/faq) to see if your issue has been recorded.
- Dive into [Agora SDK Samples](https://github.com/AgoraIO) to see more tutorials
- Take a look at [Agora Use Case](https://github.com/AgoraIO-usecase) for more complicated real use case
- Repositories managed by developer communities can be found at [Agora Community](https://github.com/AgoraIO-Community)
- If you encounter problems during integration, feel free to ask questions in [Stack Overflow](https://stackoverflow.com/questions/tagged/agora.io)

## License

The sample projects are under the MIT license.

repository: AgoraIO/Agora-Miniapp-Tutorial

repo_name: AgoraIO/Agora-Miniapp-Tutorial


text:
# BraintreeData Fraud Tools

`BraintreeData` is an Android library for fraud detection while using the [Braintree Gateway](http://braintreepayments.com/).
It collects and provides data about the mobile device for fraud detection.

`BraintreeData` does not function alone - it requires data to be passed to the Braintree Gateway via a [server integration](https://developers.braintreepayments.com/android/start/hello-server).

## Getting Started

### Gradle

```groovy
dependencies {
  compile 'com.braintreepayments.api:data:1.+'
}
```

### Maven

```xml
<dependency>
    <groupId>com.braintreepayments.api</groupId>
    <artifactId>data</artifactId>
    <version>[1.0,)</version>
</dependency>
```

### JAR

[Download the latest JAR from Maven Central](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.braintreepayments.api&a=data&v=LATEST) and include it in your project.

## Android Setup

If you are using gradle, your manifest will automatically include the required permissions. There is no
other setup required.

If you are using maven or a JAR, ensure your `minSdk` is set to`8` or higher:

```xml
<uses-sdk android:minSdkVersion="8" />
```

and specify `INTERNET` and `ACCESS_NETWORK_STATE` permissions in `AndroidManifest.xml`

```xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
```

## Quick example

Get an instance of `BraintreeData`. The second parameter should be either `BraintreeEnvironment.SANDBOX` for testing
or `BraintreeEnvironment.PRODUCTION` for production.

```java
BraintreeData mBraintreeData = new BraintreeData(context, BraintreeEnvironment.PRODUCTION);
```

When processing a user's purchase, call `collectDeviceData()`:

```java
String deviceSessionId = mBraintreeData.collectDeviceData();
```

Send `deviceSessionId` to your server along with transaction data to be included with the request to the Braintree Gateway.

In Ruby, submitting a transaction will include:

```ruby
result = Braintree::Transaction.sale(
  :amount => "100.00",
  :credit_card => {
    :number => params["credit_card_number"],
    :expiration_date => params["credit_card_expiration_date"],
    :cvv => params["credit_card_cvv"]
  },
  :device_session_id => << contents of deviceSessionId from BraintreeData.collectDeviceData() >>
)
```

### Caveats

Keep a reference to the `BraintreeData` instance after calling `collectDeviceData()` until after
a transaction has finished. The reference should persist through device rotations. Doing so allows
us to ensure the best possible fraud detection measures.


text:
[![Build Status](https://travis-ci.org/skuzzle/stringz.svg?branch=master)](https://travis-ci.org/skuzzle/stringz)

stringz
=====
Make externalized Strings as easy accessible as inline Strings!

stringz makes it easy to access externalized strings which are stored in default
Java Resource Bundles. It provides some additional features like properties file
inheritance to include translation keys from other resource bundles and
references to other keys within the same file.

## License
stringz is distributed under the MIT License. See `LICENSE.md` in this directory
for detailed information.

## Documentation
JavaDoc is available at www.stringz.skuzzle.de/0.2.0/doc/

Scroll down in this readme for a quick start guide and some advanced topics.

Further support can be found in IRC (irc.euirc.net, #pollyisawesome) or via
Twitter (@ProjectPolly).

## Building
Building stringz requires Apache Maven to be installed. You may then run
`mvn install` to build stringz and install it into your local repository. If you
want to add stringz to your existing projects, declare the following dependency
within your `pom.xml`:

```xml
<dependency>
    <groupId>de.skuzzle</groupId>
    <artifactId>stringz</artifactId>
    <version>0.2.0</version>
</dependency>
```

## Basic Usage
Declare a class marked with `@ResourceMapping` with public static String fields
whose names conform to entries of the resource bundle which contains the
translation.

```java
@ResourceMapping
public class MSG {
    static {
        Stringz.init(MSG.class);
    }

    public static String next;
    public static String back;
    public static String cancel;
}
```

The following is a properties file named `MSG.properties` contained in the same
package as the `MSG` class above (as by Stringz default look up procedure, which
can be customized if needed):

```
next = Next
back = Back
cancel = Cancel
```

This is a properties file named `MSG_De.properties` within the same package:

```
next = Weiter
back = Zurück
cancel = Abbrechen
```

Calling `Stringz.init(Class)` will initialize all public static String fields
with values read from a resource bundle using either a globally specified locale
or a locale which can optionally be passed to the init method.

You can now easily access the externalized Strings:

```java
public class MyWizard {

    public MyWizard() {
        createNextButton(MSG.next);
        createBackButton(MSG.back);
        createCancelButton(MSG.cancel);
    }

    // ...
}
```

# Advanced Usage

## ResourceBundles
This section describes how Java `ResourceBundles` are referenced from within
Stringz and which additional features it offers.

### Look Up
ResourceBundles in Java should follow a specific naming scheme. This scheme
consists of a so called _base name_ or _family name_ and an optional locale
specific postfix. For details about ResourceBundles in Java please refer to the
[Sun Online Trail](http://docs.oracle.com/javase/tutorial/i18n/resbundle/index.html).

So ResourceBundle look up in Stringz is all about specifying the base name of
the resource. All other magic is handled by the
`ResourceBundle.getResource(...)` method.

By default, Stringz uses the full qualified name of the class annotated with
`@ResourceMapping` as base name for resource look up. If your class's name is
`com.your.domain.MSG`, then Stringz will use that String as base name to find
resources named `MSG` within the same java package. So you would place a
`MSG.properties` into that package and additionally further files like
`MSG_de_De.properties` etc.

You can also explicitly specify a base name for a message class. The preferred
way is to put it into the `@ResourceMapping` annotation:

```java
@ResourceMapping("com.your.domain.SomeResourceName")
public class MSG {
    // ...
}
```

If you need some weird dynamic logic for specifying a bundle's base name, you
can use a `BundleFamilyLocator`. Please refer to the
[documentation](http://www.skuzzle.de/stringz/1.0.0/doc/de/skuzzle/stringz/Stringz.html "JavaDoc for the Stringz class")
of the Stringz class.

### Control Customization
`Control` instances are responsible for materializing a `ResourceBundle`
instance from a base name and locale. Thus they implement the actual logic of
how a resource is resolved. Stringz uses a modification of Java's default
Control for loading property resources. The modification allows the user to
specify an optional charset which should be used when reading the property file.

If for any reason this does not suit your needs, you can specify a custom
Control to be used for retrieving the ResourceBundle of a certain message class.
The first step to do so is, to implement a `ControlFactory` which is responsible
for creating an instance of your Control implementation:

```java
public class MyControlFactory implements ControlFactory {
    @Override
    public Control create(ResourceMapping mapping, String[] args) {
        // process optional arguments and create a Control instance
        if (args.length != 2) {
            throw new ControlFactoryException("Wrong argument count");
        }
        return new MyControl(args[0], args[1]);
    }
}
```

The second step is to advise Stringz to use that factory for a certain message
class by using the `@ResourceControl` annotation:

```java
@ResourceMapping
@ResourceControl(value = MyControlFactory.class, args = {"string", "arguments"})
public class MSG {
    // ...
}
```

### Extended ResourceBundle Features
While Stringz uses normal Java ResourceBundles it brings some extra features
for dealing with entries of a properties file. That is, _inclusion_ and
_key references_.

#### Property File Inclusion
Your property file which stores the resource strings, can specify a property with
the special key `@include`. The value is interpreted as a semicolon separated
list of resource bundle base names which should be included into the current
property file. All included values are then available for being mapped to a
field or to be referenced by other properties (see _key references_ below). If
an included resource bundle contains a key which is also present in the current
bundle, the current bundle takes precedence. Beyond this, the included bundles
are searched in the order in which they were included.

#### Key References
From a resource string you can reference another resource string to be inserted
at a certain point. This allows you to specify often used string parts
atomically and then build the full string by referencing those parts.

```
userName = username
password = password
promptLogin = Please specify your ${userName} and ${password}
forgotPassword = Forgot your ${password}?
```
You can use references to any key from the same file and to keys from included
files (see _Property File Inclusion_ above). Key references are also resolved
recursively. That is, if you reference a key which value references another key,
that nested reference is resolved first.

# Fieldmapping
This section describes the behavior applied to assign resource values to fields
of a class.

## Customize Resource Keys
By default, Stringz uses the name of the variable as key to find its resource.
You can also specify an explicit key for a variable using `@ResourceKey`:

```java
    @ResourceKey("someOtherKey")
    public static String myResource;
```

The variable `myResource` will get the value stored at the key `someOtherKey`
assigned.

### Ignore Fields
If for any resason your message class contains a variable that should not be
mapped to a resource value, you can mark it with `@NoResource`:

```java
    @NoResource
    public static String myResource;
```

Otherwise if Stringz tries to map the field and there exists no value for its
key, it will throw a `MissingResourceException` upon initialization.

### Mapping Array Fields
Stringz will also attempt to automatically map values to String[] variables
within your message class. Hence, it uses the semicolon as default delimiter to
split the referenced resource. For example, your resource could look like this:

```
myResource = First column;Second column;Third column
```

and within your message class you would simply declare a String array with the
resource's name:

```java
public static String[] myResource;
```

The `@ResourceKey` and `@NoResource` annotations are used on String arrays in
the same way they are used for normal Strings.

You can also define a custom delimiter pattern if the semicolon delimiter does
not suit your needs using the `@Delimiter` annotation:
```java
@Delimiter("\\s+")
public static String[] myResource;
```

This will split the resource value at any sequence of whitespaces.

You may also instruct Stringz to create an array of arbitrary other resources
referenced by their keys using `@ResourceCollection`. Consider the following
resource file:

```
first = First column
second = Second column
third = Third column
```

You can let Stringz create an array out of theses resources:

```java
@ResourceCollection({"first", "second", "third"})
public static String[] myResource;
```

repository: skuzzle/stringz

repo_name: skuzzle/stringz


text:
# JDuden
With this small library you can query [duden.de](https://duden.de) for words. It returns all information about a given word from the website.
## Installation
Download the jar file from the [release page](https://github.com/Gregyyy/JDuden/releases).

### Maven

````xml
<dependency>
    <groupId>me.gregyyy.jduden</groupId>
    <artifactId>jduden</artifactId>
    <version>VERSION</version>
</dependency>
````

## Usage
This project can only be used as a libary.

Examples:
```JAVA
Word word = JDuden.getWort("Joghurt");
System.out.println("The word " + word.getWord() + " can be written as " +  word.getAltSpellings() + ".");
```

```JAVA
Word word = JDuden.getWort("Leben");
System.out.println("The meaning of life is: " + word.getMeanings().get(0));
```

Tips:
- JDuden#getWord is case sensitive
- Some information can be null, when there are not provided by duden.de

repository: Gregyyy/JDuden

repo_name: Gregyyy/JDuden


text:
# tekton-polling-operator ![Go](https://github.com/bigkevmcd/tekton-polling-operator/workflows/Go/badge.svg)

A simple git repository poller.

This is a Git repository poller that detects changes in a Git repository, and triggers the execution of a Tekton PipelineRun.

When polling GitHub, it uses a special endpoint that should not consume any API tokens, and the schedule can be configured per repository.

## Installation

This operator requires Tekton Pipelines to be installed first, the installation
instructions are [here](https://github.com/tektoncd/pipeline/blob/master/docs/install.md).

```shell
$ kubectl apply -f https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.14.2/release.yaml
```

Then you'll need to install the polling-operator.

```shell
$ kubectl apply -f https://github.com/bigkevmcd/tekton-polling-operator/releases/download/v0.2.0/release-v0.2.0.yaml
```

## GitHub

This polls a GitHub repository, and triggers pipeline runs when the SHA of the
a specific ref changes.

It _does not_ impact on API rate limits to do this, instead it uses the method documented
[here](https://developer.github.com/changes/2016-02-24-commit-reference-sha-api/)
and the ETag to fetch the commit.

## GitLab

This polls a GitLab repository, and triggers pipeline runs when the SHA of the
a specific ref changes.

## Pipelines

You'll want a pipeline to be executed on change.

```yaml
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
  name: demo-pipeline
spec:
  params:
  - name: sha
    type: string
    description: "the SHA of the recently detected change"
  - name: repoURL
    type: string
    description: "the cloneURL that the change was detected in"
  tasks:
    # insert the tasks below
```

This pipeline accepts two parameters, the new commit SHA, and the repoURL.

 sample pipeline is provided in the [examples](./examples) directory.

## Monitoring a Repository

To monitor a repository for changes, you'll need to create a `Repository` object
in Kubernetes.

```yaml
apiVersion: polling.tekton.dev/v1alpha1
kind: Repository
metadata:
  name: example-repository
spec:
  url: https://github.com/my-org/my-repo.git
  ref: main
  frequency: 5m
  type: github # can also be gitlab
  pipelineRef:
    serviceAccountName: demo-sa # Optional ServiceAccount to execute the pipeline
    name: github-poll-pipeline
    namespace: test-ns # optional: if provided, the pipelinerun will be created in this namespace to reference the pipeline.
    params:
    - name: sha
      expression: commit.sha
    - name: repoURL
      expression: repoURL
```

This defines a repository that monitors the `main` branch in
`https://github.com/my-org/my-repo.git`, checking every 5 minutes, and executing
the `github-poll-pipeline` when a change is detected.

The parameters are extracted from the commit body, the expressions are
[CEL](https://github.com/google/cel-go) expressions.

The expressions can access the data from the commit as `commit` and the
configured repository URL as `repoURL`.

For GitHub repositories, the commit data will have the structure [here](https://developer.github.com/v3/repos/commits/#get-a-commit).

You can also monitor `GitLab` repositories, specifying the type as `gitlab`.

In this case, the commit data will have the structure [here](https://docs.gitlab.com/ee/api/commits.html#list-repository-commits).

## Authenticating against a Private Repository

Of course, not every repo is public, to authenticate your requests, you'll
need to provide an auth token.

```yaml
apiVersion: polling.tekton.dev/v1alpha1
kind: Repository
metadata:
  name: example-repository
spec:
  url: https://github.com/my-org/my-repo.git
  ref: main
  frequency: 2m
  type: github # can also be gitlab
  pipelineRef:
    name: github-poll-pipeline
    params:
    - name: sha
      expression: commit.sha
    - name: repoURL
      expression: repoURL
  auth:
    secretRef:
      name:  my-github-secret
    key: token
```

This will fetch the secret, and get the value in `token` and use that to
authenticate the API call to GitHub.

## Creating PipelineRuns in other namespaces

See the documentation [here](docs/configuring_security.md) for how to grant
access for the operator to create pipelineruns in different namespaces.

## Resource bindings

Yes...resources are deprecated and probably going away in their current form,
but you might want to still use them...

```yaml
apiVersion: polling.tekton.dev/v1alpha1
kind: Repository
metadata:
  name: demo-repository
spec:
  url: https://github.com/bigkevmcd/tekton-polling-operator.git
  ref: main
  type: github
  frequency: 30s
  pipelineRef:
    name: github-poll-pipeline-with-resource
    params:
    - name: sha
      expression: commit.sha
    - name: repoURL
      expression: repoURL
    resources:
    - name: app-git
      resourceSpec:
        type: git
        params:
        - name: revision
          value: $(params.sha)
        - name: url
          value: $(params.repoURL)
```

## Workspaces

Pipelines use workspaces to communicate between tasks, and this allows you to mount a workspace in the pipeline:

```yaml
apiVersion: polling.tekton.dev/v1alpha1
kind: Repository
metadata:
  name: example-repository
spec:
  url: https://github.com/my-org/my-repo.git
  ref: main
  frequency: 5m
  type: github
  pipelineRef:
    name: github-poll-pipeline
    serviceAccountName: example-sa
    params:
    - name: sha
      expression: commit.sha
    - name: repoURL
      expression: repoURL
    workspaces:
      - name: git-source
        persistentVolumeClaim:
          claimName: tekton-volume
```

## Local Development

This uses the operator-sdk, and hasn't yet been upgraded to work with newer
versions than v0.19

### Running tests

```shell
$ go test -v ./...
```

### Building an image

```shell
$ operator-sdk build <docker image reference> # This requires pre-v1.0.0 of the operator-sdk
```

## FAQ

### Do you support TriggerBindings and TriggerTemplates?

Not yet, they're fairly tightly bound to TektonTriggers just now, so this will
require some work to tease that apart, but the plan is to support them.

### How do I insert a static string in to a CEL param?

Ahhh...this is a trick...

```yaml
params:
- name: this-text
  expression: "'this-message'"
```

Note the use of _double_ quotes and _single_ quotes, the value of this is the
string `'this-message'`.

YAML makes this tricky, but now you know...

repository: hnts/tekton-polling-operator

repo_name: hnts/tekton-polling-operator


text:
---
title: |
    665. The Lord Is My Shepherd - Christ in Song
metadata:
    description: |
        Christ in Song 665. The Lord Is My Shepherd. The Lord is my Shepherd, no want shall I know; I feed in green pastures, safe folded I rest; He leadeth my soul where the still waters flow, Restores me when wand'ring, redeems when oppressed.
    keywords:  |
        Christ in Song, adventhymnals, advent hymnals, The Lord Is My Shepherd, The Lord is my Shepherd, no want shall I know.
    author: Brian Onang'o
---

#### Advent Hymnals
## 665. THE LORD IS MY SHEPHERD
####  Christ in Song,

```txt
1.
The Lord is my Shepherd, no want shall I know;
I feed in green pastures, safe folded I rest;
He leadeth my soul where the still waters flow,
Restores me when wand'ring, redeems when oppressed.

2.
Thro' the valley and shadow of death tho' I stray,
Since thou art my Guardian, no evil I fear;
Thy rod shall defend me, thy staff be my stay,
No harm can befall, with my Comforter near.

3.
In the midst of affliction my table is spread,
With blessings unmeasured my cup runneth o'er;
With perfume and oil thou annointest my head;
O, what shall I ask of thy providence more?

4.
Let goodness and mercy, my bountiful God,
Still follow my steps till I meet thee above;
I seek by the path which my forefathers trod,
Thro' the land of their sojourn thy kingdom of love.

```

- |   -  |
-------------|------------|
Title | The Lord Is My Shepherd |
Key | G Major |
Titles | undefined |
First Line | The Lord is my Shepherd, no want shall I know |
Author | J. Montgomery
Year | 1908
Composer| undefined |
Hymnal|  - |
Tune| GOSHEN |
Metrical pattern | |
# Stanzas |  |
Chorus |  |
Chorus Type |  |
Subjects | Christ: Christ Leading |
Texts | undefined |
Print Texts |
Scripture Song |  |

repository: GospelSounders/adventhymnals

repo_name: GospelSounders/adventhymnals