text:
# Capstone - Zillow House Price Prediction

## Overview
Zillow is an online real estate database company founded in 2006 that provides an estimate system called Zestimate. The Zestimate system utilizes 7.5 million statistical and machine learning models to analyze various data points on each property, determining the price value for any given house. Kaggle participants will develop an algorithm that makes predictions about the future sale prices of homes.

More information about this contest: https://www.kaggle.com/competitions/zillow-prize-1/overview

## Problem Statement
In this data science project, the task is to build a machine learning model based on the residuals of the Zestimate system. The target variable given in the dataset is the log-transformed error between the predicted price and the actual price of houses.

$$Log error = \log(\text{Predicted price}) - \log(\text{Actual Price})$$

## Data
The project uses two main datasets:
1. Transaction data - 2016: This file contains information on all the houses sold in 2016 across the state of California and the corresponding log error made by the Zestimate system.
2. Property data (27 million): This file includes details about the properties, such as mortgage records, tax assessments, physical features of the property (bed count, living area, age of the building), and location details.

## Exploratory Data Analysis
EDA involves understanding the data using various visualization techniques.

- Serious missing value probelm: 35% of the attributes are missing more than 90% of values.

- Location analysis

- Heatmap to explore correlation

Refer to the EDA Jupyter notebook file attached for a detailed analysis.

## Impute Missing Values
A major challenge in dealing with the data was the high percentage of missing attributes (35% with more than 90% missing values). We use Knn Imputation (Euclidean distance) to handle the missing values:
Knn Imputation (Euclidean distance)
1. Imputation after join operation -90k
2. Using KNN classifier and regressor to find better neighbors to impute

## Feature Engineering
Feature engineering involved creating new variables using variable interaction and feature selection using different approaches:

New features using variable interaction:
- Total rooms = bath_count + bedroom_count
- Average room size = total_finished_living_area_sqft / roomcnt
- Ratio of structure tax to land tax = structure_tax / land_tax
- ExtraSpace = lot_area_sqft - total_finished_living_area_sqft

Feature Selection & Dimensionality Reduction:
- Recursive Feature Elimination (RFE)

- XgBoost feature importance (Information Gain & Gini Index)

- TreeRegressor feature importance (Information Gain & Gini Index)

- Principal Component Analysis (PCA)

Result of Dimensionality Reduction:

## Model Building & Fine Tuning
We will use Linear regression, Ridge regression, Gradient boosting decision tree tuned with gridsearchcv to conduct classification task. They are conducted based on four groups of attributes selected by feature engineering: rfe_selection, xgboost_selelction, tree_selection, pca_selection respectively.
The whole data is divided into train 90% and test 10%, models are built on train data using cross-validation techniques.

## Results

The models' performance on different imputation approaches and PCA are as follows:

For each selection, Ridge regression has the lowest MAE.

## Inferences and Future Improvements
- The main challenge was building the model based on the residuals of a powerful machine learning model (Zestimate system).
- The amount of missing information in each attribute also contributed to the model's limitations.
- Hardware limitations prevented building an imputation model using all 27 million records.
- Exploring different imputation techniques and leveraging xgboost's inbuilt ability to handle missing values could be potential future improvements.
- Further investigation is needed to improve the linear regression model's R squared value, which suggests it couldn't effectively explain the underlying data.


text:
# DSA learning and practice

![Language](https://img.shields.io/badge/Language-C++-red.svg?style=for-the-badge)
![License](https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge)
![Update](https://img.shields.io/badge/Update-daily-purple.svg?style=for-the-badge)
![Problems](https://img.shields.io/badge/Problems-189-brown.svg?style=for-the-badge)

Please use the discussions tab for any queries.

Use the index given below to search for problems and solutions. Problems are arranged in non-descending order of difficulty.

## 💢 Index
### Theory
* [Introduction](#-Introduction)

* [Big-O Notation](#-the-big-o-notation)

### Data Structures
* [Arrays](#-arrays)

* [Linked Lists](#-linked-lists)

* [Stacks](#-stacks)

* [Tree](#-tree)

* [Trie (Prefix tree)](#-trie)

### Algorithms
* [Dynamic programming](#-dynamic-programming)

* [Binary Search](#-binary-search)

* [Depth First Search](#-depth-first-search)

* [Strings](#-strings)

* [Two pointers](#-two-pointers)

### Extra
* [Miscellaneous/Uncategorized Problems](#-miscellaneous-problems)

## 💢 Introduction
### What is data structure(DS)?
A way of organizing data, so it can be used effectively.

### Why do we use them?
* To create fast and powerful algorithms
* To make code easier for understanding

### What is abstract data type(ADT)?
An abstraction of a DS which provides only an interface. An interface is not specific to any programming language, instead, it's completely free of all of them.

ADTs are implemented using data structures.

Some examples are :

|  #  | ADT        |  Implementation(DS) |
|:-----:| --------------- | -----------  |
|  1  | Lists | Dynamic Array
 Linked List |
|  2  | Queue | Array based queue
 Stack based queue
 Linked List based queue |
|  3  | Maps | Hash table
 Tree |

## 💢 The Big-O Notation
### What is Big-O and why do we use it?
Big-O notation helps us identify the time and space complexity of an algorithm. There are many other notations as well, like, Big-Theta, or, Big-Omega, but we use Big-O because it deals with the worst case scenario of an algorithm, i.e., when the size of input tends to infinity.

Size of input is denoted by 'n'.

### Ascending order of complexity :

|  #  | Notation        |  Name        |  Example (time)   |
|:-----:|---------------| -----------  | ----------- |
|  1  |  O (1)          | Constant     | Accessing an array |
|  2  |  O (log n)      | Logarithmic  | Binary search |
|  3  |  O (n)          | Linear       | Traversing an array |
|  4  |  O (n log n)    | Linearithmic | Merge sort |
|  5  |  O (n^2)        | Quadratic    | 2 Nested loops |
|  6  |  O (n^3)        | Cubic        | 3 Nested loops |
| ... |  |  |  |
|  7  |  O (nm)         | O of n m     | Iterating over a matrix of (n X m) |
| ... |  |  |  |
|  8  |  O (b^n)        | Exponential  | All subsets of a set -> O (2^n) |
|  9  |  O (n!)         | Factorial    | All permutations of a string |

    ⬆ Back to Top

## 💢 Arrays
### Property
Each and every element is indexable(can be referenced with a number) from range 0 to n-1. 'n' is the size of array.

Used :-

* for sorting
* to access sequential data
* as buffer by I/O routines
* as lookup / inverse lookup tables
* to return multiple values from a function
* as *cache* in dynamic programming

### Types
♦*Static* : fixed length

♦*Dynamic* : variable length; implemented using static array; when size capacity is reached, a new static array of double size is created and elements are copied.

### Problems on arrays
Key : 🟢 Easy, 🟡 Medium, 🔴 Hard

![Count](https://img.shields.io/badge/Count-78-brown.svg?style=for-the-badge)

|  ID   | Title |  Solution  |  Time  |    Space     |  Difficulty  |  Tags | Note |
|:-----:|-------|:----------:|:------:|:------------:|:------------:|-------|------|
|1929  | [Concatenation of array](https://leetcode.com/problems/concatenation-of-array) | [C++](./C++/1929.cpp) |||🟢|||
|1920  | [Build array from permutation](https://leetcode.com/problems/build-array-from-permutation) | [C++](./C++/1920.cpp) |||🟢|||
|1480  | [Running sum of 1D array](https://leetcode.com/problems/running-sum-of-1d-array) | [C++](./C++/1480.cpp) |||🟢|||
|1672  | [Richest customer wealth](https://leetcode.com/problems/richest-customer-wealth) | [C++](./C++/1672.cpp) |||🟢||matrix|
|0566  | [Reshape the matrix](https://leetcode.com/problems/reshape-the-matrix) | [C++](./C++/0566.cpp) |||🟢|||
|1470  | [Shuffle the array](https://leetcode.com/problems/shuffle-the-array) | [C++](./C++/1470.cpp) |||🟢|||
|1431  | [Kids with greatest number of candies](https://leetcode.com/problems/kids-with-the-greatest-number-of-candies) | [C++](./C++/1431.cpp)|||🟢|||
|1512  | [Number of good pairs](https://leetcode.com/problems/number-of-good-pairs) | [C++](./C++/1512.cpp) |||🟢||bruteforce,
 hash table|
|1365  | [How many numbers are smaller than current number](https://leetcode.com/problems/how-many-numbers-are-smaller-than-the-current-number) | [C++](./C++/1365.cpp) |||🟢| |frequency array|
|0706  | [Design hashmap](https://leetcode.com/problems/design-hashmap) | [C++](./C++/0706.cpp) |||🟢|||
|1528  | [Shuffle string](https://leetcode.com/problems/shuffle-string) | [C++](./C++/1528.cpp) |||🟢|||
|0136  | [Single number](https://leetcode.com/problems/single-number) | [C++](./C++/0136.cpp) |||🟢|||
|1720  | [Decode XORed array](https://leetcode.com/problems/decode-xored-array) | [C++](./C++/1720.cpp) |||🟢||XOR property|
|0169  | [Majority element](https://leetcode.com/problems/majority-element) | [C++](./C++/0169.cpp) |||🟢||Moore's Voting algo|
|1313  | [Decompress run-length encoded list](https://leetcode.com/problems/decompress-run-length-encoded-list) | [C++](./C++/1313.cpp) |O(n^2)||🟢|||
|1389  | [Create taget array in the given order](https://leetcode.com/problems/create-target-array-in-the-given-order) | [C++](./C++/1389.cpp) |O(n)||🟢|||
|1773  | [Count items maching a rule](https://leetcode.com/problems/count-items-matching-a-rule) | [C++](./C++/1773.cpp) |||🟢|||
|1588  | [Sum of all odd length arrays](https://leetcode.com/problems/sum-of-all-odd-length-subarrays) | [C++](./C++/1588.cpp) |||🟢|||
|0118  | [Pascal's triangle](https://leetcode.com/problems/pascals-triangle) | [C++](./C++/0118.cpp) |||🟢|||
|0119  | [Pascal's triangle II](https://leetcode.com/problems/pascals-triangle-ii) | [C++](./C++/0119.cpp) |||🟢|||
|1656  | [Design an ordered stream](https://leetcode.com/problems/design-an-ordered-stream) | [C++](./C++/1656.cpp) |||🟢|||
|1662  | [Check if two atring arrays are equivalent](https://leetcode.com/problems/check-if-two-string-arrays-are-equivalent) | [C++](./C++/1662.cpp) |||🟢|||
|1684  | [Count the number of consistent strings](https://leetcode.com/problems/count-the-number-of-consistent-strings) | [C++](./C++/1684.cpp) |||🟢|||
|1913  | [Maximum product difference between two pairs](https://leetcode.com/problems/maximum-product-difference-between-two-pairs) | [C++](./C++/1913.cpp) |O(nlogn),
O(n)||🟢|||
|1816  | [Truncate sentence](https://leetcode.com/problems/truncate-sentence) | [C++](./C++/1816.cpp) |||🟢|||
|1979  | [Find greatest common divisor of array](https://leetcode.com/problems/find-greatest-common-divisor-of-array) | [C++](./C++/1979.cpp) |||🟢|||
|1629  | [Slowest key](https://leetcode.com/problems/slowest-key) | [C++](./C++/1629.cpp) |||🟢|||
|0217  | [Contains duplicate](https://leetcode.com/problems/contains-duplicate) | [C++](./C++/0217.cpp) |O(n)||🟢|||
|0001  | [Two Sum](https://leetcode.com/problems/two-sum/) | [C++](./C++/0001.cpp) |O(n)|O(1)|🟢| | hash table|
|0026  | [Remove duplicates from sorted array](https://leetcode.com/problems/remove-duplicates-from-sorted-array) | [C++](./C++/0026.cpp) |      |   |🟢|||
|0888  | [Fair candy swap](https://leetcode.com/problems/fair-candy-swap) | [C++](./C++/0888.cpp) |||🟢|||
|0350  | [Intersection of two arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii) | [C++](./C++/0027.cpp) |||🟢|||
|0121  | [Best time to buy and sell stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock) | [C++](./C++/0121.cpp) |||🟢|||
|0027  | [Remove Element](https://leetcode.com/problems/remove-element) | [C++](./C++/0027.cpp) |||🟢|||
|0744  | [Find smallest letter greater than target](https://leetcode.com/problems/find-smallest-letter-greater-than-target) | [C++](./C++/0744.cpp) |O(logn)||🟢|||
|0053  | [Maximum subarray](https://leetcode.com/problems/maximum-subarray) | [C++](./C++/0053.cpp) |||🟢||Kadane's algorithm|
|0066  | [Plus One](https://leetcode.com/problems/plus-one) | [C++](./C++/0066.cpp) |||🟢|||
|0088  | [Merge sorted array](https://leetcode.com/problems/merge-sorted-array) | [C++](./C++/0088.cpp) |||🟢|||
|0645  | [Set mismatch](https://leetcode.com/problems/set-mismatch) | [C++](./C++/0645.cpp) |||🟢|||
|0414  | [Third maximum number](https://leetcode.com/problems/third-maximum-number) | [C++](./C++/0414.cpp) |||🟢|||
|1909  | [Remove one element to make array strictly increasing](https://leetcode.com/problems/remove-one-element-to-make-the-array-strictly-increasing) | [C++](./C++/1909.cpp) |||🟢|||
|0075  | [Sort colors](https://leetcode.com/problems/sort-colors) | [C++](./C++/0075.cpp) |||🟡|||
|0056  | [Merge intervals](https://leetcode.com/problems/merge-intervals) | [C++](./C++/0056.cpp) |||🟡|||
|0442  | [Find all duplicates in an array](https://leetcode.com/problems/find-all-duplicates-in-an-array) | [C++](./C++/0442.cpp) |||🟡||sort,
hash maps,
logic|
|0540  | [Single element in a sorted array](https://leetcode.com/problems/single-element-in-a-sorted-array) | [C++](./C++/0540.cpp) |||🟡|||
|1814  | [Count nice pairs](https://leetcode.com/problems/count-nice-pairs-in-an-array) | [C++](./C++/1814.cpp) |||🟡|||
|0215  | [K-th largest element in an array](https://leetcode.com/problems/kth-largest-element-in-an-array) | [C++](./C++/0215.cpp) |||🟡|||
|0015  | [3Sum](https://leetcode.com/problems/3sum) | [C++](./C++/0015.cpp) |||🟡|||
|0018  | [4Sum](https://leetcode.com/problems/4sum) | [C++](./C++/0018.cpp) |||🟡|||
|0039  | [Combination sum](https://leetcode.com/problems/combination-sum) | [C++](./C++/0039.cpp) |||🟡|||
|0048  | [Rotate image](https://leetcode.com/problems/rotate-image) | [C++](./C++/0048.cpp) |||🟡|||
|1052  | [Grumpty bookstore owner](https://leetcode.com/problems/grumpy-bookstore-owner) | [C++](./C++/1052.cpp) |||🟡|||
|0040  | [Combination sum II](https://leetcode.com/problems/combination-sum-ii) | [C++](./C++/0040.cpp) |||🟡|||
|0667  | [Beautiful arrangement II](https://leetcode.com/problems/beautiful-arrangement-ii) | [C++](./C++/0667.cpp) |||🟡|||
|0074  | [Search a 2D matrix](https://leetcode.com/problems/search-a-2d-matrix)| [C++](./C++/0074.cpp) |||🟡|||
|1823  | [Find the inner of the circular game](https://leetcode.com/problems/find-the-winner-of-the-circular-game)| [C++](./C++/1823.cpp) |||🟡|||
|0152  | [Maximum product subarray](https://leetcode.com/problems/maximum-product-subarray) | [C++](./C++/0152.cpp) |||🟡|||
|0309  | [Best time to buy and sell stock with cooldown](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/)| [C++](./C++/0309.cpp) |||🟡|||
|0036  | [Valid sudoku](https://leetcode.com/problems/valid-sudoku) | [C++](./C++/0036.cpp) |||🟡||hash maps, or
2D array|
|0011  | [Container with most water](https://leetcode.com/problems/container-with-most-water) | [C++](./C++/0011.cpp) |||🟡|||
|0204  | [Count primes](https://leetcode.com/problems/count-primes) | [C++](./C++/0204.cpp) |||🟡|||
|0128  | [Longest consecutive sequence](https://leetcode.com/problems/longest-consecutive-sequence) | [C++](./C++/0128.cpp) |||🟡|||
|0034  | [Find first and last position of element in sorted array](https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array) | [C++](./C++/0034.cpp) |||🟡|||
|0950  | [Reveal cards in increasing order](https://leetcode.com/problems/reveal-cards-in-increasing-order) | [C++](./C++/0950.cpp) |||🟡|||
|1343  | [Number of sub-arrays of size k and average greater than or equal to threshold](https://leetcode.com/problems/number-of-sub-arrays-of-size-k-and-average-greater-than-or-equal-to-threshold) | [C++](./C++/1343.cpp) |||🟡|||
|0078  | [Subsets](https://leetcode.com/problems/subsets) | [C++](./C++/0078.cpp) |||🟡|||
|0090  | [Subsets II](https://leetcode.com/problems/subsets-ii) | [C++](./C++/0090.cpp) |||🟡|||
|0046  | [Permutations](https://leetcode.com/problems/permutations) | [C++](./C++/0046.cpp) |||🟡|||
|0047  | [Permutations II](https://leetcode.com/problems/permutations-ii) | [C++](./C++/0047.cpp) |||🟡|||
|1248  | [Count number of nice subarrays](https://leetcode.com/problems/count-number-of-nice-subarrays) | [C++](./C++/1248.cpp) |||🟡|||
|0033  | [Search in sorted array](https://leetcode.com/problems/search-in-rotated-sorted-array) | [C++](./C++/0033.cpp) |||🟡|||
|0523  | [Continuous subarray sum](https://leetcode.com/problems/continuous-subarray-sum) | [C++](./C++/0523.cpp) |||🟡|||
|0031  | [Next permutation](https://leetcode.com/problems/next-permutation) | [C++](./C++/0031.cpp) |||🟡|||
|0287  | [Find the duplicate number](https://leetcode.com/problems/find-the-duplicate-number) | [C++](./C++/0287.cpp) |||🟡|||
|0154  | [Find minimum in rotated sorted array II](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii) | [C++](./C++/0154.cpp) |||🔴|||
|0239  | [Sliding window maximum](https://leetcode.com/problems/sliding-window-maximum) | [C++](./C++/0239.cpp) |||🔴|||
|0004  | [Median of two sorted arrays](https://leetcode.com/problems/median-of-two-sorted-arrays) | [C++](./C++/0004.cpp) |||🔴||binary search,
careful of bounds|
|0992  | [Subarrays with k different integers](https://leetcode.com/problems/subarrays-with-k-different-integers) | [C++](./C++/0992.cpp) |||🔴|||

    ⬆ Back to Top

## 💢 Linked Lists
### What is it?
A sequential list of data holding nodes that point to other nodes.

### Uses
* Stack, queue, list, circular list implementation
* Adjancy list for graphs
* Separate chaining to deal with hashing collisions

### Properties
__Node__ : contains data and pointer

__Pointer__ : reference to another node

__Head__ : first node in the list

__Tail__ : last node in the list

### Types
* Singly linked list : reference to next node only

* Doubly linked list : reference to next and previous nodes

| Type | Pros       | Cons        |
|-----| --------------- | -----------  |
|  Singly  |  Less memory usage,
 Simple implementation | Difficult to access previous element    |
|  Doubly  |  Backward traversal possible          | Takes much more memory
 (Pointers can take lot of memory) |

### Complexity Analysis
| Action | Singly LL | Doubly LL  |
|-----|:---------------:|:-----------:|
| Search | O (n) | O (n) |
| Insert at head | O (1) | O (1) |
| Insert at tail | O (1) | O (1) |
| Remove at head | O (1) | O (1) |
| Remove at tail | O (n) | O (1) |
| Remove in between | O (n) | O (n) |

### Problems on linked lists
![Count](https://img.shields.io/badge/Count-23-brown.svg?style=for-the-badge)

|  ID   | Title |  Solution  |  Time  |    Space     |  Difficulty  |  Tags | Note |
|:-----:|-------|:----------:|:------:|:------------:|:------------:|-------|------|
| 1290 | [Convert binary number in a linked list to integer](https://leetcode.com/problems/convert-binary-number-in-a-linked-list-to-integer) | [C++](./C++/1290.cpp) |||🟢||Bruteforce|
| 0876 | [Middle of the linked list](https://leetcode.com/problems/middle-of-the-linked-list) | [C++](./C++/0876.cpp) |||🟢||Bruteforce|
| 0237 | [Delete node in a linked list](https://leetcode.com/problems/delete-node-in-a-linked-list) | [C++](./C++/0237.cpp) |||🟢|||
| 0206 | [Reverse linked list](https://leetcode.com/problems/reverse-linked-list) | [C++](./C++/0206.cpp) |||🟢|||
| 0705 | [Design HashSet](https://leetcode.com/problems/design-hashset) | [C++](./C++/0705.cpp) |||🟢|||
| 0021 | [Merge two sorted lists](https://leetcode.com/problems/merge-two-sorted-lists) | [C++](./C++/0021.cpp) |||🟢||Merge sort|
| 0083 | [Remove duplicates from sorted list](https://leetcode.com/problems/remove-duplicates-from-sorted-list) | [C++](./C++/0083.cpp) |||🟢|||
| 0160 | [Intersection of two linked lists](https://leetcode.com/problems/intersection-of-two-linked-lists) | [C++](./C++/0160.cpp) |||🟢|||
| 0234 | [Palindrome linked list](https://leetcode.com/problems/palindrome-linked-list) | [C++](./C++/0234.cpp) |O(n)|O(1)|🟢||List reversal|
| 0141 | [Linked list cycle](https://leetcode.com/problems/linked-list-cycle) | [C++](./C++/0141.cpp) |||🟢|||
| 0203 | [Remove linked list elements](https://leetcode.com/problems/remove-linked-list-elements) | [C++](./C++/0203.cpp) |||🟢|||
| 0092 | [Reverse linked list II](https://leetcode.com/problems/reverse-linked-list-ii) | [C++](./C++/0092.cpp) |||🟡|||
| 0142 | [Linked list cycle II](https://leetcode.com/problems/linked-list-cycle-ii) | [C++](./C++/0142.cpp) |||🟡|||
| 0143 | [Reorder cycle](https://leetcode.com/problems/reorder-list) | [C++](./C++/0143.cpp) |||🟡|||
| 1669 | [Merge in between linked lists](https://leetcode.com/problems/merge-in-between-linked-lists) | [C++](./C++/1669.cpp) |||🟡|||
| 0019 | [Remove n-th node from end of list](https://leetcode.com/problems/remove-nth-node-from-end-of-list) | [C++](./C++/0019.cpp) |||🟡|||
| 1721 | [Swapping nodes in a linked list](https://leetcode.com/problems/swapping-nodes-in-a-linked-list) | [C++](./C++/1721.cpp) |||🟡|||
| 1019 | [Next greater node in linked list](https://leetcode.com/problems/next-greater-node-in-linked-list) | [C++](./C++/1019.cpp) |O(n)||🟡||Typical problem,
 *Important*|
| 0328 | [Odd even linked list](https://leetcode.com/problems/odd-even-linked-list) | [C++](./C++/0328.cpp) |O(n)|O(1)|🟡|||
| 0002 | [Add two numbers](https://leetcode.com/problems/add-two-numbers) | [C++](./C++/0002.cpp) |||🟡|||
| 0445 | [Add two numbers II](https://leetcode.com/problems/add-two-numbers-ii) | [C++](./C++/0445.cpp) |||🟡|||

* Doubly linked list -

|  ID   | Title |  Solution  |  Time  |    Space     |  Difficulty  |  Tags | Note |
|:-----:|-------|:----------:|:------:|:------------:|:------------:|-------|------|
| 1472 | [Design browser history](https://leetcode.com/problems/design-browser-history) | [C++](./C++/1472.cpp) |||🟡||Create list structure|
| 0430 | [Flatten a multilevel doubly linked list](https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list) | [C++](./C++/0430.cpp) |O(n)|O(n)|🟡||Recursion|

    ⬆ Back to Top

## 💢 Stacks
### Stacks as ADT
We only care about the features and operations of stacks. We don't care about the implementation details. Therefore, I am going to define stack only as mathematical model.

### Definition
A list with restriction of insertion and deletion from one end only.

### Property
Elements are inserted and removed from the same end, also called, the *top* of stack. This is not just a property, but a constraint of stack. Hence, stack is called, LAST-IN-FIRST-OUT, or, LIFO, collection of items.

### Operations
* Push( ) : for insertion of an element
* Pop( ) : for deletion of an element

Apart from the above mentioned fundamental operations, there can be other operations as well, like :-

* Top( ) : return the top element of stack
* IsEmpty( ) : return TRUE if stack is empty, FALSE if not

### Complexity Analysis
All opertaions mentioned above are performed in constant, or, O( 1 ) time.

Overflow condition : O( n ), a larger array is created and all elements are copied. This only happens in array implementation of stack.

### Uses
* Function calls / Recursion in dynamic memory allocation
* implement Undo operation
* balance of brackets by a compiler

### Implementation of stacks
Stacks can be implemeted in 2 ways :-

* Stacks using arrays :

        // declaration of array that will act as stack
        int A[n]

        // pointer to the top of stack
        top = -1

        Push(x){
            top = top + 1
            A[top] = x
        }

        Pop(){
            top = top - 1
        }

        Top(){
            return A[top]
        }

        IsEmpty(){
            if (top == -1)
                return TRUE
            else
                return FALSE
        }

* Stacks using linked lists :

        // structure for linked list
        struct Node {
            int data
            struct Node* link
        }

        Push(x) {
            temp->data = x
            temp->link = top
            top = temp
        }

        Pop() {
            temp = top
            top = top->link
            free(temp)
        }

### Problems on Stacks
![Count](https://img.shields.io/badge/Count-6-brown.svg?style=for-the-badge)

|  ID   | Title |  Solution  |  Time  |    Space     |  Difficulty  |  Tags | Note |
|:-----:|-------|:----------:|:------:|:------------:|:------------:|-------|------|
| 0020 | [Valid parantheses](https://leetcode.com/problems/valid-parentheses) | [C++](./C++/0020.cpp) |||🟢|||
| 1614 | [Maximum nesting depth of the parantheses](https://leetcode.com/problems/maximum-nesting-depth-of-the-parentheses) | [C++](./C++/1614.cpp) |||🟢|||
| 1021 | [Remove outermost parantheses](https://leetcode.com/problems/remove-outermost-parentheses) | [C++](./C++/1021.cpp) |||🟢|||
| 1475 | [Final prices with a special discount in shop](https://leetcode.com/problems/final-prices-with-a-special-discount-in-a-shop) | [C++](./C++/1475.cpp) |||🟢|||
| 0232 | [Implement queue using stacks](https://leetcode.com/problems/implement-queue-using-stacks) | [C++](./C++/0232.cpp) |||🟢|||
| 0071 | [Simplify path](https://leetcode.com/problems/simplify-path) | [C++](./C++/0071.cpp) |||🟡|||

    ⬆ Back to Top

## 💢 Tree
![Count](https://img.shields.io/badge/Count-29-brown.svg?style=for-the-badge)

|  ID   | Title |  Solution  |  Time  |    Space     |  Difficulty  |  Tags | Note |
|:-----:|-------|:----------:|:------:|:------------:|:------------:|-------|------|
| 0144 | [Binary tree preorder traversal](https://leetcode.com/problems/binary-tree-preorder-traversal) | [C++](./C++/0144.cpp) |||🟢|||
| 0094 | [Binary tree inorder traversal](https://leetcode.com/problems/binary-tree-inorder-traversal) | [C++](./C++/0094.cpp) |||🟢|||
| 0145 | [Binary tree postorder traversal](https://leetcode.com/problems/binary-tree-postorder-traversal) | [C++](./C++/0145.cpp) |||🟢|||
| 0104 | [Maximum depth of binary tree](https://leetcode.com/problems/maximum-depth-of-binary-tree) | [C++](./C++/0104.cpp) |||🟢|||
| 0543 | [Diameter of a binary tree](https://leetcode.com/problems/diameter-of-binary-tree) | [C++](./C++/0543.cpp) |||🟢|||
| 0700 | [Search in a binary tree](https://leetcode.com/problems/search-in-a-binary-search-tree) | [C++](./C++/0700.cpp) |||🟢|||
| 0993 | [Cousins in binary tree](https://leetcode.com/problems/cousins-in-binary-tree) | [C++](./C++/0993.cpp) |||🟢|||
| 0101 | [Symmetric tree](https://leetcode.com/problems/symmetric-tree) | [C++](./C++/0101.cpp) |||🟢|||
| 0112 | [Path sum](https://leetcode.com/problems/path-sum) | [C++](./C++/0112.cpp) |||🟢|||
| 0226 | [Invert binary tree](https://leetcode.com/problems/invert-binary-tree) | [C++](./C++/0226.cpp) |||🟢|||
| 0653 | [Two sum IV - Input is a BST](https://leetcode.com/problems/two-sum-iv-input-is-a-bst) | [C++](./C++/0653.cpp) |||🟢|||
| 0235 | [Lowest common ancestor of a binary search tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree) | [C++](./C++/0235.cpp) |||🟢|||
| 0331 | [Verify preorder serialization of a binary tree](https://leetcode.com/problems/verify-preorder-serialization-of-a-binary-tree) | [C++](./C++/0331.cpp) |||🟡|||
| 0102 | [Binary tree level order traversal](https://leetcode.com/problems/binary-tree-level-order-traversal) | [C++](./C++/0102.cpp) |||🟡||queue|
| 0222 | [Count complete tree nodes](https://leetcode.com/problems/count-complete-tree-nodes) | [C++](./C++/0222.cpp) |||🟡||queue, bfs|
| 1008 | [Construct binary search tree from preorder traversal](https://leetcode.com/problems/construct-binary-search-tree-from-preorder-traversal) | [C++](./C++/1008.cpp) |||🟡|||
| 0889 | [Construct binary tree from preorder and postorder traversal](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-postorder-traversal) | [C++](./C++/0889.cpp) |||🟡|||
| 0979 | [Distribute coins in binary tree](https://leetcode.com/problems/distribute-coins-in-binary-tree) | [C++](./C++/0979.cpp) |||🟡|||
| 0654 | [Maximum binary tree](https://leetcode.com/problems/maximum-binary-tree) | [C++](./C++/0654.cpp) |||🟡|||
| 0662 | [Maximum width of binary tree](https://leetcode.com/problems/maximum-width-of-binary-tree) | [C++](./C++/0662.cpp) |||🟡|||
| 0687 | [Longest univalue path](https://leetcode.com/problems/longest-univalue-path) | [C++](./C++/0687.cpp) |||🟡|||
| 1104 | [Path in zigzag labled binary tree](https://leetcode.com/problems/path-in-zigzag-labelled-binary-tree) | [C++](./C++/1104.cpp) |||🟡|||
| 1372 | [Longest zigzag path in a binary tree](https://leetcode.com/problems/longest-zigzag-path-in-a-binary-tree) | [C++](./C++/1372.cpp) |||🟡|||
| 0437 | [Path sum III](https://leetcode.com/problems/path-sum-iii) | [C++](./C++/0437.cpp) |||🟡|||
| 1339 | [Maximum product of splitted binary tree](https://leetcode.com/problems/maximum-product-of-splitted-binary-tree) | [C++](./C++/1339.cpp) |||🟡|||
| 0814 | [Binary tree pruning](https://leetcode.com/problems/binary-tree-pruning) | [C++](./C++/0814.cpp) |||🟡|||
| 1448 | [Count good nodes in binary tree](https://leetcode.com/problems/count-good-nodes-in-binary-tree) | [C++](./C++/1448.cpp) |||🟡|||
| 0894 | [All possible full binary trees](https://leetcode.com/problems/all-possible-full-binary-trees) | [C++](./C++/0894.cpp) |||🟡|||
| 0701 | [Insert into a binary search tree](https://leetcode.com/problems/insert-into-a-binary-search-tree) | [C++](./C++/0701.cpp) |||🟡|||
| 0098 | [Validate binary search tree](https://leetcode.com/problems/validate-binary-search-tree) | [C++](./C++/0098.cpp) |||🟡|||

    ⬆ Back to Top

## 💢 Trie
![Count](https://img.shields.io/badge/Count-1-brown.svg?style=for-the-badge)

|  ID   | Title |  Solution  |  Time  |    Space     |  Difficulty  |  Tags | Note |
|:-----:|-------|:----------:|:------:|:------------:|:------------:|-------|------|
| 0208 | [Implement trie](https://leetcode.com/problems/implement-trie-prefix-tree) | [C++](./C++/0208.cpp) |||🟡|||

    ⬆ Back to Top

## 💢 Dynamic Programming
![Count](https://img.shields.io/badge/Count-8-brown.svg?style=for-the-badge)

|  ID   | Title |  Solution  |  Time  |    Space     |  Difficulty  |  Tags | Note |
|:-----:|-------|:----------:|:------:|:------------:|:------------:|-------|------|
| 0338 | [Counting bits](https://leetcode.com/problems/counting-bits) | [C++](./C++/0338.cpp) |||🟢|||
| 0509 | [Fibonacci number](https://leetcode.com/problems/fibonacci-number) | [C++](./C++/0509.cpp) |||🟢|||
| 0070 | [Climbing stairs](https://leetcode.com/problems/climbing-stairs) | [C++](./C++/0070.cpp) |||🟢|||
| 1137 | [N-th tribonacci number](https://leetcode.com/problems/n-th-tribonacci-number) | [C++](./C++/1137.cpp) |||🟢|||
| 0746 | [Min cost climbing stairs](https://leetcode.com/problems/min-cost-climbing-stairs) | [C++](./C++/0746.cpp) |||🟢|||
| 1025 | [Divisor game](https://leetcode.com/problems/divisor-game) | [C++](./C++/1025.cpp) |O(n^2)
O(1)||🟢||Trick solution|
| 0764 | [Largest plus sign](https://leetcode.com/problems/largest-plus-sign) | [C++](./C++/0764.cpp) |||🟡|||
| 1143 | [Longest common subsequence](https://leetcode.com/problems/longest-common-subsequence) | [C++](./C++/1143.cpp) |||🟡|||
| 0174 | [Dungeon game](https://leetcode.com/problems/dungeon-game) | [C++](./C++/0174.cpp) |||🔴|||

    ⬆ Back to Top

## 💢 Binary Search
![Count](https://img.shields.io/badge/Count-7-brown.svg?style=for-the-badge)

|  ID   | Title |  Solution  |  Time  |    Space     |  Difficulty  |  Tags | Note |
|:-----:|-------|:----------:|:------:|:------------:|:------------:|-------|------|
| 0704 | [Binary Search](https://leetcode.com/problems/binary-search) | [C++](./C++/0704.cpp) |||🟢|||
| 0278 | [First bad version](https://leetcode.com/problems/first-bad-version) | [C++](./C++/0278.cpp) |||🟢|||
| 0035 | [Search insert position](https://leetcode.com/problems/search-insert-position) | [C++](./C++/0035.cpp) |||🟢|||
| 0875 | [Koko eating banans](https://leetcode.com/problems/koko-eating-bananas) | [C++](./C++/0875.cpp) |||🟡|||
| 1237 | [Find positive integer solution for a given equation](https://leetcode.com/problems/find-positive-integer-solution-for-a-given-equation) | [C++](./C++/1237.cpp) |||🟡|||
| 1011 | [Capacity to ship packages within D days](https://leetcode.com/problems/capacity-to-ship-packages-within-d-days) | [C++](./C++/1011.cpp) |||🟡|||
| 1901 | [Find a peak element II](https://leetcode.com/problems/find-a-peak-element-ii) | [C++](./C++/1901.cpp) |||🟡|||

    ⬆ Back to Top

## 💢 Depth First Search
![Count](https://img.shields.io/badge/Count-2-brown.svg?style=for-the-badge)

|  ID   | Title |  Solution  |  Time  |    Space     |  Difficulty  |  Tags | Note |
|:-----:|-------|:----------:|:------:|:------------:|:------------:|-------|------|
| 0463 | [Island perimeter](https://leetcode.com/problems/island-perimeter) | [C++](./C++/0463.cpp) |||🟢||Bruteforce,
DFS|
| 0079 | [Word search](https://leetcode.com/problems/word-search) | [C++](./C++/0079.cpp) |||🟡||Optimised for space|

    ⬆ Back to Top

## 💢 Strings
![Count](https://img.shields.io/badge/Count-17-brown.svg?style=for-the-badge)

|  ID   | Title |  Solution  |  Time  |    Space     |  Difficulty  |  Tags | Note |
|:-----:|-------|:----------:|:------:|:------------:|:------------:|-------|------|
| 0242 | [Valid anagram](https://leetcode.com/problems/valid-anagram) | [C++](./C++/0242.cpp) |||🟢|||
| 0387 | [First unique character in a string](https://leetcode.com/problems/first-unique-character-in-a-string) | [C++](./C++/0387.cpp) |||🟢|||
| 0383 | [Ransom note](https://leetcode.com/problems/ransom-note) | [C++](./C++/0383.cpp) |||🟢|||
| 0394 | [Decode string](https://leetcode.com/problems/decode-string) | [C++](./C++/0394.cpp) |||🟡|||
| 0567 | [Permutation in string](https://leetcode.com/problems/permutation-in-string) | [C++](./C++/0567.cpp) |||🟡|||
| 0005 | [Longest palindromic substring](https://leetcode.com/problems/longest-palindromic-substring) | [C++](./C++/0005.cpp) |||🟡|||
| 0451 | [Sort characters by frequency](https://leetcode.com/problems/sort-characters-by-frequency) | [C++](./C++/0451.cpp) |||🟡|||
| 0151 | [Reverse words in a string](https://leetcode.com/problems/reverse-words-in-a-string) | [C++](./C++/0151.cpp) |||🟡|||
| 1170 | [Compare strings by frequency of the smallest character](https://leetcode.com/problems/compare-strings-by-frequency-of-the-smallest-character) | [C++](./C++/1170.cpp) |||🟡|||
| 0848 | [Shifting letters](https://leetcode.com/problems/shifting-letters) | [C++](./C++/0848.cpp) |||🟡|||
| 1358 | [Number of substrings containing all three characters](https://leetcode.com/problems/number-of-substrings-containing-all-three-characters) | [C++](./C++/1358.cpp) |||🟡|||
| 0006 | [Zigzag conversion](https://leetcode.com/problems/zigzag-conversion) | [C++](./C++/0006.cpp) |||🟡|||
| 1456 | [Maximum number of vowels in a substring of a given length](https://leetcode.com/problems/maximum-number-of-vowels-in-a-substring-of-given-length) | [C++](./C++/1456.cpp) |||🟡|||
| 0008 | [String to integer (atoi)](https://leetcode.com/problems/string-to-integer-atoi) | [C++](./C++/0008.cpp) |||🟡|||
| 2038 | [Remove colored pieces if both neighbors are the same color](https://leetcode.com/problems/remove-colored-pieces-if-both-neighbors-are-the-same-color) | [C++](./C++/2038.cpp) |||🟡|||
| 0076 | [Minimmum window substring](https://leetcode.com/problems/minimum-window-substring) | [C++](./C++/0076.cpp) |||🔴|||
| 0010 | [Regular expression matching](https://leetcode.com/problems/regular-expression-matching) | [C++](./C++/0010.cpp) |||🔴||Very hard,
dp & dfs|

    ⬆ Back to Top

## 💢 Two pointers
![Count](https://img.shields.io/badge/Count-3-brown.svg?style=for-the-badge)

|  ID   | Title |  Solution  |  Time  |    Space     |  Difficulty  |  Tags | Note |
|:-----:|-------|:----------:|:------:|:------------:|:------------:|-------|------|
|0977  | [Squares of a sorted array](https://leetcode.com/problems/squares-of-a-sorted-array) | [C++](./C++/0977.cpp) |O(n)||🟢|||
|0283  | [Move zeroes](https://leetcode.com/problems/move-zeroes) | [C++](./C++/0283.cpp) |O(n)||🟢|||
|0167  | [Two sum II - input array is sorted](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted) | [C++](./C++/0167.cpp) |O(log n)||🟢|||
|0189  | [Rotate array](https://leetcode.com/problems/rotate-array) | [C++](./C++/0189.cpp) |||🟡|||

    ⬆ Back to Top

## 💢 Miscellaneous problems
![Count](https://img.shields.io/badge/Count-12-brown.svg?style=for-the-badge)

|  ID   | Title |  Solution  |  Time  |    Space     |  Difficulty  |  Tags | Note |
|:-----:|-------|:----------:|:------:|:------------:|:------------:|-------|------|
| 0007 | [Reverse integer](https://leetcode.com/problems/reverse-integer) | [C++](./C++/0007.cpp) |||🟢|||
| 0009 | [Palindrome Number](https://leetcode.com/problems/palindrome-number) | [C++](./C++/0009.cpp) |||🟢|||
| 0496 | [Next greater element I](https://leetcode.com/problems/next-greater-element-i) | [C++](./C++/0496.cpp) |||🟢||bruteforce,
stacks|
| 0374 | [Guess number higher or lower](https://leetcode.com/problems/guess-number-higher-or-lower) | [C++](./C++/374.cpp) |||🟢|||
| 0013 | [Roman to integer](https://leetcode.com/problems/roman-to-integer) | [C++](./C++/0013.cpp) |||🟢|||
| 1343A | [Candies](https://codeforces.com/contest/1343/problem/A) | [C++](./C++/1343A.cpp) |||🟢||bruteforce,
math|
| 1525B | [Permutation Sort](https://codeforces.com/contest/1525/problem/B) | [C++](./C++/1525B.cpp) |||🟢||greedy|
| 451A | [Game with Sticks](https://codeforces.com/contest/451/problem/A) | [C++](./C++/451A.cpp) |||🟢|||
| 0201 | [Bitwise AND of number range](https://leetcode.com/problems/bitwise-and-of-numbers-range) | [C++](./C++/0201.cpp) |||🟡|||
| 0012 | [Integer to roman](https://leetcode.com/problems/integer-to-roman) | [C++](./C++/0012.cpp) |||🟡|||
| 0003 | [Longest substring without repeating characters](https://leetcode.com/problems/longest-substring-without-repeating-characters) | [C++](./C++/0003.cpp) |||🟡||hash table|
| 0055 | [Jump game](https://leetcode.com/problems/jump-game) | [C++](./C++/0055.cpp) |||🟡|||
| 0279 | [Perfect squares](https://leetcode.com/problems/perfect-squares) | [C++](./C++/0279.cpp) |||🟡||DP,
Mathematical|
| 0380 | [Insert delete GetRandom O(1)](https://leetcode.com/problems/jump-game) | [C++](./C++/0380.cpp) |O(1)||🟡|||
| 0123 | [Best time to buy and sell stock III](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii) | [C++](./C++/0123.cpp) |||🔴|||

    ⬆ Back to Top

license: MIT

branch_name: refs/heads/main

extension: md

license_type: permissive


text:
---
layout: post
title: Rep Update - November 2018
subtitle: PGR Feedback survey. Please answer.
---

## HLS PGR Feedback Survey - PART 2

In the last 2 months or so, you will have received many emails from __**Sarah Charles**__ about your PGR experience in HLS at Coventry. Sarah is making it her mission this year, as co-senior REP, to ensure that as many changes are put in place as possible in the faculty to help all students have a better experience.

The fact that there are issues at CU is not a secret, and the most recent *PRES results* (which were not good) demonstrates that.

A part of this mission to improve PGR experience involves getting as much feedback as possible, so that the changes that are made are ones students would like.

Many students already answered the first survey that was sent out about 3 weeks ago, with some insights already being delivered to senior staff in HLS.

For some changes, however, we need some more specific feedback. As a result, a 2nd survey that takes about 10-15 minutes to complete was designed to help us show not just senior HLS staff, but senior CU staff what it is the PGRs both want and need, so that the appropriate action can be taken to improve all of our experiences here.

Please, could you take just *10-15 minutes* of your time to answer these questions. With each person who responds, the added weight of another PGR voice can be used as evidence for the need for certain changes.

***[Click here](https://coventryhls.eu.qualtrics.com/jfe/form/SV_cNnelMFmYIjnu9n)*** to complete the 2nd survey. **You can respond to this survey even if you didn't answer the previous survey**

All responses will be anonymous, unless you specifically give your name in your responses.

## Hot Desking in RC4

HLS are making space available for hot-desking for PhD and MRes PGRs in the CABS open plan area. This is in the central-right section RC4 (to the right of the reception desks if you enter via the lift). If necessary, reception can point you to the correct location.

Desks that are allocated for hot-desking will display a sign saying: ‘This desk is available today’. If you use the desk, put the sign to one side and then replace it in a prominent position at the end of the day.

Most of the desks have a desk-top PC but, if you need one, laptops may be available to sign out from reception for a day at a time. (Please be aware that some laptops are used for fieldwork so availability isn’t guaranteed.)

The signs also note etiquette around using the desks, e.g. leaving the desk as you found it. Please be mindful that others will be using the space.

Please note, the area dedicated to PGRs at the other end of the floor (left side of RC4) is _still available_ and still exclusive to PGRs.

This CABS section has been opened up to allow for more space for the large number of PGRs who have expressed that they would come in if they were more likely to have space.

## New Framework

* As many of you may know, a new research student framework is being put in place.

* For more information about the new framework, please go to [this site](https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Frecap.coventry.domains%2Fnewframework%2F&data=02%7C01%7Ccharle42%40uni.coventry.ac.uk%7Cd620944aaa1c4e9d858908d60d92403f%7C4b18ab9a37654abeac7c0e0d398afd4f%7C0%7C0%7C636711319133110177&sdata=2xQIOSUod%2FXPcrj4EzqmacqQoCjG6szV1u%2B%2BOWJUncY%3D&reserved=0).

* For those who have moved to the new system, you will have now been contacted by rru.reg to complete your <b>Research Degree Development Agreement</b>. Please be sure to complete this before the deadline that you have been given.

* Also, please do write into us with your experiences on how the move has gone, so we can inform people who are having PRPs in Jan/May

## Reminder About Booking Rooms at Elm Bank

* The RECAP team have now started allowing students to book rooms at Elm Bank for studying or meeting purposes.

* For booking a seminar/workshop/reading group (capacity 25 people) just fill in [this form](https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fforms.office.com%2FPages%2FResponsePage.aspx%3Fid%3DmqsYS2U3vkqsfA4NOYr9T0J0V6Md3HNNj94BvfxrC-lUOU9CSzhXOUhIOVlWT1BPTkpPTkZMM1FaNC4u&data=02%7C01%7Ccharle42%40uni.coventry.ac.uk%7Cd620944aaa1c4e9d858908d60d92403f%7C4b18ab9a37654abeac7c0e0d398afd4f%7C0%7C0%7C636711319133110177&sdata=9T3lSBfnPPxn%2BCVVqrYhYx9Z4RD5%2F9HRhJ2hRa1LJV4%3D&reserved=0)

* For larger spaces, send an email to the RECAP team [RECAP<EMAIL_ADDRESS>with your request. These will be dealt with on a case by case basis

branch_name: refs/heads/master

gha_language: HTML


text:
# This is open source forum I am building and optimizing from studying materials from Laracasts.com
## Step 1: Clone the repository, install composer dependencies
`git clone git@github.com:quangvision/test.git`
`cd test && composer install`
## Step 2: Setup environment file

- Change file .env.example to .env
- Edit database credentials there to fit yours
- Generate new app key by running command
`php artisan key:generate`

## Step 3 Migrate database and seed some sample data
- Migrate database by running command
`php artisan migrate`
- Seed sample data with 30 threads along with already signed in admin named "QT"
`php artisan db:seed --class=ForumSeeder`

## Step 4 Register for external API services like Google Recaptcha to protect from spammers or Algolia with Vuejs for instant searching feature
![2018-03-05_004510](https://user-images.githubusercontent.com/12606323/36948505-7fc6b2c6-200e-11e8-96d0-6577f840412b.png)

## Final Step
Access [http://test.test/threads](http://test.test/threads) for publishing your very first own thread./.

repository: quangnhattran/test

repo_name: quangnhattran/test


text:
# Whatsapp Docker Container

This is a very basic docker container for [Whatsapp Chat API](https://github.com/mgp25/Chat-API).

The idea behind this container is to make it easy to install and use:

```
./docker.sh
docker run -i -t <hash> /bin/bash
cd /whatsapp/vendor/whatsapp/chat-api/examples
php exampleFunctional.php
```

repository: publinchi/docker-whatsapp

repo_name: publinchi/docker-whatsapp


text:
# EqualStreetNames - Scripts

## Scripts

- [`geojson.php`](../../scripts/geojson.php)

## Generate final GeoJSON files

### Extract data from _OpenStreetMap_ objects

From the files downloaded from _OpenStreetMap_, we extract the following informations:

- Relation (or way)
- Geometry of the street ;
- Streetname
  - `name` tag (bilingual) ;
  - `name:fr` tag (french) ;
  - `name:nl` tag (dutch) ;
- `wikidata` tag (wikidata identifier for the street)
- `name:etymology:wikidata` tag (wikidata identifier for the person)

### Extract data from _Wikidata_ objects

### Apply gender information

### Generate files

## Run the script locally

```cmd
composer install

php scripts/geojson.php
```

The `relations.geojson` and `ways.geojson` files will be stored in the city `data/` directory.

repository: eMerzh/equalstreetnames

gha_language: PHP

gha_license_id: MIT

repo_name: eMerzh/equalstreetnames


text:
This code was developed in year 2002 on a weekend to one of wood cutting industry client in Chikmangalore, kept this code public for 2 reasons, one to give my clients an opportunity to update and improve as JDK moves on with time,  secondly, use it as a project to run cyclomatic complexicity analysis to teach enthusiastics how important modularity and scalability is, in software engineering or coding in particular.

# eTimber
Easy way to manage Timber
## Features
1. Incoming Timber calculator (from the estate)
2. Outgoing Size Timber calculator
3. Prints the load
4. Manages Inventory

## why eTimber
- Speedy Billing
- Eliminates human errors in calculations
- Single place to manage (add, view & delete) inventatory
  - Outgoing load(s) to a **Firm**
  - Incoming logs from a **Estate**

## How to setup
1. clone this repository
2. java -jar woodlogs.jar
3. Enter password mentioned in VerifyAuth.java file
4. Select the feature from the drop down
5. Configure the details of estate or firm, enter price and sizes
6. Now you are ready to enter the timber data
7. Save the load after entering all timber, and print as required

repository: codepil/eTimber

repo_name: codepil/eTimber


text:
# Expresso

> A coffee shop app with a REST API back-end built with Node.js, Express and SQLite.

![](https://upload.wikimedia.org/wikipedia/commons/thumb/d/d9/Node.js_logo.svg/200px-Node.js_logo.svg.png)

![NPM Version](https://img.shields.io/node/v/passport.svg) ![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)

This app showcases CRUD operations for a coffee shop in a Node.js app with Express and SQLite.

The Expresso internal tool allows users to:
- Create, view, update, and delete menus
- Create, view, update, and delete menu items
- Create, view, update, and delete employees
- Create, view, update, and delete employee's timesheets

## Installation

Clone the source locally:

```sh
$ git clone https://github.com/thepembeweb/expresso.git
$ cd expresso
```
If you're on Debian or Ubuntu, you'll also need to install
`nodejs-legacy`:

Use your package manager to install `npm`.

```sh
$ sudo apt-get install npm nodejs-legacy
```

Install project dependencies:

```sh
$ npm install
```
Start the app:

```sh
$ npm start
```

## Built With

* [Node.js®](https://nodejs.org/) - The JavaScript runtime used
* [Express.js](https://nodejs.org/) - The web application framework used
* [SQLite](https://www.sqlite.org/) - The database engine used

## License

MIT  © [Pemberai Sweto](https://github.com/thepembeweb)

repository: thepembeweb/expresso

gha_language: JavaScript

repo_name: thepembeweb/expresso


text:
---
date: 2011-03-14 21:43:50+00:00
excerpt: None
slug: designing-mylifelisted
template: single.html
title: Designing MyLifeListed
---

Today I'm excited to see [MyLifeListed](http://www.mylifelisted.com) launch!

We've been _very_ busy at Base Creative designing & developing the site. We're glad to be part of such an exciting project. See for yourself:

[![MyLifeListed.com](/images/2011/03/mylifelisted-1024x671.png)](/images/2011/03/mylifelisted.png)

I'm going to write a more in-depth article on the design process of [MyLifeListed](http://www.mylifelisted.com) but since this is probably my favourite design project to date, here's a few notes:

### Responsive design for all devices

[MyLifeListed](http://www.mylifelisted.com) was designed around a semi-fluid build allowing it to look great on iPads to large 30" monitors. It's not 100% fluid, I set a min & max width to maintain usability. I also made use of CSS media queries to prioritise content on smaller screens. The aim was to make best use of available space on multiple devices.

Keeping all this in mind when designing was a challenge! You'll notice the modular layout was very helpful, but the key is **knowing how to code**. It would be impossible to design such a complicated website without this knowledge.

### Hard-boiling it

The idea of _"progressive enhancement"_ is to design for a consistent experience across all browsers and then add a touch of eye-candy for the newer ones. Hardboiled design (evangelised by [Andy Clarke](http://hardboiledwebdesign.com/samples/)) says that you should take the opposite approach - design for the **best** possible experience, then work backwards no matter how difficult it may prove.

When I started designing [MyLifeListed](http://www.mylifelisted.com) I quickly realised such a modern web app needed to push the limits of modern browsers and web standards. Why play it safe and design something that will work in IE6 through to Chrome 10 identically? If I took that approach I'd be doing a disservice to the longevity of the site.

Instead, I decided to challenge my own building skills and aim for nothing but the best design and user experience. I think the result speaks for itself, it even looks great in IE7!

### And more...

I could go on forever about the whole design process – and I will – but that's enough for now. Make sure you signup to [MyLifeListed](http://www.mylifelisted.com) and let me know what you think!

repository: tied/DevArtifacts

repo_name: tied/DevArtifacts


text:
# roleHaven

roleHaven is part of an initiative to create a platform to be used in-game during LARPs.

## Configuration

The default configuration files are in /config/defaults/ (appConfig and databasePopulation). You can override the defaults by either adding appConfig and/or databasePopulation in /config/modified or set envar CONFIGPATH with an URL to a repo withappConfig and/or databasePopulation.

## Deployment

Envar JSONKEY has to be set. It is used for the generation of JSON Web Tokens.

It is recommended to use Docker to deploy and run roleHaven.

## First run

A user named * is automatically created when the app is first deployed. Its password is printed to the logs. This user will be removed as soon as another user exists in the system.

## API

The documentation for the REST API can be found at https://thethirdgift.com/roleHaven/rest/.

## Project owner

* Aleksandar Jankovic - [Github](https://github.com/yxeri)

## Development contributors

* Aleksandar Jankovic - [Github](https://github.com/yxeri)
* Stanislav B - [Github](https://github.com/stanislavb)
* Sebastian Streiffert
* Johnathan Browall
* Thomas Erdelyi

## Contributors/Supporters

* Varg Johan
* Mathias Abrahamsson
* Jenny L.
* Stefan Scott
* Tveskägg
* H. Merkelbach
* Tobias W.
* 55463
* Joakim Sandström
* William Von Hofsten
* Kenny Svensson
* Maria Rodén
* Niklas Sandström
* Joachim
* Erik Jonsson
* tz
* Karl Dahlgren
* [Blodsband Reloaded](https://www.bbreloaded.se)
* [Sommarland](http://beratta.org/sommarland/)
* [Vinterland](http://beratta.org/vinterland/)
* [Tales from the Sprawl](http://www.talesfromthesprawl.se)
* [Ockulta Medborgarbyrån](http://www.ockultamedborgarbyran.com)
* [Berättelsefrämjandet](https://beratta.org)
* [Krokodilhammarkompaniet](https://www.bbreloaded.se)

repository: dwarfenhoschi/roleHaven

repo_name: dwarfenhoschi/roleHaven


text:
## Core Java 10

This module contains articles about Java 10 core features

### Relevant Articles:

- [Java 10 LocalVariable Type-Inference](http://www.baeldung.com/java-10-local-variable-type-inference)
- [New Features in Java 10](https://www.baeldung.com/java-10-overview)
- [Copy a List to Another List in Java](http://www.baeldung.com/java-copy-list-to-another)
- [Deep Dive Into the New Java JIT Compiler – Graal](https://www.baeldung.com/graal-java-jit-compiler)
- [Copying Sets in Java](https://www.baeldung.com/java-copy-sets)
- [Converting Between a List and a Set in Java](https://www.baeldung.com/convert-list-to-set-and-set-to-list)
- [Java IndexOutOfBoundsException “Source Does Not Fit in Dest”](https://www.baeldung.com/java-indexoutofboundsexception)
- [Collect a Java Stream to an Immutable Collection](https://www.baeldung.com/java-stream-immutable-collection)


text:
# Perl Moose Extension for VS Code

[![Build Status](https://travis-ci.com/torrentalle/vscode-perl-moose.svg?branch=master)](https://travis-ci.com/torrentalle/vscode-perl-moose)

[Perl Moose](https://metacpan.org/pod/Moose) syntax highlight support for Visual Studio Code

![Syntax Highlight](images/grammar.png)

## Features

This extensions includes support for **Moose** and their minimalist variants (**Mouse** and **Moo**).
Currently includes Syntax Highlight for following classes:

* Moose
* Moose::Deprecated
* Moose::Exporter
* Moose::Object
* Moose::Role
* Moose::Util
* Moose::Util::TypeConstraints
* Test::Moose

## Release Notes

See [CHANGELOG.md](CHANGELOG.md) to see latest changes

## Contributing

The grammar sources is written in YAML in [src/syntaxes/](src/syntaxes/) folder and converted
to textmate JSON format in build phase.

### Building

To generate the main grammar:

```bash
npm install
npm run build
```

### Testing

To run the grammar tests:

```bash
npm run test
```

The test cases are stored as markdown files under `testFixture/colorize-fixtures`. Grammar test results are stored under `testFixture/colorize-results`, which are automatically generated from the fixtures.

To test the grammar in VS Code, select the `Extension Tests` configuration in the VS Code debugger and run.

## References

* [Moose::Cookbook::Snack::Keywords](https://metacpan.org/pod/distribution/Moose/lib/Moose/Cookbook/Snack/Keywords.pod) - Restricted "keywords" in Moose

## License

This extension is distributed under [MIT](LICENSE.md) license.

repository: torrentalle/vscode-perl-moose

gha_language: Perl

gha_license_id: NOASSERTION

repo_name: torrentalle/vscode-perl-moose


text:
# Prime Number Generator
Generate Prime numbers **up-to** a given number using [`sieve of eratosthenes`](https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes#Algorithm_and_variants) algorithm.

## Usage
Compile `main.c`. And run it from terminal (Command Prompt in Windows). It takes an unsigned integer input from `stdin`.

### Remarks
Using this script, I was able to generate prime numbers up-to 100000000 *(99999989 being the last prime)* in less than 10 seconds. Size of the file created in the process was 51099000 bytes (51.1 MB).
I created this script for making my own version of **Prime Spiral** which is beautifully explained by 3Blue1Brown in [this](https://youtu.be/EK32jo7i5LQ) video.

###### developed by **@krishna2803**


text:
# prometheus-static-metric

[![docs.rs](https://docs.rs/prometheus-static-metric/badge.svg)](https://docs.rs/prometheus-static-metric)
[![crates.io](http://meritbadge.herokuapp.com/prometheus-static-metric)](https://crates.io/crates/prometheus-static-metric)

Utility macro to build static metrics for the [rust-prometheus](https://github.com/pingcap/rust-prometheus) library.

## Why?

`MetricVec` (i.e. `CounterVec`, `GaugeVec` or `HistogramVec`) is slow. However if every possible values for labels are
known, each metric in the `MetricVec` can be cached to avoid the runtime cost.

For example, the following code can be slow when it is invoked multiple times:

```rust
some_counter_vec.with_label_values(&["label_1_foo", "label_2_bar"]).inc();
```

It is because we are retriving a specific `Counter` according to values each time and to ensure thread-safety there is
a lock inside which makes things worse.

We can optimize it by caching the counter by label values:

```rust
// init before hand
let foo_bar_counter = some_counter.with_label_values(&["label_1_foo", "label_2_bar"]);

foo_bar_counter.inc();
```

So far everything seems good. We achieve the same performance as `Counter` for `CounterVec`. But what if there are many
labels and each of them has many values? We need to hand-craft a lot of code in this way.

That's what this crate solves. This crate provides a macro that helps you do the optimization above without really
introducing a lot of templating code.

## Getting Started

+ Add to `Cargo.toml`:

    ```toml
    [dependencies]
    prometheus-static-metric = "0.1"
    ```

+ Add to `lib.rs`:

    ```rust
    #![feature(proc_macro)]

    extern crate prometheus_static_metric;
    ```

## Example

Use the `make_static_metric!` to define all possible values for each label. Your definition will be expanded to a real
`struct` for easy access while keeping high-performance.

```rust
use prometheus_static_metric::make_static_metric;

make_static_metric! {
    pub struct MyStaticCounterVec: Counter {
        "method" => {
            post,
            get,
            put,
            delete,
        },
        "product" => {
            foo,
            bar,
        },
    }
}

fn main() {
    let vec = CounterVec::new(Opts::new("foo", "bar"), &["method", "product"]).unwrap();
    let static_counter_vec = MyStaticCounterVec::from(&vec);

    static_counter_vec.post.foo.inc();
    static_counter_vec.delete.bar.inc_by(4.0);
    assert_eq!(static_counter_vec.post.bar.get(), 0.0);
    assert_eq!(vec.with_label_values(&["post", "foo"]).get(), 1.0);
    assert_eq!(vec.with_label_values(&["delete", "bar"]).get(), 4.0);
}
```

Please take a look at [examples](./examples) directory for more.

repository: sebastianjonasson/rust-prometheus

repo_name: sebastianjonasson/rust-prometheus


text:
# Qvik's Custom CocoaPod Podspec Repository

*This repository contains Swift utilities for use in both Qvik's internal and customer projects.*

## Usage

To use the pod libraries in your projects, add the following source to your Podfile:

```ruby
source 'https://github.com/qvik/qvik-podspecs.git'
```

## Pods

The following pods are available:

- https://github.com/qvik/qvik-swift-ios
- https://github.com/qvik/qvik-network-ios
- https://github.com/qvik/qvik-cloudinary-ios
- https://github.com/qvik/qvik-ui-ios

## Contact

Any questions? Contact<EMAIL_ADDRESS>

repository: qvik/qvik-podspecs

repo_name: qvik/qvik-podspecs


text:
# Frequently Asked Questions

This list will be updated frequently!

### How do you combine the reducer created by react-redux-form and `combineForms` with other reducers?

Use it along side the other reducers and call [combineForms](https://davidkpiano.github.io/react-redux-form/docs/api/combineForms.html) with the second argument set to the reducer key of your choice, `deep` in the following example):

```javascript
const store = createStore(combineReducers({
  nav: navReducer, // <== here
  foo: fooReducer,
  bar: barReducer,
  deep: combineForms({
    user: initialUserState,
    goat: initialGoatState,
  }, 'deep'),
}));
```

### How do you add conditional class names based on field state?

Use the `mapProps={\{...}}` property on `<Control>` components to set any props on the control component based on field state, like this:

```jsx
<Control.text
  model="user.firstName"
  mapProps={\{
    className: ({fieldValue}) => fieldValue.focus
      ? 'focused'
      : ''
  }}
/>
```

The props that are provided to each function value in your `mapProps` mapping are:
- `modelValue`
- `fieldValue`
- `onFocus`
- `onBlur`
- `onChange`

as well as other additional props:
- all props on the `<Control>`
- all props on the `controlProps={\{...}}` prop (if any)
- `onKeyPress`
- `viewValue`

### How do you validate across fields?

Validation across fields becomes a higher form-level concern, which follows Redux's general tree-structure data flow pattern. If you want a reusable group of fields that are validated, you can **nest forms** as long as you set the form's `component="..."` prop to something other than `"form"` (because you can't nest forms in HTML). [See this issue response for more information.](https://github.com/davidkpiano/react-redux-form/issues/545#issuecomment-261944846) Here's an example:

```jsx
import { Form, Control } from 'react-redux-form';

const isOver18 = (day, month, year) => { ... };

const BirthDate = ({forModel}) => (
  <Form
    model={`${forModel}.birth`}
    component="div"
    validators={\{
      '': ({day, month, year}) => isOver18(day, month, year),
    }}
  >
    <Control model=".day" placeholder="Day" />
    <Control model=".month" placeholder="Month" />
    <Control model=".year" placeholder="Year" />
  </Form>
);

export default BirthDate;
```

Also, see [./validation.md](the validation guide) for more information.

### How do I get the component instance? `ref={...}` doesn't work.

Use `getRef={(node) => ...}` in place of `ref`. This is due to the fact that React treats the `ref` prop as a "magic" prop that doesn't get propagated down through wrapped components.

You can use `getRef` on `<Field>`, `<Control>`, `<Form>`, or `<LocalForm>` components.

(since: version 1.3.2)

```jsx
<Control.text
  model="user.name"
  getRef={(node) => this.attach(node)}
/>
```

### Other Questions and Answers
- https://github.com/davidkpiano/react-redux-form/issues/675#issuecomment-281164930

repository: szare/react-redux-form

repo_name: szare/react-redux-form


text:
---
title: ContentList
---

:::error
**The Ruby SDK is deprecated as of 9/16/2020**

The Genesys Cloud Ruby SDK (v96.0.0) will be frozen at its current version level. Any new enhancements to our API or bug fixes will not be backported. If you do need to take advantage of new features or bug fixes outside the Genesys Cloud Ruby SDK, you will need to use the Genesys Cloud REST endpoints directly. More information can be found in the [Official Announcement](https://developer.mypurecloud.com/forum/t/announcement-genesys-cloud-ruby-sdk-end-of-life/8850).
:::

## PureCloud::ContentList

## Properties

|Name | Type | Description | Notes|
|------------ | ------------- | ------------- | -------------|
| **id** | **String** | An ID assigned to this rich message content. Each instance inside the content array has a unique ID. | [optional] |
| **list_type** | **String** | The type of list this instance represents | [optional] |
| **title** | **String** | Text to show in the title row | [optional] |
| **description** | **String** | Text to show in the description row. This is immediately below the title | [optional] |
| **submit_label** | **String** | Label for Submit button | [optional] |
| **actions** | [**ContentActions**](ContentActions.html) | User actions available on the content. All actions are optional and all actions are executed simultaneously. | [optional] |
| **components** | [**Array<ListItemComponent>**](ListItemComponent.html) | An array of component objects | [optional] |
{: class="table table-striped"}

repository: MyPureCloud/platform-client-sdk-ruby

gha_language: Ruby

repo_name: MyPureCloud/platform-client-sdk-ruby


text:
## Team: TheMedics
This folder contains the neceseray code to run inference using the DeepFake Detection (DFDC) solution by team TheMedics.  For more details on the project please visit the GitHub [repository](https://github.com/jphdotam/DFDC).

### Requirements

The following python packages are required:

- facenet_pytorch==2.5.1
- opencv_python==<IP_ADDRESS>
- numpy==1.18.1
- torchvision==0.5.0
- scipy==1.4.1
- scikit_image==0.18.1
- pretrainedmodels==0.7.4
- Cython==0.29.21
- decord==0.4.2
- einops==0.3.0
- faiss==1.5.3
- lmdb==1.0.0
- mmcv==1.2.6
- mmdet==2.9.0
- scikit_learn==0.24.1
- pandas==1.0.3
- albumentations==0.5.2

They can be installed by running `pip install -r requirements.txt`

Additionally, `opencv` requires the following system libraries `libglib2.0-0 libsm6 libxext6 libxrender1 libfontconfig1` and `mmcv` requires `build-essential`

### Using Docker

To start a container that has all the requirements for using the model first build the image by running the following command in this directory:

```
docker build -t medics_i .
```
To use GPUs in the container you will need to install the [NVIDIA container toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker).  To run the models, a directory with the pretrained model weights  will need to be mounted in the container's `workdir/weights` directory.

```
docker run --runtime=nvidia -it -v <path to weight directory>:/workdir/weights  medics_i
```

### Usage instructions

Place the relevant model weights in the [weights](./weights) directory.
``` python
from ensemble import Ensemble
submit = Ensemble()
prediction = submit.inference(video_path)
```

repository: zhampel/FakeFinder

gha_language: Python

repo_name: zhampel/FakeFinder


text:
# Escher-FBA Feedback

This repository contains the issue tracker and wiki for Escher-FBA: https://sbrg.github.io/escher-fba

You can leave ideas, feedback and bugs in the issue tracker:

https://github.com/SBRG/escher-fba-feedback/issues

And you can add to our development roadmap:

https://github.com/SBRG/escher-fba-feedback/wiki/Development-Roadmap

## Where is the Escher-FBA source code?

Escher-FBA is not currently open source. However, it is free to use.

Many of the features in Escher-FBA are part of the Escher project, which is open source and available under the MIT license:

https://github.com/zakandrewking/escher

repository: SBRG/escher-fba-feedback

repo_name: SBRG/escher-fba-feedback


text:
# svs-tiler
Instructions and code for tiling pathology image (svs) files

## Overview
We will be using libvips (https://github.com/jcupitt/libvips) for processing the .svs image files. All instructions were tested on Ubuntu 14.04.

### Install vips dependencies
sudo apt-get install libvips-tools
sudo apt-get install libvips --no-install-recommends
#### patch to fix broken libopenjpeg2 library
sudo dpkg -i libopenjpeg2_1.3+dfsg-4.6ubuntu2_amd64.deb

### Example usage
vips dzsave output_files_dir_name svs_image_name.svs --background 0 --centre --layout dz

### TODO
Update /examples folder with more examples of usage (e.g. with TCGA data)

repository: SemanticMD/svs-tiler

repo_name: SemanticMD/svs-tiler


text:
# Grilled Coconut and Pineapple Sweet Chili Shrimp

## Overview

- Yield: 4 servings
- Prep Time: 10 mins
- Cook Time: 10 mins
- Total Time: 20 mins

## Ingredients

#### Coconut and Pineapple Sweet Chili Sauce:

- 3 tablespoons coconut cream

- 3 tablespoons pineapple sweet chili sauce*

- 1 teaspoon sriracha, or to taste

#### Grilled Shrimp:

- 1 pound (20-25 or 16-20) shrimp, peeled and deveined

- 2 slices pineapple, cut into 1/2 inch pieces

## Method

#### For the coconut and pineapple sweet chili sauce:

1. Mix everything.
---

#### For the grilled shrimp:

1. Skewer the shrimp and pineapple and grill over medium-high heat until cooked, about 2-3 minutes per side.
---
2. Brush the sauce onto the shrimp and enjoy!
---

#### Notes

- You can just puree the pineapple into the chili sauce for a smoother consistency.

## References and Acknowledgments

[Grilled Coconut and Pineapple Sweet Chili Shrimp](http://www.closetcooking.com/2015/06/grilled-coconut-and-pineapple-sweet.html)

## Tags
verified

repository: troyerta/recipes

repo_name: troyerta/recipes


text:
# Clothing Texture Alignment (Boundary Extrapolation)
Clothing texture alignment or boundary extrapolation for matching the extended binary masks/silhouettes and hiding the artifacts generated in 3D clothing reconstruction.

## 1) Texture alignment using TPS transformation

### Steps of implementation:
- Mask dilation (for extrapolating out of boundary)
- Get contours and matching points (padded points outside of boundary for extrapolation)
- Apply TPS transformation for extending textures
- Merge original eroded clothing texture with the extended parts

## 2) Texture alignment using dilation operation

### Steps of implementation:
- Mask dilation (for extrapolating out of boundary)
- Apply gray dilation separately on each channel of the clothing image, then merge
- Merge original eroded clothing texture with the dilated parts


text:
---
title: data Objects
sidebar: flexberry-orm_sidebar
keywords: DataObject Flexberry ORM methods
summary: Characteristics, methods, and properties of the data object
toc: true
permalink: en/fo_data-object.html
lang: en
autotranslated: true
hash: 1f5924578a85ba5da5dd5c9c0f47cfb40f2afcd2f85e82d49662279c74ead6b9
---

In Flexberry ORM **data objects** instances of classes are called heirs of the abstract class `ICSSoft.STORMNET.DataObject`. For data objects Flexberry generators generate code for class .Net CLR-compliant language (C#, VB, etc.).

## Data objects in the model

[Classes of data objects](fo_data-object-structure.html) are described in [class diagram](fd_class-diagram-constraction.html) in [Flexberry Designer](fd_flexberry-designer.html) and have the stereotype [implementation](fd_data-classes.html). In the description of the data object are specified [attributes](fo_attributes-class-data.html), context and metadata.

The attributes of the data object can be of two types standard (described in the diagram) and dynamic [dynamic properties of the data object](fo_dynamic-properties.html). If the attribute value is not supposed to be placed in the repository, it can be declared as [phranky](fo_not-stored-attributes.html). In the description of the attributes may be assigned to the [default values](fo_features-dafault-value.html).

Also Flexberry ORM supports several types of links: [inheritance](fd_inheritance.html), [artisans](fd_master-association.html) and [Decalogue](fo_detail-associations-properties.html) communication.

The data objects may be linked to additional information (meta-information), for example, [views](fd_view-definition.html) or [picture](fo_class-image.html).

Stereotype [implementation](fd_data-classes.html) is the default value, i.e. when developing the chart it can be omitted leaving a blank.

## Data objects at run time

The life cycle of a data object traditionally consists of three stages:

* Create.
* Treatment.
* Save.

## Create a data object

The data object can be created in the following ways:

* Create an instance of the class standard means of language
* Download from repository methods LoadObject/LoadObjects [data service](fo_data-service.html).
* [Prototyping](fo_data-object-prototype.html)
* [Copy](fo_copying-data-objects.html).
* [Deserialize a previously saved object](fo_aggregating-function.html).

## Processing of the data object

One of the main attributes of an object is [object key](fo_primary-keys-objects.html), for which property is used `PrimaryKey`. In most cases, the key is the global unique identifier (GUID), although if necessary, can be used other types.

The most common problems in the processing data objects:

* [Change in attribute values](fo_own-object-attributes.html).
* [Obtaining information about the object status](fo_processing-status-condition-load.html).
* [Obtaining information about the loaded properties](fo_definition-loaded-properties.html).
* [Obtaining object metadata](fo_methods-class-information.html).
* [Lock object for exclusive editing](fo_lock-service.html).
* [Verification of compatibility of object and representation](fo_test-object-for-viewing.html).
* [Receipt of presentation of the value of the data object](fo_get-presentation-value.html)
* [Dochitcu of data object](fo_additional-loading.html)

## Saving the data object in the repository

To save the data object uses the methods of [data service](fo_data-service.html) UpdateObject/UpdateObjects. When working with data objects important concepts are [the status of objects, the upload status](fo_object-status.html) and [copy data](fo_data-object-copy.html).

## The basic properties and methods ICSSoft.STORMNET.DataObject

### Work with a copy of the data

#### GetDataCopy

__Assign__: Get the internal copy of the data object

__Signature__:

```csharp
DataObject ICSSoft.STORMNET.DataObject.GetDataCopy()
```

#### InitDataCopy

__Assign__ to Initialize the copy of the data

__Settings__:

`DataObjectCache`

__Signature__:

```csharp
// 1
void ICSSoft.STORMNET.DataObject.InitDataCopy()

// 2
void ICSSoft.STORMNET.DataObject.InitDataCopy(DataObjectCache DataObjectCache)
```

#### SetDataCopy

__Assign__: Set the internal copy of the data object

__Settings__:

`value` - Set object as a copy of an existing

__Signature__:

```csharp
void ICSSoft.STORMNET.DataObject.SetDataCopy (DataObject value)
```

### Getting and setting the state of the object

#### ContainsAlteredProps

__Assign__: Set whether the values of object properties in comparison with internal copy of

__Signature__:

```csharp
bool ICSSoft.STORMNET.DataObject.ContainsAlteredProps()
```

#### GetAlteredPropertyNames

__Assign__: Returns a list of properties (attributes, supervisors, datalow), the values of which are changed in comparison with the internal copy of the object.

__Signature__:

```csharp
string[] ICSSoft.STORMNET.DataObject.GetAlteredPropertyNames()
```

#### CheckNotNullProperties

__Assign__: Return a list of blank fields (values can't be empty according to data model)

__Settings__:

* `detailSkip` - Skip if you check the deleted detaily. A dictionary with a list of the types of datalow and flags for them. If detail not in the dictionary or a value for it to False, then check detail not to be missed. The parameter can be null.
* `view` - the View on which properties are checked and the return of property title.
* `returnCaptions` - true if the necessity to return the header properties from the view, not the names of the properties, false otherwise.

__Signature__:

```csharp
// 1
public string[] CheckNotNullProperties()

// 2
string [] ICSSoft.STORMNET.DataObject.CheckNotNullProperties (Dictionary<Type, bool> detailSkip)

// 3
public string[] CheckNotNullProperties(View view, bool returnCaptions)

// 4
public string[] CheckNotNullProperties(View view, bool returnCaptions, Dictionary<Type, bool> detailSkip)
```

#### GetStatus

__Assign__: getting the value of object status

__Settings__:

`recountIfAutoaltered` - update value of the force (if a class with automatic calculation status)

__Signature__:

```csharp
// 1
ObjectStatus ICSSoft.STORMNET.DataObject.GetStatus()

// 2
ObjectStatus ICSSoft.STORMNET.DataObject.GetStatus(bool recountIfAutoaltered)
```

#### SetLoadingState

__Assign__: set the status of the download.

__Settings__:

`newState` - load Status, set by the object.

__Signature__:

```csharp
void ICSSoft.STORMNET.DataObject.SetLoadingState (LoadingState newState)
```

#### SetLoadedProperties

__Assign__: set the status of the download.

__Settings__:

`newState` - load Status, set by the object.

__Signature__:

```csharp
void ICSSoft.STORMNET.DataObject.SetLoadingState (LoadingState newState)
```

#### SetStatus

__Assign__: set status

__Settings__:

`newState` - Status, set by the object.

__Signature__:

```csharp
virtual void ICSSoft.STORMNET.DataObject.SetStatus (ObjectStatus newState)
```

### Copying and duplication of data objects

#### CopyTo

__Assign__ to Create copy of the data object. If the resulting copy of the object will be placed in storage, it is necessary to call the methods `InitDataCopy` or `ClearDataCopy`.

__Settings__:

* `toObject` = object this, which
* `CreateDataObjectsCopy` - true - to create copies of linked objects, false - limited to copying and pasting the link
* `PrimaryKeyCopy` - true - copy primary keys
* `UseParentCaching` - use a previously-installed caching

__Signature__:

```csharp
  virtual void ICSSoft.STORMNET.DataObject.CopyTo(DataObject toObject,
  bool  CreateDataObjectsCopy,
  bool  PrimaryKeyCopy,
  bool  UseParentCaching
 )
 ```

#### Prototyping

__Assign__ A: Prototypicality

__Settings__:

`withDetails` - with or without detaylari

__Signature__:

```csharp virtual void ICSSoft.STORMNET.DataObject.Prototyping()
virtual void ICSSoft.STORMNET.DataObject.Prototyping(bool withDetails)
```

#### SetExistObjectPrimaryKey

__Assign__: Set the primary key in the data object. The operation is performed Clear() object is assigned a primary key, SetLoadingState(LoadingState.LightLoaded); SetLoadedProperties("__PrimaryKey");

__Settings__:

`primaryKey` - primary key

__Signature__:

```csharp
void ICSSoft.STORMNET.DataObject.SetExistObjectPrimaryKey (object primaryKey)
```

### Lock object

#### LockObject

__Assign__ to Lock the object

__Settings__:

`key` key lock facility

__Signature__:

```csharp
void ICSSoft.STORMNET.DataObject.LockObject(object key)
```

#### UnLockObject

__Assign__: to Unlock the object

__Settings__:

`key` - the key lock feature.

__Signature__:

```csharp
void ICSSoft.STORMNET.DataObject.UnLockObject (object key)
```

gha_language: CSS


text:
# akka-elasticsearch
An ElasticSearch extension for Akka. The extension registers a single instance of the elasticsearch client as node,
that can be configured by an `application.conf` that points to a `elasticsearch.yml` file. Using docker containers
the `elasticsearch.yml` can be loaded from the file system, url or classpath. The extension makes use of the work
done by [Stephen Samuel](https://github.com/sksamuel), many thanks to him and the committers of
[elastic4s - Elasticsearch Scala Client](https://github.com/sksamuel/elastic4s), thanks thanks thanks!!

[![Build Status](https://travis-ci.org/dnvriend/akka-elasticsearch.svg?branch=master)](https://travis-ci.org/dnvriend/akka-elasticsearch)
[![License](http://img.shields.io/:license-Apache%202-red.svg)](http://www.apache.org/licenses/LICENSE-2.0.txt)
[![Coverage Status](https://coveralls.io/repos/dnvriend/akka-elasticsearch/badge.svg?branch=master&service=github)](https://coveralls.io/github/dnvriend/akka-elasticsearch?branch=master)

# Dependency
To include the akka-elasticsearch extension to your project, add the following lines to your build.sbt:

 ```bash
resolvers += "dnvriend at bintray" at "http://dl.bintray.com/dnvriend/maven"

libraryDependencies += "com.github.dnvriend" %% "akka-elasticsearch" % "1.0.4"
```

# What's new?

### v1.0.6 (2015-07-11)
  - elastic4s v1.6.4 -> v1.6.5

### v1.0.5 (2015-07-10)
  - akka v2.3.11 -> v2.3.12
  - elastic4s v1.6.0 -> v1.6.4

### v1.0.4 (2015-07-06)
  - Took the project out of the mothballs, using it in production,
  - Loading config from classpath, directory or url,
  - elastic4s v1.3.2 -> v1.6.0

# Usage
Launch the extension:

```scala
import com.github.dnvriend.elasticsearch.extension.ElasticSearch
import com.sksamuel.elastic4s.ElasticClient

val system = ActorSystem()
val elasticSearch = ElasticSearch(system)
val client: ElasticClient = elasticSearch.client
```
You can also register the extension in application.conf:

```bash
akka {
    extensions = ["com.github.dnvriend.elasticsearch.extension.ElasticSearch"]
}
```

# Configure the elasticsearch node
The extension can be configured by means of `application.conf`. You have to configure the path to the
`elasticsearch.yml` file, that can be on an URL (like etc.d), the filesystem (docker container) or classpath.

```bash
elasticsearch {
  settings = "classpath://elasticsearch.yml"
}
```

# Execute a query
To execute a query:

```scala
import com.sksamuel.elastic4s.ElasticDsl._
import org.elasticsearch.search.sort.SortOrder

val mySearchDef = search in "orders" -> "order" sort { by field "created" order SortOrder.DESC} limit 100

val response: Future[SearchResponse] = elasticSearch.doSearch(mySearchDef)
```

# To index
To index:

```scala
import com.sksamuel.elastic4s.source.DocumentMap

case class Order(orderId: String, created: String) extends DocumentMap {
  def map = Map("orderId" -> orderId, "created" -> created)
}

val myIndexDefinition = index into "orders" -> "order" doc Order(UUID.randomUUID.toString, "2014-01-01")

val response: Future[IndexResponse] = elasticSearch.doIndex(myIndexDefinition)
```

repository: dnvriend/akka-elasticsearch

repo_name: dnvriend/akka-elasticsearch


text:
# Grafungi

The simple graph library. It contains an embedded graph database, webservice for multi entity graphs and bayesian networks.

## Starting

```
git clone https://github.com/flohannes/grafungi.git
cd grafungi
mvn clean install
java -jar query-ws/target/query-ws-1.0-SNAPSHOT.jar -port 8012 -dbpath /anypathto/graphdata/ -dummydata
```

## Test
Test by enter the following link to the browser: http://localhost:8012/graphs/all

## BN Visualization
open the following file with a browser: bnvis/Vis.html

repository: flohannes/grafungi

repo_name: flohannes/grafungi


text:
# Lambda Lets-Encrypt

Use [AWS Lambda](https://aws.amazon.com/lambda/) to manage SSL certificates for
any site that uses [Amazon's CloudFront CDN](https://aws.amazon.com/cloudfront/).

# Why do I want this?
Rather than having to dedicate a machine to running the Lets-Encrypt client to
maintain your certificate for your CloudFront distribution, you can let it all
live on Amazon's infrastructure for cheap. You'll receive notification if
anything goes wrong, and there's no hardware or virtual machines for you to
manage.

## How do I use this?
If you just want it to work and be done there is a wizard that will do all the
work for you. Or if you're more of a power user and want to see what all is
going on you can follow the steps to configure it manually.

### Automatic Wizard

1. Download this repo

2. Install the required dependency with `pip install boto3`

3. Save your AWS credentials:

    * install [`awscli`](https://aws.amazon.com/cli/) and run `aws configure`, **or**
    * manually create the file `~/.aws/credentials` with the following contents:

        ```ini
        [default]
        aws_access_key_id = YOUR_ACCESS_KEY
        aws_secret_access_key = YOUR_SECRET_KEY
        region = us-east-1 ; Replace with your region
        ```

4. Run `python wizard.py`

    This will

    * ask you a few questions about your desired set up
    * create a configuration file
    * upload the lambda function for you
    * help you manually configure the lambda's daily scheduling (this can't be done automatically because there's no API yet)

### Manual Setup
More docs coming soon.

# How does it work?

This works by running a Lambda function once per day which will check
your certificate's expiration, and renew it if it is nearing expiration.

Since Lambda is billed in 100ms increments and this only needs to run once a day
for less than 10seconds each time the cost to run this is less than a
penny per month(i.e. effectively free)

## But I only have a static S3 website, how do I use this?
See the guide:
[Configuring a static S3 website to use CloudFront](./Readme_S3.md)

## Reporting Bugs/Feature Requests
The goal of this project is to make it as simple as possible for anyone to add
encryption to their (cloudfront hosted) website. Anything that makes you
uncertain should be
[filed as an issue](https://github.com/ubergeek42/lambda-lets-encrypt/issues).

## Special Thanks
I want to thank @diafygi for https://github.com/diafygi/acme-tiny, which I've
borrowed some code for so as not to need any python-openssl dependencies(which
isn't easily available in Lambda).

## Hacking

### Python Dependencies(for local development):
* boto3
* python-dateutil

repository: gregwhitaker/lambda-letsencrypt

repo_name: gregwhitaker/lambda-letsencrypt