query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
508bed0523ab832e5677dc25be3e2cc1 | This can be used only during the load of a package set It removes the given packages from the set of packages that will be built if 'package_set_name' is used. By default, all of the package set's packages are included. After a call to default_packages, only the packages listed (and their dependencies) are. | [
{
"docid": "617c70b1edc4e111a242a0b88c0aff80",
"score": "0.734085",
"text": "def remove_from_default(*names)\n pkg_set = Autoproj.current_package_set\n Autoproj.workspace.manifest.metapackage(pkg_set.name).packages.delete_if do |pkg|\n names.include?(pkg.name)\n end\nend",
"title": "... | [
{
"docid": "7d0ef0b08da3348c549c5e7d82490fa4",
"score": "0.707793",
"text": "def reset_package_sets\n @package_sets.clear\n end",
"title": ""
},
{
"docid": "2302d77d17484cc58dad8b9cc04cbc5c",
"score": "0.6866724",
"text": "def default_packages(*names)\n pkg_set =... |
d0f6993da384746f2793551e25de308b | Public: Change state exempt taxes status to true/false Example taxpayer_section.set_state_exempt_taxes(true) Returns nothing | [
{
"docid": "1092a00472978411048af0875bde650f",
"score": "0.8276618",
"text": "def set_state_exempt_taxes(status)\n edit_tax_exempt_btn.click\n state_tax_exempt_cb.uncheck unless status\n save_tax_exempt_btn.click\n end",
"title": ""
}
] | [
{
"docid": "e8edd54d91ddc5c63a689f0860899dad",
"score": "0.75764674",
"text": "def set_federal_exempt_taxes(status)\n edit_tax_exempt_btn.click\n federal_tax_exempt_cb.uncheck unless status\n save_tax_exempt_btn.click\n end",
"title": ""
},
{
"docid": "8344dcccfaf4b8e9e5fb3... |
d4f70ef80440db1461ee7262ec0da0db | POST /events POST /events.xml | [
{
"docid": "599efac83e88e7633d9ad351c5902033",
"score": "0.62164843",
"text": "def create\n @event = Event.new(params[:event])\n @event.id = params[:event][:id]\n\n respond_to do |format|\n if @event.save\n flash[:notice] = 'Event was successfully created.'\n format.html { re... | [
{
"docid": "1da98515e16ce7f6a536bbec1e36611d",
"score": "0.7437068",
"text": "def test_should_create_event_via_API_XML\r\n get \"/logout\"\r\n post \"/events.xml\", :api_key=>'testapikey',\r\n :event => {:name => 'Test API Event 1',\r\n ... |
2b7fdbb1008316166ff5d60ea47aa0f1 | Instantiates a strategy with a reference to the given configuration. | [
{
"docid": "a0444e46ba137754339e8d6dcee05015",
"score": "0.0",
"text": "def initialize(config={})\n @configuration = config\n end",
"title": ""
}
] | [
{
"docid": "c4c9b2bdb83350915227a351a22ddf27",
"score": "0.6425962",
"text": "def initialize(strategy)\n @strategy = strategy\n end",
"title": ""
},
{
"docid": "c4c9b2bdb83350915227a351a22ddf27",
"score": "0.6425962",
"text": "def initialize(strategy)\n @strategy = strategy\n ... |
6ddacdb1b79f87c280987aae3e421c9e | Produces a random French social security number (INSEE number). | [
{
"docid": "bedae1cb4923997d7419f27b533de4ed",
"score": "0.71952385",
"text": "def french_insee_number\n num = [\n [1, 2].sample(random: Faker::Config.random), # gender\n Faker::Number.between(from: 0, to: 99).to_s.rjust(2, '0'), # year of birth\n Faker::Number.between(... | [
{
"docid": "51b0402e818d7effe8a595e41d1e6906",
"score": "0.7223983",
"text": "def spanish_citizen_number\n num = Faker::Number.number(digits: 8)\n mod = num.to_i % 23\n check = CHECKS[mod]\n \"#{num}-#{check}\"\n end",
"title": ""
},
{
"docid": "dc0a5b7f85aaa... |
769352421c3b43b0b1586841c1869838 | A multilevel guess. The primary difference with +guess+ is that the result is always an array containing pairs: [paradigms, forms] and as such it might return multiple results (still each pair might be ambiguous. The second difference is that is uses a set of methods, each more complicated and slower than the previous,... | [
{
"docid": "54a4b10be08d836ad8818a347f085636",
"score": "0.77475345",
"text": "def multiguess(forms,type,tags,gender=nil)\n # 0) trivial cases\n type = Rlp::Grammar::FlexemeType.for_tag(type.to_sym)\n if type.paradigms.size == 1 && type.paradigms.first.suffixes.size == 1\n ... | [
{
"docid": "ac23323bd2605ff0b26f3932107e4987",
"score": "0.5237874",
"text": "def master_mind(solution, guess)\n hits = hit(solution, guess)\n pseudo_hits = psuedo_hit(solution, guess)\n \"hits: #{hits}\\n pseudo hits: #{pseudo_hits}\"\nend",
"title": ""
},
{
"docid": "b6ff08327add97e0bb6... |
3fa24fb79bbec898705188104cc83f12 | 1,0,1,... Does not affect the object's state. | [
{
"docid": "5b44cc186ab35d20230b0ff578c48cd5",
"score": "0.0",
"text": "def other_index(index)\n if index == 1 \n index = 0\n else\n index = 1\n end\n return index\n end",
"title": ""
}
] | [
{
"docid": "d168b76f93e41ca5d9ee163db8660ee1",
"score": "0.6476894",
"text": "def state(*) end",
"title": ""
},
{
"docid": "3ed8a887a3b2357c3b5ed42f9ab93798",
"score": "0.6472207",
"text": "def states=(_arg0); end",
"title": ""
},
{
"docid": "3ed8a887a3b2357c3b5ed42f9ab93... |
17639a129e223548c56009aa32d255a7 | check the token from Weixin Service is exist in local store. | [
{
"docid": "5e2faa61850b35032d13d0a7078e34da",
"score": "0.0",
"text": "def is_weixin_secret_key_valid?\n current_weixin_public_account.present?\n end",
"title": ""
}
] | [
{
"docid": "f47ef61f3b297b6c80250caf9479fff2",
"score": "0.69386184",
"text": "def check_token\n if session[:__token__] == params[:__token__] \n session[:__token__] = nil \n # session.update \n return true \n end \n false \n end",
"title": ""
},
{
... |
2d254e8a1279a2b191134300c2011405 | Turns makeable words into array of their letters, puts each array into vals, an array containing arrays of each words' letters | [
{
"docid": "747d29d2c1a5ae004fd44816545d070d",
"score": "0.59771174",
"text": "def move_vals\n\t\tvals = []\n\t\t@moves = possible_moves\n\t\t@moves.each do |word|\n\t\t\tword_letters = word.split(//)\n\t\t\tword_vals = []\n\n\t\t\tword_letters.each do |letter|\n\t\t\t\tword_vals << @table[letter.to_sym... | [
{
"docid": "bb7cf38c526d795d3be686c8473dcfbe",
"score": "0.709947",
"text": "def letter_array\n @word.chars.to_a\n end",
"title": ""
},
{
"docid": "83e24eca871a84ae367dce8c00cf82d1",
"score": "0.70264053",
"text": "def aba_array(words)\n words.map { |word| aba_translate(wo... |
328372b0ddf2fca28eef06b64ebb59e1 | POST /questions POST /questions.json Creates a new question | [
{
"docid": "1866b434451c7ee14df7aadd6c7dec2d",
"score": "0.7555404",
"text": "def create\n @question = Question.new(question_params)\n respond_to do |format|\n if @question.save\n format.html { redirect_to @question, notice: 'Question was successfully created.' }\n format.json {... | [
{
"docid": "56850646224a2709f3405ab227e6e9c2",
"score": "0.81200445",
"text": "def create\n \t@question = Question.new(questions_params)\n\n \trespond_to do |format|\n \t\tif @question.save\n \t\t\tformat.html { redirect_to @question, notice: 'question was successfully created.' }\n \t\t\tformat.js... |
8aeb47c4998060e4bce3fe0d0acf6d45 | GET /geo_locations GET /geo_locations.json | [
{
"docid": "7de1ff486844e1d502135e21d9422fa1",
"score": "0.71685416",
"text": "def index\n @geo_locations = GeoLocation.all\n end",
"title": ""
}
] | [
{
"docid": "5a045e60ef8597f6e1a8e45e32e24111",
"score": "0.7589828",
"text": "def locations(options={})\n get(\"/locations/search\")\n end",
"title": ""
},
{
"docid": "30cf3aaba2cf137b9aad8454273b78d0",
"score": "0.7553565",
"text": "def locations(opts = {})\n get 'loc... |
c822d2fbe9ff93d592b1c099be787e05 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Set Top Row ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | [
{
"docid": "0a0499827522473363ec44d814ecd10d",
"score": "0.73990357",
"text": "def top_row=(row)\n row = 0 if row < 0\n row = row_max - 1 if row > row_max - 1\n self.oy = @all_line_ys.empty? ? row * item_height : @all_line_ys[row]\n update_padding_bottom\n end",
"title": ""
}
] | [
{
"docid": "25283639a6b59a504f03c4b415a4081c",
"score": "0.7686045",
"text": "def top_row=(row)\n # if row is less than 0\n if row < 0\n # change it to 0\n row = 0\n # if row exceeds row_max - 1\n elsif row > row_max - 1\n # change it to row_max - 1\n row = row_max - 1\n ... |
efb2f4d06d23a861a9e47a335596015a | GET /step_eights/1 GET /step_eights/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "f1e63e42ed887f7a65aa5ae2b01dc904",
"score": "0.72039783",
"text": "def index\n @step_eights = StepEight.all\n end",
"title": ""
},
{
"docid": "7ff2e312cc921f428dd1f2c29d2bec38",
"score": "0.68943506",
"text": "def show\n render json: @step\n end",
"title": ""
... |
9e0d882f3ea9a53919b628dc8e5a5dbf | For use in the show method... determines the current mount point | [
{
"docid": "0e11da46f10b4c0be1337355cf8bc0c6",
"score": "0.6546445",
"text": "def get_active_mount_point( index )\n Comatose.mount_points.each do |path_info|\n if path_info[:index] == index\n return path_info\n end\n end\n {:root=>\"\", :index=>index}\n end",
"title": ""
... | [
{
"docid": "e1518a1eaafe0383c8d0cdf1cd579ca1",
"score": "0.7247484",
"text": "def mountpoint\n self\n end",
"title": ""
},
{
"docid": "e1518a1eaafe0383c8d0cdf1cd579ca1",
"score": "0.7247484",
"text": "def mountpoint\n self\n end",
"title": ""
},
{
"docid":... |
59cd53ec23e1d73545c9f379197f6266 | Collect the entire else branch, including whitespace and comments | [
{
"docid": "b9d42924f3028e139ff234746b764650",
"score": "0.0",
"text": "def else_range(node)\n if node.ternary?\n node.else_branch\n else\n range_between(node.loc.else.end_pos, node.loc.end.begin_pos)\n end\n end",
"title": ""
}
] | [
{
"docid": "c5c285f2a6c6974c4f18a9262c54b638",
"score": "0.72169685",
"text": "def expand_elses(branch); end",
"title": ""
},
{
"docid": "c5c285f2a6c6974c4f18a9262c54b638",
"score": "0.72169685",
"text": "def expand_elses(branch); end",
"title": ""
},
{
"docid": "ea51e080... |
f9aeb871bb1efff3e9eeee6586123034 | POST /events POST /events.json | [
{
"docid": "07451ee030857265fe4d6241ea6c02c9",
"score": "0.0",
"text": "def create\n #removing http:// if present\n if params[:event][:link].present?\n params[:event][:link] = params[:event][:link].split(\"http://\")[1]\n end\n \n @event = current_user.events.build(params[:event])\n ... | [
{
"docid": "8beb709b44028dcb6cde70ea2be23fa3",
"score": "0.76767963",
"text": "def create\n megam_rest.post_events(to_hash)\n end",
"title": ""
},
{
"docid": "2eac2345f845c02c8478dafe0b803519",
"score": "0.75318",
"text": "def create\n @event = Event.new(event_pa... |
63e3376410ae6b44da5dbed39c9eb647 | Tell if the page is correctly localized, meaning it is localized itself as well as its parent. | [
{
"docid": "71907533745d9de6408e953a34c8d794",
"score": "0.8101729",
"text": "def safely_translated?(page)\n if page.parent.nil?\n page.translated_in?(Locomotive::Mounter.locale)\n else\n page.parent.translated_in?(Locomotive::Mounter.locale) &&\n ... | [
{
"docid": "7090b11317a095ef2760a17640492d99",
"score": "0.72874326",
"text": "def localized?\n !!@localize\n end",
"title": ""
},
{
"docid": "bed3e2c62daf9f9bebc0ad9265dcb2fb",
"score": "0.69967306",
"text": "def localized?\n self.respond_to?(:\"#{_label_field_n... |
7331eb6f8bd4df1effa77490bfdeef4c | Given a hash with numeric values, return the key for the smallest value def key_for_min_value(name_hash) min_value = name_hash.value[0] min_key = name_hash.key[0] min_index = 0 current_index = 0 if !name_hash.empty? name_hash.each do |name,number| if number < min_value min_value = number min_index = current_index end c... | [
{
"docid": "f0fc6672c41ec2312bdd468d076bcfc2",
"score": "0.92535365",
"text": "def key_for_min_value(name_hash)\n current_key = \"\"\n current_value = Float::INFINITY\n if !name_hash.empty?\n\t name_hash.each do |key,value|\n if value < current_value\n current_value = value \n cur... | [
{
"docid": "c2427fbb3d9c5d3b60f998ec0326d3f5",
"score": "0.938552",
"text": "def key_for_min_value(name_hash)\n return nil if name_hash == nil || name_hash == {}\n number_array = name_hash.collect do |name, number|\n number\n end\n number_array.sort!\n name_hash.key(number_array[0])\nend",
"... |
7c9e192b411e480026ffa48e05579e06 | Replace normal Kaminari pagination rendering, which didn't work for me Isaac | [
{
"docid": "50e782ec03733da1a772d39623af5679",
"score": "0.0",
"text": "def paginate_products(products)\n \t\tcontent_tag :div, class: 'pagination product_pagination' do\n\t \t\tcontent_tag :ul do\n\t \t\t\tul_content = ''\n \t\t\t unless products.current_page == 1\n \t\tul_content... | [
{
"docid": "86c8905ec6ce5bda16494fae35247221",
"score": "0.7255112",
"text": "def paginator; end",
"title": ""
},
{
"docid": "1c1d8a2397d80198dde923f9cfb160bb",
"score": "0.7085773",
"text": "def paginate; false; end",
"title": ""
},
{
"docid": "e252d0ef1165a0e3f17483d875... |
b381a286e042817f3c47198fb845927d | Returns the value of attribute initial_cache. source://capybara//lib/capybara/driver/node.rb6 | [
{
"docid": "c7b07a0fbaedfe0e6dfd574c75bb44ce",
"score": "0.6433149",
"text": "def initial_cache; end",
"title": ""
}
] | [
{
"docid": "a9316d5f86ad9dc6241d33d8634a95fb",
"score": "0.5972091",
"text": "def set_attr_cached_values\n # Don't associate from an emtpy cache\n if attr_cache_store.keys.count > 0\n attr_cached_attributes.each do |attribute|\n # Will call _changed on attributes\n self[attribut... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "0fb91340cdd6dba76830f8e828afe250",
"score": "0.0",
"text": "def car_params\n params.require(:car).permit(:make, :model, :makeyear, :body, :version, :classification, :bodytype, :door, :seat, :engineplace, :drivetrain,\n photos_attributes: [:file, :description, :id])\n\n end",
... | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7495027",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.69566035",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
5f5816c170e3d0ad4c6aaaa703946ba2 | Set the minutes for the log. ==== Parameters minutes:: Minutes for the log. | [
{
"docid": "05439f2594dc75a03def34c15e1ba9e8",
"score": "0.8290395",
"text": "def setMinutes(minutes)\r\n\t\t\t\t\t@minutes = minutes\r\n\t\t\t\tend",
"title": ""
}
] | [
{
"docid": "b3e1ef2effddf629297da72e4d7df17c",
"score": "0.7732073",
"text": "def minutes=(minutes)\r\n\t\tif minutes.respond_to?( :to_i )\r\n\t\t\t@time += ( minutes.to_i * 60 )\r\n\t\tend\r\n\t\treturn self\r\n\tend",
"title": ""
},
{
"docid": "0ddc53ecbef9311dab57e407375f0a11",
"score... |
2f5fdd53c98490a74a556b109d1b12b7 | Return a new command with appended after hooks | [
{
"docid": "7037274b87716101f5563bbe091622d1",
"score": "0.6012651",
"text": "def after(*hooks)\n self.class.new(relation, **options, after: after_hooks + hooks)\n end",
"title": ""
}
] | [
{
"docid": "d0ea584e38ff2c05c74e651cb138ee84",
"score": "0.7011869",
"text": "def add_original_commands; end",
"title": ""
},
{
"docid": "01db2cc4db4c2b148bc66a5a92448bcf",
"score": "0.699675",
"text": "def add_original_commands\n end",
"title": ""
},
{
"docid": "15ba27b... |
f8d7175e3beea51e0058ed507d70e05e | 12h or 24h locale | [
{
"docid": "8007848bde909695ef1d1d2fe8b7df71",
"score": "0.5580732",
"text": "def picker_is_in_12h_locale\n screenshot_and_raise \"12h/24h mode is not applicable to this mode\" if picker_is_in_date_mode or picker_is_in_countdown_mode\n column = picker_column_for_period\n !query(\"pickerTableView inde... | [
{
"docid": "a43f4133b2cbd48ee3ec2d6bad59e1f1",
"score": "0.70335716",
"text": "def meridiem\n hour_24 / 12\n end",
"title": ""
},
{
"docid": "9a8ba4255c4027f2e4b6dd7f32fa2b76",
"score": "0.69789094",
"text": "def time_format\n return :time12 if new_us_user?\n\n clock_type =... |
2fd6eb39be2cffb8d0135bbe6bd23f42 | DELETE /bairros/1 DELETE /bairros/1.json | [
{
"docid": "5b8cc82d75a634998efd511b10ef0cb3",
"score": "0.7259606",
"text": "def destroy\n @bairro = Bairro.find(params[:id])\n @bairro.destroy\n\n respond_to do |format|\n format.html { redirect_to bairros_url }\n format.json { head :no_content }\n end\n end",
"title": ""
... | [
{
"docid": "b1a17c1ee1af05c79fe156622df44818",
"score": "0.7432125",
"text": "def delete(path)\n begin\n response = client[path].delete :accept => 'application/json'\n rescue Exception => e\n puts e.inspect\n end\n end",
"title": ""
},
{
"docid": "... |
0d874735bb5058d01ce1a03d512fa67d | Returns a node that represents a slice of this tree | [
{
"docid": "6e7aa144a6908f62de8100cb7da78928",
"score": "0.0",
"text": "def subtree(from, length)\n # Translate to positive index if given a negative one\n if from < 0\n from += @length\n end\n\n # If more than @length characters are requested, truncate\n length = [(@leng... | [
{
"docid": "25d9b3157584ffa90292f516b5b945b2",
"score": "0.735339",
"text": "def slice(*args)\n slice = root.slice(*args)\n\n case slice\n when Fixnum # slice(Fixnum) returns a plain Fixnum\n slice\n when BasicNode, primitive_type # create a new Rope with the returned tree as ... |
335b27a81c98e9e8a46ba81c4b561993 | GET /scfs GET /scfs.json | [
{
"docid": "c0910af17017a151196b96068e4c968d",
"score": "0.6812502",
"text": "def index\n @scfs = Scf.all\n end",
"title": ""
}
] | [
{
"docid": "57c893d53ca9d63af73641de6e2724c1",
"score": "0.66126794",
"text": "def show\n @scf = Scf.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @scf }\n end\n end",
"title": ""
},
{
"docid": "f3573d0809cb285055f... |
ff60ace616d10d81af48cf62ebb96509 | List replication executions. This endpoint let user list replication executions. | [
{
"docid": "207141337a94de6e96830f92db66abfd",
"score": "0.5992569",
"text": "def replication_executions_get_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: ProductsApi.replication_executions_get ...'\n end\n # resource pa... | [
{
"docid": "4d914809e17496440b557e821fa85dcf",
"score": "0.65627426",
"text": "def replication_executions_get(opts = {})\n data, _status_code, _headers = replication_executions_get_with_http_info(opts)\n data\n end",
"title": ""
},
{
"docid": "c015f4d4118700dd26aede6ddcee7ea1",
... |
3b675f2ef68775e2ddb0a851457936f9 | Units tests for leapYear?() class and instance methods | [
{
"docid": "6c63263ccea2151863a1c7c490e384d1",
"score": "0.8093554",
"text": "def testLeapYear_T1()\n\t\tassert(SimpleDate.leapYear?(1756))\n\tend",
"title": ""
}
] | [
{
"docid": "e3659934c55934da989fe8a8f62830ea",
"score": "0.83636355",
"text": "def leapYear?\n\n end",
"title": ""
},
{
"docid": "3b3a7c923ca156715afe510047fca55b",
"score": "0.8132619",
"text": "def leapYear?\n SimpleDate.leapYear?(@year)\n end",
"title": ""
},
{
"d... |
b6ebe2c91dc1c09696d1240b7a42f920 | GET /silent_auctions/new An HTTP GET to /resources/new is intended to render a form suitable for creating a new resource, which it does by calling the new action within the controller, which creates a new unsaved record and renders the form. | [
{
"docid": "535c2a02cfeba09714aba5b858d62392",
"score": "0.7918734",
"text": "def new\n @title = \"Create new auction\"\n @silent_auction = SilentAuction.new\n respond_to do |format|\n format.html\n end\n\n end",
"title": ""
}
] | [
{
"docid": "eb6a6a1f9a9186c80503fcedaf4da60d",
"score": "0.7665059",
"text": "def new\n @auction = Auction.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @auction }\n end\n end",
"title": ""
},
{
"docid": "62d57c8a0713249cfd080d70... |
cc45b6ef6daa3227453de95bddc2fb3a | TODO: Later, when the demo hoopla is over, we need to filter out assignments that have not been published from all listings. | [
{
"docid": "bbdab8365194fea7cff1461eeb2ef4ab",
"score": "0.0",
"text": "def flick_switch\n @assignment = Assignment.find(params[:id])\n if @assignment.facebook_user.id = @fb_user.id\n @assignment.published = !(@assignment.published)\n if @assignment.save\n if(@assignment.p... | [
{
"docid": "1af8c1c2aa9d0c0632444ff5eb3c302e",
"score": "0.5874094",
"text": "def test_filter_mneme_assignment_published_and_open\n\n assign_hash = {\n 'published' => true,\n 'openDate' => 0,\n 'closeDate' => @mock_today_epoch\n }\n\n r = MnemeAPIResponse.filter_out_irrelev... |
aeace6485a970b84d8ca29465d66b179 | POST /stack_accounts POST /stack_accounts.json | [
{
"docid": "00e326f4d0f64f4e1b695b64fa483628",
"score": "0.71911806",
"text": "def create\n @stack_account = StackAccount.new(stack_account_params)\n\n respond_to do |format|\n if @stack_account.save\n format.html { redirect_to @stack_account, notice: 'Stack account was successfully cr... | [
{
"docid": "bd14ea4cc268f9280dc031bb071699b7",
"score": "0.75112635",
"text": "def create\n megam_rest.post_accounts(to_hash)\n end",
"title": ""
},
{
"docid": "537f9e258a43e3d1eb8a90185aa4861e",
"score": "0.7126162",
"text": "def post_accounts(json_hash)\n @options = {:... |
1beeeb1ce4edb9c2770436a05cd5e7b2 | fullname is filenamerevsion e.g: MyCode.cpp33 | [
{
"docid": "d751058c0ce3f36330d2998d081b3d75",
"score": "0.6745537",
"text": "def fullname\n \"#@filename\\##@revision\"\n end",
"title": ""
}
] | [
{
"docid": "b6e11aca6386a0606f4007893fa539c3",
"score": "0.67326176",
"text": "def fullname\n @fullname ||= ::File.join(location, loadpath, filename + (extension || ''))\n end",
"title": ""
},
{
"docid": "165ec4e21c80d6a24b7d575ecff121df",
"score": "0.6599954",
"text": "def f... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "213e14190d2b603f70170bbddbce7e3a",
"score": "0.0",
"text": "def set_building\n @building = Building.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6163163",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.6045976",
"text": "def action_hook;... |
b6ad3d00ab18a50cf64bf3c44d78bd27 | POST /users POST /users.json | [
{
"docid": "7a4d9e5474dde9a0e99c21d932216742",
"score": "0.0",
"text": "def create\n @user = User.new(params[:user])\n respond_to do |format|\n if @user.save\n user = User.authenticate(@user.user_name, params[:user][\"password\"])\n if user\n session[:user_id] = user.id... | [
{
"docid": "24c5e44d772da89269600975eeebdfda",
"score": "0.71918935",
"text": "def create\n @user = User.new(user_params)\n @user.save\n json_response(@user, :created)\n end",
"title": ""
},
{
"docid": "6e1490da4a56756e02c8de2a503a156e",
"score": "0.7185745",
"text": "def c... |
13e6b3fe2b29d7520676a9094ae2dec4 | log a message to the database message (String) text message to be recorded in the database return N/A | [
{
"docid": "9c0931a048250391675ec0cc4ab1beb2",
"score": "0.7330462",
"text": "def log_message( level, message )\n t = Time.now\n log_time = \"#{t.strftime('%Y/%m/%d %H:%M:%S')}\"\n\n if @db != nil\n begin\n stm = @db.prepare( 'INSERT INTO tblMessages (mStatus, mT... | [
{
"docid": "7655a18fab65149b44f72e6b2faccdc9",
"score": "0.68882",
"text": "def record_message(room_hash, is_admin, msg, admin_name, speaker)\n create_chatroom(room_hash, admin_name, 'client_name')\n \n begin\n the_time = Time.now-Time.zone_offset('CST')\n insert_new_msg = @db.prepare... |
3bb45d354cca843ff989968a0088cf26 | NOTE: this SHOULD be used by tolk.rb initializer | [
{
"docid": "34cad322bd8ed97157e2428dfde81604",
"score": "0.0",
"text": "def manage_all_sites_translations?\n all_sites_translator? || super_admin?\n end",
"title": ""
}
] | [
{
"docid": "5cf2cba0ee7f9825b63b087af5363b37",
"score": "0.7110019",
"text": "def init; end",
"title": ""
},
{
"docid": "5cf2cba0ee7f9825b63b087af5363b37",
"score": "0.7110019",
"text": "def init; end",
"title": ""
},
{
"docid": "5cf2cba0ee7f9825b63b087af5363b37",
"sc... |
e2f80199c8bfae169edba86fab75ed55 | Creates a Stub for a HEAD request that will be matched against the specified criteria. | [
{
"docid": "5e9d507d2e3d27084d14556889aa1ad0",
"score": "0.6008023",
"text": "def on_head(url, query: nil, headers: nil, priority: nil)\n on_request('HEAD', url, query: query, headers: headers, priority: priority)\n end",
"title": ""
}
] | [
{
"docid": "1400362d42012dd33eecb163afab4a94",
"score": "0.696811",
"text": "def make_head_request\n\t\tpath = self.path\n\t\tpath += '?' + self.get_query_args unless self.params.empty?\n\t\treturn Net::HTTP::Head.new( path, self.headers )\n\tend",
"title": ""
},
{
"docid": "834f4e7563625b27... |
c07c8cbbae4024a386e9466f41716453 | The start of range partitioning, inclusive. See [Creating and using integer range partitioned tables]( | [
{
"docid": "73d0fa12f33b7d3f37cc1a90a34385dc",
"score": "0.77389914",
"text": "def range_partitioning_start\n @gapi.configuration.load.range_partitioning.range.start if range_partitioning?\n end",
"title": ""
}
] | [
{
"docid": "7f36d1064a1b4b0dae01c673695a1e93",
"score": "0.7870555",
"text": "def range_partitioning_start\n @gapi.configuration.query.range_partitioning.range.start if range_partitioning?\n end",
"title": ""
},
{
"docid": "13ac7be0243e8c932c0fa90f225db180",
"score": "0.7... |
7cfec1d2d2844d7fb12dc688c2836b2a | Valid order_field: task_name, order direction: incrementally | [
{
"docid": "6f7533b7d6d2211d00d8689dbd129190",
"score": "0.0",
"text": "def test_ut_da10b_t1_008\n p \"Test 8\"\n # gets a list of subtasks ordered incrementally by pu_name\n subtasks = Subtask.get_all_subtasks_and_paginate(1,\n \"task_name\",\... | [
{
"docid": "210fa2eb8f49daa736dee8993a9b210a",
"score": "0.6507366",
"text": "def order\n params[:tasks].split(\",\").each_with_index do |id, position|\n Task.find_by_id(id).update_attributes(:position => position+1)\n end\n render :nothing => true\n end",
"title": ""
},
{
"do... |
14fe1094c63588ee9d678598a2cf0d84 | Condition 35 battler : battler strategy : strategy | [
{
"docid": "4c8e86709d0df333cd0cc24895149a97",
"score": "0.73888886",
"text": "def condition_35(battler, strategy)\n return false if [0,1,2,4].include?(strategy[1])\n action = set_action(battler, strategy)\n return false if action.nil?\n for state in action.minus_state_set\n targets = b... | [
{
"docid": "fc417cf2f932315dc1ed82119fab0026",
"score": "0.7716771",
"text": "def set_valid_condition(battler, strategy)\n case strategy[2]\n when 0 then return true\n when 1 then return condition_1(battler)\n when 2 then return condition_2(battler)\n when 3 then return condition_3(battle... |
1edd1f5313a1fe543922d7ce1cb20338 | this will run after each test | [
{
"docid": "6f0d6c99c39fa50b37ea2e2adb42fd66",
"score": "0.7085439",
"text": "def teardown\n\tend",
"title": ""
}
] | [
{
"docid": "4c19dfa9f5fd3f7e08fe8999045be7d0",
"score": "0.86457103",
"text": "def after_test(_test); end",
"title": ""
},
{
"docid": "4c19dfa9f5fd3f7e08fe8999045be7d0",
"score": "0.86457103",
"text": "def after_test(_test); end",
"title": ""
},
{
"docid": "4c19dfa9f5fd3f... |
de12a5b3d20546a8aa4475ce0abfd1e3 | Return encode object from file system | [
{
"docid": "2cdc25a4fe2664480dcd81016afa724c",
"score": "0.0",
"text": "def find(id, opts={})\n encode_class = opts[:cast]\n encode = ActiveEncode::Base.new(nil, opts)\n encode.id = id\n encode.output = []\n encode.created_at, encode.updated_at = get_times encode.id\n ... | [
{
"docid": "6e5c37eb682ded445d04391118585f07",
"score": "0.69987243",
"text": "def encode_file_contents(path)\n bin = file_as_binary path\n encode(bin)\nend",
"title": ""
},
{
"docid": "8cb19053cf7d8d4b96fd43f21af42414",
"score": "0.64337915",
"text": "def encode_file(filename, for... |
e13291f4f72ca81565a19518586be384 | we just need it for this event. Not critical_device_alert.rb super class runs after the CriticalDeviceAlert.after_save | [
{
"docid": "33028a75d6a0860c688f83609e1d6785",
"score": "0.60418326",
"text": "def after_save\n begin\n # https://redmine.corp.halomonitor.com/issues/3215\n #\n unless user.blank?\n # \n # Wed Feb 9 23:26:29 IST 2011, ramonrails\n # * this is the panic 'timesta... | [
{
"docid": "c20cea5b8fdf4c29d745aeab7d3a2cf4",
"score": "0.64963126",
"text": "def after_save(record)\n \n end",
"title": ""
},
{
"docid": "3c1a60b14b1da2a1e1faec53a9904d81",
"score": "0.62963784",
"text": "def after_update_save(record); end",
"title": ""
},
{
"docid"... |
6d71628e07911e2136913289e206980c | Generates a report that highlights the following: Any files that don't have an eagle at the beginning of the second record Any files that don't have an eagle at the end of the last record (before id page if it exists) Any records other than the second or last in each file that contain an eagle Allows exemption of recor... | [
{
"docid": "3cb43ad515894513dde2ece52f1b226b",
"score": "0.545012",
"text": "def report_invalid_eagles(options)\n file_count = 0\n issues = {}\n Repositext::Cli::Utils.read_files(\n config.compute_glob_pattern(\n options['base-dir'] || :content_dir,\n ... | [
{
"docid": "0c86bddd6cab65fa1e39268d2f50f519",
"score": "0.55928624",
"text": "def report\n # Iterate over each qotd record and check if it is present verbatim\n # in the corresponding content AT file.\n discrepancies = []\n @qotd_records.each { |qotd_record|\n ... |
649dd214333f033b516a2255f459985d | PATCH/PUT /products/1 PATCH/PUT /products/1.json | [
{
"docid": "31a0f505fbb07d9b3eac22f68ce2ec38",
"score": "0.0",
"text": "def update\n respond_to do |format|\n if params[:images_attributes]\n if params[:images_attributes]['image'].length <= 10\n if @product.update(product_params)\n if params[:images_attributes]\n ... | [
{
"docid": "fa2eeaa45445dd76141374dc13ffab6d",
"score": "0.72710204",
"text": "def update\n begin\n @api_v1_product.update!(api_v1_product_params)\n head :no_content\n rescue => ex\n json_response({error: ex.message}, :unprocessable_entity)\n end\n end",
"title": ""
},
{... |
5554eedc70bace4d613705026a3c24b9 | DELETE /secrets/1 DELETE /secrets/1.json | [
{
"docid": "a4afedb647cf12c7696146884be0da3f",
"score": "0.7273162",
"text": "def destroy\n @secret.destroy\n respond_to do |format|\n format.html { redirect_to secrets_url, notice: 'El secreto se eliminó correctamente.' }\n format.json { head :no_content }\n end\n end",
"title":... | [
{
"docid": "8d1af5690cf3ece300a2152085b9d53e",
"score": "0.72179925",
"text": "def destroy\n @secret.destroy\n respond_to do |format|\n format.html { redirect_to secrets_url, notice: 'Secret was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title": ... |
760db073fbd62ac0d6b2fd60e76fbce1 | Test if the queue currently contains any elements. | [
{
"docid": "95ea098122014b20bde38c1fe9930186",
"score": "0.0",
"text": "def any?; end",
"title": ""
}
] | [
{
"docid": "2e0c1c0574bbfcdf7d7213636bac4937",
"score": "0.84718955",
"text": "def any?\n !@queue.empty?\n end",
"title": ""
},
{
"docid": "2e0c1c0574bbfcdf7d7213636bac4937",
"score": "0.84718955",
"text": "def any?\n !@queue.empty?\n end",
"title"... |
25469952459c3aa079dd53915136f87f | Create a new instance of the Bloggers class Using the values submitted by the user in the new.html.erb form Check if the blogger object is valid If so redirect to the new instances show page Otherwise redirect back to the form | [
{
"docid": "ae5426085da4d63e8af4820dbb0a4aa1",
"score": "0.81968844",
"text": "def create\n @blogger = Blogger.create(blogger_params)\n if @blogger.valid?\n redirect_to @blogger\n else \n render :new\n end\n end",
"title": ""
}
] | [
{
"docid": "390f788ada0029caeeb862ed47055f71",
"score": "0.75533485",
"text": "def create\n @blogpost = Blogpost.new(blog_params)\n\n if @blogpost.save\n redirect_to @blogpost\n else\n render 'new'\n end\n end",
"title": ""
},
{
"docid": "7b8a8a9b12b6ad8107493edada1193... |
21e5000562cf72c71929467065ce17de | PUT /wish_lists/1 PUT /wish_lists/1.json | [
{
"docid": "2640c7ee5170ebd904d6dcd21f5a09d9",
"score": "0.7798717",
"text": "def update\n @wish_list = WishList.find(params[:id])\n\n respond_to do |format|\n if @wish_list.update_attributes(params[:wish_list])\n format.html { redirect_to @wish_list, notice: 'Wish list was successfull... | [
{
"docid": "6284a0528d0623e6daa9fedbeff33048",
"score": "0.78137016",
"text": "def update\n @wish_list = WishList.find(params[:id])\n\n respond_to do |format|\n if @wish_list.update_attributes(params[:wish_list])\n format.html { redirect_to @wish_list, notice: 'The Wish List item was s... |
27cff9faeb70748d17681957364444ad | a fan b, b's fans include a | [
{
"docid": "ca911e0aa44a1c6f3b14b10480cf6e21",
"score": "0.5338725",
"text": "def fan(user)\n Relative.create(:fan => self,:follow => user)\n end",
"title": ""
}
] | [
{
"docid": "0797169287b2e864b1caf5f8c6ec9ced",
"score": "0.6511325",
"text": "def fan_each_other?(user)\n self.fan?(user) && user.fan?(self)\n end",
"title": ""
},
{
"docid": "9b556dc42e75969613e53972fa8f6f70",
"score": "0.62175876",
"text": "def add_fan(fan)\n fans ... |
e791c1e06baae97fe7b89f0210ce784d | returns [] of all empl whose salary are w/i 1000 of th eemployee who invoked the meth emp1 > [] emp salaries 1. set the min ragne to a var 2. set the max range to a var 3. iterate over all emp salaries and compare against min_range && max_range | [
{
"docid": "d03da02afbaa83a081571be3eea8279c",
"score": "0.7237199",
"text": "def tax_bracket \n min = self.salary - 1000 \n max = self.salary + 1000\n @@all.select do |emp| \n emp.salary > min && emp.salary < max \n end\n end",
"title": ""
}
] | [
{
"docid": "b6ceac7d306f692e86dd7f9feca21212",
"score": "0.6278391",
"text": "def busy_range\n [\n engineering_normal_salary_items,\n engineering_normal_with_tax_salary_items,\n engineering_big_table_salary_items,\n engineering_dong_fang_salary_items\n ].flat_map{|items| items.... |
fc9100207f491dc771240491e3c48c30 | GET /post41s/1 GET /post41s/1.xml | [
{
"docid": "299b81d82d2873ac6fb1e866bcb3fcb4",
"score": "0.63989705",
"text": "def show\n @post41 = Post41.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @post41 }\n end\n end",
"title": ""
}
] | [
{
"docid": "2d8c3d248831af0abc38f1bcbc30ac5a",
"score": "0.63918257",
"text": "def show\n @post57 = Post57.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @post57 }\n end\n end",
"title": ""
},
{
"docid": "1fafd286... |
c14e858bee503c35dab92c44a0df9bae | TODO Decide where sku really comes from its in the variant but not at product level like in matalan direct appears to be | [
{
"docid": "68407944eeffffba8d8eddb300cfae0d",
"score": "0.7278214",
"text": "def sku\n reference\n end",
"title": ""
}
] | [
{
"docid": "67973d9730ce7ec5ec7bb8e0a46b1b11",
"score": "0.79533315",
"text": "def sku\n variant.sku if variant\n end",
"title": ""
},
{
"docid": "d5202fe69cefeacbabea2d388e2e1cb3",
"score": "0.7230297",
"text": "def sku; (ShopProduct.to_sku(slug) rescue ''); end",
"title": "... |
1040ab3130bc5ffd408e450d54c78e2a | Instantiates a new managedDevice and sets the default values. | [
{
"docid": "e3ee41dcc4c16d810f48d9d372dbee77",
"score": "0.0",
"text": "def initialize()\n super\n end",
"title": ""
}
] | [
{
"docid": "bac6d6bf4b5fb82047516d1f55c25fdf",
"score": "0.6801708",
"text": "def default_device_or_create\n device = default_device()\n if device.nil?\n device = Calabash::Cucumber::Device.new(nil, server_version())\n end\n device\n end",
"title": ""
},
{
"doci... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "ac938b08415fba53ff4ab26c43e00010",
"score": "0.0",
"text": "def postcard_export_params\n params.require(:postcard_export).permit(:company, :group, :mail_id, :mail_date, :state, :list, :license_number, :uid, :merge_1, :merge_2, :merge_3, :f_name, :l_name, :add_1, :add_2, :city, :st, :zip... | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7496729",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6958585",
"text": "def strong_params\n params.require(:request).permit(param_white... |
f926b5d571b5d8161c4b1804ee602d9a | this function is called on every datum This function chooses the compute method to use and tries to | [
{
"docid": "81c1443bd4e664fad0168e4a8033fefc",
"score": "0.6023837",
"text": "def compute(datum)\n acc = choose_accuracy\n Sr.log.info(\"job(#{@job_id}) - worker using acc = #{acc}\")\n block = @compute_methods[acc]\n result = nil\n begin\n # preemptively kill... | [
{
"docid": "ae991e8be445bb9f1be232f49be619e6",
"score": "0.70766056",
"text": "def compute\n if @method==:two_step\n compute_two_step_mle\n elsif @method==:joint\n compute_one_step_mle\n elsif @method==:polychoric_series\n compute_polychoric_series\n ... |
86981125f40d68ca444eb7b22d62053b | Return Hash mapping tag (String) to value (String), only include strings which have been translated. | [
{
"docid": "2481f2ce9d306cc2b24c18b75c643c3d",
"score": "0.6146803",
"text": "def translated_strings\n merge_localization_strings_into({})\n end",
"title": ""
}
] | [
{
"docid": "228ab63973873ea26a639ab5343b0715",
"score": "0.76126224",
"text": "def translation_strings_hash\n hash = {}\n translation_strings.each do |str|\n hash[str.tag] = str\n end\n hash\n end",
"title": ""
},
{
"docid": "46dd3225842620c571acfcf9f51c5e8b",
"score": ... |
6d6a57f649cbc9abb1daa1e01d05c4f6 | for int or uint only | [
{
"docid": "10c5d26155429eb921c3696bd359623b",
"score": "0.0",
"text": "def initialize(name, args, func, requires_context, returns_error)\n @name, @args, @func, @requires_context, @returns_error = name, args, func, requires_context, returns_error\n end",
"title": ""
}
] | [
{
"docid": "bafc97d7ad99c7c17436652f339f8800",
"score": "0.6447246",
"text": "def integer(n)\n n & @max_uint\n end",
"title": ""
},
{
"docid": "41e5f4754d8983ca0a83dacf318a8d9e",
"score": "0.6314011",
"text": "def Int(value); end",
"title": ""
},
{
"docid": "3f1b5baac... |
ad81e360cf781861fbf95a823f55ec86 | POST /gallery_pics POST /gallery_pics.json | [
{
"docid": "ca023042f601b75d6a55732ae10b58cf",
"score": "0.7650008",
"text": "def create\n @loaded_photos = []\n\n params[:gallery_pic][:picture].each do |pic|\n @photo = GalleryPic.new(photo: pic, user_id: current_user.id, pic_collection: params[:collection])\n @photo.save\n @loade... | [
{
"docid": "22f201899b70e9b298ef808077e9c7fe",
"score": "0.7529666",
"text": "def create\r\n @gallery = @wedding.galleries.new(gallery_params)\r\n\r\n respond_to do |format|\r\n if @gallery.save\r\n\r\n if params[:images]\r\n # The magic is here ;)\r\n params[:images]... |
79e4c811c9a64e826f5064393fb5d16c | Determine whether to use encryption or not. encryption: is the encryption method, either 'ssl', 'tls', 'simple_tls' or 'start_tls'. Returns the real encryption type. | [
{
"docid": "1248fc3bf11c3851b27f121a79ba96c8",
"score": "0.789771",
"text": "def check_encryption(encryption)\n return unless encryption\n\n case encryption.downcase.to_sym\n when :ssl, :simple_tls\n :simple_tls\n when :tls, :start_tls\n :start_tls\n end\n end",... | [
{
"docid": "fff1ae0d41b9bf803edb719ac4ce655e",
"score": "0.72846425",
"text": "def check_encryption(encryption, tls_options = {})\n return unless encryption\n\n tls_options ||= {}\n case encryption.downcase.to_sym\n when :ssl, :simple_tls\n { method: :simple_tls, tls_options: ... |
9b4cec39bfb057dab8bb687e501a1fe9 | Calls transaction method. Params: +authorize+:: +transaction+ The request data | [
{
"docid": "7781d1c31ba192c766357792b12da679",
"score": "0.66551566",
"text": "def authorize(transaction)\n begin\n #creating url\n url = \"#{@security.environment}/transactions\"\n\n # make the request.\n json_response = Rede::Commo... | [
{
"docid": "198ff663562070ae200c990fe2d34b77",
"score": "0.735868",
"text": "def authorize(transaction)\n raise \"implement #authorize in your class\"\n end",
"title": ""
},
{
"docid": "9f4d246fde5060201dcc849dfcc44822",
"score": "0.6272458",
"text": "def set_transaction\n ... |
8c32ff53c5e6e9f73081414828887d87 | constant for name function to process each line of a file and extract the song titles | [
{
"docid": "86ea4db572d6b4415515bb6d7f8af28d",
"score": "0.0",
"text": "def process_file(file_name)\n\tputs \"Processing File.... \"\n\tbegin\n\t\tIO.foreach(file_name, encoding: \"UTF-8\") do |line|\t\t# loop through each file line\n\t\t\ttitle = cleanup_title(line)\t\t\t\t\t\t\t\t\t\t\t\t\t# for each ... | [
{
"docid": "252a9243252b2f3de83a4ca106a9c3e0",
"score": "0.6815331",
"text": "def process_file(file_name)\n\tputs \"Processing File.... \"\n processArr = Array.new\n\tbegin\n\t\tif RUBY_PLATFORM.downcase.include? 'mswin'\n\t\t\tfile = File.open(file_name)\n\t\t\tunless file.eof?\n\t\t\t\tfile.each_line... |
37f910ac684252c5bb32b1bbe7f9a653 | Retrieves the list of teaching event registration channels. | [
{
"docid": "2874dc9a44be48761f174e78141d283b",
"score": "0.7683973",
"text": "def get_teaching_event_registration_channels(opts = {})\n data, _status_code, _headers = get_teaching_event_registration_channels_with_http_info(opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "34cc7aabb961b1b60c5e75c26a7677e9",
"score": "0.6938367",
"text": "def subscribed_channels\n @subscriptions_by_channel.keys\n end",
"title": ""
},
{
"docid": "4cae899228d2c09077b2092782580c8c",
"score": "0.67292",
"text": "def get_channel_list()\n # checks if al... |
5fc0cb5d05ca190b2a221c128c945be1 | Try to bind this reading, and return true if it can be completed | [
{
"docid": "cdc8fb8ace5d38df9e92ef4d6fd544d9",
"score": "0.6384796",
"text": "def bind_reading reading\n return true if reading.fact\n\n # Find the roles of this reading that do not yet have an instance\n bare_roles = reading.role_refs.\n select do |role_ref|\n ... | [
{
"docid": "56169133a4ca0b4217ed5f53c2998de3",
"score": "0.7257919",
"text": "def bind\n return false unless !@connection.nil?\n begin\n Timeout::timeout(10) do\n return (@connection.bind) ? true : false\n end\n rescue\n return false\n end\n end",
"title": ""
},
... |
9355f5121a29eae2ab2778e93119f12c | only shows gears created by USER | [
{
"docid": "6654602e78b03df3e73de8462825a45e",
"score": "0.70065516",
"text": "def show\n @user = User.find_by(:id => params[:id])\n # binding.pry\n @gears = Gear.where(\"user_id = ?\", current_user.id) # find all Gear who has user_id = @user.id\n end",
"title": ""
}
] | [
{
"docid": "5f4a32cfaadbe19040c1d17452feb979",
"score": "0.6199997",
"text": "def by_user\n user = find_obj_or_goto_index(\n model: User, obj_id: params[:by_user].to_s,\n index_path: locations_path\n )\n return unless user\n\n query = create_query(:Location, :by_user, user: user)\n... |
3ecf039a014138170f07daf0e1e2271b | this method used for get all company and placementnews | [
{
"docid": "78919a68196ac6faeb09a9866ba20e3d",
"score": "0.6097955",
"text": "def insert\n @companies = Company.all\n @placement_news = PlacementNews.all\n end",
"title": ""
}
] | [
{
"docid": "151edf5d6e61729c2333e776d294dd15",
"score": "0.66165465",
"text": "def companies\n\t\tEmpresa.all\n\tend",
"title": ""
},
{
"docid": "2b12c791d802889b1dd3b7b78718f6e0",
"score": "0.65137076",
"text": "def index\n @page_id = 'companyList'\n @banners = Banner.companie... |
e0a3b9f7f61f1a23d286d955886733c1 | using method missing to define role checking methods | [
{
"docid": "3c7a298a4c1d61cc7554e8e2f58dd5fb",
"score": "0.6393936",
"text": "def method_missing(method_sym, *arguments, &block)\n eigenclass = class << self; self; end\n role = Role.find_by(name: method_sym.to_s.tr('?', ''))\n if role\n eigenclass.class_eval do\n define_m... | [
{
"docid": "6edac0d14ef974153621f8f3b6d556b2",
"score": "0.7451688",
"text": "def method_missing(method, *args)\n begin\n @user.custom_roles.any? { |role| role.send(method.to_sym) }\n rescue NoMethodError\n super\n end\n end",
"title": ""
},
{
"docid": "3abfa0deed60244eda... |
2433adedb79ea05873b80f16d9c98dfb | Return the local path to the project repo | [
{
"docid": "33046cdba14de5b35fc3803c81465a99",
"score": "0.721047",
"text": "def path\n @repository.path\n end",
"title": ""
}
] | [
{
"docid": "ec42f7087574c1c851200de51ff581c4",
"score": "0.8898394",
"text": "def local_repo_path\n @resolver.getLocalRepoPath()\n end",
"title": ""
},
{
"docid": "a6ac94f8b0178804b29ab1335eb012f6",
"score": "0.8267607",
"text": "def repo_path\n File.join(RepoPath, self.fu... |
0e21c00f174db843c89526632e81cda8 | Get a list of a country&39;s states Permissions Needed: ANY | [
{
"docid": "87a7ef3e5712b5a92e054eaf61cffca9",
"score": "0.65867",
"text": "def get_country_states_with_http_info(country_code_iso3, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: LocationsApi.get_country_states ...\"\n end\n # verify ... | [
{
"docid": "290dd9c6621ad63c088e5cab7e6056b5",
"score": "0.74830544",
"text": "def state_list\n [\"AL\", \"AK\", \"AZ\", \"AR\", \"CA\", \"CO\", \"CT\", \"DE\", \"FL\", \"GA\", \"HI\", \"ID\", \"IL\", \"IN\", \"IA\", \"KS\", \"KY\", \"LA\", \"ME\", \"MD\", \"MA\", \"MI\", \"MN\", \"MS\", \"MO\", \"MT... |
d1665091017f2e92ba8f59f63ebd70f6 | as_json creates a hash structure, which you then pass to ActiveSupport::json.encode to actually encode the object as a JSON string. This is different from to_json, which converts it straight to an escaped JSON string, which is undesireable in a case like this, when we want to modify it | [
{
"docid": "bcd847ffbb8878b5d6af04b7ccc92a38",
"score": "0.0",
"text": "def as_json(options={})\n options[:except] ||= blacklisted_attributes\n super(options)\n end",
"title": ""
}
] | [
{
"docid": "af5d9b3ad9ec90f4d3c3c5932a8c6aaa",
"score": "0.8077097",
"text": "def to_json\n ActiveSupport::JSON.encode(as_json)\n end",
"title": ""
},
{
"docid": "737265ff32ecc6bc702bbc2063f37333",
"score": "0.78018993",
"text": "def to_json(...)\n as_json.to_json(...)\n ... |
af42a7b81c671b85b77ad6a39170711b | Author: Kedar, Puneet Date: 12/10/2017 Reviewed By: Sunil | [
{
"docid": "7e8e36159db45beb56ed9d872facd2c1",
"score": "0.0",
"text": "def city_d\n @user_extended_detail.city.present? ?\n local_cipher_obj.decrypt(@user_extended_detail.city).data[:plaintext] : nil\n end",
"title": ""
}
] | [
{
"docid": "a9dd648a5d0d2e7d56223e7c753f5e2e",
"score": "0.6418316",
"text": "def telegraphical()\n end",
"title": ""
},
{
"docid": "04e074efc99de627ea58633a58870ec3",
"score": "0.6335599",
"text": "def stpreason\n end",
"title": ""
},
{
"docid": "9dcc74dd11eb115d21bf... |
a144072a6c2acf9f862bd21bb31b2762 | DELETE /pmodulos/1 DELETE /pmodulos/1.json | [
{
"docid": "30cea7df8e2c413a37efa7c6cc126137",
"score": "0.7168972",
"text": "def destroy\n @pmodulo.destroy\n respond_to do |format|\n format.html { redirect_to pmodulos_url, notice: 'Pmodulo was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title"... | [
{
"docid": "97fff4d6406acb9d40a2eaf86458c2fd",
"score": "0.7353749",
"text": "def destroy\n @seguridad_modulo = Seguridad::Modulo.find(params[:id])\n @seguridad_modulo.destroy\n\n respond_to do |format|\n format.html { redirect_to seguridad_modulos_url }\n format.json { head :no_conte... |
2ae6470554480fb6a3ce539fe2515d2c | Return all available nodes in the cluster | [
{
"docid": "f6c3cc55f46e48c883de8c92af458f1d",
"score": "0.0",
"text": "def all\n Directory.all.map do |node_id|\n find node_id\n end\n end",
"title": ""
}
] | [
{
"docid": "29a12eeaade5ff539e1d2dcf0628bb45",
"score": "0.7914335",
"text": "def available_nodes\n nodes_avail\n end",
"title": ""
},
{
"docid": "d6e65799c145f18a786ddf39df9495ce",
"score": "0.7891808",
"text": "def nodes\n @cluster.cluster_nodes\n end",
... |
9c9427089c6b6857d2d261af6e3b97c4 | Render entire MyApp::MainComponent Called from runtime.rb | [
{
"docid": "589b9ef4922cb4ee7745e1b81ec34e75",
"score": "0.0",
"text": "def render_view(state)\n Ovto.debug_trace_log(\"rendering #{self}\")\n do_render(state: state)\n end",
"title": ""
}
] | [
{
"docid": "ba7540edb6f668354f5377c779df9436",
"score": "0.68121547",
"text": "def render\n Argyle.activate\n\n @renderer.render(current_page)\n end",
"title": ""
},
{
"docid": "0f03a55e2673e346e813619c1dda3b3f",
"score": "0.6755839",
"text": "def render\n if not @item\n ... |
c12a54fa70972d24600f6db6a1a16f85 | Hide the connection details and show jid as string for compactness | [
{
"docid": "d1e0c8d2943bf911b2cadcd8ae1c6b9b",
"score": "0.5639481",
"text": "def inspect\n obj_id = \"%x\" % (object_id << 1)\n \"#<#{self.class}:0x#{obj_id} @jid=\\\"#{@jid}\\\" @name=#{@name.inspect}>\"\n end",
"title": ""
}
] | [
{
"docid": "57e451eb9c8ba07ff854b846bafaa365",
"score": "0.6676503",
"text": "def to_s\n jid.to_s\n end",
"title": ""
},
{
"docid": "0c29e8c91041af710b665c90e65ddba0",
"score": "0.6390543",
"text": "def jid\n \"#{@username}@#{@domain}\"\n end",
"title": ""
},
... |
2bf9a79f8f4b38a7431e6514079aaa22 | Return true if file/route is saved | [
{
"docid": "7a207be94bd1b71e903d24152263dc25",
"score": "0.71107316",
"text": "def saved?\n File.exists?(File.join(@base, \"#{@file_name}.md\")) ? true : false\n end",
"title": ""
}
] | [
{
"docid": "504372357c2ea6779c653a9a8f3df4fd",
"score": "0.7344071",
"text": "def saved?\n res = uri.nil?\n !res\n end",
"title": ""
},
{
"docid": "504372357c2ea6779c653a9a8f3df4fd",
"score": "0.7344071",
"text": "def saved?\n res = uri.nil?\n !res\n end",
... |
d04a1f977872b5149f51233c2c309641 | PATCH Address => Confirm | [
{
"docid": "fae69ec76015c7cefacb29f3713a5e06",
"score": "0.0",
"text": "def confirm\n current_user.address.update(address_params)\n @order = Order.create(user: current_user, number: Time.zone.now.strftime(\"%y%m%d%H%M%S\"), payment_state: \"confirm\")\n current_user.cart_items.each do |item|\n ... | [
{
"docid": "b3a7fe583b6dc3df3fa483d809251643",
"score": "0.7255916",
"text": "def update\n respond_to do |format|\n if @bill_address.update(bill_address_params)\n format.html { redirect_to order_confirm_path, notice: t(:bill_address_suc_update) }\n format.json { head :no_content }\... |
30481a3093a05671228e07656d2a8eb0 | GET /installed_measure_types/new GET /installed_measure_types/new.json | [
{
"docid": "53a52e37318ea91bd1b3fa846d814a1b",
"score": "0.8182383",
"text": "def new\n @installed_measure_type = InstalledMeasureType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @installed_measure_type }\n end\n end",
"title": ""
}
... | [
{
"docid": "96eedd7e4088b553f779fb343e91d544",
"score": "0.7528628",
"text": "def create\n @installed_measure_type = InstalledMeasureType.new(params[:installed_measure_type])\n\n respond_to do |format|\n if @installed_measure_type.save\n format.html { redirect_to installed_measure_type... |
c4216d3ece34f545b33eae8c443a06db | seed and a team each wrapped in a tag. put seed on left_or_right side. | [
{
"docid": "13e6926ffaa3a9b250d3bf73e1f1e810",
"score": "0.50991815",
"text": "def bid_cells(bid, seed_on_left_or_right)\n options = {:align => seed_on_left_or_right, :style => \"border-bottom: 1px solid black; padding-#{seed_on_left_or_right}: 2mm;\"}\n seed = content_tag :td, (bid ? \"(#{bid.see... | [
{
"docid": "0f21b054e6f0082d7b1a8f2a5ff9db75",
"score": "0.5541194",
"text": "def make_tags\r\n Post.all.each do |post|\r\n 10.times do\r\n name = Faker::Lorem.word\r\n post.tags.create!(name: name)\r\n end\r\n end\r\nend",
"title": ""
},
{
"docid": "b972934f9604e7d162509b1... |
8a52a275160e8cf63b316ae36927e7df | Builds a valid file name from the given information Returns the RELATIVE PATH of the image file from app/assets/images/ Note that this method does NOT return just the file name | [
{
"docid": "5330056c6db28b855da03f4426804417",
"score": "0.0",
"text": "def get_image_path(object, location, extension)\n # Relative path of parent directory based on app/assets/images/\n partial_path = \"GT\"\n\n # File name: CAR_CIRCUIT_ID.EXTENSION\n # Increments the ID if file already ex... | [
{
"docid": "ded0a52eef4c21bc8efb3c868fc1c099",
"score": "0.78277135",
"text": "def build_image_name(image)\n path = File.join(File.dirname(image.name), File.basename(File.basename(image.name, '.*'), '.*'))\n Pathname.new(path).cleanpath.to_s\n end",
"title": ""
},
{
"docid": "825ac7dc... |
7b58ec8a1d2bc3092967a31a0ea6ce85 | Initial setup creates API client and API testrail objects | [
{
"docid": "bb06b7c8e8193c5f74492fcfc4145948",
"score": "0.8469264",
"text": "def setup\n if @client.nil? || @api_testrail.nil?\n @client = get_client\n @api_testrail = ApiTestRail.new(@client)\n end\n end",
"title": ""
}
] | [
{
"docid": "1e44e542b25d45760cf65f079f11b88e",
"score": "0.7335558",
"text": "def setup\n @client = RoomoramaApi::Client.new(OAUTH_TOKEN)\n end",
"title": ""
},
{
"docid": "0b22ecad774a762492e8f5fa4d36de8b",
"score": "0.7272981",
"text": "def initialize\n @api = Api.new\n c... |
c521963307a6b798ed9313124be79877 | While evaluating step definitions code This called when a new step has been parse We need to save these to be able to match plain text | [
{
"docid": "81e42fca602b853d414e7634c3cbcd39",
"score": "0.0",
"text": "def add_step(type, pattern)\n step = Spec::Story::Step.new(pattern){raise \"Step doesn't exist.\"}\n \n line_number = caller[1].match(/:(\\d+)/).captures.first.to_i\n \n next_li... | [
{
"docid": "793e7197590c0386e64da978bdd30854",
"score": "0.6298386",
"text": "def step_definition; end",
"title": ""
},
{
"docid": "793e7197590c0386e64da978bdd30854",
"score": "0.6298386",
"text": "def step_definition; end",
"title": ""
},
{
"docid": "c5b066ee25538392e9e4... |
76e1fc6ec55a4750e2565f879183b416 | callseq: Key.from_path(parent=nil, kind, id, [kind, id]...) > Key Constructs a Key out of a path. This is useful when an application wants to use just the 'id' portion of a key in e.g. a URL, where the rest of the URL provides enough context to fill in the rest, i.e. the app id (always implicit), the entity kind, and p... | [
{
"docid": "84867a6ffb02e1d2086ddf419b915662",
"score": "0.79705626",
"text": "def from_path(parent_or_kind, kind_or_id, *args)\n # Extract parent\n parent = nil\n if parent_or_kind.is_a? Key\n parent = parent_or_kind\n args[0,0] = [kind_or_id]\n ... | [
{
"docid": "9158603cd1dc93e515027fa18b9588e9",
"score": "0.61691374",
"text": "def initialize(kind, key_name, parent=nil); end",
"title": ""
},
{
"docid": "dead3b65e4d53a2a0411e3f7da852244",
"score": "0.599136",
"text": "def key kind = nil, id_or_name = nil\n Key.new kind, id_... |
23ffcbf904a7234c4530ebb8f5019140 | Authentication sequence with debug messages, error mesgs will come from corresponding methods | [
{
"docid": "1bd31b7ea90e9f3764bcc7491617bc4d",
"score": "0.0",
"text": "def auth_sequence( io )\n logger \"--- #{io.peeraddr[2]} connected.\"\n get_username( io )\n logger \"--- Received \\\"#{@user}\\\" for username.\"\n salt = send_salt( io )\n logger \"--- Sent salt to the client.\"\n ... | [
{
"docid": "04e65379635e1f61d3b229b5726ee84f",
"score": "0.69642335",
"text": "def auth; end",
"title": ""
},
{
"docid": "7084fe77c7c433c1759507f1cdb9dda8",
"score": "0.6878487",
"text": "def preauthenticate; end",
"title": ""
},
{
"docid": "1d2908fae39984a84efcfd38dae9b7... |
fad74881a0617bb71f61974c64d33032 | Determines whether the anchor point is within the selectable region. | [
{
"docid": "7e13b3c32d8254dd1af257c011ff01ff",
"score": "0.0",
"text": "def atLeftEdge\n return true if Grid::EdgeLeft.include?($game_temp.grid[1][0])\n return false if @selectable_region == nil\n return true if !@selectable_region.include?($game_temp.grid[1][0]-1)\n return false \n end",
... | [
{
"docid": "20eca960e8c780b498a96f0710316825",
"score": "0.73237026",
"text": "def in_select_region?(position)\n (left + width / 2 - position).abs <= width / 4.5\n end",
"title": ""
},
{
"docid": "94d8e2af5528872f8319633d9166c3ba",
"score": "0.694405",
"text": "def in_area?(a... |
7e4b7d7739e7381f962a316eb1b26842 | Pauses the running scan on a best effort basis. | [
{
"docid": "1b0b242d5da27aba381dcb96e08af9a7",
"score": "0.5063498",
"text": "def pause\n super\n each_slave{ |instance, iter| instance.framework.pause{ iter.next } }\n true\n end",
"title": ""
}
] | [
{
"docid": "f8e8535d11836973d06981db17590968",
"score": "0.66982365",
"text": "def pause\n sleep PAUSE_SECONDS\n end",
"title": ""
},
{
"docid": "f8e8535d11836973d06981db17590968",
"score": "0.66982365",
"text": "def pause\n sleep PAUSE_SECONDS\n end",
"title": ""... |
7af56d5952a2aa320fb51d8381161082 | POST /documents POST /documents.json | [
{
"docid": "4f2aa0e7ddd7f90cea3f65c6c3ce93e1",
"score": "0.0",
"text": "def create\n @document.user = current_user\n respond_to do |format|\n if @document.save\n @document.create_activity :create, owner: current_user\n format.html { redirect_to @document, notice: 'Document was s... | [
{
"docid": "706f5c0f4f01c5b58d1a75fe4ca43b41",
"score": "0.7267415",
"text": "def create\n @document = Document.new(params[:document])\n\n respond_to do |format|\n if @document.save\n format.html { redirect_to @document, :notice => 'Document was successfully created.' }\n format... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "4a5840b194c7152377cf54cc3e1ae53e",
"score": "0.0",
"text": "def set_relato\n @relato = Relato.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60315156",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6018921",
"text": "de... |
e2866db254b8b6e7122f588828979ceb | TODO: Is this the same as Action Pack > ActionView::Helpers::AssetTagHelper private methods? | [
{
"docid": "81ec9d323dc18f6818aa251a29909cd0",
"score": "0.0",
"text": "def make_relative(filename)\n filename.split(CloudfileAsset::local_public_path).last\n end",
"title": ""
}
] | [
{
"docid": "775a3f9fba71c1c292b0b42a859db90e",
"score": "0.7187168",
"text": "def asset_tag_for(asset, &block)\n block_to_partial(\"assets/tag\", {:asset => asset}, &block)\n end",
"title": ""
},
{
"docid": "ae335ab684f90b4629e70b6e2b4b9810",
"score": "0.7108822",
"text": "def ... |
1d00f60143ca788509934e7b6382b625 | ```p split_array([0, 1, 2, 3, 4, 5], 2) => [[0, 1], [2, 3], [4, 5]] p split_array([0, 1, 2, 3, 4, 5], 3) => [[0, 1, 2], [3, 4, 5]]``` | [
{
"docid": "27b62f54b84cc960d840ae1feb228baa",
"score": "0.7962745",
"text": "def split_array(array, size)\n array.each_slice(size).to_a\nend",
"title": ""
}
] | [
{
"docid": "721a75fbf005ecb53cecd315e39de722",
"score": "0.82783234",
"text": "def split_array(arr, split_num)\n arr.each_slice(split_num).to_a\nend",
"title": ""
},
{
"docid": "fa0c590b979efad038951e147cb01f5e",
"score": "0.82119554",
"text": "def split_array(array, split)\n split... |
63ee35a170c7a9c7dceb047188cea3d1 | Get Number of Items Possessed item_id : item ID | [
{
"docid": "55002a27fe5dcf8e27390525dec37365",
"score": "0.7354366",
"text": "def item_number(item_id)\n # If quantity data is in the hash, use it. If not, return 0\n return @items.include?(item_id) ? @items[item_id] : 0\n end",
"title": ""
}
] | [
{
"docid": "e9b0d4237f78c2ce166810ac39df9183",
"score": "0.8036512",
"text": "def item_count(id) $game_party.item_number($data_items[id]) end",
"title": ""
},
{
"docid": "02ced09ff05a356d5c11311e58e0e2b7",
"score": "0.7965415",
"text": "def item_number(item)\n container = item_con... |
117b22cca1fba878088a46be9dd159bc | accessors for class vars | [
{
"docid": "01fe39d1c50d1a70bd1dc55d51f2ea1c",
"score": "0.0",
"text": "def collection\n self.class.collection()\n end",
"title": ""
}
] | [
{
"docid": "32f8115e6bc5430f7c269788350dfed9",
"score": "0.74652666",
"text": "def my_class_var\n @@my_class_var\n end",
"title": ""
},
{
"docid": "f47d1f0478c3ad31bbf204a9f60b55a8",
"score": "0.7207291",
"text": "def class_variable\n @@class_variable\nend",
"title": ""
},... |
82ee5f26d68f973347865e6f27a7e42e | Creates the needed path to import outsorced files. IN: path the destination which needs to be reached RETURN: the full path to that outsourced lane | [
{
"docid": "7ad6c4073f745253e302372229d1f9c0",
"score": "0.0",
"text": "def getPath(path)\n return ENV['FASTLANE_HOME'] + '/Android/implementation/' + path \nend",
"title": ""
}
] | [
{
"docid": "6cfcf836aafecb4611bcc03090a28044",
"score": "0.6604205",
"text": "def dest_path\n @dest_path ||= File.expand_path(path)\n end",
"title": ""
},
{
"docid": "6cfcf836aafecb4611bcc03090a28044",
"score": "0.6604205",
"text": "def dest_path\n @dest_path... |
4e29fecbb04718fe978ec61b52f18ecb | returns delegated methods as well as regular methods | [
{
"docid": "7233d5a1c3a91f43810632a7fb2f9f3d",
"score": "0.7842721",
"text": "def methods\n delegated_instance_methods + old_methods\n end",
"title": ""
}
] | [
{
"docid": "346d9826bf4f7dc9194211c40593b051",
"score": "0.78196996",
"text": "def methods\n delegated_instance_methods + old_methods\n end",
"title": ""
},
{
"docid": "f1c479469461dc90ba3705c7e3b1a8dc",
"score": "0.7773926",
"text": "def delegated_instance_methods\n ... |
ca019ebfad535804a2cb04c4c3f1164c | an odk (xpath) expression of any question contraints | [
{
"docid": "871b0b84716657e2f9143d38c9ccdb29",
"score": "0.4968876",
"text": "def odk_constraint\n exps = []\n exps << \". #{minstrictly ? '>' : '>='} #{casted_minimum}\" if minimum\n exps << \". #{maxstrictly ? '<' : '<='} #{casted_maximum}\" if maximum\n exps.empty? ? nil : \"(\" + exps.jo... | [
{
"docid": "368de53f5b50a4caef123e13acaf9612",
"score": "0.6056131",
"text": "def xpath_expression_for xpath\n (xpath.first[:tag]=='.' ? \"\" : \"/\" ) + xpath.map do |term|\n term[:tag] +\n (\"[\" + (term[:conditions]*' and ') + \"]\" if term[:conditions].size > 0).to_s +\n (\... |
91eee1c11d1653c9be38747ebef0b29e | Resume reading. If the ReadSupport has been paused, reading will recommence on it. | [
{
"docid": "9943c3c096ba4782cd597ea64bf8ad96",
"score": "0.52136815",
"text": "def resume\n if !block_given?\n @j_del.java_method(:resume, []).call()\n return self\n end\n raise ArgumentError, \"Invalid arguments when calling resume()\"\n end",
"title": ""
}
] | [
{
"docid": "5467ab900723d5c3c5a979768eaa4d6c",
"score": "0.639281",
"text": "def resume()\n @ole.Resume()\n end",
"title": ""
},
{
"docid": "96c42e203bf8948e2bbeb2e8438a10fc",
"score": "0.62742746",
"text": "def resume\n @suspended = false\n end",
"title": ""
},... |
6a62b115bd85d695fa25398804df3486 | Return an image tar for the user avatar thumbnail | [
{
"docid": "2c979db4f75b4b2b0357f6ac6c846d24",
"score": "0.7565697",
"text": "def thumbnail_tag(user)\n image_tag(user.avatar.thumbnail_url, :border => 1)\n end",
"title": ""
}
] | [
{
"docid": "c8338eeb1e7535541accd24c56557f85",
"score": "0.7509637",
"text": "def avatar_thumbnail\n avatar.variant(resize: '100x100!').processed\n end",
"title": ""
},
{
"docid": "94abedb61e1a3c146f2d83714ce91c13",
"score": "0.74975693",
"text": "def thumbnail_tag(user)\n\t\tima... |
8a04482c0b0072633758cfaf7e75ac2a | NOTE add your custom adjustments to class name constructions here if you need to e.g. Zurb has its own handling of ".progress" classes | [
{
"docid": "6a3504e26537059da4647cf85adabe27",
"score": "0.0",
"text": "def extended_body_class(options = {})\n body_class(options)\n end",
"title": ""
}
] | [
{
"docid": "fd9425a2ee3c1440d17d613a8b966ed2",
"score": "0.6496558",
"text": "def progress_class(value)\n color_class = case value\n when 0...15 then \"progress-danger\"\n when 15...33 then \"progress-warning\"\n else \"progress-success\"\n ... |
f6d8c42a4c79a1b5fa199d6db980417e | filter set_template_page first, then filter set_template | [
{
"docid": "73f571e06cd0472de885b978eb9428bc",
"score": "0.5845232",
"text": "def set_template\n @template = @template_theme.try(:template)\n @template ||= Templates::Template.find_by(id: params[:template_id])\n redirect_to templates_templates_path if @template.nil?\n end",
"title... | [
{
"docid": "3aaf23dd5fcd89c7745d615c4b0ba4b8",
"score": "0.65181744",
"text": "def set_template\n @template = @template_page.try(:template)\n @template ||= Templates::Template.find(params[:template_id])\n end",
"title": ""
},
{
"docid": "04c03de0b9ad26c7e212395d37c2c447",
"... |