text:
#### Nr: 357
#### [Back to Main list](index.md)
# SQLSaturday #357 - Cleveland 2015
Start Time (24h)|Speaker|Track|Title
---|---|---|---
00:00:00|Ben Miller|Training 4|[PoShDBA: Practical PowerShell for the DBA](#sessionid-10270)
00:00:00|Julie Smith|Training 1|[Swimming in the Deep End with SSIS](#sessionid-11129)
00:00:00|Chris Schmidt|Training 5|[SSAS, MD.: Tuning your cubes for fast processing and faster queries](#sessionid-11677)
00:00:00|Colleen Morrow|Training 4|[Enterprise-level auditing on a Standard Edition budget](#sessionid-11782)
00:00:00|Craig Purnell|Training 4|[Hardening SQL Server](#sessionid-12041)
00:00:00|David Maxwell|Training 4|[The usual SUSPECTs: When good databases go bad.](#sessionid-13340)
00:00:00|Kevin Feasel|Auditorium|[APPLY Yourself](#sessionid-14199)
00:00:00|Hope Foley|Training 5|[Spatial Data - Looking Outside the Map](#sessionid-15002)
00:00:00|Janis Griffin|Training 2|[Geekin’ Out on Extended Events -Deconstructing the system_health session to solve performance issues](#sessionid-15744)
00:00:00|Jim Arko|Training 3|[Troubleshooting SQL Server Performance Using Wait Stats](#sessionid-15774)
00:00:00|Jeff Moden|Training 2|[Partitioning System for "WORM" Tables - Part 1 - The Theory and the Problems](#sessionid-16065)
00:00:00|Jeff Moden|Training 2|[Partitioning System for "WORM" Tables - Part 2 - Deep Dive on the Code](#sessionid-16066)
00:00:00|Joseph D'Antoni|Training 2|[Who Moved My Tuple--Columnstore Indexes in SQL Server 2014.](#sessionid-16234)
00:00:00|Jeff Mlakar|Training 1|[Working with BimlScript to ease and automate your SSIS development](#sessionid-16279)
00:00:00|John Deardurff|Training 5|[Working with Data Types](#sessionid-17238)
00:00:00|Kendal Van Dyke|Training 4|[Transactional Replication: Tuning and Troubleshooting](#sessionid-18080)
00:00:00|Konstantin Melamud|Training 2|[Turbo Boost Performance: In Memory Tables index optimizations](#sessionid-18580)
00:00:00|Ravi Kumar|Training 1|[Think like SSIS and Build a package](#sessionid-18875)
00:00:00|Matt Nelson|Training 1|[Building dynamic SSIS packages for more flexibility](#sessionid-19849)
00:00:00|Tim Corey|Training 3|[Before You Optimize: Understanding Execution Plans](#sessionid-20047)
00:00:00|Michael Corey|Training 3|[Database Virtualization and Drinking out of the Fire Hose](#sessionid-20236)
00:00:00|Mindy Curnutt|Training 3|[The Ins and Outs of SQL Indexes](#sessionid-20779)
00:00:00|Michael Swart|Training 5|[Drawing Conclusions](#sessionid-20841)
00:00:00|Michael John|Auditorium|[Handling catch all or sometimes queries](#sessionid-20966)
00:00:00|Matt Slocum|Training 3|[What Every DBA Needs To Know About Storage For SQL Server](#sessionid-21145)
00:00:00|William Wolf|Auditorium|[Common Coding Mistakes and how to Mitigate them](#sessionid-22082)
00:00:00|Phillip Labry|Training 5|[Interactive Data Visualizations in Power View ](#sessionid-22122)
00:00:00|Steve Hood|Training 2|[Fixing Page Life Expectancy](#sessionid-25727)
00:00:00|Warren Sifre|Training 3|[DBA Monitoring and Maintenance Fundamentals](#sessionid-27566)
00:00:00|Wayne Sheffield|Auditorium|[Table Vars  Temp Tables - What you NEED to Know!](#sessionid-27740)
00:00:00|Wendy Pastrick|Training 4|[SQL Server in Azure](#sessionid-27826)
00:00:00|Aaron King|Training 1|[Database Deployment with Release Management for Visual Studio](#sessionid-8833)
00:00:00|Aaron Bertrand|Auditorium|[Top 5 Ways to Improve Your triggers](#sessionid-8927)
00:00:00|Aaron Cutshall|Auditorium|[T-SQL Tips  Tricks](#sessionid-8950)
00:00:00|Adam Belebczuk|Training 5|[XML Without Xanax: How to Handle XML in SQL Server](#sessionid-9003)
00:00:00|Audrey Hammonds|Training 1|[The Data Warehouse is Dead! Long Live the Data Warehouse! ](#sessionid-9968)
#
#### SessionID: 10270
# PoShDBA: Practical PowerShell for the DBA
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 4
## Speaker: Ben Miller
## Title: PoShDBA: Practical PowerShell for the DBA
## Abstract:
### This session will cover real world functions that are used for real DBA work. There will be a few slides but mostly demos with actual scripts to help you do your job. I will also introduce some SQLPSX to assist as well. Things like Reading/Changing the following: Permissions, DB Owner maintenance and database space management. We all could use a few standard things in our DBA world of ever changing roles and "I have to have it now" stuff, that Management Studio can get in the way of getting it done faster. Join me for a fun PowerShell hour.
#
#### SessionID: 11129
# Swimming in the Deep End with SSIS
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 1
## Speaker: Julie Smith
## Title: Swimming in the Deep End with SSIS
## Abstract:
### Many developers of all sorts get thrown into the deep end of the ETL pool without water wings with SSIS. While the dataflow and basic connections are easier to grok, the true complexity of SSIS often lies hidden in configurations, expressions, and parent child packages. This session is a primer on these lesser known, but frightfully important elements.
#
#### SessionID: 11677
# SSAS, MD.: Tuning your cubes for fast processing and faster queries
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 5
## Speaker: Chris Schmidt
## Title: SSAS, MD.: Tuning your cubes for fast processing and faster queries
## Abstract:
### Do you have an Analysis Services Multidimensional cube that isn't working right? Is it slow and non-performing? Does it take a REALLY long time to process? In this session, we'll review some of the best practices that you can put against your SSAS cube to get it running at peak efficiency. We'll discuss how to optimize dimension processing and why attribute relationships are so important, and what makes distinct count measure groups special. We'll also discuss why SSAS has 2 engines under the covers, and how you can use this knowledge to performance tune your cube to address the right bottleneck.
#
#### SessionID: 11782
# Enterprise-level auditing on a Standard Edition budget
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 4
## Speaker: Colleen Morrow
## Title: Enterprise-level auditing on a Standard Edition budget
## Abstract:
### In SQL Server 2008, Microsoft finally introduced a first-class auditing tool for monitoring what's going on in your databases.  Unfortunately, that's an Enterprise Edition feature.  What about those of us running Standard Edition?  In this demo-heavy session, we'll learn about auditing methods for the masses, including triggers, event notifications, SQL Trace, and extended events.
#
#### SessionID: 12041
# Hardening SQL Server
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 4
## Speaker: Craig Purnell
## Title: Hardening SQL Server
## Abstract:
### Need to build a more secure SQL Server?  Attend this session and learn 10 things you can do today to make your SQL Server more secure. Options like encrypting client connections, renaming SA, and configuring a SPN so SQL Server uses Kerberos.  You learn how to combine multiple layers to truly build “defense in depth” for a more secure database platform.
#
#### SessionID: 13340
# The usual SUSPECTs: When good databases go bad.
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 4
## Speaker: David Maxwell
## Title: The usual SUSPECTs: When good databases go bad.
## Abstract:
### You just restarted SQL Server, but some of your databases aren't coming online. Maybe
you see a database marked SUSPECT, or RECOVERY PENDING. What do you do? In this session
we'll cover the various states that a database can be in, how they get into those states, and
learn the proper techniques to bring your data safely back online.
#
#### SessionID: 14199
# APPLY Yourself
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Auditorium
## Speaker: Kevin Feasel
## Title: APPLY Yourself
## Abstract:
### Microsoft introduced the APPLY operator in SQL Server 2005. This under-used, non-standard operator can help us solve a number of common (and not-so-common) problems with elegant code which performs well. We will look several problem spaces in which the APPLY operator shines, such as joining to table-valued functions, getting the top N child records for each parent record, string splitting, and word matching. With the use of these examples, we will gain a deeper understanding of when to use the APPLY operator.
#
#### SessionID: 15002
# Spatial Data - Looking Outside the Map
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 5
## Speaker: Hope Foley
## Title: Spatial Data - Looking Outside the Map
## Abstract:
### I've said it before and I'll say it again, spatial data doesn't get much love in SQL Server.  It is a feature worthy of much appreciation and will become more vital as more location data is collected.  In this session we will explore spatial data and discover many ways it can be used for incredible analytics.  You will learn some new ways to visualize your data outside of the typical plots on a Bing map layer.  Come and learn how powerful spatial data can be even though it lacks a snazzy "power" title.
#
#### SessionID: 15744
# Geekin’ Out on Extended Events -Deconstructing the system_health session to solve performance issues
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 2
## Speaker: Janis Griffin
## Title: Geekin’ Out on Extended Events -Deconstructing the system_health session to solve performance issues
## Abstract:
### Extended Events are used to gather a wide range of performance information to help troubleshoot performance problems in SQL Server. The system_health session is an Extended Events session that is included by default with SQL Server. This session starts automatically when the SQL Server database engine starts, and runs without any noticeable performance effects. This presentations will take you on an in-depth tour of the data provided in the system_health event session and how to use it to troubleshoot performance issues. Cases studies from real-life examples will be used to demonstrate tips and tricks.
#
#### SessionID: 15774
# Troubleshooting SQL Server Performance Using Wait Stats
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 3
## Speaker: Jim Arko
## Title: Troubleshooting SQL Server Performance Using Wait Stats
## Abstract:
### Sometimes the hardest part of diagnosing performance issues is determining where to start. Wouldn’t it be nice if you could just ask SQL Server what’s slowing it down? Good news: you can! Every single time SQL Server has to wait on a resource it keeps track of it in its Wait Stats. That valuable data can be used to narrow down your troubleshooting efforts and help you get to the root cause quicker. This session will provide an introduction to Wait Stats and explain how they can be leveraged to improve your performance tuning skills.
#
#### SessionID: 16065
# Partitioning System for "WORM" Tables - Part 1 - The Theory and the Problems
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 2
## Speaker: Jeff Moden
## Title: Partitioning System for "WORM" Tables - Part 1 - The Theory and the Problems
## Abstract:
### This isn't your typical talk on "partitioning".  This is a deep dive into all the problems that you'll run into when partitioning new or existing "Write Once, Read Many" tables, such as large Audit Tables, and how to code around them.  You'll also learn the methods to support three of the best reasons for partitioning such monster tables... MUCH shorter nightly index maintenance, MUCH shorter and smaller backups, and MUCH shorter "Get back in business" piecemeal restores.  We'll also learn how to do the "impossible"... compact a File Group (one per partition) so that there's virtually no unused space in the underlying file.  After all, we don't want to set any "free" disk-space to "Read Only".  Don't let the "Advanced" rating of this session scare you away.  Anyone with a decent handle on T-SQL (or wants one) will be able to understand this session because "all will be explained" and there will be oodles of well-documented code to back up the explanations.
#
#### SessionID: 16066
# Partitioning System for "WORM" Tables - Part 2 - Deep Dive on the Code
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 2
## Speaker: Jeff Moden
## Title: Partitioning System for "WORM" Tables - Part 2 - Deep Dive on the Code
## Abstract:
### This isn't your typical talk on "partitioning".  This is a deep dive on the code for the problems and desired results for partitioning things like the "Audit" Table covered in Part 1.  It's strongly recommended that you attend Part 1 where the groundwork for this session has been laid out.  In this session, we'll build a 4 million-row test table and do the initial partitioning.  We'll follow that up with the monthly process to re-index and compress the latest full partition automatically every month and do a deep dive on a view that makes monitoring partitions easy.  This code helped me reduce backups to 1/60th the amount of time that they used to take.  There's a ton of ancillary learning in the code, as well.  Don't let the "advanced" rating of this session scare you away because it's written for all levels to understand.
#
#### SessionID: 16234
# Who Moved My Tuple--Columnstore Indexes in SQL Server 2014.
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 2
## Speaker: Joseph D'Antoni
## Title: Who Moved My Tuple--Columnstore Indexes in SQL Server 2014.
## Abstract:
###
Data Warehouse workloads can be very large and taxing on your database server. With the modern demands of real-time analytics against growing volumes of data this challenge continues. When columnstore indexes and batch mode query processing were introduced in SQL Server 2012 were a performance game changer. In the 2012 implementation of columnstore, direct updating and inserting of data was not supported and other restrictions, such as data types limited the use of the feature. SQL 2014 removes those limitations—you can use a columnstore index as a clustered index, and more importantly directly perform DML against the index. Also, more query operators support batch mode, which means more of your queries can see performance benefits. You will understand the changes for 2014—and how having updateable columnstore indexes may cause changes to your process design. You will see the power of columnstore indexes in analytics, their limits, and how to include them into your system design.

#
#### SessionID: 16279
# Working with BimlScript to ease and automate your SSIS development
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 1
## Speaker: Jeff Mlakar
## Title: Working with BimlScript to ease and automate your SSIS development
## Abstract:
### Business Intelligence Markup Language (Biml) is a great way to simplify your SSIS development to an easy-to-read XML format.  BimlScript expands this even further to allow you to embed .NET code in your Biml to have new Biml dynamically generated with schema changes at your source.  In this session, we’ll talk about what BimlScript can do and give you multiple examples of how it makes SSIS package creation easier and more dynamic.
#
#### SessionID: 17238
# Working with Data Types
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 5
## Speaker: John Deardurff
## Title: Working with Data Types
## Abstract:
### This session focuses on what you need to know about working with SQL Server Data Types. The session is led by an expert Microsoft Certified Trainer (MCT) who regularly teaches the SQL Server certification courses. The presenter will focus on the differences between character data types, working with implicit vs. explicit conversions and using conversion functions.
#
#### SessionID: 18080
# Transactional Replication: Tuning and Troubleshooting
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 4
## Speaker: Kendal Van Dyke
## Title: Transactional Replication: Tuning and Troubleshooting
## Abstract:
### At some point in every DBA's career they'll be probably be asked to work with transactional replication but most DBAs don't look under the covers once they're done walking through the setup wizards. In this session we'll take a deeper look at setting up, monitoring, and calibrating transactional publications plus share some tricks and tips gleaned from years of experience working with high volume, multiple datacenter topologies.
Session Goals:
•	Learn how to baseline performance metrics by gleaning information from the distribution database
•	Show how to tune replication agent performance with agent profiles
•	Demonstrate advanced troubleshooting techniques to apply when problems occur
#
#### SessionID: 18580
# Turbo Boost Performance: In Memory Tables index optimizations
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 2
## Speaker: Konstantin Melamud
## Title: Turbo Boost Performance: In Memory Tables index optimizations
## Abstract:
### With the introduction of in-memory based tables in SQL Server 2014, it’s natural to expect  significant increases in query performance. But what do we do when queries which utilize in-memory tables actually start to perform same or, in some cases, even worse than their equivalent disk based table predecessors?  In this session, we are going to take a look at the changes to the indexing design for in-memory based objects and how it differs from existing disk based table indexing. Also, we are going to cover how to choose the appropriate indexes for your in-memory object to give you the performance boost that you have been expecting.
#
#### SessionID: 18875
# Think like SSIS and Build a package
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 1
## Speaker: Ravi Kumar
## Title: Think like SSIS and Build a package
## Abstract:
### You wouldn't drive to a new place without directions? Then why build a SSIS package without having a road map on how to build it. Learn how to think like SSIS, make your ETL life easy, and convert a Process into an SSIS Package.  If time allows, we will also cover SSIS Package Configurations, security and deployment. Expect to participate actively in the class.
#
#### SessionID: 19849
# Building dynamic SSIS packages for more flexibility
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 1
## Speaker: Matt Nelson
## Title: Building dynamic SSIS packages for more flexibility
## Abstract:
### After building a handful of SSIS packages, you probably want to have more flexibility to make the package execution more dynamic.  In this session, we will learn how to use  variables, expressions, and loops to do things like: extract data to a file with *today's* date in the file name, load all files in a directory at the same time, and loop through a set of servers to gather data.  For this session, you should already be familiar with how to create SSIS packages to load data from flat files and extract data to flat files.
#
#### SessionID: 20047
# Before You Optimize: Understanding Execution Plans
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 3
## Speaker: Tim Corey
## Title: Before You Optimize: Understanding Execution Plans
## Abstract:
### You know what your query does, but do you know how it does it?  Do you know what type of resources your query uses?  Come to this session to find the answers to these questions and more as we walk through reading execution plans.  We will see how SQL breaks down the execution of your query and what each step tells us about the overall query.  If you are newer to Microsoft SQL or you just don’t feel totally comfortable with reading execution plans, this session is for you.
#
#### SessionID: 20236
# Database Virtualization and Drinking out of the Fire Hose
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 3
## Speaker: Michael Corey
## Title: Database Virtualization and Drinking out of the Fire Hose
## Abstract:
### A database by its very nature is one of the most resource intensive applications you will ever virtualize. This is even more difficult to do correctly in the context of a virtualized infrastructure that is a shared resource environment. We will look at every possible dynamic to virtualizing a database from Design, Storage, Memory and Network considerations. This presentation is based upon material given at VMworld from a presentation that was in the top 10 out of all presentation given.
#
#### SessionID: 20779
# The Ins and Outs of SQL Indexes
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 3
## 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: 20841
# Drawing Conclusions
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 5
## Speaker: Michael Swart
## Title: Drawing Conclusions
## Abstract:
### A fun and sometimes irreverent look a the SQL Server and Data world through illustrations.
I often blog about my DB Developer life in a very visual way. I explore a subset of useful topics such as Normal Form, Deadlocks, the Query Optimizer.
#
#### SessionID: 20966
# Handling catch all or sometimes queries
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Auditorium
## Speaker: Michael John
## Title: Handling catch all or sometimes queries
## Abstract:
### We have all had requirements for a procedure based upon many parameters that may or may not contain a value. These are typically seen as the code behind a search screen. The end users need to do this regularly, and they can be real performance killers.

This session will provide a number of different ways to handle "sometimes" queries, and provide techniques to make these perform faster.

Michael John is a Senior DBA with almost 20 years experience working and solving problems for both Fortune 100 companies and smaller firms. As a frequent contributor to many of the community newsgroups, and expert at answering the 2:00 AM problem phone calls, Michael has seen nearly every issue as a DBA in his career.
#
#### SessionID: 21145
# What Every DBA Needs To Know About Storage For SQL Server
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 3
## Speaker: Matt Slocum
## Title: What Every DBA Needs To Know About Storage For SQL Server
## Abstract:
### Do you have issues communicating your needs to your Storage/SAN Administrator? Do they seem to speak a different language when it comes to determining and providing your SQL Server storage needs?  In this session we'll review storage technologies so that you can communicate effectively with your Storage/SAN Administrator as well as methods of monitoring your storage to ensure that your needs are met.
In this session we will discuss RAID types, Local/Direct Attached Storage vs SAN Storage, and Flash Storage (including how it fits into multiple storage models).  We'll also review methods for monitoring and testing your storage performance.  With the information gathered in this session, you'll be able to have thorough, informed discussions with your Storage Administrator as well as being able to provide solid metrics to confirm storage performance.

#
#### SessionID: 22082
# Common Coding Mistakes and how to Mitigate them
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Auditorium
## Speaker: William Wolf
## Title: Common Coding Mistakes and how to Mitigate them
## Abstract:
### There are several programming design patterns that work great in object orientated code that doesn’t scale well inside of SQL Server. In this session we will focus some of these patterns and show you how to make them scale in the database engine. We will touch on Scalar-Value functions, Union, CTE, RBAR and more.
#
#### SessionID: 22122
# Interactive Data Visualizations in Power View
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 5
## Speaker: Phillip Labry
## Title: Interactive Data Visualizations in Power View
## Abstract:
### Power View is an interactive data exploration, reporting and presentation tool that is a pleasure for business people to use. It the one of the core building blocks of Power BI. In this session we will cover slicing, filtering, custom drill hierarchies, animated scatter plots, maps and more. You don't have to be a visualization expert to create beautiful and compelling visualizations.
#
#### SessionID: 25727
# Fixing Page Life Expectancy
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 2
## Speaker: Steve Hood
## Title: Fixing Page Life Expectancy
## Abstract:
### Starting with what Page Life Expectancy really means to query, server, and disk performance, we’ll get a firm understanding of what this counter means to you. After that we can start talking about if and how you want to raise it. It’s important to know that this is just a counter and there are situations where you don’t care about it nearly as much as you’d expect. It’s also important to know what effect a drop in PLE mid-day really means beyond query performance, including a possible impact on other, unrelated servers.
#
#### SessionID: 27566
# DBA Monitoring and Maintenance Fundamentals
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 3
## Speaker: Warren Sifre
## Title: DBA Monitoring and Maintenance Fundamentals
## Abstract:
### The key to becoming a great DBA is time.  The best way to regain some time is by spending less time doing the daily mundane work.  Let this mundane effort work autonomously.  We will introduce the basics in monitoring and maintenance.  The how and why certain things should be done at a minimum and what things can be done to help improve the quality of life in larger dynamic environments.
#
#### SessionID: 27740
# Table Vars  Temp Tables - What you NEED to Know!
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Auditorium
## Speaker: Wayne Sheffield
## Title: Table Vars  Temp Tables - What you NEED to Know!
## Abstract:
### Almost every SQL Developer is familiar with Table Variables and Temporary Tables. While each of these objects represent temporary storage, there are also substantial differences between them. Understanding the differences between Table Variables and Temporary Tables, and the ramifications that those differences cause, is essential to being able to properly select the appropriate object for use in your development tasks. In this code filled session, we’ll discover the differences and similarities of Temporary Tables and Table Variables, dispel some widespread myths about each, and answer the most important questions of them all, "When do I use one or the other and what are the various impacts of doing so?"
#
#### SessionID: 27826
# SQL Server in Azure
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 4
## Speaker: Wendy Pastrick
## Title: SQL Server in Azure
## Abstract:
### Walk through on creating SQL Server solutions in the cloud! Learn about the options for data storage in Azure, plus how to (very easily) configure and deploy a SQL Server. We will go over pricing, storage options, security and other details on using either Infrastructure as a Service (Iaas) or Database as a Service with Microsoft cloud solutions.
#
#### SessionID: 8833
# Database Deployment with Release Management for Visual Studio
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 1
## Speaker: Aaron King
## Title: Database Deployment with Release Management for Visual Studio
## Abstract:
### Database deployments while trying to implement continuous integration can be tricky. Microsoft has some great tools available to make things easier. Aaron will show how to use Release Management and Visual Studio to make your development life easier.
#
#### SessionID: 8927
# Top 5 Ways to Improve Your triggers
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Auditorium
## Speaker: Aaron Bertrand
## Title: Top 5 Ways to Improve Your triggers
## Abstract:
### You've got a piece of code that you want to implement as a trigger, but you've read that triggers can grind your performance to a halt. Developers everywhere write triggers to implement business logic, to enforce certain types of constraints, or to avoid changing database schema or external code. Many triggers are inefficient and violate best practices -- but it doesn't have to be this way. Come learn how to improve your triggers and keep them off the list of potential scapegoats for your SQL Server performance woes.
#
#### SessionID: 8950
# T-SQL Tips  Tricks
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Auditorium
## Speaker: Aaron Cutshall
## Title: T-SQL Tips  Tricks
## Abstract:
### Do you ever wonder how you can make T-SQL do what you really want? Do you want to know how to make it jump through loops, perform amazing twists and turns, and execute other wondrous performances? In this session you'll learn about various features such as CTE, ROW_NUMBER, and other great features that will enable you to make your T-SQL queries and stored procedures more efficient and give you the results you really want.
#
#### SessionID: 9003
# XML Without Xanax: How to Handle XML in SQL Server
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 5
## Speaker: Adam Belebczuk
## Title: XML Without Xanax: How to Handle XML in SQL Server
## Abstract:
### Do you cringe whenever you have to look at an XML document? Does the very thought of XML data living in your database make you scream? Do you have a panic attack any time you have to parse XML? If you answered yes to any of these questions, then this session is for you!

We'll start with reasons why having XML in SQL Server might be a good thing, then we'll face our fears and turn tabular data into XML, and finally we'll confront the true source of our anxiety by parsing XML back into tabular data using xQuery.

If you survive this session, you'll have faced your fears about XML in SQL Server, you'll have a solid understanding of creating XML from tabular data, and you'll know how to use xQuery to parse XML.
#
#### SessionID: 9968
# The Data Warehouse is Dead! Long Live the Data Warehouse!
#### [Back to calendar](#nr-357)
Event Date: 07-02-2015 - Session time: 00:00:00 - Track: Training 1
## Speaker: Audrey Hammonds
## Title: The Data Warehouse is Dead! Long Live the Data Warehouse!
## Abstract:
### Okay, the Data Warehouse isn't really dead. But, it's time to think past your favorite textbook and begin looking at practical solutions that fit the schedule, budget, and team you're working with. In this session, we'll discuss design options, implementation considerations, and lessons gained from the many mistakes the presenter has made over the years. This is a highly interactive session, so bring your ideas, opinions, and experiences.

repository: andrekamman/sqlsathistory

repo_name: andrekamman/sqlsathistory


text:
Title: Virtual Machines
Date: 2013-01-04 22:21
Author: Michael
Category: VM
Tags: Virtual Computing
Slug: virtual-machine
Status: published

Let me just put this right out there; Virtual Machines are awesome, but
not
for me in this use case.

For the last 6 or so months I have been developing in separate
environments.
Using VMware Fusion for Mac OSX has enabled me to create virtual
computers that
facilitate complete separation between my main machine and dev
environments.
I will explain what I did followed by why and how it worked out.

The creation of an OSX Mountain Lion VM is painless. After creation I
went in
and removed a bunch of non-necessary apps. After all, I was mainly
interested in
using the VM to develop, not manage pictures or play with GarageBand.
Removing
the unnecessary apps made the VM footprint a lot smaller, which was
another nice
side effect.

I keep most of my important configurations in a version control system
called
git. I store these repositories at Github, which makes retrieving and
subsequently installing them super easy. Once the machine was
provisioned with
my configurations, I used my laptop script to install the apps and
packages I
use for developing and managing.

Up to this point I have a few hours invested and I figure I can make a
copy of
VM for future use. Lets call it the base VM. From here I can experiment
with
new packages, modules and code. I install items without regard for my
system as
I can simply roll back the changes or start anew. Life is good...

The problem I have experienced with this setup is managing what is
installed,
where it is installed and how to keep track of it all. This gets
really
complicated when I have 4 or 5 VM's that are purpose built for
different
programming languages and/or tools. I often need to modify my path or
another
config file, for example, in each VM. This is a managerial nightmare as
I have
4 or 5 different dotfile configurations to stay on top of. Yuck.

What I've found is that I am unable to really stay on top of each VM and
my main
machine when I really just want to focus on getting something done.
Conversely,
I can't get anything done when I spend all my time making sure all of
the repos
are up to date. Houston we have a problem.

My hat is off to those of you with more than one computer and also
manage to
keep everything sane. I have toyed around with the idea of one main
computer and
another traveling computer or something like that. This experiment has
taught me
that I am a one computer man. I guess my particular OCD dictates that I
keep my
config files up to date and if my computer blows up, I can simply move
to another...
but not more than one at a time.

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
### [CVE-2018-14037](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-14037)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

Cross-site scripting (XSS) vulnerability in Progress Kendo UI Editor v2018.1.221 allows remote attackers to inject arbitrary JavaScript into the DOM of the WYSIWYG editor because of the editorNS.Serializer toEditableHtml function in kendo.all.min.js. If the victim accesses the editor, the payload gets executed. Furthermore, if the payload is reflected at any other resource that does rely on the sanitisation of the editor itself, the JavaScript payload will be executed in the context of the application. This allows attackers (in the worst case) to take over user sessions.

### POC

#### Reference
- http://seclists.org/fulldisclosure/2018/Sep/49
- http://seclists.org/fulldisclosure/2018/Sep/50
- https://www.sec-consult.com/en/blog/advisories/stored-cross-site-scripting-in-kendo-ui-editor-cve-2018-14037/

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

branch_name: refs/heads/main

gha_language: HTML

gha_license_id: MIT

repo_name: trickest/cve


text:
# history-navigation

A jQuery plugin providing dynamic page navigation using the JavaScript History API

npm package: [@webservco/history-navigation](https://www.npmjs.com/package/@webservco/history-navigation)

---

## Features:
- Dynamic page navigation (JavaScript "history" navigation): local pages are loaded dynamically;
- Highlight active page in the navigation menu;

---

## Usage

### Install
```
npm install @webservco/history-navigation --save-dev
```

### Include the script tag in your project (after jQuery)
```
<script defer<EMAIL_ADDRESS>```

> Alternatively you could download the plugin for the project's `src` directory.

### Initialize the plugin

> Settings presented are the default ones

```JavaScript
    /* history navigation */
    $(document).historyNavigation({
        linkClass: "app-nav", // class of the links which trigger the navigation
        mainElementId: "main", // id of content wrapper element
        contentElementId: "content", // id of content element
        navigationElementClass: "navbar", // class of the element containing the navigation links
        onLinkClick: function( element ) { // callback
            //console.log("callback: onLinkClick");
        },
        onUrlLoaded: function( newUrl ) { // callback
            //console.log("callback: onUrlLoaded");
        },
        onUrlLoadError: function( newUrl, resultObject ) {
            //console.log("callback: onUrlLoadError");
            /* set custom content on error */
            $("#content").html(
                "<div class=\"alert alert-danger\" role=\"alert\"><h1>Error loading page</h1>" +
                "Status: " + resultObject.status + " " + resultObject.statusText +
                "</div>"
            );
        },
        onPopState: function( event ) { // callback
            //console.log("callback: onPopstate");
        },
    });
```

### Documentation and examples
For documentation and a full HTML implementation example please see the project [webservco/html5-app](https://github.com/webservco/html5-app)

---

## Development Setup

### Install
```
git clone https://github.com/webservco/history-navigation.git my-project
cd my-project
npm install
```

### Build the project
Clean everything and create production files in the `dist` folder:
```
npm run build
```

### Cleanup
```
npm run clean
```

---

## Notes

Initially the plugin was using the jQuery `.load()` functionality.
It has been however removed, because it doesn't load any scripts.
> http://api.jquery.com/load/
>
> "jQuery uses the browser's .innerHTML property to parse the retrieved document and insert it into the current document. During this process, browsers often filter elements from the document such as html, title, or head elements. As a result, the elements retrieved by .load() may not be exactly the same as if the document were retrieved directly by the browser."
>
> "If .load() is called with a selector expression appended to the URL, however, the scripts are stripped out prior to the DOM being updated, and thus are not executed."

### TODO: handle meta title / description

Not working:

```javascript
var title = $(data).find("title").text();
var description = $(data).find('meta[name=description]').attr("content");
console.log(title);
console.log(description);
```

---

repository: webservco/history-navigation

repo_name: webservco/history-navigation


text:
# cnab-go

CNAB packages for Go, extracted from Duffle.

We highly recommend you _do not_ take a dependency on this package, as it's currently in a very early, experimental state.

```
$ go build ./...
$ go test ./...
$ golangci-lint run --config ./golangci.yml
```

repository: glyn/cnab-go

repo_name: glyn/cnab-go


text:
# GithubSearch

## Project Description
It is a website where users may enter a GitHub username into a form, submit it, and see names and descriptions of that person's public repositories.

### Author
 * **Charity Mutoni**

### Project setup instructions
 1. You must have a github account
 2. Fork the project on your local computer
 3. You will be able to view the project
 4. Edit the codes according to your preferences

### Technologies
 1.Typescript

 2. Html

 3. Css

 4. bootstrap framework

 5. javascript libary

### Contact Information
<EMAIL_ADDRESS>
 Tel:<PHONE_NUMBER>

### Github live pages
 https://charitymutonii.github.io/GithubSearch/

### License
This project is license  by MIT

### copyright information
Copyright (c) 2020 CharityMutonii

repository: CharityMutonii/GithubSearch

repo_name: CharityMutonii/GithubSearch


text:
# glint-container

glint container for blocks

# install

```bash
npm install glint-container
```

# use

> This Module is part of [glintcms](http://glintcms.com/).
> Please see the [documentation](https://github.com/glintcms/glintcms) for more info.

```js
var Container = require('glint-container');
var container = Container(configuration);

container.id(myId).load(function() {
console.log('glint loaded');
});
```

# attributes

## changed

## blocks

## adapter

# methods

all methods return `this` and are therefore chainable.
and they have two arguments: `function([fn ,] done)`

`fn(block, result)` is called on every block,
`done(err, content)` is called once the operation is done.

## preload
 loading parts without DOM manipulation

## load (Adapter::load -> Block[]::load)
 (either on server or browser depending on browser(true) or false)

## edit (Block[]::edit)
 - Container::load -> Container::edit

## save (Block[]::save -> Adapter::save)
 - save -> load

## cancel (noop)
 - load

## delete (Adapter::delete)
 - delete -> load

## hasChanged

# rendering

rendering (load) is done by default on the server.
editing, saving and deleting is always initiated in the browser.
blocks and widgets can be defined to render in the browser when needed.
however you can also override where the components (blocks and widgets) are rendered all together.
you can use this for example to let everything be rendered on the server,
when the site is being called by a bot, search engine, crawler or the like.

## rendering priorities
(0:low priority ... 3:high priority)

 0 render on server by default

 1 Block.render('browser') or
   Widget.render('browser')
   -> render these items in the browser

 2 Wrap.render('server') or
   Container.render('server')
   -> render ALL items on the server, e.g. when requested by a search engine.

 3 SpecificBlock.render('force:both') or
   Widget.render('force:both)
   -> when a Specific Block has this flag, it will always be rendered on both sides (server and browser)

 4 Same as priority 3 but with 'force:server' or 'force:client'
   -> render always on the server respectively in the browser

# test

```bash
npm test
```

# license

MIT

> sponsored by [intesso](http://intesso.com)

repository: glintcms/glint-container

repo_name: glintcms/glint-container


text:
# Snorkel Zoo
![snorkel-logo](https://www.snorkel.org/doks-theme/assets/images/layout/Snorkel.png)

The Snorkel Zoo is a collection of utilities for writing labeling functions, transformation functions, and slicing functions, as seen in the [core Snorkel library](https://github.com/snorkel-team/snorkel). We’ve demonstrated the efficacy of _templates_ or _declarative operators_ across a range of use cases in prior work ([Ratner et. al 2019](https://arxiv.org/abs/1711.10160)). In this reposiotry, we aim to provide a shared resource for different _builders_, _generators_, and _primitives_ that are effective in both research and production contexts. More importantly, we’re excited to crowdsource ideas from the community!

## Structure
The repository is divided into subfolders for builders, generators, and primitives.

### Templates
For a single problem, It’s helpful to have a shared interface for building a specific type of labeling function. For instance, the [Intro Tutorial](https://www.snorkel.org/use-cases/01-spam-tutorial) features a number of keyword labeling functions using a shared template:

```python
def make_keyword_lf(keywords, label=SPAM):
    return LabelingFunction(
        name=f"keyword_{keywords[0]}",
        f=keyword_lookup,
        resources=dict(keywords=keywords, label=label),
    )

"""Spam comments talk about 'my channel', 'my video', etc."""
keyword_my = make_keyword_lf(keywords=["my"])

"""Spam comments ask users to subscribe to their channels."""
keyword_subscribe = make_keyword_lf(keywords=["subscribe"])

"""Spam comments post links to other channels."""
keyword_link = make_keyword_lf(keywords=["http"])

"""Spam comments make requests rather than commenting."""
keyword_please = make_keyword_lf(keywords=["please", "plz"])

"""Ham comments actually talk about the video's content."""
keyword_song = make_keyword_lf(keywords=["song"], label=HAM)
```

### Generators
Labeling functions may be generated using programmatic methods. We’ve explored this in a number of settings — from automatically-generated labeling functions ([Varma et. al 2019](http://www.vldb.org/pvldb/vol12/p223-varma.pdf)) to natural language interfaces for parsing labeling functions ([Hancock et. al 2018](https://arxiv.org/pdf/1805.03818.pdf)). In the [Crowdsourcing Tutorial](https://www.snorkel.org/use-cases/crowdsourcing-tutorial), we show a generator that produces a labeling function for each crowdworker:
```python
def worker_lf(x, worker_dict):
    return worker_dict.get(x.tweet_id, ABSTAIN)

def make_worker_lf(worker_id):
    worker_dict = worker_dicts[worker_id]
    name = f"worker_{worker_id}"
    return LabelingFunction(name, f=worker_lf, resources={"worker_dict": worker_dict})

worker_lfs = [make_worker_lf(worker_id) for worker_id in worker_dicts]
```

### Primitives
For certain use cases, it's helpful to generate primitives, or basic features, over the underlying data for Snorkel operators to access. This is especially important for non-textual data modalities, as we’ve shown in work across medical imaging ([Fries et. al, 2019](https://www.nature.com/articles/s41467-019-11012-3))  and computer vision ([Chen et. al 2019](https://arxiv.org/abs/1904.11622)).

## Contributing
Coming soon!

repository: snorkel-team/snorkel-zoo

repo_name: snorkel-team/snorkel-zoo


text:
# POX custom flow generator
A GUI POX flow generator in mono

General instructions:
First create individual flows using create flow button and then after all flows are created use create script button to create final controller script

-For Windows

*Requires .NET framework 4 or up

Clone the repo or download zip file & click to run

-For Mac

Download & install latest Mac OS X mono package from http://www.mono-project.com/download/
 cd into the directory where pcfg.exe is located and execute 'mono pcfg.exe'

-For Linux

Download mono for your distribution from http://www.mono-project.com/download/
(Ubuntu users can download using 'sudo apt-get install mono-complete')
 cd into the directory where pcfg.exe is located and execute 'mono pcfg.exe'


text:
[![Build Status](https://dev.azure.com/swiftops/swiftops/_apis/build/status/swiftops.git_change_log)](https://dev.azure.com/swiftops/swiftops/_build/latest?definitionId=1)

# Git Change Log Microservice

This microservice is used to fetch git change log data for given git repository between its tags. It lists newly added and modified files name, retuns short-stat of total count changed file from previous tags also detail logs with commit details, author for given duration in input. Refer Swagger api after installation.

## Installation
### Checkout Repository
```sh
git clone https://github.com/swiftops/git_change_log.git
```

### 1. Deploy inside Docker
---
#### Pre-Requisite - Docker
*   Docker should be installed on your machine. Refer [Install Docker](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04) documentation.

*   Git repository should be checked out locally. e.g  Lets say you have cloned jenkins repository at `/app/work/salm_core`
    >[ssh url](git@github.com:jenkinsci/jenkins.git)
    >[http url](https://github.com/jenkinsci/jenkins.git)

*   Git repository remote should be set with credentials, no further git operation will prompt for credentials.
    >e.g (http://<username:password@git-host>/<git-repositiory>) for http ssh key required to set for ssh url

*   Change property file
    >gitconfig.ini to change working directory path, customer maping and path to include from working directory.
    >setup.py to change URL

#### Steps to start microservice
Once you  done with pre-requisite exeute below command to start git change log microservice
```sh
docker build -t <image-name>
docker run -p 5005:5005 -v <hostpath for mounting repo>:/app/work/salm_core --name ms-gitchangelog -d <image-name>
```
#### To access Microservice Swagger API Documentation
http://<yourip>:5005/ui

*Note* - To get your IP in api url change host property in swagger.yaml and restart service.

#### To access Microservice
e.g http://<yourip>:5005/api/gitchangelog/v1/shortstat/salm_core/Rel_4.4.0_Rel_4.5.0

### 2. On Commit Auto-deploy on specific server
---
To autodeploy your docker container based service on server used below steps
*   You need to configure Gitlab Runner to execute Gitlab CI/CD Pipeline. See [Gitlab Config](https://docs.gitlab.com/runner/install)
As soon as you configure runner auto deployment will start as you commited the code in repository.
refer .gitlab-ci.yml file.

### 3. Deploy on local environment
---
#### Pre-Requisite
*   Git repository should be checked out locally.
    e.g  Lets say you have cloned jenkins repository at `/app/work/salm_core`
    >[ssh url](git@github.com:jenkinsci/jenkins.git)
    >[http url](https://github.com/jenkinsci/jenkins.git)

*   Git repository remote should be set with credential, no further git operation will prompt for credentials.
      e.g (http://<username:password@git-host>/<git-repositiory>) for http
      ssh key required to set for ssh url

*   Change property file
    > gitconfig.ini to change working directory path, customer maping and path to include from working directory.
    > setup.py to change URL

#### Create Virtual Environment
Virtualenv is the easiest and recommended way to configure a custom Python environment for your services.
To install virtualenv execute below command:
```sh
pip3 install virtualenv
```
You can check version for virtual environment version by typing below command:
```sh
virtualenv --version
```
Create a virtual environment for a project:
```sh
cd <my_project_folder>
virtualenv virtenv
```
virtualenv `virtenv` will create a folder in the current directory which will contain the Python executable files, and a copy of the pip library which you can use to install other packages. The name of the virtual environment (in this case, it was `virtenv`) can be anything; omitting the name will place the files in the current directory instead.

This creates a copy of Python in whichever directory you ran the command in, placing it in a folder named `virtenv`.

You can also use the Python interpreter of your choice (like python3.6).
```sh
virtualenv -p /usr/bin/python3.6 virtenv
```
To begin using the virtual environment, it needs to be activated:
```sh
source virtenv/bin/activate
```
The name of the current virtual environment will now appear on the left of the prompt (e.g. (virtenv)Your-Computer:your_project UserName$) to let you know that it’s active. From now on, any package that you install using pip will be placed in the virtenv folder, isolated from the global Python installation. You can add python packages needed in your microservice decelopment within virtualenv.

#### Install python module dependanceies
```sh
pip install -r requirements.txt
```
#### To start microservice - Local
```sh
python services.py
```
#### To access Microservice Swagger API Documentation - Local
http://<yourip>:5005/ui

Note - To get your IP in api url change host property in swagger.yaml and restart service.

#### To access Microservice - Local
e.g http://<yourip>:5005/api/gitchangelog/v1/shortstat/jenkins/jenkins-2.142..jenkins-2.143

### Architechture
![Scheme](gitchangelog.JPG)

#### Flask
Flask is a micro web framework written in Python. It is classified as a microframework because it does not require particular tools or libraries.It has no database abstraction layer, form validation, or any other components where pre-existing third-party libraries provide common functions. However, Flask supports extensions that can add application features as if they were implemented in [Flask itself](http://flask.pocoo.org/docs/1.0/quickstart/)

#### Gunicorn
The Gunicorn "Green Unicorn" (pronounced gee-unicorn) is a Python Web Server Gateway Interface (WSGI) HTTP server.

#### Features
*   Natively supports WSGI, web2py, Django and Paster
*   Automatic worker process management
*   Simple Python configuration
*   Multiple worker configurations
*   Various server hooks for extensibility
*   Compatible with Python 2.6+ and [Python 3.2+](http://docs.gunicorn.org/en/stable/configure.html)

#### Docker
[Container platform](https://www.docker.com/get-started)


text:
# pgp-backup
encrypted python backup scripts using gnupg
EncryptedUploader is the main module and will upload a directory to a folder in google drive.
Options.conf defines where the oauth credentials folder lives and where to store temp files
In order to run this script it should be run as a service so that it isn't halted mid upload.
--Some sort of link to systemd docs

upload_dir is an unencrypted uploader script

# Limits on API Calls
Each google account should be related to a google api project so that they don't overload a single api project's limits.
1000000 requests/100sec
1000000000/24hrs

Referencing GDrive tutorials
Jeremy Blythe
https://github.com/jerbly/tutorials/tree/master/motion
http://jeremyblythe.blogspot.com/2015/06/motion-google-drive-uploader-for-oauth.html


text:
## Terminus

Translation to English:

The planet farthest from the center of the galaxy.

GitHub: https://github.com/Terminus2049/Terminus2049.github.io

This warehouse stores deleted articles. For blog templates, please go to terminus-jekyll-template

For feedback, please go to https://2049bbs.xyz

What is Endpoint Star Program
The Terminus Endpoint Star Project is a site built on the GitHub open platform for backing up deleted articles on platforms such as WeChat and Weibo. Outside the firewall, there are also websites like China Digital Times, GreatFire, FreeWeibo, FreeWeChat, Wall and Book that make articles and backups, but it is not easy to spread the network inside the wall.

At the same time, we operate a forum 2049bbs that can be registered without a mobile phone number and email. Welcome to discuss freely.

Note: Endpoint Star does not include content that has not been harmonized by the Chinese government.

How to participate in the Endpoint Star Program
How to help organize 404 articles
See the top article for details on how to participate in the Endpoint Star Program

Mirror site
https://wxdeletedarticle.github.io/Terminus/ (automatically updated)
https://nyanpasu-poi.github.io/Terminus/ (automatic update)
https://terminus2049-isupportyou.github.io/Terminus/ (automatic update)
https://qiaoqi945.github.io/Terminus/ (automatically updated)
https://seawolfmao.github.io/Terminus/ (automatically updated, recommended)
https://terminus2049.gitlab.io/ (automatically updated, has been walled)
Local preview
gem install bundler jekyll
gem install jekyll-paginate
gem install jekyll-seo-tag
gem install jekyll-sitemap
git clone --depth = 1 https://github.com/Terminus2049/Terminus2049.github.io.git
cd terminus2049.github.io
jekyll serve
Thanks
Open source program
Blog template kiko-now
Font scheme http://cosx.org
Share component Share.js
GitHub Corners
pangu.js
github-cards
service
Free and reliable picture bed sm.ms

Chrome extension reader-mode

Contributor
@TerminusBot @cmmei @ b614103080 @ShuttleDDD @IchiroArisugawa @scisheiko @Jephen @ p-library @Kurocoppla @ Tsai1993 @ billy3321 @DarioMeeker @wisdomlover @fictionalwinner @idealclover @Mabbs

Special thanks to IchiroArisugawa for the good-looking LOGO.

Special thanks to the fictionalwinner Chrome extension reader-mode developed specifically for Endpoint Star.

Specific contributions can be viewed here and here.

copyright
Site building program copyright
The site building procedure comes from kiko-now. Blog template files inherit the copyright and follow the MIT License. Refer to http://cosx.org/ for font selection scheme.

Article copyright
The copyright of the articles in the _posts folder belongs to the original author. This site only prevents the deletion and posting of platforms such as WeChat and Weibo, out of good faith. If you violate your rights, please submit an issue and we will delete it as soon as possible.


text:
+++
author = "Chris Short"
categories = ["Weekly", "Newsletter", "DevOps News", "Cloud Native News", "Open Source News", "2022"]
date = 2022-07-10T07:00:00Z
description = ["Snakebit, You Belong Here, lots more layoffs, MI5 and FBI heads issue joint statement, 10 Awesome Kubernetes Projects for Beginners, and more"]
draft = false
slug = "275"
tags = ["open source", "cloud", "server", "git", "software", "Apple", "Kubernetes", "infrastructure", "service", "platform", "build", "code", "cloud native", "development", "Detroit", "Linux", "developer", " caching	"]
title = "DevOps'ish 275: Snakebit, You Belong Here, lots more layoffs, MI5 and FBI heads issue joint statement, 10 Awesome Kubernetes Projects for Beginners, and more"
+++

Have you ever felt like you're [snakebit][1]? When whatever you do in a particular discipline, nothing goes as planned.

I have a Dell R820 packed to the gills with 500 GB Samsung SSDs (I'll update to [1 TB drives][2] once they're under $100) in my lab. 1.3 terabytes of RAID10 at your service. If you've followed me since my Red Hat days, you've seen me wrangle with Kubernetes local storage on this box. I've destroyed this server live on air, on purpose, more than I want to admit.

After joining AWS, I didn't need an OpenShift cluster and completely wiped the server. It sat there completely off for weeks at a time. The entire month of June, it sat off. I didn't use the server for much after October, aside from the random tasks that were I/O heavy.

I'm focused on inner loop development in my new role at AWS. The pipeline to prod experience from there, while not necessarily in scope, that interface, that handoff, that experience, has to be solid. Also, the job will vary day-to-day as I'm the first Developer Advocate on this team. One day I might be building software from source one day. Next, I could be looking at a CI pipeline. Another day, I'll be creating and spinning up many containers at once. There's also this cool new thing for [bare metal called EKS Anywhere][3] (I had my feedback put into the product). It's open source, too; I don't need a license as long as I'm not calling support for it.

I'm spending time now, early in the job, while I'm reading and researching, doing technical work to balance my days and lay the foundation to emulate the developer experience. Whatever it may be—I'm building out the platform now so that I can feel the same pains. I build empathy this way. I build muscle memory this way. I usually pick up a good habit or two in the process.

I want to have all the flexibility our customers have at my fingertips as they do. Whether deploying from laptop to test on-prem or in the cloud, I want my use cases covered.

The problem I'm having is the kind of Murphy's Law that makes you want to hang it up for the weekend and give up until Monday. While that might have been a better option at 6 AM, I took the path of figuring things out. The difficulties of computers not bending to my will would have festered in my head all weekend if I'd not done something.

I woke up Saturday morning, looked over everything, realized what I was doing wrong, and proceeded to set things right in one place while something else would break. I realized I was trying to do too many things at once. One system at a time. One step at a time. The server came up. I moved my [code-server][4] over to it, so I could do a wipe and load on my brand new NUC, which decided it wanted to add in on the fun (along with Julie's laptop; Apple friends, call me).

The worst part is that these systems aren't connected in any way. I'm the only consistency here. Yes, I push systems to their limits. But, I'm not superstitious until life gives me a reason to be. I remember rough patches at literally all my jobs. Where things didn't fall my way, it's not so much what you do to get over the hump. The act of getting over it is hard but worth it. Once you're through it, you can go back and write that blog post you originally wanted to finish this weekend, but silicon had different plans for you.

[1]: https://www.merriam-webster.com/dictionary/snakebit
[2]: https://amzn.to/3RmeHfJ
[3]: https://aws.amazon.com/blogs/containers/getting-started-with-eks-anywhere-on-bare-metal/
[4]: https://devopsi.sh/env

## O'Reilly Book on Observability Engineering—Get Yours Free from Honeycomb!

Manage complex cloud-native systems, improve customer experiences, and build & run better software using Honeycomb. Get your FREE copy of [our new O'Reilly book](https://info.honeycomb.io/observability-engineering-oreilly-book-2022?utm_source=devopsish&utm_medium=newsletter&utm_campaign=oreilly_book_observability_engineering_2022&utm_id=oreillybook2022&utm_content=2113) and register for our [Authors' Cut Series](https://www.honeycomb.io/oreilly-observability-engineering/?utm_source=devopsish&utm_medium=newsletter&utm_campaign=oreilly_authors_cut_series_2022&utm_id=oreillyauthorscut&utm_content=2112) to discuss key concepts.

## Events

**Editor's note:** If your event would suit the DevOps'ish audience, please let me know!

[**SCALE 19x**](http://www.socallinuxexpo.org/?source=devopsish)

JULY 28-31, 2022

SCALE is the largest community-run open-source and free software conference in North America. It is held annually in the greater Los Angeles area. This summer it returns to an in person show at the LAX Hilton.

[**ArgoCon**](https://events.linuxfoundation.org/argocon/?source=devopsish)

SEPTEMBER 19 – 21, 2022

ArgoCon is designed to foster collaboration, discussion, and knowledge sharing on the Argo Project, which consists of four projects: Argo CD, Argo Workflows, Argo Rollouts, and Argo Events. This event is aimed at audiences that are new to Argo as well as providing depth to those currently using Argo within their organization. Connect with others that are passionate about Argo and interact with project maintainers. Learn from practitioners about pitfalls to avoid and best practices on how to adopt Argo in your cloud native environment. Get inspired by and provide input to Argo leads on project roadmaps.

[**eBPF Summit**](https://ebpf.io/summit-2022/?source=devopsish)

SEPTEMBER 28 - 29, 2022

eBPF Summit is a virtual event, targeted at DevOps, SecOps, platform architects, security engineers, and developers. Register to save the date and stay updated on event information.

## People

[You Belong Here](https://jpetazzo.github.io/2022/06/30/you-belong-here/)
Jérôme Petazzoni
"To all my LGBT+ friends, peers, and fellow members of the Kubernetes and Cloud Native communities: you do belong here. No matter what others think or say; privately or publicly; you played (and are still playing) a major role in the success of this community."

[Start-Up Funding Falls the Most It Has Since 2019](https://www.nytimes.com/2022/07/07/technology/tech-start-up-funding.html)
Erin Griffith, The New York Times
"The drop was another fallout of rising inflation and widespread economic uncertainty, and a retreat after years of a funding boom."

[Highflying Cyber Firms Cut Staff After Raising Hundreds of Millions of Dollars](https://www.wsj.com/articles/highflying-cyber-firms-cut-staff-after-raising-hundreds-of-millions-of-dollars-11657099801)
David Uberti, WSJ
"Security startups hunker down and stockpile cash as they prepare for a bear market."

[Sources: Unity Laying Off Hundreds Of Staffers [Update]](https://kotaku.com/sources-unity-laying-off-hundreds-of-staffers-1849125482)
Ari Notis, Kotaku
"Unity, the company behind the popular game development engine of the same name, has recently laid off hundreds of staffers"

[Man set up fake ISP to scam low-income people seeking gov't discounts, FCC says](https://arstechnica.com/tech-policy/2022/07/man-set-up-fake-isp-to-scam-low-income-people-seeking-govt-discounts-fcc-says/)
Jon Brodkin, Ars Technica
"[Kyle] Traxler created an entity called Cleo Communications that sought authorization to be a provider in the FCC's Emergency Broadband Benefit (EBB) program, which provided $50 monthly discounts on Internet service and discounts for devices."

[Meet the first graduating class of Apple's developer academy in Detroit](https://www.clickondetroit.com/news/local/2022/06/30/meet-the-first-graduating-class-of-apples-developer-academy-in-detroit/)
Click On Detroit, Evrod Cassimy
"'This is the first time Apple is doing this in North America. To be a part of the first graduating class is really is a great accomplishment,' graduate Aaron Preston said." That's right, Apple did it in Detroit first.

[Systemd Creator Lands At Microsoft](https://www.phoronix.com/scan.php?page=news_item&px=Systemd-Creator-Microsoft)
Michael Larabel, Phoronix
"Yesterday's surprise was that [Lennart Poettering quietly had left Red Hat](https://www.phoronix.com/scan.php?page=news_item&px=Lennart-Poettering-Out-Red-Hat) following a decade and a half there leading PulseAudio among other projects and ultimately going on to start systemd that has fundamentally reshaped modern Linux distributions. It turns out he had joined Microsoft and continuing his work on systemd."

## Process

[The Social Model of Open Source](https://thenewstack.io/the-social-model-of-open-source/)
Emily Omier, The New Stack
"The social model of open source, Ferraioli says, is about understanding the different use cases for open source, as well as providing a framework for determining what appropriate success metrics could be depending on what the project's motivations are."

[OrBit: New Undetected Linux Threat Uses Unique Hijack of Execution Flow](https://www.intezer.com/blog/incident-response/orbit-new-undetected-linux-threat/)
Nicole Fishbein, Intezer
"Unlike other threats that hijack shared libraries by modifying the environment variable LD_PRELOAD, this malware uses 2 different ways to load the malicious library."

[China: MI5 and FBI heads warn of 'immense' threat](https://www.bbc.com/news/world-asia-china-62064506)
Gordon Corera, BBC News
"The heads of UK and US security services have made an unprecedented joint appearance to warn of the threat from China."

[Why Lockdown mode from Apple is one of the coolest security ideas ever](https://arstechnica.com/information-technology/2022/07/introducing-lockdown-from-apple-the-coolest-defense-youll-probably-never-use/)
Dan Goodin, Ars Technica
"Apple intros 'extreme' optional protection against the scourge of mercenary spyware."

[IDC expects cloud spending to surpass noncloud infrastructure for first time this year](https://siliconangle.com/2022/07/04/idc-expects-cloud-infrastructure-spending-surpass-non-cloud-first-time-year/)
Mike Wheatley, SiliconANGLE
"In its latest Worldwide Quarterly Enterprise Infrastructure Tracker: Buyer and Cloud Deployment, IDC said such spending rose 17.2% in the first quarter from a year ago, to $18.3 billion."

## Tools

[10 Awesome Kubernetes Projects for Beginners](https://www.containiq.com/post/kubernetes-projects-for-beginners)
Vyom Srivastava, ContainIQ
This went wild on social media this week. I can see why.

[The trouble with symbolic links](https://lwn.net/SubscriberLink/899303/3affe7bdef85706c/)
Jonathan Corbet, LWN.net
A fascinating discussion about symlinks, scheduling, and energy consumption.

[Is it time to look past Git?](https://dev.to/yonkeltron/is-it-time-to-look-past-git-ah4)
Jonathan E. Magen, DEV Community
I can't fault any of these reasons for yearning for something better, easier, and friendlier than git. Hell, I down right don't like git but literally started using it because I couldn't keep up with changes in the git-mercurial plugin. Yes, I think [Mercurial](https://www.mercurial-scm.org/) is better than git. I'm sad it didn't take off.

[The Latin of Software Code Is Thriving](https://www.nytimes.com/2022/07/06/technology/cobol-jobs.html)
Shira Ovide, The New York Times
"Latin is dead, but old computer programming languages like COBOL live on."

[Infrastructure Self-Service with Crossplane](https://www.innoq.com/en/articles/2022/07/infrastructure-self-service-with-crossplane/)
Sascha Selzer, INNOQ
"Introducing container technology and Kubernetes to the development and deployment process allows developers to independently manage deployments of their services without needing to interact with the platform team. This is true for applications but not necessarily for external resources like databases which are probably still in the hands of the platform team because the access management and tooling differs. Crossplane could fill this gap towards a full self-service capability."

[Private Web based IDE](https://blog.shalman.org/private-web-based-ide/)
Nahum Shalman
A riff on [my dev environment](https://devopsi.sh/env) using fewer components, complete with code.

[Cubernetes](https://www.justingarrison.com/blog/2022-07-06-cubernetes/)
Justin Garrison
It's so pretty.

[How We Built a Cross-Region Caching Library](https://www.wix.engineering/post/how-we-built-a-cross-region-caching-library)
Wix Engineering
"Because of Wix's massive growth over a short period of time, several different developers created different caching solutions to help them reduce the number of HTTP requests and fancy DB queries. But these libraries didn't cover all the needed features and were more of a "halfway" solution. On top of that, different groups used different libraries so it became unhealthy for the organization to keep going like this - we needed an internal caching solution as part of our server infrastructure. "

[h3xduck/TripleCross](https://github.com/h3xduck/TripleCross)
A Linux eBPF rootkit with a backdoor, C2, library injection, execution hijacking, persistence and stealth capabilities

[pocketbase/pocketbase](https://github.com/pocketbase/pocketbase)
Open Source realtime backend in 1 file

### Got a newsletter worthy post?

Have a story for the newsletter? Getting exposure via this newsletter is [a pull request](https://github.com/chris-short/devopsish.com/issues/new/choose) away. Tips is the very first option, click "[Get Started](https://github.com/chris-short/devopsish.com/issues/new?assignees=chris-short&labels=tips&template=TIPS.md&title=%5BTips%5D%3A+)", and send in your shiny, new thing.


text:
![RIDDLE: Race and ethnicity Imputation from Disease history with Deep LEarning (RIDDLE)](https://user-images.githubusercontent.com/9053987/27894953-4aff74e6-61c4-11e7-901a-8a459026b4ee.png)
[![Build Status](https://travis-ci.org/jisungk/RIDDLE.svg?branch=master)](https://travis-ci.org/jisungk/RIDDLE)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/jisungk/riddle/blob/master/LICENSE)

**RIDDLE** (**R**ace and ethnicity **I**mputation from **D**isease history with **D**eep **LE**arning) is an open-source Python2 library for using deep learning to impute race and ethnicity information in anonymized electronic medical records (EMRs). RIDDLE provides the ability to (1) build models for estimating race and ethnicity from clinical features, and (2) interpret trained models to describe how specific features contribute to predictions. The RIDDLE library implements the methods introduced in ["RIDDLE: Race and ethnicity Imputation from Disease history with Deep LEarning"](https://arxiv.org/abs/1707.01623) (arXiv preprint, 2017).

Compared to alternative methods (e.g., scikit-learn/Python, glm/R), RIDDLE is designed to handle large and high-dimensional datasets in a performant fashion. RIDDLE trains models efficiently by running on a parallelized TensorFlow/Theano backend, and avoids memory overflow by preprocessing data in conjunction with batch-wise training.

RIDDLE uses [Keras](https://keras.io) to specify and train the underlying deep neural networks, and [DeepLIFT](https://github.com/kundajelab/deeplift) to compute feature-to-class contribution scores. The current RIDDLE Python module works with both TensorFlow and Theno as the backend to Keras. The default architecture is a deep multi-layer perceptron (deep MLP) that takes binary-encoded features and targets. However, you can specify any neural network architecture (e.g., LSTM, CNN) and data format by writing your own `model_module` files!

### Documentation
Please visit [riddle.ai](https://riddle.ai).

### Dependencies
Python Libraries:
* Keras (`keras`)
* DeepLIFT (`deeplift`, install from GitHub)
* TensorFlow (`tensorflow`) or Theano (`theano`)
* scikit-learn (`sklearn`)
* NumPy (`numpy`)
* SciPy (`scipy`)
* Matplotlib (`matplotlib`)
* h5py (`h5py`)

General:
* HDF5

### Unit testing
Execute the following command in the outer *repository* folder (not `riddle/riddle`):
```
% PYTHONPATH=. pytest
```

### FAQ

#### What's the easiest way to install RIDDLE?

You can clone the GitHub repo and go from there:
```
% git clone --recursive git://github.com/jisungk/riddle.git
```

Alternatively, you can install RIDDLE and DeepLIFT from GitHub using `pip`:
```
% pip install git+git://github.com/kundajelab/deeplift.git # DeepLIFT
% pip install git+git://github.com/jisungk/riddle.git      # RIDDLE
```

#### What is the default format for data files?

Please refer to the example data file `dummy.txt` and the accompanying `README` in the [`_data` directory](https://github.com/jisungk/riddle/tree/master/_data).

### Authors

[Ji-Sung Kim](http://jisungkim.com)
Princeton University
*hello (at) jisungkim.com*

[Andrey Rzhetsky](https://scholar.google.com/citations?user=HXCMYLsAAAAJ&hl=en), Edna K. Papazian Professor
University of Chicago
*andrey.rzhetsky (at) uchicago.edu*

### License & Attribution
All media (including but not limited to designs, images and logos) are copyrighted by Ji-Sung Kim (2017).

Project code (explicitly excluding media) is licensed under the Apache License 2.0. If you would like use or modify this project or any code presented here, please include the [notice](https://github.com/jisungk/riddle/NOTICE) and [license](https://github.com/jisungk/riddle/LICENSE) files, and cite:
```
@article{KimJS2017RIDDLE,
  title={RIDDLE: Race and ethnicity Imputation from Disease history with Deep LEarning},
  author={Kim, Ji-Sung and Rzhetsky, Andrey},
  journal={arXiv preprint arXiv:1707.01623},
  year={2017}
}
```


text:
Give it a try.

:s/foo/bar/g 	Change each 'foo' to 'bar' in the current line.
:%s/foo/bar/g 	Change each 'foo' to 'bar' in all the lines.

```bash
$ vim --bar
```

See `man vim` for more details.
#	Search and replace in multiple buffers
	Often search and replace is needed in multiple files.
	This tip uses the procedures from run a command in multiple buffers
	to show how a substitute may be executed multiple times
	using :argdo (all files in argument list),
	or :bufdo (all buffers),
	or :tabdo (all tabs),
	:windo (all windows in the current tab),
	or :cdo (all files listed in the quickfix list).
	All buffers
	:bufdo %s/pattern/replace/ge | update
	All windows
	:sball
	<C-w>
	:windo %s/pattern/replace/ge 	Search and replace in all visible windows.
	 All files in a tree
	:arg *.cpp 	All *.cpp files in current directory.
	:argadd *.h 	And all *.h files.
	:arg 	Optional: Display the current arglist.
	:argdo %s/pattern/replace/ge | update 	Search and replace in all files in arglist
	:arg **/*.cpp 	All *.cpp files in and below current directory.
	:argadd **/*.h 	And all *.h files

	把文中的所有字符串“abc……xyz”替换为“xyz……abc”可以有下列写法
	:%s/abc\(.*\)xyz/xyz\1abc/g
	:%s/\(abc\)\(.*\)\(xyz\)/\3\2\1/g

repository: biezuofei/Daily-learning-records

repo_name: biezuofei/Daily-learning-records


text:
# Bridge.js
Bridge.js is an ES6 module designed to enable seamless functionality between networked applications by creating a transparent exchange layer on top of websockets
to act as a shared state object. This is done by utilizing Javascript proxy objects to intercept property assignment and sync the assigned values between networked instances. Bridge.js can be used in an arbitraty network topology by registering multiple nodes to each other.

## Functional Theory
A bridge node is created in each application after creating a websocket connection between the applications. Bridge.js does not handle the websocket connections, only acting as a framework to maintain a synced state. After establishing a websocket connection, the websocket object is registered with the bridge node and assigned a unique node ID for identification within the network. When a mutation is made to the bridge state object, the mutated property is first changed locally on the node, then a JSON message is sent to all registered bridge nodes. When a message is recieved by a bridge node, it is acted on locally before forwarding the message to all other registered bridge nodes. Each node appends it's node ID to the message to prevent reflections
and loops within the network topology. If a message has already been processed by a node, it will ignore the message if it receives it again.

Bridge.js is capable of syncing the following Javascript features:
*  Primitive assigment
*  Function assigment and calls
*  Events
*  *Values other than primitives are not yet supported*

### Primitive Assignment
Bridge.js utilizes javascript proxy objects to override the default behavior of some operators, primarily the assignment operator `=`.
when a primitive value is assigned to a state object property, *e.g.*

`bridge.state.foo = 'bar'`

the state object first assigns the string primitive `'bar'` to `state.foo` locally. Then a primitive-set message is sent to all registered nodes which interpret the message and assign the value locally before passing the message along. This method ensures that state properties stay consistent across the entire network.

### Function Assignment
When a function is assigned to a state property *e.g.*

`bridge.state.exampleFunction = function(a,b){ return a+b }`

like primitive assignment, the state object assigns the function locally and then passes a function-set message to the other registered nodes along with metadata containing the ID of the origin node. When a node receives a function-set message, the node creates a proxy function on its state object that sends a function-call message to the network requesting the function to be called on the origin node.

### Function Calls
when a function is called on a node's state object. It first checks if it is the origin node for the function. If so, it calls the function normally and returns the result. If the node is not the function origin, the called function returns a promise object that will be resolved when the network returns the function result from the origin. The remote function call is put into a queue containing the promise object and a unique call ID. a function-call message is then sent to the network containing the function call arguments, the call requester ID and the function origin ID. When the function origin node receives the function-call message, It tries to run the function locally and then sends a message back to the requester through the network containing either the return value or an error message.

### Events
Bridge.js extends the default functionality of an `EventEmitter` by sending an event message to the network so that any event handlers registered to a node on the network will respond to an event emitted from any node on the network.

## Example
#### Server
```
import { Bridge } from '@groffta/bridgejs'
const ws = require('ws')

let bridge = new Bridge()

// Create shared function on the bridge state object
bridge.state.hello = function(){
  console.log('Hello BridgeJS!')
  return 'foobar'
}

// Register event listener for customEventName
bridge.on('customEventName', function(){
  console.log(bridge.state.foo)
})

// Wait for websocket connections and register them to the bridge
let wsServer = new ws.Server({ port: 9999 })
wsServer.on('connection', function(websocket){
  bridge.register(websocket)
})
```

#### Client
```
import { Bridge } from '@groffta/bridgejs'
let bridge = new Bridge()

// Create a websocket connection to the server
let ws = new WebSocket('ws://serverURL:9999/')

ws.onopen = function() {
  bridge.register(ws)
  bridge.state.foo = 'bar'
  bridge.emit('customEventName')
  bridge.state.hello().then(function(response){
    console.log(response)
  })
}
```

**Server Console:**
```
> 'bar'
> Hello BridgeJS!
```
**Client Console:**
```
> foobar
```

repository: groffta/bridgejs

repo_name: groffta/bridgejs


text:
# RecyclerView
The `RecyclerView` class supports the display of a collection of data. You supply the data and define how each item looks, and the RecyclerView library dynamically creates the elements when they're needed.

`RecyclerView` *recycles* those individual elements. When an item scrolls off the screen, `RecyclerView` doesn't destroy its view. Instead, `RecyclerView` reuses the view for new items that have scrolled onscreen. This reuse vastly improves performance, improving your app's responsiveness and reducing power consumption.

## Key classes

Several different classes work together to build your dynamic list.
- `RecyclerView` is the `ViewGroup` that contains the views corresponding to your data. It's a view itself, so you add `RecyclerView` into your layout the way you would add any other UI element.
- Each individual element in the list is defined by a *view holder* object. When the *view holder* is created, it doesn't have any data associated with it. After the view holder is created, the `RecyclerView` binds it to its data. You define the view holder by extending `RecyclerView.ViewHolder`.
- The `RecyclerView` requests those views, and binds the views to their data, by calling methods in the *adapter*. You define the adapter by extending `RecyclerView.Adapter`.
- The *layout manager* arranges the individual elements in your list. You can use one of the layout managers provided by the RecyclerView library, or you can define your own. Layout managers are all based on the library's `LayoutManager` abstract class.

## Steps for implementing your RecyclerView
- Decide what the list or grid is going to look like. Ordinarily you'll be able to use one of the RecyclerView library's standard layout managers.
- Design how each element in the list is going to look and behave. Based on this design, extend the `ViewHolder` class. Your version of `ViewHolder` provides all the functionality for your list items. Your view holder is a wrapper around a `View`, and that view is managed by `RecyclerView`.
- Define the `Adapte`r that associates your data with the `ViewHolder` views.

## Modifying the layout
The `RecyclerView` uses a layout manager to position the individual items on the screen and determine when to reuse item views that are no longer visible to the user. To reuse (*or recycle*) a view, a layout manager may ask the adapter to replace the contents of the view with a different element from the dataset. Recycling views in this manner improves performance by avoiding the creation of unnecessary views or performing expensive `findViewById()` lookups. The Android Support Library includes three standard layout managers, each of which offers many customization options:
- `LinearLayoutManager` arranges the items in a one-dimensional list. Using a `RecyclerView` with `LinearLayoutManager` provides functionality like the older `ListView` layout.
- `GridLayoutManager` arranges the items in a two-dimensional grid, like the squares on a checkerboard. Using a `RecyclerView` with `GridLayoutManager` provides functionality like the older `GridView` layout.
- `StaggeredGridLayoutManager` arranges the items in a two-dimensional grid, with each column slightly offset from the one before, like the stars in an American flag.

If none of these layout managers suits your needs, you can create your own by extending the `RecyclerView.LayoutManager` abstract class.

## Implementing your adapter and view holder
Once you've determined your layout, you need to implement your `Adapter` and `ViewHolder`. These two classes work together to define how your data is displayed. The `ViewHolder` is a wrapper around a `View` that contains the layout for an individual item in the list. The `Adapter` creates `ViewHolder` objects as needed, and also sets the data for those views. The process of associating views to their data is called *binding*.

When you define your adapter, you need to override three key methods:
- `onCreateViewHolder()`: `RecyclerView` calls this method whenever it needs to create a new `ViewHolder`. The method creates and initializes the `ViewHolder` and its associated `View`, but does not fill in the view's contents—the `ViewHolder` has not yet been bound to specific data.
- `onBindViewHolder()`: `RecyclerView` calls this method to associate a `ViewHolder` with data. The method fetches the appropriate data and uses the data to fill in the view holder's layout. For example, if the `RecyclerView` dislays a list of names, the method might find the appropriate name in the list and fill in the view holder's `TextView` widget.
- `getItemCount()`: `RecyclerView` calls this method to get the size of the data set. For example, in an address book app, this might be the total number of addresses. `RecyclerView` uses this to determine when there are no more items that can be displayed.

Here's a typical example of a simple adapter with a nested `ViewHolder` that displays a list of data (Kotlin):
```
class CustomAdapter(private val dataSet: Array<String>) :
        RecyclerView.Adapter<CustomAdapter.ViewHolder>() {

    /**
     * Provide a reference to the type of views that you are using
     * (custom ViewHolder).
     */
    class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
        val textView: TextView

        init {
            // Define click listener for the ViewHolder's View.
            textView = view.findViewById(R.id.textView)
        }
    }

    // Create new views (invoked by the layout manager)
    override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): ViewHolder {
        // Create a new view, which defines the UI of the list item
        val view = LayoutInflater.from(viewGroup.context)
                .inflate(R.layout.text_row_item, viewGroup, false)

        return ViewHolder(view)
    }

    // Replace the contents of a view (invoked by the layout manager)
    override fun onBindViewHolder(viewHolder: ViewHolder, position: Int) {

        // Get element from your dataset at this position and replace the
        // contents of the view with that element
        viewHolder.textView.text = dataSet[position]
    }

    // Return the size of your dataset (invoked by the layout manager)
    override fun getItemCount() = dataSet.size

}
```

The layout for the each view item is defined in an XML layout file, as usual. In this case, the app has a `text_row_item.xml` file like this:
```
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="@dimen/list_item_height"
    android:layout_marginLeft="@dimen/margin_medium"
    android:layout_marginRight="@dimen/margin_medium"
    android:gravity="center_vertical">

    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/element_text"/>
</FrameLayout>
```

# Links
https://developer.android.com/guide/topics/ui/layout/recyclerview
https://developer.android.com/guide/topics/ui/layout/recyclerview-custom

# Next questions
[How does RecyclerView differ from ListView](https://github.com/Kirchhoff-/Android-Interview-Questions/blob/recyclerview/Android/How%20does%20RecyclerView%20differ%20from%20ListView.md)

repository: Kirchhoff-/Android-Interview-Questions

path: /Android/What's RecyclerView.md

filename: What's RecyclerView.md

repo_name: Kirchhoff-/Android-Interview-Questions


text:
# react-stateful-fn - Functional *stateful* components

[![Build Status](https://travis-ci.org/andywer/react-stateful-fn.svg?branch=master)](https://travis-ci.org/andywer/react-stateful-fn)
[![NPM Version](https://img.shields.io/npm/v/react-stateful-fn.svg)](https://www.npmjs.com/package/react-stateful-fn)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)

> ⚠ This repository is archived. Use React hooks instead.

Functional components are considered best practice in React, but as soon as we need local component state we cannot use them. Let's fix that!

What this package provides:

- [x] setState for functional components
- [x] No need to bind component methods
- [x] Optimized for performance
- [x] Extremely small: < 1kB (gzipped + minified)
- [x] Zero dependencies

## Installation

```sh
npm install react-stateful-fn
# or
yarn add react-stateful-fn
```

## Usage

Let's have a look at everyone's favorite sample code: A simple counter widget.

```js
import stateful from 'react-stateful-fn'

const increase = () => state => ({ clicks: state.clicks + 1 })

const Counter = (props, state, { setState }) => (
  <div>
    <div>Clicked {state.clicks} times</div>
    <button onClick={() => setState(increase())}>Increase +</button>
  </div>
)

export default stateful(Counter, { clicks: 0 })
```

As you can see, functional stateful components are good friends with [functional setState](https://medium.freecodecamp.com/functional-setstate-is-the-future-of-react-374f30401b6b).

### Optimizing

If you care about performance you will not be completely happy with the previous example:

The button's `onClick` handler is an arrow function defined in the functional component. Thus it will be a new function on every render and will cause the child component to re-render every time.

Let's fix that:

```js
import stateful from 'react-stateful-fn'

const increase = () => state => ({ clicks: state.clicks + 1 })

const Counter = (props, state) => (
  <div>
    <div>Clicked {state.clicks} times</div>
    <button onClick={props.onClick}>Increase +</button>
  </div>
)

export default stateful(Counter, { clicks: 0 }, {
  onClick: event => ({ setState }) => setState(increase())
})
```

We can wire props and setState together outside the function, similar to Redux' `connect()`.
The handlers defined here will be passed to the component as props.

If such handlers return a function (as seen above) then this function will be called with the `{ setState }` object, allowing you to update the state according to the event.

## Forms

Forms can be quite an elaborate business in React. Fortunately, stateful functional components turn out to be a convenient approach to create forms easily.

```js
import stateful from 'react-stateful-fn'

/**
 * Use as:
 *
 * <LoginForm onLogin={(email, password) => { ... }} />
 */
const LoginForm = (props, state) => (
  <form>
    <input type='email' placeholder='Email' value={state.email} onChange={props.onEmailChange} />
    <input type='password' placeholder='Password' value={state.password} onChange={props.onPasswordChange} />
    <button type='submit' onClick={props.onSubmitClick}>Login</button>
  </form>
)

const initialState = {
  email: '',
  password: ''
}

export default stateful(LoginForm, initialState, {
  onEmailChange: event => ({ setState }) => setState({ email: event.target.value }),
  onPasswordChange: event => ({ setState }) => setState({ password: event.target.value }),
  onSubmitClick: event => (_, props, state) => props.onLogin(state.email, state.password)
})
```

## API

### stateful(component: Function, initialState: ?Object, propHandlers: ?Object): Function

Make a functional component stateful. Wraps the component with a thin `React.Component` class and takes care to minimize the work done in `render()` to optimize performance.

#### component

This is supposed to be a functional React component. You can use any ordinary functional component. The difference to a stateless component are the additional parameters.

The component will be called with the parameters `(props: Object, state: Object, { setState: Function })`.

#### initialState *(optional)*

Pass a custom initial state here. Otherwise it will default to `{}`.

#### propHandlers *(optional)*

Use `propHandlers` to pass stateful event handlers as props to the component. Useful to avoid arrow function event handlers which are considered bad practice.

If a property of `propHandlers` is not a function it will be added to the component's props as it is.

If a `propHandlers` handler returns a function this function will be called with the parameters `({ setState }, props, state)`.

## See also

Another great tool for writing functional React components is [recompose](https://github.com/acdlite/recompose). Use its [withContext()](https://github.com/acdlite/recompose/blob/master/docs/API.md#withcontext) if you need stateful functional components with access to the context. It also comes with [withState()](https://github.com/acdlite/recompose/blob/master/docs/API.md#withstate) which allows you to write stateful functional components like this package does.

`Recompose` allows you to compose functional components very nicely, including the component state. Beware that you will *have to* compose the component state and end up having X stateful components under the hood if you need X different properties in a component's state. That might decrease performance.

## License

MIT

repository: andywer/react-stateful-fn

repo_name: andywer/react-stateful-fn


text:
# Reading 42

## Readings: Tying it all together

## Deploying NextJs

Deployment
Vercel (Recommended)
The easiest way to deploy Next.js to production is to use the Vercel platform from the creators of Next.js. Vercel is an all-in-one platform with Global CDN supporting static & Jamstack deployment and Serverless Functions.

Link is here:

https://nextjs.org/docs/deployment

https://www.elephantsql.com/

https://devcenter.heroku.com/articles/build-docker-images-heroku-yml