text:
#### Nr: 624
#### [Back to Main list](index.md)
# SQLSaturday #624 - Chattanooga 2017
Start Time (24h)|Speaker|Track|Title
---|---|---|---
08:30:00|Andrew Loree|Enterprise Database Administration  Deployment|[SQL Server 2017 (Linux and Beyond)](#sessionid-61099)
08:30:00|Brian Carrig|Cloud Application Development  Deployment|[Running SQL Server in AWS](#sessionid-61709)
08:30:00|Brian Beswick|BI Platform Architecture, Development  Administration|[SSAS 2016 Tabular - Diving into the new features](#sessionid-62869)
08:30:00|Kevin Hill|Enterprise Database Administration  Deployment|[SQL Server Security model, in plain English](#sessionid-63360)
08:30:00|Vladimir Oselsky|Application  Database Development|[Crash Course on Better SQL Development](#sessionid-63987)
08:30:00|Rick Lowe|Application  Database Development|[Why should I care about ... the plan cache?](#sessionid-64582)
08:30:00|Paul Southerland|BI Information Delivery|[Self Service BI – ETL and More From A Business Unit User’s Perspective](#sessionid-65051)
09:45:00|Tim Gorman|Enterprise Database Administration  Deployment|[Accelerating DevOps and TDM Using Data Virtualization](#sessionid-59603)
09:45:00|Jim Donahoe|Enterprise Database Administration  Deployment|[New Instance, Now what?](#sessionid-59653)
09:45:00|David Patrick|BI Information Delivery|[Microsoft and Big Data - An Overview of the Power Tools and more!](#sessionid-59690)
09:45:00|Jeff Foushee|Application  Database Development|[Transforming Data using the T-SQL PIVOT / UNPIVOT operators](#sessionid-59771)
09:45:00|Eric Cobb|Enterprise Database Administration  Deployment|[How To Be The DBA When You Don't Have A DBA](#sessionid-61495)
09:45:00|Daniel Glenn|BI Platform Architecture, Development  Administration|[Power BI  SharePoint - A Marriage Made in Redmond](#sessionid-61715)
09:45:00|Mindy Curnutt|Application  Database Development|[The Ins and Outs of SQL Indexes](#sessionid-63842)
09:45:00|Elizabeth Noble|Application  Database Development|[Making Your List and Checking It Twice: Introduction to unit testing with tSQLt](#sessionid-64500)
09:45:00|Shabnam Watson|BI Platform Architecture, Development  Administration|[Performance Monitoring SQL Server Analysis Services](#sessionid-65086)
11:00:00|Samir Behara|Application  Database Development|[Increase Your Coding Speed in SQL Server Management Studio](#sessionid-59796)
11:00:00|Christopher Sims|Application  Database Development|[I like big data for $400  - Exploring quiz show questions using Angular, DocumentDB and Azure Search](#sessionid-62619)
11:00:00|Ed Watson|BI Platform Architecture, Development  Administration|[Introduction to SQL Server Integration Services](#sessionid-63563)
11:00:00|Ryan Wade|Advanced Analysis Techniques|[Leveraging SQL Server R Services to Perform Advanced Analytics](#sessionid-63667)
11:00:00|Kevin Wilkie|Application  Database Development|[The Real Value of Name-Value Pairs: Using PIVOT and UNPIVOT](#sessionid-63905)
11:00:00|Kerry Tyler|BI Platform Architecture, Development  Administration|[45 Minutes to Your First SSAS Tabular Model](#sessionid-64586)
11:00:00|Robert Verell|Enterprise Database Administration  Deployment|[New Features in SQL Server 2017](#sessionid-64593)
13:15:00|Louis Davidson|Application  Database Development|[Database Design Fundamentals](#sessionid-62784)
13:15:00|Teo Lachev|BI Information Delivery|[Understanding Power BI Premium](#sessionid-63796)
13:15:00|Stacia Varga|BI Platform Architecture, Development  Administration|[Reduce, Reuse, Recycle: Automating Your BI Framework](#sessionid-64272)
13:15:00|Russel Loski|Cloud Application Development  Deployment|[Querying Semistructured Data in Azure Data Lake with USQL](#sessionid-64360)
13:15:00|Mike Robbins|Other|[PowerShell Non-Monolithic Script Module Design](#sessionid-64554)
13:15:00|Paco Gonzalez|Advanced Analysis Techniques|[Enterprise Machine Learning with R and SQL Server 2016  2017](#sessionid-64589)
13:15:00|Dan Evans|Advanced Analysis Techniques|[Perceptual Intelligence with Cortana Analytics](#sessionid-64591)
14:30:00|Tracy Boggiano|Enterprise Database Administration  Deployment|[Monitoring Availability Groups](#sessionid-61330)
14:30:00|Neal Waterstreet|BI Platform Architecture, Development  Administration|[Master Data Management with SQL Server 2016 MDS](#sessionid-61528)
14:30:00|Thomas Chan|Enterprise Database Administration  Deployment|[Secure/Encrypt SQL Server Database With TDE](#sessionid-63259)
14:30:00|Naomi Williams|Enterprise Database Administration  Deployment|[SQL Server Internals](#sessionid-63461)
14:30:00|Ryan Wade|Analytics and Visualization|[R-ternatives in Power BI](#sessionid-63668)
14:30:00|Kevin Boles|Other|[SQL Server 2016 SP1 ROCKS!!](#sessionid-63699)
14:30:00|Matt Martin|Enterprise Database Administration  Deployment|[5 Ways to Bypass or Ensure Security](#sessionid-63832)
14:30:00|Tamera Clark|Enterprise Database Administration  Deployment|[Reduce your DBA ( DEV) task list by using Microsoft BI tools](#sessionid-66145)
15:45:00|Tim Warner|Enterprise Database Administration  Deployment|[Install and Configure SQL Server with Windows PowerShell Desired State Configuration](#sessionid-59605)
15:45:00|Kevin Feasel|Analytics and Visualization|[R For the SQL Server Developer](#sessionid-59677)
15:45:00|Kevin Boles|Enterprise Database Administration  Deployment|[On-Demand Creation of Dev/Test Databases with SQL Clone](#sessionid-61809)
15:45:00|Azhagappan Arunachalam|Application  Database Development|[Excel with DAX](#sessionid-63017)
15:45:00|Richard Weiss|Cloud Application Development  Deployment|[A Tour of Cloud Data Platforms as a Service](#sessionid-63388)
15:45:00|William Wolf|Application  Database Development|[Locks, Blocks, and Deadlocks; Tame the Sibling Rivalry](#sessionid-64146)
15:45:00|Simon Kingaby|BI Platform Architecture, Development  Administration|[Using Biml to Automate the Generation of SSIS Packages](#sessionid-65050)
#
#### SessionID: 61099
# SQL Server 2017 (Linux and Beyond)
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 08:30:00 - Track: Enterprise Database Administration  Deployment
## Speaker: Andrew Loree
## Title: SQL Server 2017 (Linux and Beyond)
## Abstract:
### Microsoft has leveled the RDBMS playing field, with SQL Server vNext  (aka SQL Server 2017), allowing you to deploy and run SQL Server on a variety of operating systems and container solutions.

In this session, we will look at the background of SQL Server’s move to non-Windows platforms, cover how to install using package deployment on Linux and image-containers with Docker.  Focus will cover administration and tools that you can leverage while running SQL Server on non-Windows platforms, including migration and current feature function limitations.
#
#### SessionID: 61709
# Running SQL Server in AWS
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 08:30:00 - Track: Cloud Application Development  Deployment
## Speaker: Brian Carrig
## Title: Running SQL Server in AWS
## Abstract:
### Amazon Web Services (AWS) is the world's largest public cloud hosting provider with many companies successfully running SQL server on AWS infrastructure. In this session, we explore the options available to you for running SQL server in AWS, either as an RDS managed service or using dedicated EC2 instances. We document the different storage options, HA strategies, security and maintenance caveats to be aware of. We will also detail various approaches to licensing you can take when running SQL server in AWS.
#
#### SessionID: 62869
# SSAS 2016 Tabular - Diving into the new features
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 08:30:00 - Track: BI Platform Architecture, Development  Administration
## Speaker: Brian Beswick
## Title: SSAS 2016 Tabular - Diving into the new features
## Abstract:
### Taking a looking at all the new features of SSAS 2016 Tabular, how to use them effectively and avoid pitfalls. Features include Bi-Directional Cross Filtering, Parallel Partition Processing, Calculated Tables, etc.
#
#### SessionID: 63360
# SQL Server Security model, in plain English
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 08:30:00 - Track: Enterprise Database Administration  Deployment
## Speaker: Kevin Hill
## Title: SQL Server Security model, in plain English
## Abstract:
### What is the difference between a Login and a User?  What is a schema? Why can I view one table but not another?

  Join me for a short overview of the SQL Server security model, using non-technical terms.  We will look at it from the point of view of something we are all familiar with, so that you will remember it 6 months or a year or more down the road.

This will be a highly interactive session, designed for you to be able to absorb the info without having to take notes.   Bring coffee and learn!
#
#### SessionID: 63987
# Crash Course on Better SQL Development
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 08:30:00 - Track: Application  Database Development
## Speaker: Vladimir Oselsky
## Title: Crash Course on Better SQL Development
## Abstract:
### SQL Development is a broad subject with many roads to choose from. Often times SQL Developers feel overwhelmed and unsure which areas they need to focus on. The purpose of this session is to give a high-level overview and present paths for further study and growth. Subjects reviewed in this session will include coding patterns, error handling, and execution plans. Demonstrations of free tools will also help developers find ways of simplifying their daily tasks. Attendees will leave this session empowered with knowledge and directions for further growth.
#
#### SessionID: 64582
# Why should I care about ... the plan cache?
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 08:30:00 - Track: Application  Database Development
## Speaker: Rick Lowe
## Title: Why should I care about ... the plan cache?
## Abstract:
### SQL Server is a huge product, with many different places a DBA can go to look for information on how the server is performing. So many in fact that they can often overlap, which sometimes makes it hard to understand why tackling a new tool is worth the effort. In this installment of Rick's "Why should I care" series, he lays out a case for why working knowledge of the plan cache is critical for performance tuning efforts in real world environments. A review of relevant views and functions is included for the (newly?) motivated audience.

Perfect for those who are relatively new to performance tuning concerns, or advanced DBAs trying to figure out how to have a similar conversation with their less experienced peers, or developers who are curious as to why their DBAs drink in the morning (allegedly). This is not a deep dive into the cache, it really is primarily a session exploring _why_ these DMOs are worth slogging through.
#
#### SessionID: 65051
# Self Service BI – ETL and More From A Business Unit User’s Perspective
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 08:30:00 - Track: BI Information Delivery
## Speaker: Paul Southerland
## Title: Self Service BI – ETL and More From A Business Unit User’s Perspective
## Abstract:
### A business user is responsible for implementing a new electric power system modeling application and has to gather data from hundreds of diverse sources to set up the model.  Reference data sources included a multitude of different data types, including historical time series, commodity forward pricing curves, and power plant operating characteristics.  The user discovers the “power’ in Power Query and is able to meet the implementation deadline due to the Power Query’s rich tool set.  The business user continues to find Power Query to be a useful tool in daily tasks as a Power System Resource Planning Specialist.  Witness practical examples of Power Query’s Extract, Transform, Load (ETL) functionality applied to getting and reshaping data to perform the analyst’s daily tasks.
#
#### SessionID: 59603
# Accelerating DevOps and TDM Using Data Virtualization
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 09:45:00 - Track: Enterprise Database Administration  Deployment
## Speaker: Tim Gorman
## Title: Accelerating DevOps and TDM Using Data Virtualization
## Abstract:
### DevOps is the merger of app development, testing, and IT ops.  All tasks from coding to testing to operations should be automated so new features and fixes can be continuously quickly.

Test Data Management (TDM) is the optimization of the process of software quality, ensuring that applications properly work according to their specifications.

Constraining both DevOps and TDM is database size. "Storage is cheap" is not merely a lie, but more to the point it takes a lot of time to push terabytes around from place to place, and time itself is expensive and dear.

Providing full databases for each developer or tester on each task of each project seems unrealistic, when each copy might require terabytes of storage, so for decades everyone has limited themselves to working in shared dev/test environments that are refreshed only every few months, where conflicts occur,  quality suffers, and things move slowly.

Come learn why data virtualization is the solution to a problem everyone knows.
#
#### SessionID: 59653
# New Instance, Now what?
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 09:45:00 - Track: Enterprise Database Administration  Deployment
## Speaker: Jim Donahoe
## Title: New Instance, Now what?
## Abstract:
### Congratulations, you’re now our DBA!   A new SQL instance is like a blank canvas, you stare at it and wonder where to start.  As an accidental dba, this session will help you learn how to survive in your new role.

In this session, you will be supplied with the beginning brush strokes to make your server a master piece. To do so, we will review best practices for standard configurations, backups, maintenance, and disaster recovery.

By the end of this session, you will have developed a pallet of tools to help you create your SQL Server Masterpiece and be able to use it as a print for others.
#
#### SessionID: 59690
# Microsoft and Big Data - An Overview of the Power Tools and more!
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 09:45:00 - Track: BI Information Delivery
## Speaker: David Patrick
## Title: Microsoft and Big Data - An Overview of the Power Tools and more!
## Abstract:
### Come see Microsoft's Power tools demonstrated for advanced analytics and hear about Microsoft's embrace of Open Source and the Hadoop platform. We'll also present on Microsoft's tools for handling Big Data, such as the Parallel Data Warehouse and HDInsights.
#
#### SessionID: 59771
# Transforming Data using the T-SQL PIVOT / UNPIVOT operators
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 09:45:00 - Track: Application  Database Development
## Speaker: Jeff Foushee
## Title: Transforming Data using the T-SQL PIVOT / UNPIVOT operators
## Abstract:
### Ever wish your horizontal data were vertical for easier data storage, as well as vice-versa for reporting purposes? Are you writing elaborate routines to transform between them for one-time usage? Are your queries repeating "OUTER JOIN" or "UNION” so often that you wind up back in Kansas when you read them aloud? Join Jeff Foushee as he explains SQL Server's lesser-known PIVOT and UNPIVOT operators using SQL 2016. After this session, you will no longer need to rotate your monitor!
#
#### SessionID: 61495
# How To Be The DBA When You Don't Have A DBA
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 09:45:00 - Track: Enterprise Database Administration  Deployment
## Speaker: Eric Cobb
## Title: How To Be The DBA When You Don't Have A DBA
## Abstract:
### Not everyone has a full time Database Administrator on staff, and in many cases the responsibility of managing the database server falls on you, the developers.  But as long as the backups are running successfully you're good, right?  Not exactly.  There is ongoing maintenance required to help ensure that your databases are running smoothly.  Are your statistics out of date?  Are your indexes fragmented?  When was the last time the databases were checked for corruption? Has your SQL Server been tuned to fit your workload, or are you still running with the less optimal default settings?

Tailored to the "Non-DBA", this session will cover these topics and more to ensure that you can avoid some performance issues you may not even realize you're having.  Discussing server settings, database configurations, and recommended maintenance, you will leave this session with the knowledge (and scripts!) you need to help ensure that your SQL Server and databases are in top shape.
#
#### SessionID: 61715
# Power BI  SharePoint - A Marriage Made in Redmond
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 09:45:00 - Track: BI Platform Architecture, Development  Administration
## Speaker: Daniel Glenn
## Title: Power BI  SharePoint - A Marriage Made in Redmond
## Abstract:
### We will explore the relationship between SharePoint and Excel, how Power BI swooped SharePoint off her feet, and the current Business Intelligence soap opera that stars all three. Using live demos, we will look at data interaction between SharePoint, Excel, Power BI (including the iOS app), and the intriguing new next door neighbor - Microsoft Flow.
#
#### SessionID: 63842
# The Ins and Outs of SQL Indexes
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 09:45:00 - Track: Application  Database Development
## Speaker: Mindy Curnutt
## Title: The Ins and Outs of SQL Indexes
## Abstract:
### This course will focus on the fundamentals of strategic SQL Server index design and creation. Terms that will be covered and clarified: clustered index, non-clustered index, uniqueness, covering index, fill-factor, scan, seek, key lookup, and fragmentation. This is a beginning level course for those who have always found indexes confusing and somewhat elusive.  Lots of valuable information will be provided in a short amount of time.
#
#### SessionID: 64500
# Making Your List and Checking It Twice: Introduction to unit testing with tSQLt
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 09:45:00 - Track: Application  Database Development
## Speaker: Elizabeth Noble
## Title: Making Your List and Checking It Twice: Introduction to unit testing with tSQLt
## Abstract:
### Unit testing allows database code to be consistently tested during the development process, but it can be challenging to get unit testing setup for database development. This session will give an overview on the purpose of unit testing, the installation of the tSQLt framework, and the design of unit tests. I will use general concepts of test driven design to create and run unit tests to confirm that objects exist and to test single and multiple test cases. Learn how to implement unit testing in a development environment and create and run your own units tests.
#
#### SessionID: 65086
# Performance Monitoring SQL Server Analysis Services
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 09:45:00 - Track: BI Platform Architecture, Development  Administration
## Speaker: Shabnam Watson
## Title: Performance Monitoring SQL Server Analysis Services
## Abstract:
### SQL Server Analysis Services (SSAS) servers need continued maintenance and monitoring post deployment to production; however, many projects forgo this part and the overall system performance can suffer.

Join this session to learn how to monitor and evaluate the performance of your SSAS server. You will learn what to measure and how to determine acceptable ranges of those measurements for your environment. You will see demos of Task Manager, Perfmon and SQL Server Extended Events to get insights into your SSAS server’s health, identify the most common issues in production, and make recommendations for changes to SSAS developers on your team.

If you have experience with SSAS development and are interested in learning about SSAS from the server side, this session is for you.  This session focuses on SQL Server Analysis Services in multidimensional mode but many of the concepts apply to tabular mode as well.
#
#### SessionID: 59796
# Increase Your Coding Speed in SQL Server Management Studio
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 11:00:00 - Track: Application  Database Development
## Speaker: Samir Behara
## Title: Increase Your Coding Speed in SQL Server Management Studio
## Abstract:
### Every developer wants to be productive and get more things accomplished during their day to day work. Given a choice between working harder and working smarter, you will most likely choose the latter. But the big question is – How do you boost your productivity? How do you reduce your development time? How do you increase your coding speed?

Be it a T-SQL developer or DBA, we spend most of our time working in SQL Server Management Studio. In this session, we will learn a number of tips and tricks to increase productivity and efficiency in SSMS IDE. We will also look at the new and improved features of SSMS 2016. We will learn how adding few free third party tools to the SSMS IDE will enhance your coding speed. This will be a content rich session with plenty of live demonstrations.

By the end of this session, you will learn some useful techniques to take back with you and apply in your day to day work.
#
#### SessionID: 62619
# I like big data for $400  - Exploring quiz show questions using Angular, DocumentDB and Azure Search
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 11:00:00 - Track: Application  Database Development
## Speaker: Christopher Sims
## Title: I like big data for $400  - Exploring quiz show questions using Angular, DocumentDB and Azure Search
## Abstract:
### In this talk, we will explore two powerful technologies from the Microsoft Azure Stack: DocumentDB and Azure Search. DocumentDB is Microsoft's NoSQL service for building globally scalable schema-free applications. Azure Search allows you to integrate the power of Microsoft's search and natural language processing abilities to explore your complex data stores. During this talk we will cover the benefits of implementing a schema-free database, we will learn how to replicate your data at a global scale with the ease of a simple configuration and we will cover various techniques of querying that data using SQL and the DocumentDB API. Once we have a large datastore in place (we will use 200k+ Jeopardy questions), we will apply the powerful natural language querying capabilities and faceted search features of Azure Search to quickly create an searchable data repository. All of this will be built and exposed using a cross-platform application built in Angular on the Electron framework.
#
#### SessionID: 63563
# Introduction to SQL Server Integration Services
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 11:00:00 - Track: BI Platform Architecture, Development  Administration
## Speaker: Ed Watson
## Title: Introduction to SQL Server Integration Services
## Abstract:
### Take an introductory journey into the world of SSIS through the eyes of a SQL Server DBA as he navigates the Business Intelligence waters.  This is an introductory course for beginners or users without any SSIS experience.  Come learn how to SSIS with me!
#
#### SessionID: 63667
# Leveraging SQL Server R Services to Perform Advanced Analytics
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 11:00:00 - Track: Advanced Analysis Techniques
## Speaker: Ryan Wade
## Title: Leveraging SQL Server R Services to Perform Advanced Analytics
## Abstract:
### SQL Server 2016 is packed with many great features. One of those features is the integration of R in SQL Server via SQL Server R Services. This integration gives us the ability to perform very sophisticated analytics against data inside the database and data warehoused in big data environments such as Spark  Hadoop.

In this session I will demonstrate how to productionize models developed by your data scientist via SQL Server R Services. I will demonstrate how to manage the whole process using an IDE that many of us have grown to love, Visual Studio.
#
#### SessionID: 63905
# The Real Value of Name-Value Pairs: Using PIVOT and UNPIVOT
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 11:00:00 - Track: Application  Database Development
## Speaker: Kevin Wilkie
## Title: The Real Value of Name-Value Pairs: Using PIVOT and UNPIVOT
## Abstract:
### This session will show in-depth how to use both PIVOT and UNPIVOT. We'll go in depth on why you would use it, how you would use it, why it's set up the way it is, and along the way show you numerous tips and tricks.
#
#### SessionID: 64586
# 45 Minutes to Your First SSAS Tabular Model
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 11:00:00 - Track: BI Platform Architecture, Development  Administration
## Speaker: Kerry Tyler
## Title: 45 Minutes to Your First SSAS Tabular Model
## Abstract:
### Have you been watching SSAS Tabular develop? What about the new Azure Analysis Services product? Or you've looked at these and like what they can add in Power BI or classic BI scenarios, but haven't had a chance to dive in and figure all of this out? Now is the time!
SSAS Tabular is a new-ish form of business intelligence model released with SQL Server 2012, intended as an alternative to more traditional Multidimensional cubes. In this session, we will talk briefly about what Tabular is and what it does, in addition to the various options for deployment, before exploring the development process of creating a tabular model ready for ad-hoc querying through Excel or Power BI.
#
#### SessionID: 64593
# New Features in SQL Server 2017
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 11:00:00 - Track: Enterprise Database Administration  Deployment
## Speaker: Robert Verell
## Title: New Features in SQL Server 2017
## Abstract:
### Microsoft has moved to 18 month releases for new versions of SQL Server.  With that, we're getting new features sooner!  In this session, Robert Verell and Dan Evans will cover the new features of 2017, including Graph Database, Adaptive Query Processing, and the Azure Migration Assistant.
#
#### SessionID: 62784
# Database Design Fundamentals
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 13:15:00 - Track: Application  Database Development
## Speaker: Louis Davidson
## Title: Database Design Fundamentals
## Abstract:
### Data should be easy to work with in SQL Server if the database has been organized as close as possible to the standards of normalization that have been proven for many years, but are often thought of as old-fashioned. Many common T-SQL programming "difficulties" are the result of struggling against these standards and can be avoided by understanding the requirements, applying normalization, as well as a healthy dose of simple common sense. In this session I will give an overview of how to design a relational database, allowing you to work with the data structures instead of against them. This will let you use SQL naturally, enabling the query engine internals to optimize your output needs without you needing to spend a lot of time thinking about it. This will mean less time trying to figure out why SUBSTRING(column,3,1) = 'A' is killing your performance, and more time for solving the next customer problem.
#
#### SessionID: 63796
# Understanding Power BI Premium
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 13:15:00 - Track: BI Information Delivery
## Speaker: Teo Lachev
## Title: Understanding Power BI Premium
## Abstract:
### Microsoft Power BI has enjoyed a lot of attention and success since it became generally available in July 2015.  But its licensing model and cloud-hosted limitations barred wide adoption, especially with larger organizations. The recently introduced Power BI Premium will change all of this. Join this session to learn how Power BI Premium will allow your organization to achieve:
•	Flexibility to license by capacity
•	Greater scale and performance
•	Extending on-premises reporting with Power BI Report Server
•	Embedded analytics
#
#### SessionID: 64272
# Reduce, Reuse, Recycle: Automating Your BI Framework
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 13:15:00 - Track: BI Platform Architecture, Development  Administration
## Speaker: Stacia Varga
## Title: Reduce, Reuse, Recycle: Automating Your BI Framework
## Abstract:
### Quite frankly, some aspects of building out a business intelligence solution are tedious. As you cycle through iterations of your star schema, you’ll find that even a simple data type change in the data warehouse requires you to make corresponding changes to staging tables, and SSIS packages that take a considerable amount of time to implement. But there’s a better, faster way!In this session, we’ll explore lessons from a project that required implementation of a framework to easily generate BI objects based on reusable patterns. We’ll walk through the decision points in the framework design, review the implementation steps, and see demonstrations of how easily you can make iterative changes to your BI solution’s design by using reusable design patterns. Whether you simply want to accelerate change management or reproduce objects in bulk on demand, this session will give you practical tips for automating these processes.
#
#### SessionID: 64360
# Querying Semistructured Data in Azure Data Lake with USQL
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 13:15:00 - Track: Cloud Application Development  Deployment
## Speaker: Russel Loski
## Title: Querying Semistructured Data in Azure Data Lake with USQL
## Abstract:
### Data is exploding across enterprises.  Much of it is semi-structured junk.  Or is it junk?  What are you going to do with it until you can find out?  Microsoft’s Azure Data Lake is a cloud storage and analytical service for parking a variety of data.  When you are ready, you can query that semi-structured data using an ANSI SQL language called U-SQL.  In this session I will demonstrate the similarities and differences between U-SQL and T-SQL.  I will demonstrate how easy it is to build a query against 21 GB of CSV files. Such queries can help you determine whether you have a gold mine in your data or a bunch of garbage before investing in a full data warehouse build.
#
#### SessionID: 64554
# PowerShell Non-Monolithic Script Module Design
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 13:15:00 - Track: Other
## Speaker: Mike Robbins
## Title: PowerShell Non-Monolithic Script Module Design
## Abstract:
### Creating a script module in PowerShell is a very simplistic process, but there are a number of reasons why you might not want to create one huge monolithic PSM1 script module file that contains all of your module’s functions. During this session, Microsoft MVP Mike F Robbins will demonstrate how to separate each of your module’s functions into its own dedicated PS1 file that’s dot-sourced from your script module’s PSM1 file along with discussing this design methodology and the challenges that it creates. Many times resolving one problem seems to create more problems such as cmdlets from other modules showing up as being exported by your module. The solution to these problems and more will be provided during this session. Mike will also demonstrate using a Pester test to validate that all of the functions are indeed exported along with using a function to help automate the module manifest update process when additional functions are added to your module.
#
#### SessionID: 64589
# Enterprise Machine Learning with R and SQL Server 2016  2017
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 13:15:00 - Track: Advanced Analysis Techniques
## Speaker: Paco Gonzalez
## Title: Enterprise Machine Learning with R and SQL Server 2016  2017
## Abstract:
### R is a pure data science and statistics scripting language. It is considered the best fit for Machine Learning. With more than 5000 packages all machine learning algorithms are covered and improving. R packages help you prepare the data, e.g.: packages for cross validation with N folds, build machine learning models, validation, create plots and to generate predictions. SQL Server 2016 and R Server are a perfect match for building enterprise grade solutions that support deployments for real time predictions and continuous model updates. Join this session for an overview based on sample cases about how to build enterprise grade machine learning solutions with SQL Server and R.
#
#### SessionID: 64591
# Perceptual Intelligence with Cortana Analytics
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 13:15:00 - Track: Advanced Analysis Techniques
## Speaker: Dan Evans
## Title: Perceptual Intelligence with Cortana Analytics
## Abstract:
### Cortana Analytics is a fully managed big data and advanced analytics suite that enables you to transform your data into intelligent action.   Come learn more around how you can take action by going beyond looking in the rear-view mirror to predicting what’s next. Enhance your business applications with machine intelligence to evolve from simple descriptive analytics to prescriptive recommendations.   See some of the new ways to infer intent with vision, face, speech, text and sentiment analysis to customize responses and drive appropriate actions in a secure, compliant and scalable way leveraging SQL Server, Azure and Power BI.    Expect to leave the discussion understanding new trends in analytics and how you can apply value to your organization.
#
#### SessionID: 61330
# Monitoring Availability Groups
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 14:30:00 - Track: Enterprise Database Administration  Deployment
## Speaker: Tracy Boggiano
## Title: Monitoring Availability Groups
## Abstract:
### So you have successfully configured Availability Groups, now what? In this session we will look beyond setup and look at how to monitor your Availability Groups.  We will discuss what metrics to look at, what they mean, and what you need to alert on.  You will walk away from this session with tools you need to monitor your environment and know how to respond to alerts.  This session is for anyone that uses, or plans to use Availability Groups. You should come in with a basic understanding of Availability Groups to get the most out of this session.
#
#### SessionID: 61528
# Master Data Management with SQL Server 2016 MDS
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 14:30:00 - Track: BI Platform Architecture, Development  Administration
## Speaker: Neal Waterstreet
## Title: Master Data Management with SQL Server 2016 MDS
## Abstract:
### Want to know the position Master Data Management and MDS play in an organization's overall data strategy? We'll review the key concepts and the different roles and responsibilities to help you get your organization moving forward with MDM. We'll then take a look at the features of SQL Server 2016 MDS that make it an excellent tool for MDM. This demo-packed presentation will cover architecture and installation, different ways of processing data, hierarchies, security and many other features that will get you up and running with MDS.
#
#### SessionID: 63259
# Secure/Encrypt SQL Server Database With TDE
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 14:30:00 - Track: Enterprise Database Administration  Deployment
## Speaker: Thomas Chan
## Title: Secure/Encrypt SQL Server Database With TDE
## Abstract:
### TDE, Transparent Database Encryption, is a Microsoft built-in solution to protect sensitive information by encrypting entire SQL Server database. TDE encrypts and decrypts the data on the fly with minimum overhead and no code change at all on the development or application side.
#
#### SessionID: 63461
# SQL Server Internals
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 14:30:00 - Track: Enterprise Database Administration  Deployment
## Speaker: Naomi Williams
## Title: SQL Server Internals
## Abstract:
### How does SQL do what it does? Take a look under the hood at how the SQL database engine works with the storage engine. What causes those waits and where do we look to resolve them!
#
#### SessionID: 63668
# R-ternatives in Power BI
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 14:30:00 - Track: Analytics and Visualization
## Speaker: Ryan Wade
## Title: R-ternatives in Power BI
## Abstract:
### R is a very powerful statistical programming language that has been gaining a lot of traction in recent years. In early 2015 Microsoft acquired Revolution Analytics, a major provider of software and services for R. Microsoft have since incorporated R in Azure ML, SQL Server 2016, and Power BI.

There are 3 ways you can leverage R in Power BI. You can use it as a data source, you can leverage it in Power Query, and you can use it to create custom visualizations. In this session I present easy to follow examples of those 3 scenarios. I will also provide resources that will enable you to take what you learned to the next level.
#
#### SessionID: 63699
# SQL Server 2016 SP1 ROCKS!!
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 14:30:00 - Track: Other
## Speaker: Kevin Boles
## Title: SQL Server 2016 SP1 ROCKS!!
## Abstract:
### SQL Server 2016 SP1 is probably one of the top 3 announcements for SQL Server ... EVER!! Many previously Enterprise Edition only features were opened up to lower SKUs, including SQL Express! Memory usage scenarios changed DRASTICALLY too! This session will be a medium-to-high-level overview of these absolutely incredible changes.  If you are like most entities and NOT on SQL Server Enterprise Edition you WILL want to be there after hearing this talk!
#
#### SessionID: 63832
# 5 Ways to Bypass or Ensure Security
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 14:30:00 - Track: Enterprise Database Administration  Deployment
## Speaker: Matt Martin
## Title: 5 Ways to Bypass or Ensure Security
## Abstract:
### In this class, we will walk through 5 ways you can bypass SQL Server security, but then we will also demonstrate how to close off those loopholes. You will be surprised at some of the tactics presented and might even recognize a past experience based on one of the loopholes presented. Inevitably, even some of the best SQL security professionals will walk out with a face-palm and realize they’ve got a lot of work to do come Monday morning to plug these loopholes.
#
#### SessionID: 66145
# Reduce your DBA ( DEV) task list by using Microsoft BI tools
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 14:30:00 - Track: Enterprise Database Administration  Deployment
## Speaker: Tamera Clark
## Title: Reduce your DBA ( DEV) task list by using Microsoft BI tools
## Abstract:
### Are you a DBA or DBA Dev with access to the Microsoft BI Stack? Why not utilize some of these amazing tools to make your life a little easier?

Are you working without fancy monitoring and reporting tools? Do you dream of having time to pull data into Excel ans show you management staff what is going on? Do you run queries to answer questions for projects or at the department's request on a regular basis? Wanna know what is going on with your report server?

Come to this "BI for the Engine Guy" session and let me help you make visualizations for all your engine's health care needs and your user's (customer) data demands.
#
#### SessionID: 59605
# Install and Configure SQL Server with Windows PowerShell Desired State Configuration
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 15:45:00 - Track: Enterprise Database Administration  Deployment
## Speaker: Tim Warner
## Title: Install and Configure SQL Server with Windows PowerShell Desired State Configuration
## Abstract:
### This session accomplishes three goals: (1) Gets you up to speed on what DSC is and how it works; (2) Improves your ability to configure SQL Server by using administrative automation; and (3) Gives you some valuable practical experience with Windows PowerShell.
#
#### SessionID: 59677
# R For the SQL Server Developer
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 15:45:00 - Track: Analytics and Visualization
## Speaker: Kevin Feasel
## Title: R For the SQL Server Developer
## Abstract:
### R is the premiere language for data analysis.  If the world of data science sounds fun and exciting, now is the time to get into R.  We will walk through the core constructs of R, learn how to retrieve data from flat files and databases, and get a peek at the power behind R.  This session will also give resources on where to go in order to become more familiar with statistics, R the language, and the R package ecosystem.
#
#### SessionID: 61809
# On-Demand Creation of Dev/Test Databases with SQL Clone
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 15:45:00 - Track: Enterprise Database Administration  Deployment
## Speaker: Kevin Boles
## Title: On-Demand Creation of Dev/Test Databases with SQL Clone
## Abstract:
### Imagine a world where developers and testers could run production-like environments on their own workstations, created on-demand and self-serviced. Raising tickets and waiting hours or days to get operations to deliver test databases would be a thing of the past.

With Redgate's new tool, SQL Clone, this world now exists. Administrators and developers can create their own database copies in seconds using just MEGABYTES of disk space without ever touching production. Developers can see how their application behaves in a production-scale environment during both development and troubleshooting and operations no longer need to find disk space, provision, etc.

In this session we will examine how SQL Clone uses disk virtualization to enable quick, easy and even automated creation of database copies that are just MB in size.
#
#### SessionID: 63017
# Excel with DAX
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 15:45:00 - Track: Application  Database Development
## Speaker: Azhagappan Arunachalam
## Title: Excel with DAX
## Abstract:
### DAX is the new formula language (builds upon Excel's) supporting PowerPivot and Analysis Services Tabular mode. If you know Excel, you already know the basics of DAX (without even knowing it).  PowerBI also uses DAX for all the formula expressions.  We'll cover the basics of DAX, and go over some time intelligence functions.
#
#### SessionID: 63388
# A Tour of Cloud Data Platforms as a Service
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 15:45:00 - Track: Cloud Application Development  Deployment
## Speaker: Richard Weiss
## Title: A Tour of Cloud Data Platforms as a Service
## Abstract:
### With the proliferation of SQL, NoSQL and Big Data databases, organizations can now target specific fit-for-purpose database platforms that align with their particular application requirements regarding scalability, elasticity, functionality and manageability. Platform as a Service offerings make this even easier now, enabling developers to roll out their own database infrastructure in minutes with minimal management overhead. However, this same amount of flexibility also comes with the challenges of picking the right tool, on the right provider and with the proper expectations.
#
#### SessionID: 64146
# Locks, Blocks, and Deadlocks; Tame the Sibling Rivalry
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 15:45:00 - Track: Application  Database Development
## Speaker: William Wolf
## Title: Locks, Blocks, and Deadlocks; Tame the Sibling Rivalry
## Abstract:
### Like parents having to break up a fight between battling siblings, SQL Server must do the same for conflicting transactions. We call these Deadlocks and they can present a problem to many DBAs. Deadlocks can be minor fights or major issues making SQL Server continually choose a side like constantly quarreling siblings.

To understand how Deadlocking occurs, we must understand what caused the fight . Learning about basic locking and blocking of SQL Server is a great place to start.

By the end of this session you will walk away with the knowledge of how the locking/blocking mechanism works, the basics of deadlocking, and what Isolation Levels are . You will know how these can help or hurt your situation.  Finally you will have the power to capture, report, and stop the family fighting.
#
#### SessionID: 65050
# Using Biml to Automate the Generation of SSIS Packages
#### [Back to calendar](#nr-624)
Event Date: 24-06-2017 - Session time: 15:45:00 - Track: BI Platform Architecture, Development  Administration
## Speaker: Simon Kingaby
## Title: Using Biml to Automate the Generation of SSIS Packages
## Abstract:
### So you need to move data from 75 tables on the mainframe to new tables in SQL Azure.  Do you: a) hand code one package to load all 75 tables, b) hand code 75 packages that move a table each, or c) wish there was a better way?
There is!  Business Intelligence Markup Language (Biml) can automate the creation of packages so that they all follow the same script.  In this beginner level session, we will create some simple metadata to be able to generate multiple packages and their associated connection managers.  You will see Biml in action.  You will see the XML that Biml uses to define packages and connections.  You will see the C# code that Biml uses to fetch metadata and dynamically generate packages in SSIS. And you will see packages and connection managers generated from Biml before your very eyes.

repository: andrekamman/sqlsathistory

repo_name: andrekamman/sqlsathistory


text:
# Docker

Role to install Oracle SQL Developer on an Ubuntu box

## Requirements

After downloading the role use the url on `eclipse/files/eclipse-jee-mars-2-linux-gtk-x86_64.tar.gz.download` to download the installer and make sure its name matches the variable `ECLIPSE_BUNDLE`.

##Role Variables

 * `ECLIPSE_BUNDLE` - the eclipse bundle version, defaults to `eclipse-jee-mars-2-linux-gtk-x86_64.tar.gz`.

## Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

    - hosts: localhost
      roles:
         - { role: eclipse, ECLIPSE_BUNDLE: eclipse-jee-mars-2-linux-gtk-x86_64.tar.gz }

## License

MIT

## Author Information

Marco Shimomoto

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
layout: engineering-education
status: publish
published: true
url: /css-flexbox-vs-css-grid/
title: CSS Flexbox vs CSS Grid
description: There are many modern CSS technologies that are making it a lot easier to create dynamic layouts. Two of these are CSS Flexbox and CSS Grid. Learn the difference between them.
author: joseph-chege
date: 2021-02-21T00:00:00-20:00
topics: [Languages]
excerpt_separator: <!--more-->
images:

  - url: /engineering-education/css-flexbox-vs-css-grid/hero.png
    alt: CSS Flexbox vs CSS Grid Image
---
CSS is a very important web development technology. For a long time, we used common CSS properties to lay out HTML elements. These included floats, inline-block, and position styling. In recent years, we have seen many modern CSS technologies that are making it a lot easier to create dynamic HTML layouts.
<!--more-->
Some of these robust technologies include CSS Grid and CSS Flexbox. They have changed the way we lay out HTML elements in an incredibly simple approach.

When we talk about Flexbox and Grid layouts, we understand the concept of containers and items. In this case, a container is an HTML block that can contain other HTML elements. An item is an HTML element that can be placed inside a container.

Here is a simple example that showcases HTML items inside an HTML container.

```html
<div>
    <div>One</div>
    <div>Two Two</div>
    <div>Three Three Three</div>
    <div>Four Four Four Four</div>
    <div>Five Five Five Five Five</div>
</div>
```

In this example, the outermost `div` is a container element where other `divs` are the container items.

This guide will discuss the differences and relationships that exist between Grid and Flexbox layouts. To follow along with this guide, prior knowledge of [CSS Flexbox](/engineering-education/css-flexbox/) and [CSS Grid](/engineering-education/css-grid/) would be helpful.

### What is CSS Flexbox
Flexbox is a layout mode in CSS3. It's a more proficient approach to designing, aligning, and disseminating space between items in a container to control their arrangement.

With Flexbox, we can arrange items left to right, right to left, top to bottom, or bottom to top and, at the same time, control the spacing, alignment, and order of items in the container.

### What is CSS Grid
CSS Grid is a collection of styles that allow you to control page layout based on rows and columns. In a Grid system, the containing elements are used to define a row within the layout.

Then, you apply class attributes to item elements that then span them over the desired number of columns. This allows you to create more complex nested layouts.

### CSS Grid vs CSS Flexbox
Let's have a look at some of the common differences between the two layouts.

#### One vs two dimensions
Flexbox arranges items in a one-dimensional layout. This can be either in rows or columns.

![image](/engineering-education/css-flexbox-vs-css-grid/flex-horizontal-or-vertical.jpg)

[***Image Source***](https://www.youtube.com/watch?v=MdPYenT89o4)

A Flexbox layout fits best when aligning items either horizontally or vertically. It is one dimensional and can only fit a row or a column.

![image 2](/engineering-education/css-flexbox-vs-css-grid/vertical.png)

[***Image Source***](https://www.youtube.com/watch?v=MdPYenT89o4)

![image 3](/engineering-education/css-flexbox-vs-css-grid/horizontal.png)

[***Image Source***](https://www.youtube.com/watch?v=MdPYenT89o4)

A perfect example of a one-dimensional layout is a header navigation bar or a footer.

Let's take a look at implementing a header navigation menu using Flexbox.

```html
<div class="nav">
    <div>HOME</div>
    <div>ABOUT</div>
    <div>CONTACT</div>
    <div>SIGN UP</div>
    <div>SIGN IN</div>
</div>
```

Some CSS to style the header:

```css
.nav {
    display: flex;
    background: seagreen;
    height: 50px;
    align-items: center;
    gap: 10px;
}

.nav div {
    color: whitesmoke;
    margin-left: 20px;
}
```

![flex image](/engineering-education/css-flexbox-vs-css-grid/flex-header-nav.png)

Most common header layouts lay their items in one direction; making it much easier to use Flexbox because of its one-dimensional capabilities.

On the other hand, a Grid is a two-dimensional layout, meaning you can lay out items in rows and columns.

![image grid](/engineering-education/css-flexbox-vs-css-grid/grid.png)

[***Image Source***](https://www.youtube.com/watch?v=MdPYenT89o4)

An example of a basic two-dimensional layout.

```html
<div class="container">
    <div class="item item1"></div>
    <div class="item item2"></div>
    <div class="item item3"></div>
    <div class="item item4"></div>
    <div class="item item5"></div>
    <div class="item item6"></div>
</div>
```

```css
.container {
    display: grid;
    grid-template-columns: 150px 150px 150px;
    grid-gap: 1rem;
    grid-template-rows: 150px 150px;
}

.item {
    background-color: #1EAAFC;
    color: #fff;
    border: 6px solid #171717;
}
```

![grid example](/engineering-education/css-flexbox-vs-css-grid/grid-example.jpg)

We specify a grid with `display: grid` and then determine rows and columns with `grid-template-columns` and `grid-template-rows`. This defines a two-dimensional layout. In this case, each column and row take the size of `150px`.

#### Content vs layout
Flexbox is content-based so content comes first. By content first, we mean it helps you align the contents of and move blocks and items within a container.

On the other hand, the CSS Grid focuses on laying out the outer/skeleton layout of the page.

To understand the content vs layout concept, let's go back to the header navigation bar design we've discussed above. We can target an item inside the header (container) and determine where to display it.

To get the [core difference](https://www.youtube.com/watch?v=9zA8cB-54SA), assume we want to move the `Sign In` and `Sign Up` menu to the left, we can do it using Flexbox and CSS Grid.

**Using Flexbox:**

```css
.nav {
    display: flex;
    background: seagreen;
    height: 50px;
    align-items: center;
    gap: 1px;
}

.nav div {
    margin-left: 20px;
    margin-right: 20px;
    color: whitesmoke;
}

div:nth-child(4) {
    margin-left: auto;
}
```

![Flex Content First](/engineering-education/css-flexbox-vs-css-grid/flex-content-first.png)

We specify a child item of the container (nth-child(4) and determine its position). That's what we mean by Flexbox being content-based.

On the other hand, we can implement the same using CSS Grid. The header is one dimensional, and Flexbox is better for this, but we will go over an example with CSS Grid to differentiate between layout and content.

```css
.nav {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    background: seagreen;
    height: 50px;
    align-items: center;
    gap: 1px;
}

.nav div {
    margin-left: 20px;
    margin-right: 20px;
    color: whitesmoke;
}
```

And the result looks pretty much the same.

![header nav](/engineering-education/css-flexbox-vs-css-grid/grid-header-nav.png)

But notice, we specified ten columns, each taking a fraction of one unit. To drive the point home, let's see how the Grid layout works under the hood.

Use a web browser to inspect the parent `div` element.

![grid header](/engineering-education/css-flexbox-vs-css-grid/grid-header-under-the-hood.png)

This is awesome. We can see the grid is divided into ten cells. This is where the concept of the layout first is applied. First, we define the layout and then fix items into the grid cells.

If we were to move the items `Sign In` and `Sign Up` to the left, applying `margin-left: auto`,  as we did in the Flexbox example, it won't work. This how we could do it using CSS Grid.

```css
.nav {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    background: seagreen;
    height: 50px;
    align-items: center;
    gap: 1px;

}

.nav div {
    margin-left: 20px;
    margin-right: 20px;
    color: whitesmoke;
}

div:nth-child(4) {
    grid-column: 9;
    color: rgb(64, 35, 97);
}

div:nth-child(5) {
    grid-column: 10;
    color: rgb(64, 35, 97);
}
```

![nav layout](/engineering-education/css-flexbox-vs-css-grid/grid-header-nav-layout-first.png)

The layout has ten columns. To move these items to the left, specify the cells (layout first) where you want the content to be displayed.

![layout](/engineering-education/css-flexbox-vs-css-grid/grid-header-nav-layout-first-under-the-hood.png)

These simple examples explain the concept of content and layout first.

#### The gap property
Usually, you would include a margin property to create gaps around the items.

One of the structural differences between CSS Grid and CSS Flexbox is that you only create gutters around items using the Grid layout.

The great news is that CSS has added features that support implementing gutters around the items called a gap property. Both layouts support this property.

It gives you control over the spaces around the items inside a container, between columns and rows.

Let's see how we can implement this.

Here, I have nine items inside a Flexbox container.

```html
<div class="gap">
    <div>A</div>
    <div>B</div>
    <div>C</div>
    <div>D</div>
    <div>E</div>
    <div>F</div>
    <div>G</div>
    <div>H</div>
    <div>I</div>
</div>
```

```css
.gap {
    display: flex;
    flex-wrap: wrap;
}

.gap>div {
    background-color: rgba(10, 129, 209, .5);
    border: 1px solid #000;
    color: #000;
    padding: 20px;
    font-size: 150%;
}
```

![gap](/engineering-education/css-flexbox-vs-css-grid/gap.png)

**Using margin to create gutter around the items.**

```css
.gap {
    display: flex;
    border: 3px solid rgba(6, 109, 243, 0.911);
    flex-wrap: wrap;
    max-width: 800px;
}

.gap>div {
    background-color: rgba(10, 129, 209, .5);
    border: 1px solid #000;
    color: #000;
    padding: 20px;
    font-size: 150%;
    margin: 6px;
}
```

![gap margin](/engineering-education/css-flexbox-vs-css-grid/gap-with-margin.png)

![wrapped margin](/engineering-education/css-flexbox-vs-css-grid/gap-with-margin-wrapped.png)

When I introduce a `margin of 6px`, notice how the spaces are created around the items. Margin creates some extra white spaces that can be avoided using the gap property.

The gap property distinctly creates the gutter. You can choose to create spaces between rows and columns.

Apply gap by specifying `column-gap`.

```css
.gap {
    display: flex;
    border: 3px solid rgba(6, 109, 243, 0.911);
    flex-wrap: wrap;
    column-gap: 6px;
    max-width: 800px;
}

.gap>div {
    background-color: rgba(10, 129, 209, .5);
    border: 1px solid #000;
    color: #000;
    padding: 20px;
    font-size: 150%;
}
```

![column gap](/engineering-education/css-flexbox-vs-css-grid/column-gap.png)

![gap column](/engineering-education/css-flexbox-vs-css-grid/column-gap-wrapped.png)

When we apply the wrap, we force Flexbox to create rows and columns on small screens. We can use `row-gap` to create the gutter around them as well.

```css
.gap {
    display: flex;
    border: 3px solid rgba(6, 109, 243, 0.911);
    flex-wrap: wrap;
    column-gap: 6px;
    row-gap: 6px;
    max-width: 800px;
}

.gap>div {
    background-color: rgba(10, 129, 209, .5);
    border: 1px solid #000;
    color: #000;
    padding: 20px;
    font-size: 150%;
}
```

![row gap](/engineering-education/css-flexbox-vs-css-grid/column-gap-row-gap.png)

**The shorthand**

To create spacing between rows and columns, we can use gaps and specify the units of both.

For example, `gap: 6px 6px` and we will get the same results as applying `column-gap: 6px` and `row-gap: 6px`.

Note that when using the gap property, you can mix values in pixels and percentages. You do not have to stick to a single unit. For example, `6px 6%`, `6px 6rem` or `6% 6rem`.

When using the Grid, you would use `grid-gap`. `grid-gap` is deprecated, and we have a `gap` property that works on both layouts.

> **NOTE** : *This is not a difference between the two. It used to be when only Grid supported gaps. Since it is a [latest update](https://developer.mozilla.org/en-US/docs/Web/CSS/gap), you may find a tutorial stating gaps as a property difference.*

#### The wraps
The wrap is a property used to wrap items inside a container. It is applied when you want items to fit the available spaces of the container.

This is one of the common properties needed to resolve a few issues, such as child elements not staying inside the container element.

The wrap allows us to wrap elements onto the next line when there is not enough room for them in the current content column.

The two layouts employ the concept of the wrap. They handle wrap differently.

Here is an example:

We are checking the ability to stretch and shrink items based on the amount of space available in our container.

Here is a very basic example of a wrap using Flexbox layout.

```html
<div class="row-flex">
    <div>1 2 3 4 5 6 7 8 9 0</div>
    <div>1 2 3 4 5 6 7 8 9 0</div>
    <div>1 2 3 4 5 6 7 8 9 0</div>
    <div>1 2 3 4 5 6 7 8 9 0</div>
    <div>1 2 3 4 5 6 7 8 9 0</div>
    <div>1 2 3 4 5 6 7 8 9 0</div>
    <div>1 2 3 4 5 6 7 8 9 0</div>
    <div>1 2 3 4 5 6 7 8 9 0</div>
    <div>1 2 3 4 5 6 7 8 9 0</div>
    <div>1 2 3 4 5 6 7 8 9 0</div>
</div>
```

```css
.row-flex {
    display: flex;
}
```

When you resize the screen to below 600px, not every item will be visible—that is where the concept of wrap comes to the rescue. Specify the wrap property inside the container, and this will be resolved.

```css
.row-flex {
    display: flex;
    flex-wrap: wrap;
}
```

We are using wrap inside the container to wrap the Flexbox items to the available container size.

#### The differences
Here is an example of a Flexbox and Grid layout:

```html
<h1>Flexbox</h1>
<div class="flex">
    <div>One</div>
    <div>Two Two</div>
    <div>Three Three Three</div>
    <div>Four Four Four Four</div>
    <div>Five Five Five Five Five</div>
</div>

<h1>Grid</h1>
<div class="grid">
    <div>One</div>
    <div>Two Two</div>
    <div>Three Three Three</div>
    <div>Four Four Four Four</div>
    <div>Five Five Five Five Five</div>
</div>
```

Some CSS to style the container and the items:

```css
/* Flexbox row styles */
.flex {
    margin-bottom: 2em;
    border: 3px solid #000;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 2px;
    max-width: 700px;
}

.flex>div {
    background-color: rgba(130, 184, 219, 0.5);
    border: 2px solid rgb(104, 182, 235);
    color: #000;
    padding: 20px;
    font-size: 150%;
    flex: 1 1 250px;
}

/* Grid row styles */
.grid {
    max-width: 700px;
    border: 3px solid #000;
    background-color: #fff;
    color: #444;
    gap: 2px 2px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.grid>div {
    background-color: rgba(170, 132, 167, 0.5);
    border: 2px solid rgb(239, 189, 235);
    color: #000;
    padding: 20px;
    font-size: 150%;
}
```

![flex grid](/engineering-education/css-flexbox-vs-css-grid/grid-and-flexible.jpg)

Apply the wrap property to the container because it's the containing element of these items. It's going to control the wrapping of those items.

Let's do that.

When we apply the wrap property, this is how the CSS styling should look like:

```css
/* Flexbox row styles */
.flex {
    margin-bottom: 2em;
    border: 3px solid #000;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 2px;
    max-width: 700px;
}

.flex>div {
    background-color: rgba(130, 184, 219, 0.5);
    border: 2px solid rgb(104, 182, 235);
    color: #000;
    padding: 20px;
    font-size: 150%;
    flex: 1 1 250px;
}

/* Grid row styles */
.grid {
    max-width: 700px;
    border: 3px solid #000;
    background-color: #fff;
    color: #444;
    gap: 2px 2px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.grid>div {
    background-color: rgba(170, 132, 167, 0.5);
    border: 2px solid rgb(239, 189, 235);
    color: #000;
    padding: 20px;
    font-size: 150%;
}
```

![flexible-wrapped](/engineering-education/css-flexbox-vs-css-grid/grid-and-flexible-wrapped.png)

For the Flexbox layout, we are applying:
- `flex-wrap: wrap` to push items into rows or columns.
- `flex: 1 1 250px` to give the items a width of 250 and allow them to grow and shrink as the screen size reduces.

In the Grid case:
- `grid-template-columns` to create columns.
- `minmax()` function to give each item a width of 250px.
- `repeat()` function to wrap the columns into rows and columns repeatedly.

The observation is that:
Flexible layout loses its context. If you look at item five, it loses its context when a wrap is applied. The wrap tries to squeeze the items to fill the space available. Also, when pushed down, item five is not the same size as other items.

This is because Flexbox is one-dimensional, which arranges items in rows or columns. Wrap forces Flexbox to form rows and columns, making Flexbox to lose its one-dimensional context.

You can say a grid is just a grid. The items do not lose their grid context. They are all of the same size and fall in grid lines. It doesn't lose its context of being a grid.

This has to do with the Grid layout being two-dimensional, and that fits well in a layout with rows and columns. In our case, the Grid wrap has forced the items to rows and columns and doesn't lose its two-dimensional context.

On the side of the application, the Grid wrap concept works best when you want to push items while maintaining the same width. A good example is the images section we used in our web designed (explained later in this guide).

![image section](/engineering-education/css-flexbox-vs-css-grid/images-section.png)

A fair use case of Flexbox wrap would be this subscription form, where the items don't have to be of the same size as you push them to different screen sizes.

```html
<div class="subscribe-container">
    <form>
        <input type="email" placeholder="Email Address">
        <input type="text" placeholder="Name">
        <input class="subscribe-button" type="submit" value="Subscribe">
    </form>
</div>
```

```css
.subscribe-container {
    max-width: 800px;
    margin: 60px auto;
    background-color: rgba(130, 184, 219, 0.5);
    border: 5px solid rgb(98, 143, 228);
}

.subscribe-container form {
    display: flex;
    flex-wrap: wrap;
}

.subscribe-container form input {
    margin: 15px;
    border: 1px solid rgb(98, 143, 228);
    padding: 0.4rem;
}

.subscribe-container form input {
    flex: 1 1 200px;
}

.subscribe-container form input[type="submit"] {
    border-radius: 3px;
    background-color: rgba(17, 228, 10, 0.5);
    color: rgb(98, 143, 228);
}

.subscribe-container form input[type="email"] {
    flex: 1 1 250px;
}
```

![subscribe-form](/engineering-education/css-flexbox-vs-css-grid/subscribe-form.jpg)

In this case, each item takes as much space as possible as the container spread or shrink on varying screen sizes.

![subscribe](/engineering-education/css-flexbox-vs-css-grid/subscribe.gif)

### Flexbox layout and Grid layout
Some of the most commonly asked questions about these two include:
- Does CSS Grid replace CSS Flexbox? Is it better than CSS Flexbox?
- Should I use CSS Grid instead of CSS Flexbox or CSS Flexbox instead of CSS Grid?
- When should I use either?
- Which is best to design web layouts?

Every layout has its strength. They both work differently. The best and easiest way is to combine the two layouts to produce an intricate, simple design in a standout way.

Let's illustrate where the CSS Grid can be implemented, working together with CSS Flexbox to create something awesome.

![content-alignment](/engineering-education/css-flexbox-vs-css-grid/web-page-design-and-content-alignment.png)

The above is an example of a web page design representation. By implementation, the design was done with a Grid layout. Check the [code](https://codepen.io/abbeyjfitzgerald/pen/zzqqYo) that was used to implement it.

During implementation, some instances will require you to use a Flexbox layout such as the header and footer.

When the design is implemented, we can represent the content and the design of this [example](https://codepen.io/abbeyjfitzgerald/pen/RgRoKy).

![web-design](/engineering-education/css-flexbox-vs-css-grid/web-design-implemented.png)

Go ahead and check the [code](https://codepen.io/abbeyjfitzgerald/pen/RgRoKy) used to implement the design above.

The main layout skeleton is made with the CSS Grid as previewed using a web browser inspector tool.

![under-the-hood](/engineering-education/css-flexbox-vs-css-grid/web-page-under-the-hood.png)

```css
.container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 60px;
    display: grid;
    grid-template-columns: 0.4fr 0.3fr 0.3fr;
    grid-column-gap: 10px;
    grid-row-gap: 15px;
    background-color: #fff;
}
```

Let's break down this web page.

As we said, the layout and its contents are a blend of the CSS Grid and CSS Flexbox properties.

The header consists of a navigation menu and a logo. They are aligned in one direction, and hence Flexbox layout will handle its alignment perfectly.

```html
<div class="header">
    <p class="logo"><a href="#"><i class="fa fa-home" aria-hidden="false"></i></a></p>
    <nav>
        <ul>
            <li><a href="#">HOME</a></li>
            <li><a href="#">ABOUT</a></li>
            <li><a href="#">Contact</a></li>
            <li><a href="#">SIGN UP</a></li>
            <li><a href="#">SIGN IN</a></li>
        </ul>
    </nav>
</div>
```

In this case, the header is the perfect example of implementing a Flexbox inside the CSS Grid.

```css
.header {
    grid-column: 1 / 4;
    grid-row: 1 / 2;
    text-transform: uppercase;
    border-bottom: 2px solid #b0e0ea;
    padding: 20px 0;
    display: flex;
    gap: 5px;
    align-items: center;
}
```

![header-content](/engineering-education/css-flexbox-vs-css-grid/header-content.png)

Again the navigation menu will fit well with a Flexbox layout.

```css
.header nav ul {
    display: flex;
    list-style-type: none;
}
```

![nav-header-content](/engineering-education/css-flexbox-vs-css-grid/nav-header-content.png)

Another case that embraces one dimension flexibility is the extra content section.

```html
<div class="extra">
    <div class="content-block-info">
        <h3>View Grid Help</h3>
        <p>See tips and tricks for CSS Grid Layouts...</p>
        <button>Read</button>
    </div>

    <div class="content-block-info">
        <h3>View Flexbox Help</h3>
        <p>See tips and tricks for Flexbox layouts...</p>
        <button>Read</button>
    </div>

    <div class="content-block-info">
        <h3>View Combined Help</h3>
        <p>See tips and tricks for combined layouts...</p>
        <button>Read</button>
    </div>
</div>
```

```css
.extra {
    grid-column: 2 / 4;
    grid-row: 4 / 5;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #ececec;
    justify-content: space-between;
}
```

![extra-content](/engineering-education/css-flexbox-vs-css-grid/extra-content.png)

Each `content-block-info` is arranged vertically; thus, a one-dimensional layout fits its design.

To wrap this illustration, the image section consists of images. It would be possible to implement this with a Flexbox layout by wrapping the images to fit the layout size.

But with a Grid layout, the images will work fine on a two-dimensional layout.

```css
.related-images {
    grid-column: 1 / 3;
    grid-row: 5 / 6;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 1rem;
}
```

![images-section](/engineering-education/css-flexbox-vs-css-grid/images-section.png)

CSS Grid and Flexbox layout can do a many things. But in some areas, the CSS Grid is better and more convenient, and in other areas, Flexbox is more convenient and the right choice.

### Conclusion
#### When to consider Flexbox
- When you need small-scale layouts, it is ideal for implementing layouts with fewer items such as headers and footers.

- Flexbox is ideal if you consider aligning your content in one direction. It allows us to create a Flexbox container and determine its direction, either horizontally or vertically. It will help distribute your content evenly in one direction.

- When you consider a content first scenario, Flexbox will be a perfect choice.

#### When to consider Grid
- Larger scale layouts with multi-rows and multi-columns that are two dimensional. CSS Grid will help you with an intricate design like the one we used in the web design above due to its capacity to support multi-directional design. It enables you to design the bigger picture of your layouts and components.

- When a design of your layout is a choice to arrange the items in your container, the CSS Grid will be ideal for manipulating your layout's design.

The best option is to combine both layouts. A Flexbox container can be used inside a Grid container and not vise versa. When designing a web page, adopt the practice of using a Flexbox layout inside your Grid containers to move your content in the right direction.

I prefer to use Flexbox for specific layouts and CSS Grid for the general or the overall design. Rather than going with choice bias, I generally use them both where they're more needed. They both have different use cases, and I use the one more appropriate for the task at hand.

Happy coding.

---
Peer Review Contributions by: [Linus Muema](/engineering-education/authors/linus-muema/) & [Louise Findlay](/engineering-education/authors/louise-findlay/)

repository: mbuguac/engineering-education

gha_language: SCSS

repo_name: mbuguac/engineering-education


text:
<https://leetcode.com/problems/design-phone-directory/description/>
```
class PhoneDirectory:

    def __init__(self, maxNumbers):
        """
        Initialize your data structure here
        @param maxNumbers - The maximum numbers that can be stored in the phone directory.
        :type maxNumbers: int
        """
        self.data = []
        for i in range(maxNumbers):
            self.data.append(i)

    def get(self):
        """
        Provide a number which is not assigned to anyone.
        @return - Return an available number. Return -1 if none is available.
        :rtype: int
        """
        if not self.data:
            return -1
        else:
            res = self.data[0]
            self.data=self.data[1:]
            return res

    def check(self, number):
        """
        Check if a number is available or not.
        :type number: int
        :rtype: bool
        """
        if number in self.data:
            return True
        else:
            return False

    def release(self, number):
        """
        Recycle or release a number.
        :type number: int
        :rtype: void
        """
        if number not in self.data:
            self.data.append(number)

# Your PhoneDirectory object will be instantiated and called as such:
# obj = PhoneDirectory(maxNumbers)
# param_1 = obj.get()
# param_2 = obj.check(number)
# obj.release(number)
```

path: /design/379. Design Phone Directory.md

filename: 379. Design Phone Directory.md


text:
# gocd-build-badge-notifier
Plugin notifies all pipeline build status to an instance of [Build Badge notifier](https://github.com/ashwanthkumar/gocd-build-badge-server).

## Setup
- Download jar from releases & place it in /plugins/external & restart Go Server.
- Make sure you have an instance of [build badge server](https://github.com/ashwanthkumar/gocd-build-badge-server) running. The README has 1-click deploy to Heroku.

## Configuration
You need to set a URL to an instance of [build badge server](https://github.com/ashwanthkumar/gocd-build-badge-server).

![Demo](images/configuration-screen.png)

## Markdown Syntax
To add the badge to the README of your private repo projects you could use the following template. Make sure you update the `HOST_OF_BADGE_SERVER` and `Pipeline-Name`.

```markdown
[![Build Status](https://HOST_OF_BADGE_SERVER.com/badge/Pipeline-Name)](http://ci-server:8153/go/tab/pipeline/history/Pipeline-Name)
```

## How does it work?
Since there isn't any (universal) way to determine if the pipeline has completed or not. We store the status of the latest completed stage in the pipeline on the badge server and return a badge (Passed / Failed / Unknown) based on that.

## License

http://www.apache.org/licenses/LICENSE-2.0

repository: ashwanthkumar/gocd-build-badge-notifier

repo_name: ashwanthkumar/gocd-build-badge-notifier


text:
Acute Pancreatitis in Patients with Type 2 Diabetes Who are New Users of Canagliflozin as Compared with New Users of Other Antihyperglycemic Agents: A Retrospective Cohort Study Using Large Claims Databases in the United States
========================================================================

This study package performs a retrospective, real-world observational study to evaluate the risk of acute pancreatitis among patients with type 2 diabetes mellitus treated with antihyperglycemic agents.

Package overview
================

Location | Content
-------- | -------
documents/ | The study protocol
inst/sql/sql_server | SQL queries for cohort construction
inst/settings | Analytic specifications for the study
R | R scripts for full comparitive study
extras/CodeToRun.R | The code used to execute full comparitive study
extras/EvidenceExplorer | The source code for the Shiny app for exploring the study results

License
=======
The AHAsAcutePancreatitis package is licensed under Apache License 2.0

Development
===========
AHAsAcutePancreatitis package was developed in R Studio.

### Development status

Study has been executed

repository: OHDSI/StudyProtocols

gha_language: R

repo_name: OHDSI/StudyProtocols


text:
# TardisBank

Pocket money tracking for parents and kids

## Quick start with Docker

TardisBank can be run locally using docker. You will most likely have to run these commands as sudo:

1. Copy the .env.example file to .env
2. Run `docker-compose pull`
3. Run `docker-compose -f docker-compose.yml -f docker-compose.local.yml up -d`

This configruation will expose to end points on the host:

| Site       | URL                   | Purpose                                                                                |
| ---------- | --------------------- | ----------------------------------------------------------------------------------------- |
| TardisBank | http://localhost:4000 | The main application                                                                      |
| smtp4dev   | http://localhost:4001 | A dummy maill server which traps all mail sent by TardisBank an displays it in a web page |

### Useful tips

- Run `docker-compose logs -f` to see all the logging being generated by the container
- To stop the contains running enter `sudo docker-compose -f docker-compose.yml -f docker-compose.local.yml down` at the console

## Development mode with Docker

TardisBank can be run locally, in development mode, using docker.

1. Copy the .env.example file to .env
3. Run `docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d`

You can then access the app on http://localhost , with hot-reloading on the client frontend code, and http://localhost:9001 to access the Storybook endpoint

repository: TardisBank/TardisBank

gha_language: C#

gha_license_id: MIT

repo_name: TardisBank/TardisBank


text:
## OVERVIEW:
The term Vanilla in english is termed as "anything having no special or extra features".Vanilla javascript is basically plain old javascript,understandable by javascript compiler,which means writing DOM manipulation manually. It is fast,lightweight framework which enables one to build incredible and powerful javascript applications. It refers to the framework which makes use of javascript without any libraries but it sacrifices code legibility in order to achieve better performance.Facebook,Google,Youtube,Yahoo,Wikipedia,WindowsLive Twitter,Amazon,LinkedIn,MSN,eBay,Microsoft,Tumblr,Apple,Pinterest,PayPal,Reddit,Netflix,Stackoverflow makes use of vanilla js.

#### WHEN TO USE VANILLA JS ?
Vanilla is fine when one aims to build a content-heavy website.

Use Vanilla when primary client side app technology(rendering html,routing,validation,data mapping,calling services and authentication) is different than javascript(.net,jsp etc) and one just want DOM manipulations to already rendered DOM without disturbing core mechanism of rendering.

#### USING VANILLA JS:
In order to use vanilla js:

[< script src="path/to/vanilla.js" >< /script >]

one needs to put this code anywhere in html file.

#### LEARN VANILLA JS:
[RESOURCES TO LEARN VANILLA JAVASCRIPT](https://designmodo.com/learn-vanilla-javascript/)

[YOUTUBE TUTORIALS]()
## OVERVIEW:
The term Vanilla in english is termed as "anything having no special or extra features".Vanilla javascript is basically plain old javascript,understandable by javascript compiler,which means writing DOM manipulation manually. It is fast,lightweight framework which enables one to build incredible and powerful javascript applications. It refers to the framework which makes use of javascript without any libraries but it sacrifices code legibility in order to achieve better performance.Facebook,Google,Youtube,Yahoo,Wikipedia,WindowsLive Twitter,Amazon,LinkedIn,MSN,eBay,Microsoft,Tumblr,Apple,Pinterest,PayPal,Reddit,Netflix,Stackoverflow makes use of vanilla js.

#### WHEN TO USE VANILLA JS ?
Vanilla is fine when one aims to build a content-heavy website.

Use Vanilla when primary client side app technology(rendering html,routing,validation,data mapping,calling services and authentication) is different than javascript(.net,jsp etc).

Use Vanilla where DOM allows programs and scripts to dynamically access and update the content, structure, and style of a document to already rendered DOM without disturbing core mechanism of rendering.

#### USING VANILLA JS:
In order to use vanilla js:

**< script src="path/to/vanilla.js" >< /script>**

one needs to put this code anywhere in html file.

#### LEARN VANILLA JS:
[RESOURCES TO LEARN VANILLA JAVASCRIPT](https://designmodo.com/learn-vanilla-javascript/)

[YOUTUBE TUTORIALS](https://www.youtube.com/watch?v=vEROU2XtPR8&list=PLillGF-RfqbbnEGy3ROiLWk7JMCuSyQtX)

repository: androidtestuser/first-timers-guide

repo_name: androidtestuser/first-timers-guide


text:
---
title: "Building a serverless Web App (part 5)"
date: 2020-06-12 09:00:00
author: "Alvaro Serrano"
image: ../../images/lambda.jpeg
tags:
  - Code
  - Software
  - AWS
  - Cloud Computing
  - Tutorial
---

In this part of the series we will add a new and extremely helpful feature for the users of the app. Since most of them will be tourists from different countries, we want to make it easy for them to use our app in case that English is not their first language.

## How it works

Our frontend files will contain local language resources that substitute language string whenever the locale is changed. A Node function that uses Amazon Translate will be responsible for the creation of a new file with a given number of languages. Once the file is created, this will be moved to the frontend repository in order to redeploy the application through Amplify.

## Step by step

Create a directory in your frontend containing 2 files: translate.js and translation-input.js

You can find here the array with support languages for [Amazon Translate ](https://docs.aws.amazon.com/translate/latest/dg/how-it-works.html#how-it-works-language-codes)

```node
const main = async () => {
  // Make sure list entered matches allowed language codes
  const listLanguages = targetLanguages.filter(lang =>
    possibleLanguages.includes(lang)
  )

  const translations = {}
  translations.en = messages.en

  // For each language selected...
  const pArray = listLanguages.map(async function(lang) {
    const output = {}
    // For each category...
    for (let category in messages.en) {
      output[category] = {}
      // For each phrases
      for (let phrase in messages.en[category]) {
        const translation = await translateText(
          messages.en[category][phrase],
          lang
        )
        output[category][phrase] = translation
      }
    }
    translations[lang] = output
  })

  // Await for all promises to resolve
  await Promise.all(pArray)

  // Here are the results
  console.log(translations)

  // Write to the local file system.
  fs.writeFileSync(outputFileName, JSON.stringify(translations, null, 2))
}

if (!process.argv[2])
  return console.error("Missing REGION in command line parameters.")

main()

//Translate function
const targetLanguages = ["fr", "zh", "da", "nl"]
const outputFileName = "./translations.json"
const translateText = async (originalText, targetLanguageCode) => {
  const params = {
    Text: originalText.substring(0, MAX_LENGTH),
    SourceLanguageCode: "auto",
    TargetLanguageCode: targetLanguageCode,
  }

  try {
    console.log(`Translating to ${targetLanguageCode}: ${originalText} `)
    const result = await translate.translateText(params).promise()

    // Introduce a slight delay to avoid throttling on the AWS Translate service
    // In production systems, you can raise your throttling limits as needed
    return new Promise(resolve => {
      setTimeout(() => resolve(result.TranslatedText), 500)
    })
  } catch (err) {
    console.error(err)
  }
}
```

Test the application by choosing different target language under the translation dropdown of your application

Next, in the final part of the series we will implement functionality to ingest real-time data from the tourists and get some useful statistics using Amazon Quicksight.

repository: alvaroserrrano/CodeBlog

gha_language: JavaScript

repo_name: alvaroserrrano/CodeBlog


text:
# Mind Illuminated Backend

The purpose of this backend application is to provide a REST API for the Android client application
for file uploading - this is required to persist the sensor data gathered during a session.

The application is using the Spring Boot framework, built with Gradle and was written in Kotlin.

## Build

Use Gradle to build the application: `gradle build`

## Deployment

Deployed to Heroku with HerokuCLI using `git subtree push --prefix backend-service heroku master`

## API Documentation

Available through the Swagger: http://mind-illuminated-backend.herokuapp.com/swagger-ui.html

## Features

### File upload

Google Drive is persistance storage for the uploaded files. This is achieved with the help of the official Google Drive API for Java.

Each client uploads a file after each session for later analysis of data.

### Authentication

The application is using OAuth to authenticate with the Android client application.

repository: mind-illuminated-team/mind-illuminated

repo_name: mind-illuminated-team/mind-illuminated


text:
Homework 2
==========

1. Solve Exercises 1, 2, 3(a) 5, 6, 7, 8, and 9(a) in Jarvis and Shier.

   Due on November 12:
   Submit your answers at end of the class.

2. Solve Exercises 3, 9, and 11 in Jarvis and Shier.

   Due on November 11:
   Push your IPython notebook to your GitHub repository.

   1. Create a new repository.

   2. Make a clone with, e.g., SourceTree.

   3. Download [JarvisShier_ex.ipynb](../markov/JarvisShier_ex.ipynb) and save it in the folder created above.
      **Simulation part added (11/10)**

   4. Open the downloaded file with IPython, and execute the commands and write your own code in blank cells.

   5. Commit and push the file.

   6. Edit the file "README.md" in your repository (create a file if not existing)
      to make a link to your notebook through [nbviewer](http://nbviewer.ipython.org/):

      Add to README.md the following line:

      ```
      [My notebook](http://nbviewer.ipython.org/github/USER/REPO/blob/master/FILENAME.ipynb)
      ```

      where you change
      * USER to your user name,
      * REPO to your repository name, and
      * FILENAME to your file name.

      [Here](http://nbviewer.ipython.org/github/oyamad/theory14/blob/master/markov/JarvisShier_ex.ipynb)
      is an example of the outcome.

   [Suggested solutions](http://nbviewer.ipython.org/github/oyamad/theory14/blob/master/markov/JarvisShier_solutions.ipynb)
   (11/12)

3. Solve Exercises 10 in Jarvis and Shier.

   Due on November 11:
   Push your Python script file to your GitHub repository.

   The algorithm is implemented for example in `fractions.gcd`,
   which you can find by running the following on IPython notebook:

   ```python
   import fractions
   fractions.gcd??
   ```

   (11/12)


text:
# Intro

## Extraction is crappy [J]

Writing programs in Coq and verifying them works nicely and is well-understood, but there's not great story for running take code.  Extraction is the standard way to take code out of Coq, but it's full of issues:

- Performance
- Trust
- Code size
- Deployment (OCaml runtime)
- Memory use / GC

## Low-level is hard [C]

VCC, VST, Facade, Bedrock 1/2.
Low-level gives you fine-grained control, but forces you to deal with irrelevant details as well.
(with C in particular, the specs force you to pay for stuff you don't use)
Bedrock / Bedrock2 are much better, but you're still writing low-level, with many details that you may not care about
It helps to distinguish fancy low-level code that needs the power of a low-level language with simpler code that assembles pieces together and just needs to be able to invoke efficient code and do simple manipulations.
Common style: write Gallina and C, prove them equivalent.  Why not generate the C code?

□ Question for the group: What are VST success stories at the moment ?

## Gallina is nice [J]

Gallina is a good starting point; we'd like to make it a good place to end, too.

This is a real problem: Narcissus is a good potential client: it's nice for generating code, but we need extra optimizations to run efficiently (previous approach was too heavy/complicated to work reliably)

This is a real problem: parts of fiat-crypto are a good candidate (others need complete control, so fiat-crypto has a custom compiler and we're not going to replace that).  In fact, we have a cool example! [^^]

Q: How do we bridge the gap between the lowest-level gallina spec/impl and actual imperative code?
A: Minimal strategy for bridging that gap: write Gallina with just the right shape and extract that. Target a small but extensible subset of Gallina, use tactics to produce an equivalent Bedrock2 program.  Use Gallina as a macro language to assemble bits of imperative programs (intuitively, we're encoding Bedrock2 into Gallina to gain the advantages of a shallow-embedded language)

### First demo: Montgomery ladder (!!) [J]

## Purpose of the talk [C]

- Explain our approach
- Sync with other projects

# Our approach

## Big picture [C]

1. Target a subset of a good proof language (Gallina)
   This is a common strategy, e.g. in F*-land
2. Use tactics to synthesize Bedrock2
   We do this because we want extensibility: because of the misalignments between Gallina and Bedrock2, there's not a single correct way to translate each construct that we might be interested in compiling.  Instead we let users plug in new tactics.

For now, no need to worry about memory allocation (caller is responsible)

## Second demo: bedrock 2 and simple examples (swap/incr) [J]

- Show Bedrock2 code
- Show Gallina (hopefully with these two it's clear that we'd want to synthesize)
- Show individual calls to compile_step

## Interesting problem: mutating nested structures

[C]

Examples:
- Mutate a value retrieved from a map
- Construct a view over a packet

Problem: We want to split out parts of a container to handle them as independent objects, but the typical predicate in separation logic for a container owns all contained objects (e.g. an array of pointers, or a tree).  IOW, standard predicates are not ready to relinquish ownership of some of their children.

This is not a new problem: Bedrock2 has a predicate to let you split an array into (prefix * element * suffix).  This type of approach also works for a linked list.  But the split isn't as simple for more complex datastructures (often it's just not possible, like in a tree).

Approach: annotate elements as [Borrowed (a: address)] or [Owned].

---

[J]

Problem: how do you borrow multiple values?  Borrowing one value might invalidate results of subsequent lookups, because borrowed values may have been mutated (hence invalidating the gallina model for that address).

(This is a real issue; consider a packet with [length(header); header..; B]; then to find B we need to read length(header), so it must not be borrowed).

Approach: use an extra state, [Reserved (a: address)]. Reserved is inbetween owned and borrowed: it has an address that is asserts but it still claims ownership.

## Third demo: manual derivation of the map swap example [C]

# Next steps [J]

- Nested packets to stress-test the approach
- Loops
- Translating monadic code
- Memory allocation (long-term)

repository: hermetique/rupicola

repo_name: hermetique/rupicola


text:
---
layout: post
title: "Protostar stack02 writeup"
tags: [protostar]
comments: false
---

We are given a source code for this challenge

```
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>

int main(int argc, char **argv)
{
  volatile int modified;
  char buffer[64];
  char *variable;

  variable = getenv("GREENIE");

  if(variable == NULL) {
      errx(1, "please set the GREENIE environment variable\n");
  }

  modified = 0;

  strcpy(buffer, variable);

  if(modified == 0x0d0a0d0a) {
      printf("you have correctly modified the variable\n");
  } else {
      printf("Try again, you got 0x%08x\n", modified);
  }

}
```

For this challenge, you just need to set up an environment variable that contains 64 A's + \x0a\x0d\x0a\x0d
then if you run the program, the program will get the values in teh environment variable using getenv, actually
getenv gets the address not the actual value but because of that the source code is using pointer, it will save the value in. Which will then copy all of the values in by using strcpy and by overflowing buffer then putting \x0a\x0d\x0a\x0d which will be 0x0d0a0d0a and match the if statement.

```
root@protostar:/opt/protostar/bin# export GREENIE=$(python -c 'print "A"*64+"\x0a\x0d\x0a\x0d"')
root@protostar:/opt/protostar/bin# ./stack2
you have correctly modified the variable
```


text:
---
layout: post
title: "Nice ORDER BY-syntax: FIELD()"
permalink: "/nice-order-by-syntax-field/"
tags: [mysql]
---

SELECT
turtle,
pizza,
rating
FROM
heroes
ORDER BY
FIELD(turtle, ‘Donatello’, ‘Michelangelo’, ‘Raphael’, ‘Leonardo’)

This let’s you get the ratings of Donatello’s first, etc. Really practical.


text:
# Address Book

#### This is an application to create an Address Book. 11/2/2020

#### By Bess Campbell & Tawnee Harris

## Description

## Setup/Installation Requirements

## Known Bugs

There are no known bugs.

## Support and contact details

## Technologies Used

* HTML
* CSS
* JavaScript

### License

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Copyright (c) 2020 Bess Campbell & Tawnee Harris

repository: tawneeh/address-book

repo_name: tawneeh/address-book


text:
# SQL-ZOO
SQL Answers for the [SQL-ZOO website](https://sqlzoo.net/wiki/SQL_Tutorial).

> This project will test the student’s domain of SQL queries by requesting them to retrieve and organize different pieces of data from a table.

## Built With

- SQL

## Author

👤 **Carlos Veiga**

- Github: [@githubhandle](https://github.com/wrakc)
- Twitter: [@twitterhandle](https://twitter.com/carlosveig)
- Linkedin: [linkedin](https://linkedin.com/chveiga)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the [issues page](issues/).

## Show your support

Give a ⭐ if you like this project!

## Acknowledgments

- Thanks microverse for the support;
- Thanks minskins team;
- Thanks the-manx team;

repository: carlosveigadev/SQL-ZOO

repo_name: carlosveigadev/SQL-ZOO


text:
## My concept mindmaps

Includes source files built with [Xmind](https://www.xmind.net/). Some aren't finished.

My first a mind map built in the university.

![Lasers](Лазеры.png)

Second work about `msfconsole` (Metasploit Framework). Please, click `Open image in new tab`.

![msfconsole](Msfconsole.gif)

A mindmap summarising self-education concepts.

![self-education](self-education.png)

Base scheme AI. (**INCOMPLETE**)

![AI](ИИ.png)

Trello Power-Up concept.

![Trello Power-Up](trello_power-up.png)

Architecture Design Example with microservices.

![Microservices](Microservices.png)

My concept [dockerized emacs](https://github.com/AfsmNGhr/dockemacs).

![Dockemacs](Dockemacs.png)

repository: AfsmNGhr/mindmaps

repo_name: AfsmNGhr/mindmaps


text:
---
title: Suppression
category: Triage Results
chapter: 5
order: 3
---

Individual findings can be suppressed regardless of analysis state. Suppressed findings will have a positive impact on
metrics whereas findings that are not suppressed will not.

Suppressed findings may:
* Decrease the number of 'Portfolio Vulnerability' metrics
* Decrease the number of 'Vulnerable Project' metrics
* Decrease the number of 'Vulnerable Component' metrics
* Decrease the number of vulnerabilities in specific components
* Decrease the 'Inherited Risk Score'

Findings that are not suppressed will continue to have an impact on all metrics. Once a finding has been suppressed,
it will remain in that state unless a user specifically removes the suppression from the finding.

### Best Practice

Findings with an analysis state of NOT_AFFECTED or FALSE_POSITIVE should be suppressed so that the inherited risk
and corresponding metrics take into consideration the analysis decision.

A comment of why the issue is a false positive, or why the vulnerability does not affect the project should be made
prior to the issue being suppressed. This will provide auditors details of why specific decisions were made.

### Impact on External Systems

By suppressing findings, external systems will, by default, have the same positive impact on metrics. Suppressing a
finding will have a positive impact not only on Dependency-Track itself, but the metrics of external systems as well.

For example, vulnerability aggregation platforms such as Kenna Security or ThreadFix will become aware of the updated
list of findings and metrics the next time they sync. These systems will assume suppressed findings have been 'fixed'.

repository: DependencyTrack/dependency-track

gha_language: Java

repo_name: DependencyTrack/dependency-track


text:
Changelog
=========

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog] and this project adheres to [Semantic
Versioning].

[Unreleased]
------------

[(See this file in `develop` branch.)][Development Changelog]

[0.1.1] – 2019-07-29
--------------------

### Security

- Update dependencies

[0.1.0] – 2019-04-28
--------------------

### Added

- Displaying savings
- Searching savings descriptions
- Sorting by project ID

[Keep a Changelog]: http://keepachangelog.com/en/1.0.0/
[Semantic Versioning]: http://semver.org/spec/v2.0.0.html
[Development Changelog]:
  https://github.com/henrik-leppa/hfl-savings-table/blob/develop/CHANGELOG.md
[Unreleased]:
  https://github.com/henrik-leppa/hfl-savings-table/compare/master...develop
[0.1.1]:
  https://github.com/henrik-leppa/hfl-savings-table/compare/0.1.0...0.1.1
[0.1.0]:
  https://github.com/henrik-leppa/hfl-savings-table/compare/69b559d558b9d5d669cf08a3b09ff76e1c4d65a6...0.1.0

repository: henrik-leppa/hfl-savings-table

repo_name: henrik-leppa/hfl-savings-table