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
https://wiki.rockylinux.org/links/ |
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
seleniumeasy.com | |
https://demo.seleniumeasy.com/ #testing ground | |
https://selenium-python.readthedocs.io/ | |
http://allselenium.info/python-selenium-commands-cheat-sheet-frequently-used/ | |
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
#Navigating | |
visit articles_path | |
#Clicking links and buttons | |
click_on 'Link Text' | |
click_button | |
click_link | |
#Interacting with forms | |
attach_file 'Image', '/path/to/image.jpg' |
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
rails new #APP_NAME# -d mysql --skip-turbolinks | |
#to create new rails app version specific: | |
rails _6.0.0_ new hello_app | |
#to skip the default bundle command to ensure compatibility with the version already installed: | |
rails _6.1.4.6_ new hello_app --skip-bundle | |
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
// from the Node library: aos | |
// syntax | |
<div | |
data-aos="fade-up" | |
data-aos-offset="200" | |
data-aos-delay="50" | |
data-aos-duration="1000" | |
data-aos-easing="ease-in-out" | |
data-aos-mirror="true" | |
data-aos-once="false" |
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
-(NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath { | |
UITableViewRowAction *button = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Delete" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) | |
{ | |
NSLog(@"Action to perform with Button 1"); | |
}]; | |
button.backgroundColor = [UIColor redColor]; //arbitrary color | |
UITableViewRowAction *button2 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Mark\nRead" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) | |
{ | |
NSLog(@"Action to perform with Button2!"); | |
}]; |
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
/*A class called Pair has already been declared, but the constructors have not been implemented yet. Pair has two public member variables: | |
int *pa,*pb; | |
These two "pointers to int" are intended to point to heap memory locations that store integers. The remainder of the Pair class expects the following functionality. | |
A single constructor Pair(int a, int b): This should set up pa and pb to point to newly allocated memory locations on the heap. The integers at those memory locations should be assigned values according to the constructor's integer arguments a and b. | |
A copy constructor Pair(const Pair& other): This takes as its argument a read-only reference to another Pair. It should set up the newly constructed Pair as a "deep copy," that is, it should create a new Pair that is equivalent to the other Pair based on dereferenced values but does not reuse any of the same memory locations. In other words, the copy constructor should set up its own instance's member variables pa and pb to point to newly a |
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
const exponentiate = (base, power) => { | |
let exponentiatedValue = 1; | |
for (i = 1; i <= power; ++i) { | |
exponentiatedValue *= base; | |
} | |
return exponentiatedValue; | |
} | |
// can do the same thing with: |
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
my_list = [1,2,3] | |
def only_odd(item): | |
return item % 2 != 0 | |
print(list(filter(only_odd, my_list))) | |
#=> [1,3] | |
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
#app/models/user.rb | |
class User < ApplicationRecord | |
has_many :microposts, dependent: :destroy | |
has_many :active_relationships, class_name: "Relationship", | |
foreign_key: "follower_id", | |
dependent: :destroy | |
has_many :passive_relationships, class_name: "Relationship", | |
foreign_key: "followed_id", | |
dependent: :destroy | |
has_many :following, through: :active_relationships, source: :followed |