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 href="#" onclick="NewServiceWizard.add_new_service_tariff({"data":{},"url":"http://localhost:3000/services/3612/service_tariffs/new"});; return false;">Add a new service tariff</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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<!-- path of this file : required_field_style/app/views/accounts/new.html.erb --> | |
<% form_for (@account), :url => '' do |f| %> | |
<%= f.label :account_no %><br /> | |
<%= f.text_field :account_no %><br /> | |
<%= f.label :company_name %><br /> | |
<%= f.text_field :company_name %><br /> | |
<% 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
# location of this file : required_field_style/spec/required_field_style_spec.rb | |
require 'spec_helper' | |
module RequiredFieldStyle | |
describe '/accounts/new.html.erb', :type => :view do | |
it 'should render mandatory style for required field' do | |
required_field = 'Account no' | |
mandatory_style = '<sup style=\"color:red\"> *</sup>' | |
assigns[:account] = Account.new |
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
require 'rubygems' | |
require 'benchmark' | |
phone1 = { phone_number: '0434889994', plan: 'standard' } | |
phone2 = { phone_number: '0452649226', plan: 'standard' } | |
phone3 = { phone_number: '0434556677', plan: 'data_only' } | |
phone4 = { phone_numner: '0434889995', plan: 'data_only' } | |
array_of_hash = [phone1, phone2, phone3, phone4] | |
proc_find = ->(s) {s[:plan] == 'standard'} |
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
/opt/redis/redis-stable/src/redis-cli | |
HDEL schedules key check_instagram_tags_number |
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
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<TextView | |
android:layout_width="wrap_content" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.mock"> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" |
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
package com.example.mock | |
import android.os.Bundle | |
import android.os.StrictMode | |
import androidx.appcompat.app.AppCompatActivity | |
import kotlinx.android.synthetic.main.activity_main.* | |
import java.io.BufferedReader | |
import java.io.IOException | |
import java.io.InputStream | |
import java.io.InputStreamReader |
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
package com.example.mock | |
import androidx.test.espresso.Espresso.onView | |
import androidx.test.espresso.action.ViewActions | |
import androidx.test.espresso.assertion.ViewAssertions | |
import androidx.test.espresso.matcher.ViewMatchers | |
import androidx.test.ext.junit.runners.AndroidJUnit4 | |
import androidx.test.rule.ActivityTestRule | |
import org.hamcrest.core.StringContains | |
import org.junit.Rule |
OlderNewer