You need to provide some classes and decorators yourself to maintain the same style as [email protected]
.
@EntityRepository(UserEntity)
export class UserRepository extends Repository<UserEntity> {}
↓
### This gist is a part of the NestJS Zero to Hero course on Udemy. | |
### https://www.udemy.com/course/nestjs-zero-to-hero/?referralCode=F672C0C701844DC91F4D | |
To run PostgreSQL on Docker, run the following in your Terminal: | |
docker run --name postgres-nest -p 5432:5432 -e POSTGRES_PASSWORD=postgres -d postgres |
/** | |
* Instagram web unfollow script | |
* | |
* WHAT IS IT? | |
* A script to unfollow people in the instagram website | |
* | |
* WHY? | |
* I needed to clean my account so I quickly did this | |
* | |
* HOW TO USE: |
You need to provide some classes and decorators yourself to maintain the same style as [email protected]
.
@EntityRepository(UserEntity)
export class UserRepository extends Repository<UserEntity> {}
↓
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
http://cronus.allowed.org works for me, 2018.1.6 |
private lateinit var binding: ActivityMainBinding | |
binding = DataBindingUtil.setContentView(this, R.layout.activity_main) | |
// Set view model | |
binding.viewModel = viewModel | |
// Execute pending binding data | |
binding.executePendingBindings() | |
// View model | |
val viewModel = ViewModelProviders.of(this, viewModelFactory).get(MainViewModel::class.java) |
Core Animation's original name is Layer Kit
Core Animation is a compositing engine; its job is to compose different pieces of visual content on the screen, and to do so as fast as possible. The content in question is divided into individual layers stored in a hierarchy known as the layer tree
. This tree forms the underpinning for all of UIKit, and for everything that you see on the screen in an iOS application.
In UIView, tasks such as rendering, layout and animation are all managed by a Core Animation class called CALayer
. The only major feature of UIView that isn’t handled by CALayer is user interaction.
There are four hierarchies, each performing a different role:
You can use this class to realize a simple sectioned RecyclerView.Adapter
without changing your code.
The RecyclerView
should use a LinearLayoutManager
.
You can use this code also with the TwoWayView
with the ListLayoutManager
(https://github.com/lucasr/twoway-view)
This is a porting of the class SimpleSectionedListAdapter
provided by Google
Example:
/* | |
* Copyright (C) 2014 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
public class ColoredSnackBar { | |
private static final int red = 0xfff44336; | |
private static final int green = 0xff4caf50; | |
private static final int blue = 0xff2195f3; | |
private static final int orange = 0xffffc107; | |
private static View getSnackBarLayout(Snackbar snackbar) { | |
if (snackbar != null) { |