This file contains 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
# -*- coding: utf-8 -*- | |
from selenium import webdriver | |
import time | |
import unittest | |
dr = webdriver.Chrome() | |
dr.get("http://192.168.10.21:28080/admin/tag/list.do") | |
jqueryPath = 'D:/jquery-1.7.1.js' | |
jqueryFile = open(jqueryPath) |
This file contains 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
source "https://rubygems.org" | |
gem "rake" | |
# Screens | |
gem "ProMotion" | |
gem 'motion-layout' |
This file contains 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
function List() { | |
this.listSize = 0; | |
this.pos = 0; | |
this.dataSource = []; | |
this.clear = clear; | |
this.find = find; | |
this.toString = toString; | |
this.insert = insert; | |
this.append = append; | |
this.remove = remove; |
This file contains 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
function Stack() { | |
this.dataSource = []; | |
this.top = 0; | |
this.push = push; | |
this.pop = pop; | |
this.peek = peek; | |
this.clear = clear; | |
this.length = length; | |
function push(element) { |
This file contains 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
// insert sort implement using javascript | |
function print(what) { | |
console.log(what); | |
} | |
function insertSort(array) { | |
var currentPos, before; | |
for(currentPos = 1; currentPos < array.length; currentPos++) { |
This file contains 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
# insert sort using ruby | |
def insert_sort(array) | |
(1..array.size-1).each do |index| | |
key = array[index] | |
j = index - 1 | |
while key < array[j] && j >= 0 | |
array[j + 1] = array[j] | |
j = j-1 | |
end #while |
This file contains 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
# insert sort using python | |
def insert_sort(the_list): | |
for i in range(1,len(the_list)): | |
print 'key is %d' %(key) | |
current = i - 1 | |
while the_list[current] > key and current >= 0: | |
the_list[current + 1] = the_list[current] | |
current = current - 1 | |
This file contains 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 <stdio.h> | |
int main() { | |
int arr[] = {1, 8, 9, 4, 8, 7, 2, 3, 4, 90, 34}; | |
int len = sizeof(arr) / sizeof(arr[0]); | |
int i; | |
for(i = 1; i < len - 1; i++) { | |
int key = arr[i]; | |
int j = i - 1; | |
while(arr[j] > key && j >=0) { |
This file contains 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
#coding: utf-8 | |
import unittest | |
from selenium import webdriver | |
import time | |
class LoginCase(unittest.TestCase): | |
def setUp(self): #每个用例执行之前执行 | |
print 'before test' |
This file contains 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 StockConfig | |
include ActiveModel::Validations | |
include ActiveModel::Conversion | |
extend ActiveModel::Naming | |
include Virtus.model | |
attribute :money, Integer | |
attribute :month, Integer | |
attribute :policy_id, Integer |
OlderNewer