gem 'simple_form'
rails generate simple_form:install
L1 | |
Базовые знание диалекта Typescript, основных встроенных примитивов (Array, Object, Function, String, Date) и методов работы с ними, понимание контекста (this) и способов управления им | |
Базовые знания фреймворка React | |
Знание наиболее часто используемых Web API: fetch/XHR, Storage, PostMessage, DOM | |
Умение писать простейшие алгоритмы (поиск, сортировка, сравнение объектов) без требований к их оптимальности. | |
Навыки кроссбраузерной адаптивной верстки по макету с использованием существующего кода, знание CSS и препроцессора SCSS | |
Навыки отладки разметки в браузерах Chrome/Safari | |
Знание принципов работы HTTP, отличий между различными методами, принципов работы Cookies | |
Практическое владение лучшими практиками структурирования кода: SOLID/DRY/KISS и т.д. | |
Базовые знания git, понимание git flow |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
By default, Rails applications build URLs based on the primary key -- the id
column from the database. Imagine we have a Person
model and associated controller. We have a person record for Bob Martin
that has id
number 6
. The URL for his show page would be:
/people/6
But, for aesthetic or SEO purposes, we want Bob's name in the URL. The last segment, the 6
here, is called the "slug". Let's look at a few ways to implement better slugs.
# before (legacy model) | |
# app/models/user.rb | |
class User < ActiveRecord::Base | |
validates :name, length: { maximum: 100 } | |
validates :lastname, length: { maximum: 100 } | |
validates :patronymic, length: { maximum: 100 } | |
before_save :capitalize_name!, :if => :name_process_needed? | |
private |
(1..5).include?(2..3) # => false | |
require 'active_support/all' | |
(1..5).include?(2..3) # => true |
# Keep in mind that when asking for a `return` after another, only the first one will be output. | |
# This example is meant as a simple starting point, to show how to get the information in the simplest available way. | |
# Google Chrome | |
tell application "Google Chrome" to return URL of active tab of front window | |
tell application "Google Chrome" to return title of active tab of front window | |
# Google Chrome Canary | |
tell application "Google Chrome Canary" to return URL of active tab of front window | |
tell application "Google Chrome Canary" to return title of active tab of front window | |
# Chromium |
Nr,Rmag,e.Rmag,ApDRmag,mumax,Mcz,e.Mcz,MCzml,chi2red,UjMAG,e.UjMAG,BjMAG,e.BjMAG,VjMAG,e.VjMAG,usMAG,e.usMAG,gsMAG,e.gsMAG,rsMAG,e.rsMAG,UbMAG,e.UbMAG,BbMAG,e.BbMAG,VnMAG,e.VbMAG,S280MAG,e.S280MA,W420FE,e.W420FE,W462FE,e.W462FE,W485FD,e.W485FD,W518FE,e.W518FE,W571FS,e.W571FS,W604FE,e.W604FE,W646FD,e.W646FD,W696FE,e.W696FE,W753FE,e.W753FE,W815FS,e.W815FS,W856FD,e.W856FD,W914FD,e.W914FD,W914FE,e.W914FE,UFS,e.UFS,BFS,e.BFS,VFD,e.VFD,RFS,e.RFS,IFD,e.IFD | |
6,24.995,0.097,0.935,24.214,0.832,0.036,1.4,0.64,-17.67,0.14,-17.54,0.25,-17.76,0.25,-17.83,0.14,-17.6,0.25,-17.97,0.25,-17.76,0.14,-17.53,0.25,-17.76,0.25,-18.22,0.17,6.60E-04,3.85E-03,1.27E-02,3.72E-03,1.89E-02,4.48E-03,1.82E-02,3.55E-03,1.47E-02,3.01E-03,1.66E-02,4.09E-03,1.88E-02,5.63E-03,2.46E-02,3.51E-03,2.45E-02,5.24E-03,2.16E-02,2.66E-03,2.44E-02,5.46E-03,3.77E-02,6.10E-03,1.17E-02,1.01E-02,1.87E-02,2.39E-03,1.63E-02,1.29E-03,1.73E-02,1.41E-03,1.65E-02,4.34E-04,2.47E-02,4.83E-03 | |
9,25.013,0.181,-0.135,25.303,0.927,0.122,0.864,0.41,-18.28,0.22,17.86,0.55,-18 |
Null values indicated by space character.