This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> // подключаем заголовочный файл iostream | |
| using namespace std; | |
| void eatFood(string &food) { | |
| food = food + " съедена :-)"; | |
| } | |
| int main() // определяем функцию main | |
| { // начало функции | |
| cout << "Привет!" << "\n"; // выводим строку на консоль |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :bowtie: | |
| :smile: 😄 | |
| :simple_smile: | |
| :laughing: 😆 | |
| :blush: 😊 | |
| :smiley: 😃 | |
| :relaxed: ☺ | |
| :smirk: 😏 | |
| :heart_eyes: 😍 | |
| :kissing_heart: 😘 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gem install mysql2 -- \ | |
| --with-mysql-lib=/opt/homebrew/Cellar/mysql/8.0.27/lib \ | |
| --with-mysql-dir=/opt/homebrew/Cellar/mysql/8.0.27 \ | |
| --with-mysql-config=/opt/homebrew/Cellar/mysql/8.0.27/bin/mysql_config \ | |
| --with-mysql-include=/opt/homebrew/Cellar/mysql/8.0.27/include |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| whenever /var/spool/cron/: mkstemp: Permission denied | |
| I ended up adding all the users to the crontab group, and setting the group ownership of all needed files to that crontab group. | |
| A lot of permissions were messed up. Changing the group ownership to something else first "resets" those permissions. | |
| The crontab executable: | |
| sudo chgrp crontab /usr/bin/crontab | |
| sudo chmod g+s /usr/bin/crontab | |
| Result: -rwxrwsr-x 1 root crontab 37K 2010-04-15 08:51 /usr/bin/crontab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Faker generate duplicate data with FactoryGirl | |
| Use brackets! | |
| FactoryGirl.define do | |
| factory :user do | |
| name { Faker::Name.name } | |
| email { Faker::Internet.email } | |
| provider "google_oauth2" | |
| uid { Faker::Lorem.word } | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get only domain from uri | |
| "http://example.com".replace('http://','').replace('https://','').split(/[/?#]/)[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * File: demo_table_jui.css | |
| * CVS: $Id$ | |
| * Description: CSS descriptions for DataTables demo pages | |
| * Author: Allan Jardine | |
| * Created: Tue May 12 06:47:22 BST 2009 | |
| * Modified: $Date$ by $Author$ | |
| * Language: CSS | |
| * Project: DataTables | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| The Apache 2 module was successfully installed. | |
| Please edit your Apache configuration file, and add these lines: | |
| LoadModule passenger_module /root/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/passenger-4.0.5/libout/apache2/mod_passenger.so | |
| PassengerRoot /root/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/passenger-4.0.5 | |
| PassengerDefaultRuby /root/.rbenv/versions/2.0.0-p195/bin/ruby | |
| After you restart Apache, you are ready to deploy any number of Ruby on Rails | |
| applications on Apache, without any further Ruby on Rails-specific |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Promo < ActiveRecord::Base | |
| attr_accessible :count_items, :description, :end_at, :name, :short_description, | |
| :start_at, :promo_images_attributes, :category_id, :employe_ids, :point_ids | |
| belongs_to :company | |
| belongs_to :category | |
| has_many :promo_images #photos of promo, display on devise | |
| has_many :coupons | |
| has_and_belongs_to_many :employes | |
| has_and_belongs_to_many :points | |
| accepts_nested_attributes_for :promo_images, allow_destroy: true #need for working nested form |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 13:14:15 Начало тестирования | |
| 13:14:15 Задан вопрос "Какой будет результат выполнения следующего кода на PHP: | |
| class A { | |
| static public $i = 1; | |
| static public function get_i() { | |
| return self::$i; | |
| } | |
| static public function print_i() { | |
| echo static::get_i(); |
NewerOlder