query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
3338aa1d04bdbb2bb786c5c63461d5a8 | Gets the full response of the SRS Distribution API call. | [
{
"docid": "838d5d78d5338e4d66780781816c6265",
"score": "0.8439997",
"text": "def full_srs_distribution_response\n return api_response(\"srs-distribution\")\n end",
"title": ""
}
] | [
{
"docid": "a03faa6d5e9b998b575c974a17c55057",
"score": "0.58835965",
"text": "def api_response\n client_domain = ClientWebHostDetail.get_from_memcache_by_client_id(@client_id).domain\n client_domain = \"https://#{client_domain}\"\n {\n published_url: client_domain\n ... |
936ad87549ae5dad0d1a3a3f82180b53 | Creates a new Device and retains it if specified and aplicable | [
{
"docid": "e7223bbefdb146c40a3a350d37061d73",
"score": "0.60425246",
"text": "def initialize(ptr, retain = true)\n super(ptr)\n platform = FFI::MemoryPointer::new( Platform )\n OpenCL.clGetDeviceInfo( ptr, OpenCL::Device::PLATFORM, platform.size, platform, nil)\n p = OpenCL::Platfor... | [
{
"docid": "480ec64ee6a8a2c049134134c09fbbb9",
"score": "0.7405013",
"text": "def create_device\n Device.create(advertising_identifier: random_string(6),\n imei: random_string(6),\n meid: random_string(6))\n end",
"title": ""
},
{
"docid": "24ebc6b7a4b18... |
fb5a6eb5010b315e101895e0de8596a0 | GET /tasks/1 GET /tasks/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "1a71110c0b7b1341c80bd129acb3b511",
"score": "0.76096785",
"text": "def show\n @task = Task.find(params[:id])\n\n render json: @task\n end",
"title": ""
},
{
"docid": "8232c50468301a185d8ad9f041957c9f",
"score": "0.7555889",
"text": "def task(name)\n get \"#{... |
fff580f1cf9de655c22d970e7cee7d12 | def translate(word) if %w(a e i o u).include?(word[0]) == false arr = word.split('') arr.rotate!(1) word = arr.join end word += 'ay' end | [
{
"docid": "21e177a03f01146ad0900f61eb13d9d7",
"score": "0.9485178",
"text": "def translate_word(word)\n arr = word.split('')\n arr.size.times do |i|\n break unless %w(a e i o).include?(word[i]) == false\n arr.rotate!(1)\n end\n word = arr.join\n word += 'ay'\nend",
"title": ""
}
] | [
{
"docid": "f36a2828484ce4ff7f904657f946ab84",
"score": "0.9179308",
"text": "def translate(word)\n if word[0] == \"a\" || \"e\" || \"o\" || \"u\" || \"i\"\n word = word + \"ay\"\n \n elsif word[0] != \"a\" || \"e\" || \"o\" || \"u\" || \"i\"\n word = word-word[0]+... |
e61a0e905e1085bf1a78f4d20d825ef9 | Create and show the main window | [
{
"docid": "407bbd79bd87a0c0c17b4934526448ca",
"score": "0.7523853",
"text": "def create\r\n super # Create the windows\r\n show(PLACEMENT_SCREEN) # Make the main window appear\r\n end",
"title": ""
}
] | [
{
"docid": "db4db7fbe908748ac8b9196e6ba1193b",
"score": "0.7498087",
"text": "def start!\n @window = Window.new width, height, fullscreen?\n window.caption = name\n window.scene = Scenes.generate(first_scene)\n window.show\n end",
"title": ""
},
{
"docid": "ed68f0bad03... |
03f83f025291738ca8f5b138542cda91 | helper methods for delete: | [
{
"docid": "761e33853a03dc021ebca9774a677a77",
"score": "0.0",
"text": "def left_nil?(value)\n the_node = find(value)\n if the_node.parent.right.value == the_node.value\n the_node.parent.right = the_node.right\n else\n the_node.parent.left = the_node.right\n end\n end",
"title... | [
{
"docid": "36887f2b24d31f98fbb51687409e73f6",
"score": "0.8511339",
"text": "def delete; end",
"title": ""
},
{
"docid": "36887f2b24d31f98fbb51687409e73f6",
"score": "0.8511339",
"text": "def delete; end",
"title": ""
},
{
"docid": "36887f2b24d31f98fbb51687409e73f6",
... |
e363f2feb57caa27979d145748eda981 | Determines if there is a collision in the direction of travel, on one of the corners in the direction of travel. | [
{
"docid": "fd6301af8b3a8a7fb55b1be452607385",
"score": "0.646328",
"text": "def diagonal_collision?( from_x, from_y, to_x, to_y )\n if from_x == to_x + 1 && from_y == to_y + 1\n return collision_cb?(from_x,from_y-1) || collision_cb?(from_x-1,from_y)\n elsif from_x == to_x - 1 && ... | [
{
"docid": "03ffad6a4abf727def9e491461c0055e",
"score": "0.71817994",
"text": "def corner?\n CORNERS.detect{|a| @board.cells[a] == \" \"}\n end",
"title": ""
},
{
"docid": "f98a7acb4c9138cfceacc366303337a1",
"score": "0.7067027",
"text": "def at_wall?\n return @x_coor... |
fadb4515bb330e699acb194060f8a445 | Add yaml data to the existing .mytime config file Options: contents: Required hash of data to add to config file | [
{
"docid": "96b02cccc89d6c85e92be5b98733546a",
"score": "0.67526144",
"text": "def add(contents)\n begin\n data = YAML.load_file USER_FILE\n merged_data = data.merge(contents)\n puts merged_data\n File.open(USER_FILE, 'w') do |file|\n file.write merged_data.to_y... | [
{
"docid": "cbe4d2ab1b53c5b19bce058fabfe26db",
"score": "0.6606473",
"text": "def update\n yaml_file = File.open(File.join(Dir.pwd, '/kymera_config.yaml'), 'w+')\n @config_options.to_yaml.split('\\n').each do |line|\n yaml_file.write(line)\n end\n yaml_file.rewind\n str =... |
8d7bcf0560e0304e6a3ab08f97c4ca9b | DELETE /motivo_movimiento_cajas/1 DELETE /motivo_movimiento_cajas/1.json | [
{
"docid": "046c74d0d834de5a56f78c0fa7bb2dba",
"score": "0.7282509",
"text": "def destroy\r\n @motivo_movimiento_caja.destroy\r\n respond_to do |format|\r\n format.html { redirect_to motivo_movimiento_cajas_url, success: 'Eliminaste un motivo correctamenteed.' }\r\n format.json { head :n... | [
{
"docid": "f8ec51d1d5d828ec0c2e2d9eebeb6a17",
"score": "0.72413635",
"text": "def destroy\n @asignatura.destroy\n respond_to do |format|\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "91ceac7bfc816354231b7dc5cae3fcec",
"score": "0.7236371",
... |
938207963ea16207e1d242177b3bd38c | Check Solaris DNS server | [
{
"docid": "dfc89975b57def71322f501b55dabdb1",
"score": "0.6373098",
"text": "def check_sol_bind(options)\n if options['host-os-name'].to_s.match(/11/)\n pkg_name = \"service/network/dns/bind\"\n install_sol11_pkg(options,pkg_name)\n end\n create_named_conf(options)\n return\nend",
"title"... | [
{
"docid": "7fe239ad7db74119176ba94d7d956612",
"score": "0.6835687",
"text": "def check_hostname_dns_reverse_lookup\n my_fqdn = %x{hostname -f}.chomp\n if !$?.success?\n opoo \"You can't run 'hostname -f'!? I can't check your hostname dns reverse lookup.\"\n elsif %x{traceroute -m 2 \"#{my... |
8c8ac97602c7eb9bbd21f712b0a24158 | Hashes with numeric keys will be turned into arrays instead. This is not done automatically because it can wrongly corrupt data if not used correctly. | [
{
"docid": "5e61c267a02cf929c87c327d22789bd6",
"score": "0.0",
"text": "def get_parse_arrays(arg = nil, ob = nil)\n arg = _get.clone if !arg\n \n #Parses key-numeric-hashes into arrays and converts special model-strings into actual models.\n if arg.is_a?(Hash) and Knj::ArrayExt.hash_numeric_... | [
{
"docid": "332ffb593f97264ec68268922cef61d2",
"score": "0.6442021",
"text": "def arrays_to_hashes\n end",
"title": ""
},
{
"docid": "f53a45e710e288f0a04fec2b449a900e",
"score": "0.62736535",
"text": "def sanitize_hash\n @hash_of_merged_data.map { |key,values|\n values.m... |
1e7849ff8a50e0438a656ddfe012b5ce | Returns an array of objects representing the configuration of this structure. Such an array can be serialized as JSON, and used to replicate this structure using from_json_array. | [
{
"docid": "a2d664f9d9c08e33ee69ced5498c665a",
"score": "0.0",
"text": "def to_json_array\n @indexes.map do |ai_|\n name_ = ai_.axis_name\n axis_ = ai_.axis_object\n type_ = axis_.class.name\n if type_ =~ /^NTable::(\\w+)Axis$/\n type_ = $1\n type_ = ty... | [
{
"docid": "22a14f2211093bd7d445f8b05c5b18b1",
"score": "0.6881567",
"text": "def to_a\n list = []\n @_config.each do |feature, configs|\n list.concat(configs)\n end\n list\n end",
"title": ""
},
{
"docid": "a31f2c8405b6d8d569e285e4fca90f99",
"score": "0.683... |
2ca649f5f364e9a3b9a2516ad7ccdeb8 | GET /game_types GET /game_types.xml | [
{
"docid": "cb956665bfbde8f5a7b85fcd2503b9c4",
"score": "0.75917107",
"text": "def index\n @game_types = GameType.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @game_types }\n end\n end",
"title": ""
}
] | [
{
"docid": "8a1f573b972ba045876155d6293d7ffb",
"score": "0.6840154",
"text": "def show\n @game_type = GameType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @game_type }\n end\n end",
"title": ""
},
{
"docid": "e... |
fa06f028b1aca295d74261cd41f9af79 | Walks links from this object to other objects in Riak. | [
{
"docid": "66e2ec777a6e205847f6340665b6200a",
"score": "0.0",
"text": "def walk(*params)\n specs = WalkSpec.normalize(*params)\n response = @bucket.client.http.get(200, @bucket.client.prefix, escape(@bucket.name), escape(@key), specs.join(\"/\"))\n if boundary = Multipart.extract_boundar... | [
{
"docid": "6da65c2d27b684c8d31c766dff3df1a9",
"score": "0.6773632",
"text": "def linkReferences()\n eachObject(){|object|\n object.linkReferences(self) ;\n }\n end",
"title": ""
},
{
"docid": "cc6e2c0402285f2f66f4f928b6697d70",
"score": "0.6720037",
"text": "def ... |
7e63e7b106af6dca7115d97e5c121865 | PATCH/PUT /player_team_tournaments/1 PATCH/PUT /player_team_tournaments/1.json | [
{
"docid": "1a28158cb548c759a05a56efc1f648ee",
"score": "0.6995216",
"text": "def update\n respond_to do |format|\n if @player_team_tournament.update(player_team_tournament_params)\n format.html { redirect_to @player_team_tournament, notice: 'Player team tournament was successfully update... | [
{
"docid": "114328b837774ae33ab29f0692f399b9",
"score": "0.7047848",
"text": "def update\n if @player_team.update(player_team_params)\n DraftChannel.broadcast_to @player_team.league, @player_team.league.player_teams.as_json\n render json: @player_team, status: :ok\n else\n ... |
935b20a4e224e47a2235ee8e23b562bf | PUT /compras_documentos/1 PUT /compras_documentos/1.xml | [
{
"docid": "971c2ae2b099ab8ffffea86227534a2c",
"score": "0.6433612",
"text": "def update\n @compras_documento = ComprasDocumento.find(params[:id])\n @compras_documento.usuario_updated = current_user.id\n @compras_documento.unidade_updated = current_unidade.id\n\n respond_to do |format|\n ... | [
{
"docid": "cf69150b8a2d2ed76fd803cb0bf5e0d8",
"score": "0.6762354",
"text": "def update\n @documento = @externo.documentos.find(params[:id])\n\n respond_to do |format|\n if @documento.update_attributes(params[:documento])\n flash[:notice] = 'ATUALIZADO COM SUCESSO.'\n format.ht... |
3f52973818698070d105a2c20fdb77a5 | Serializes information the current object | [
{
"docid": "6cbba6722cb904463e7a4b9e7b21e3e8",
"score": "0.0",
"text": "def serialize(writer)\n raise StandardError, 'writer cannot be null' if writer.nil?\n writer.write_string_value(\"color\", @color)\n writer.write_string_value(\"criterion1\", @criterion1)... | [
{
"docid": "0795eac2a3b746fc7fea6373714e1986",
"score": "0.794954",
"text": "def serialize\n end",
"title": ""
},
{
"docid": "762bca0e2db3ff19d91cc4521bb1e1d9",
"score": "0.7644408",
"text": "def serialize(object) end",
"title": ""
},
{
"docid": "a126e681346630c4ec31... |
0372435987c53efdb4a0a93c0dd9fb8b | BEST CONSULTANTS SERIES OF TESTS Tests the list ordering for a priority 5 objective | [
{
"docid": "fcd33110767b4a37c9090f6b6236b7e7",
"score": "0.0",
"text": "def best_consultants_setup\n setup_before_rbc\n @rbc_0 = @rank_by_consulting[0]\n @rbc_1 = @rank_by_consulting[1]\n @rbc_2 = @rank_by_consulting[2]\n @rbc_3 = @rank_by_consulting[3]\n @rbc_0... | [
{
"docid": "fd21bd5dd8b27f65a5156fe761191d48",
"score": "0.6235174",
"text": "def test_find_n_people_with_lowest_scores\n skip\n people = phone_book.n_lowest_scorers(2)\n names = people.map do |person|\n person.name\n end\n assert_equal [\"Adeline Wolff\", \"Lorenzo Lowe\"], names.so... |
3dd75a4c5218f060ce38f55ab6ad139b | DELETE /enrollments/1 DELETE /enrollments/1.json | [
{
"docid": "8d5b4c52fdb031aba8776a43fa5a71f1",
"score": "0.7509986",
"text": "def destroy\n @enrollment.destroy\n respond_to do |format|\n format.html { redirect_to enrollments_url, notice: 'Enrollment was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
... | [
{
"docid": "b48b59c1efda50bf227d53d022e69def",
"score": "0.7878287",
"text": "def destroy\n @enroll = Enroll.find(params[:id])\n @enroll.destroy\n\n respond_to do |format|\n format.html { redirect_to enrolls_url }\n format.json { head :no_content }\n end\n end",
"title": ""
... |
243d91d4dfdf7f76382d76b10f06d1ce | PATCH/PUT /applicants/1 PATCH/PUT /applicants/1.json | [
{
"docid": "af334144e0a24c0e0471cebd6c807f3d",
"score": "0.6255274",
"text": "def update\n respond_to do |format|\n if @applicant.update(applicant_params)\n format.html { redirect_to @applicant, notice: 'Applicant was successfully updated.' }\n format.json { head :no_content }\n ... | [
{
"docid": "56169966a601d56f6e763111dd1d9fe7",
"score": "0.64376044",
"text": "def update\n @applicant = Applicant.find(params[:id])\n\n respond_to do |format|\n if @applicant.update_attributes(params[:applicant])\n format.html { redirect_to admin_url(current_user.id), notice: 'Applica... |
7eb97f2da5690f3516b265bcd39398ec | common things we may be defining redundanty b/c we don't want to confuse ourselves with too many modules | [
{
"docid": "ad2f7fe3bb495c56eb9c3f22473f3cbb",
"score": "0.0",
"text": "def inspct ctxt, opts\n sprintf(\"#<Reference%s->%s>\", @my_parse_id, @target_parse_id)\n end",
"title": ""
}
] | [
{
"docid": "b44978fb90407afbd0420a3793d8a926",
"score": "0.7013209",
"text": "def modules; end",
"title": ""
},
{
"docid": "b44978fb90407afbd0420a3793d8a926",
"score": "0.7013209",
"text": "def modules; end",
"title": ""
},
{
"docid": "b44978fb90407afbd0420a3793d8a926",
... |
e1f0d48d39a27fae86d6597735596c17 | TODO parse array properly | [
{
"docid": "b7819a83c2da4dfb28d8572c16519503",
"score": "0.0",
"text": "def indexes\n select_all(<<-SQL\n SELECT\n schemaname AS schema,\n t.relname AS table,\n ix.relname AS name,\n regexp_replace(pg_get_indexdef(i.indexrelid), '^[^\\\\(]*\\\\... | [
{
"docid": "69a04e038816da81c0ffb83b5f2880e2",
"score": "0.7716592",
"text": "def parse_array(name); end",
"title": ""
},
{
"docid": "5a921b7bdd43c4707d68fc39b63b8ef1",
"score": "0.68630296",
"text": "def converted_arrays; end",
"title": ""
},
{
"docid": "65905a6f2703806c... |
6cada05c52ca2779c81ddef487d63cd1 | Same thing as method above, except instead of doing math, it adds the correspinding speed to the speed variable. And then prints the statement. | [
{
"docid": "b02e30ec1a657fd8c068f2527bc4cfbc",
"score": "0.0",
"text": "def speed_of_spread #(population_density, state) #in months\n # We are still perfecting our formula here. The speed is also affected\n # by additional factors we haven't added into this functionality.\n \n\n#Method should be ... | [
{
"docid": "565acb516c01622e77308a371d37770c",
"score": "0.75647485",
"text": "def accelerate_to(speed) \r\n\t\tputs \"You #{speed > @speed ? \"sped up\" : \"slowed down\"} to #{speed}mph.\"\r\n\t\t@speed = speed;\r\n\tend",
"title": ""
},
{
"docid": "1a2914e489133bd1012ebcdb0e323b7d",
"... |
e086a56901b5a3f5dec0a189987ff863 | Get the port of the streamhost | [
{
"docid": "ea909d127a223cac3798170b3df6868e",
"score": "0.73386824",
"text": "def port\n if p = read_attr(:port)\n p.to_i\n else\n nil\n end\n end",
"title": ""
}
] | [
{
"docid": "67aca6f89e99e3c48de9ee805e4beee1",
"score": "0.7890188",
"text": "def port\n if raw_host_with_port =~ /:(\\d+)$/\n $1.to_i\n else\n standard_port\n end\n end",
"title": ""
},
{
"docid": "5356a8f213b46d54ac77f829e2fb2d18",
"score": "0.7873751",
"text": ... |
9ed875d72f42148f76fa7f08fac3f674 | DELETE /db_countries/1 DELETE /db_countries/1.json | [
{
"docid": "8dc331cb98691c128414bc668f5173fc",
"score": "0.7145646",
"text": "def destroy\n @db_country.destroy\n respond_to do |format|\n format.html { redirect_to db_countries_url, notice: 'Db country was successfully destroyed.' }\n format.json { head :no_content }\n end\... | [
{
"docid": "2671e22c34d21cbc637dd6a853d7b35b",
"score": "0.6895187",
"text": "def destroy\n @country.destroy\n\n head :no_content\n end",
"title": ""
},
{
"docid": "6ab1edd69037ea4b23422c7653b13e9f",
"score": "0.68639714",
"text": "def destroy\n @country.destroy\n respon... |
5938c8a78a43dd5c629754b0468a4195 | GET /projects/1 GET /projects/1.xml | [
{
"docid": "fbf976ebb36bdb121bc09bd1a5769450",
"score": "0.67210877",
"text": "def show\n @project = Project.find(params[:id])\n @projects_count = Project.count\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @project }\n end\n end",
"ti... | [
{
"docid": "ac127746781a3eccf384c52731ad3199",
"score": "0.747483",
"text": "def show_project\n @user = User.find_by_username(session['user'])\n @access_token = OAuth::AccessToken.new(UsersController.consumer, @user.token, @user.secret)\n @response = UsersController.consumer.request(:get, \"/ap... |
67f6a2781e112b641b25ad8dd99e4ed4 | Returns the value of attribute self_types. source://rbs//lib/rbs/definition_builder/ancestor_builder.rb10 | [
{
"docid": "4152fc905733115092aedc21cebfc501",
"score": "0.68548894",
"text": "def self_types; end",
"title": ""
}
] | [
{
"docid": "2573af64a7e68a1743cad9bc41fb23c0",
"score": "0.6267443",
"text": "def self_type; end",
"title": ""
},
{
"docid": "2573af64a7e68a1743cad9bc41fb23c0",
"score": "0.6267443",
"text": "def self_type; end",
"title": ""
},
{
"docid": "2573af64a7e68a1743cad9bc41fb23c0... |
3cbc0ddae57053735a9ea52f565717b8 | Create a new deck text input with a deck name Leads to deck edit page | [
{
"docid": "7d89135e338d36ac5415d8271d782133",
"score": "0.63513",
"text": "def new\n @deck = Deck.new\n end",
"title": ""
}
] | [
{
"docid": "bfb0dfa1b98220937275b6c90038813b",
"score": "0.7100657",
"text": "def newDeck(name, template = @cur_deck_name)\n\n end",
"title": ""
},
{
"docid": "e28e90fec2b05580051264a478319a36",
"score": "0.67611843",
"text": "def new\n @current_deck = Deck.new\n end",
... |
9cd17a1aa0d232591832c370fc87ac7b | 23 ==> Enter the second number: 17 ==> 23 + 17 = 40 | [
{
"docid": "3ba2ba4978ec9af7d40c4f7e97543724",
"score": "0.63083494",
"text": "def add(first_num, second_num)\n first_num + second_num\nend",
"title": ""
}
] | [
{
"docid": "e22d58ebcf581a46798f677dfe50d3c4",
"score": "0.7556622",
"text": "def add_two_numbers\n puts \"enter first number\"\n a = gets.chomp.to_i\n puts \"enter second number\"\n b = gets.chomp.to_i\n result = a + b\n puts \"#{a} + #{b} = #{result}\"\nend",
"title": ""
},
{
"docid"... |
ec7df16ee3f5581ed04526938860541e | Validate the value length is equal to the expected length | [
{
"docid": "5be6c9d4e9c2df02fcb3fcea3921c1df",
"score": "0.7287119",
"text": "def validate_equals(length)\n return if length == @equal\n\n ValidationErrors.default_error_message(\n :wrong_length,\n humanized_field_name,\n @equal\n )\n end",
"title... | [
{
"docid": "3d88ce0ed2a781884cc5aaf96ed0127f",
"score": "0.8047178",
"text": "def valid_length?(length)\n expected.include?(length)\n end",
"title": ""
},
{
"docid": "b07dcdb88afe36048a161bfcca4e0431",
"score": "0.8034124",
"text": "def length_valid\n clean\n ... |
4ffa37cf626b50d829cda3a9d069e851 | TODO: this will replace the others 3 below | [
{
"docid": "8b89551ef0fd2ca2d154c3c78e1c6a6c",
"score": "0.0",
"text": "def create_generic_file(resource_id)\n filename = Faker::File.file_name(dir: '', directory_separator: '')\n StashEngine::GenericFile.create(\n {\n original_filename: filename,\n upload_file_name: filename,\n... | [
{
"docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1",
"score": "0.7145502",
"text": "def private; end",
"title": ""
},
{
"docid": "0b8b7b9666e4ed32bfd448198778e4e9",
"score": "0.6874047",
"text": "def probers; end",
"title": ""
},
{
"docid": "65ffca17e416f77c52ce148aeafbd826",
... |
c562a7dd53cc1e065aeb469f45816d76 | PUT /nomes/1 PUT /nomes/1.xml | [
{
"docid": "ba39d0fa374658cb9542d1d5849415cf",
"score": "0.5648003",
"text": "def update\n @nome = Nome.find(params[:id])\n\n respond_to do |format|\n if @nome.update_attributes(params[:nome])\n format.html { redirect_to(@nome, :notice => 'Nome was successfully updated.') }\n fo... | [
{
"docid": "23b5f5e4dacfb330cb1e0ffd4590ef63",
"score": "0.60737914",
"text": "def update opts = {}\n opts[:headers] ||= {}\n opts[:headers]['Content-Type'] ||= 'text/xml'\n post opts.fetch(:path, update_path), opts\n end",
"title": ""
},
{
"docid": "7dcf61d28367255f0ec9cea7ade341d... |
14d2a76fb7416cdb44c87b1a25ff9d63 | Should return true if caption is marked as SPAM | [
{
"docid": "5c9d4ddacd9e8b7704eb537776151aee",
"score": "0.0",
"text": "def deleted?\n false\n end",
"title": ""
}
] | [
{
"docid": "ec19bc90f2be4f011a2bd4fe265d2bb2",
"score": "0.6381806",
"text": "def splayed?\n splayed\n end",
"title": ""
},
{
"docid": "5a5e9c7c7b6f00afa5cc19bc9e166a28",
"score": "0.62558776",
"text": "def verbatim?(tikis)\n @sentences.include?(tikis)\n end",
"title": ""... |
94e58b135571dcaff1a2f5033a68e879 | The document directive is specified in but Gecko allows the `urlprefix` and `domain` functions to omit quotation marks, contrary to the standard. We could parse all document directives according to Mozilla's syntax, | [
{
"docid": "7550560e137d8648e049ec421ccf91e7",
"score": "0.69576937",
"text": "def _moz_document_directive(start_pos); end",
"title": ""
}
] | [
{
"docid": "aed08a67f54bbb10f8319b3520c2304a",
"score": "0.5772068",
"text": "def fix_domains(content)\n content.gsub(/HTTP_OR_S:/, \"\\\" + document.location.protocol +\\\"\")\nend",
"title": ""
},
{
"docid": "f33b19e79653f8c0112c1ac546273460",
"score": "0.5681823",
"text": "def pr... |
99335fdddee4e25c573d199e4c6214fe | DELETE /socio_dados_bancos/1 DELETE /socio_dados_bancos/1.json | [
{
"docid": "f4bcc0472998b557a098c343b66b48da",
"score": "0.75228506",
"text": "def destroy\n @socio_dados_banco.destroy\n respond_to do |format|\n format.html { redirect_to socio_dados_bancos_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "ed113a54459cf8f0398bcba322625db1",
"score": "0.70811063",
"text": "def destroy\r\n @sivic_banco.destroy\r\n respond_to do |format|\r\n format.html { redirect_to sivic_bancos_url }\r\n format.json { head :no_content }\r\n end\r\n end",
"title": ""
},
{
"docid":... |
f2e5a4029d8ef6daa063a0e384172968 | Returns received peer transfers for a user | [
{
"docid": "d74f6736c411c2d9fb9e78603280629c",
"score": "0.5514533",
"text": "def get_peertransfers_user_userorbusinesstoken_recipient_with_http_info(user_or_business_token, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PeerTransfersApi.get_peer... | [
{
"docid": "3a83fd19d70420ce6d86d97d02f9c111",
"score": "0.64345145",
"text": "def get_transactions_from_user\n user = User.find(params[:user_id])\n transactions_sent = user.sent_transactions\n transactions_received = user.received_transactions\n return transa... |
7ecffdb51be8f21b70b54404b7cae03d | initialize If domain argument is given, it will find all GPP printer assignments for the domain the computer is a member of, generate the HTML file and open it in the default browser. Otherwise, simply initialize the instance variables. | [
{
"docid": "50009851c83c2b53907886231633fd5f",
"score": "0.64002717",
"text": "def initialize(auto_run = true)\n\t\t\t@printers = {}\n\t\t\t@ad_groups = {}\n\t\t\t@domain = ENV['USERDNSDOMAIN']\n\t\t\t\n\t\t\tif auto_run\n\t\t\t\tt = self.for_domain(@domain)\n\t\t\t\tf = self.class.write_file(t)\n\t\t\t... | [
{
"docid": "b7725be50e3bb7a8688142fbff69d89a",
"score": "0.63317835",
"text": "def for_domain(domain_name)\n\t\t\tpaths = self.class.catalog_gpo_paths(domain_name)\n\t\t\traise \"Domain name incorrect or no Printer Preferences found. Please use the full domain name such as ad.contoso.com.\" if paths.len... |
a4b4c687031031809c9e30418e7e61a0 | Creates an empty Hash and then merges it with default values for the options Hash. arguments Hash Returns the Return from the truncate_paragraph method. | [
{
"docid": "496627d6322aff62c9c4a5a62900cbf0",
"score": "0.6149571",
"text": "def initialize(arguments = {})\n options = {paragraph: \"No paragraph entered.\", character_length: 50, cutoff_characters: \"...\"}\n @arguments = options.merge(arguments)\n end",
"title": ""
}
] | [
{
"docid": "1f7f39abd3b8abc0752eb4845b8a4b5f",
"score": "0.6604149",
"text": "def paragraph_options\n # Was: { 'w:rsidP' => '00000000', 'w:rsidRDefault' => '00000000' }.merge(run_options)\n { }.merge(run_options)\n end",
"title": ""
},
{
"docid": "c478671037291dcd95428f4d5... |
332d058e807f515f4d2e3a6756f6c3a9 | Returns the list of column names. | [
{
"docid": "2f48abc4315bbfd1d45a6b97c6e6aa1e",
"score": "0.0",
"text": "def header\n property(:header)\n end",
"title": ""
}
] | [
{
"docid": "91a312eb14179474eb634ce13429e773",
"score": "0.90193355",
"text": "def column_names\n columns.map { |c| c.name }\n end",
"title": ""
},
{
"docid": "363dbd4365c059e558541bb6f9b67bb7",
"score": "0.88136744",
"text": "def column_names\n @column_names ||= c... |
49eb75b26048ed4d592280022bc2e98c | Create a new instance of the Client class in order to access the GrabzIt API. | [
{
"docid": "678fa69df4fa4631028714d7978cc5c4",
"score": "0.0",
"text": "def initialize(applicationKey, applicationSecret)\n\t\t\t@applicationKey = applicationKey\n\t\t\t@applicationSecret = applicationSecret\n\t\t\t@protocol = 'http'\n\t\t\t@proxy = Proxy.new()\n\t\tend",
"title": ""
}
] | [
{
"docid": "34e7960b1bf6bf1f094439f308d711b3",
"score": "0.7707456",
"text": "def new\n @client = Client.new\n end",
"title": ""
},
{
"docid": "a2fd0c9fe2a2cb3cd1543557022ad8a8",
"score": "0.75910217",
"text": "def new\n @client = Client.new\n end",
"title": ""
... |
145ae7925ab57fb7d342ec3c0b1c2f7d | PATCH/PUT /bid_infos/1 PATCH/PUT /bid_infos/1.json | [
{
"docid": "9fb3554b09ecfb9b5e59b152772862d0",
"score": "0.0",
"text": "def update\n @item = @bid_info.item\n @bid_info.assign_attributes(bid_info_params)\n @item.winning_bid = @bid_info\n if @bid_info.bid_price.nil?\n # if not return it will go to the next line\n return redirect_t... | [
{
"docid": "8cc509945c655a08f96f93e5559f4482",
"score": "0.7129212",
"text": "def update\n @bid = Bid.find(params[:id])\n\n respond_to do |format|\n if @bid.update_attributes(params[:bid])\n format.html { redirect_to @bid, :notice => 'Bid was successfully updated.' }\n format.js... |
e14519d460430f94e35a4a4ad2e686f0 | Require 1n validator ==== Examples require_validator :crm require_validator :city require_validators :country, :city require_validators :state, :property | [
{
"docid": "110f48b230709b0a59b29e438a55ce2c",
"score": "0.67810625",
"text": "def require_validator(*validators)\n validators.flatten.each { |file| require \"app/validators/#{file.to_s}_validator\" }\n end",
"title": ""
}
] | [
{
"docid": "2b2bbc8a496117ff6b794233a54d2477",
"score": "0.60915375",
"text": "def it_should_validate_required_for(*required)\n required.each do |field|\n it \"should not be valid without #{field}\" do\n elem = model_class.new(valid_attributes)\n elem.send(\"#{field}=\", ni... |
1258a9756b539dea4563bbc8013ec640 | Associate with a Tag by name. Intended to be called through the MessageFactoryHandler by bots who know names but not ids. tag_name Name of a tag in the database. Returns nothing. | [
{
"docid": "de5c025c77370d3c0834b20b3776a07c",
"score": "0.6915517",
"text": "def tag_name=(tag_name)\n self.tag = Tag.find_by_name!(tag_name)\n end",
"title": ""
}
] | [
{
"docid": "7a0832e17056e44f07dba12dc04e5a85",
"score": "0.73294485",
"text": "def tag(name)\n name.strip!\n tag = Tag.find_or_create_by(name: name)\n self.taggings.find_or_create_by(tag_id: tag.id)\n end",
"title": ""
},
{
"docid": "27c13fac3d308f2280f65ffc11ea3340",
"score": ... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "e26e462da91d672f6415e12a85600ab2",
"score": "0.0",
"text": "def set_upload\n\t\t\t@upload = Upload.find(params[:id])\n\t\tend",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60339177",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.60135007",
"text": "d... |
d68a3c76a469435a41538f4faaefadd0 | method adds a student, adds multiple students to a grade and different grades | [
{
"docid": "414fe6162bdb5305f5c81b40244350d5",
"score": "0.7766138",
"text": "def add_student(student_name, grade)\n roster[grade] ||= []\n roster[grade] << student_name\n end",
"title": ""
}
] | [
{
"docid": "4aa2b7f0d39d01833835b5b27d39566f",
"score": "0.81501824",
"text": "def add_student(name, grade, semester)\n\t\t @students << {:name => name, :grade => grade, :semester => semester}\n\t\tend",
"title": ""
},
{
"docid": "b75e6341926d52d8096f9dc858393b2d",
"score": "0.813854"... |
8b84800e4767e67034ac41bc7de41d3d | OVERRIDES THE BUILTIN to_s METHOD. RETURNS THE DETAILS OF THE WORD SEARCH PUZZLE | [
{
"docid": "f9cc89a9e34edab5715ad433c45dd354",
"score": "0.0",
"text": "def to_s\r\n details = \"Word Search Puzzle Details\\n\" # String variable containing the title\r\n details += \"\\tNumber of Words:\\t\\t#{ @words.length }\\n\" # The... | [
{
"docid": "614193b25d731db6273ab7c1cbde64fc",
"score": "0.62447166",
"text": "def to_s\n @word.to_s\n end",
"title": ""
},
{
"docid": "e79c928984a859902943881d0f9a2f48",
"score": "0.61086357",
"text": "def to_word\n self\n end",
"title": ""
},
{
"docid": "e... |
ae5852817818a62307e22c89d5e42169 | Merges the DEFAULT_OPTIONS with those provided to initialize the Client state, namely, its browser version, whether it should validate scripts, and htmlunit log level. | [
{
"docid": "e19d703e335eb696bfd4c1eae580eaa0",
"score": "0.6943887",
"text": "def process_options!(options) \n options = DEFAULT_OPTIONS.merge(options)\n\n @browser_version = BROWSER_VERSIONS.fetch(options.delete(:browser))\n @validate_scripts = options.delete(:validate_scri... | [
{
"docid": "462b53fc097c28ac43d15dbf2da07bed",
"score": "0.6839193",
"text": "def default_options\n @default_options ||= HTTP::Options.new\n end",
"title": ""
},
{
"docid": "dd10ea2ae5d8403339998aa38256bcc4",
"score": "0.6805452",
"text": "def set_defaults\n if @options[... |
96a62bff66d39d97cb6c91630db81cad | Returns the value of attribute lowercase_mapping. source://mail//lib/mail/multibyte/unicode.rb12 | [
{
"docid": "11a72786fb06cc87b1836ab47049e1a8",
"score": "0.7815261",
"text": "def lowercase_mapping; end",
"title": ""
}
] | [
{
"docid": "f01b23ea37585307032c26897b21d796",
"score": "0.7098462",
"text": "def lowercase_mapping=(_arg0); end",
"title": ""
},
{
"docid": "d5bcf9c466610807536fe87e1e0da45e",
"score": "0.6703263",
"text": "def lowercase\n @lowercase ||= false\n end",
"title": ""
}... |
b30baaee6a9e56f7b11c39012b3cccda | Gets the username property value. The username. | [
{
"docid": "b91cd8fe22adc6c670d76e12200b7512",
"score": "0.8422113",
"text": "def username\n return @username\n end",
"title": ""
}
] | [
{
"docid": "2b45b42b518511586a7842eea0a62f8e",
"score": "0.85080266",
"text": "def username\n @obj['username']\n end",
"title": ""
},
{
"docid": "985025a25e7506b3f6d98d605883e6d0",
"score": "0.8395429",
"text": "def username\n @attributes[:username]\n end",
"title... |
82c1740005871383d37a77e4339eee8c | GET /friend_requests Returns pending friend requests of the current logged in user | [
{
"docid": "915903e8fcd3f0923aefb5ff17c00c5d",
"score": "0.7813592",
"text": "def index\n @friend_requests = current_user.recieved_friend_requests\n .where(:status => :pending)\n\n render json: @friend_requests, :include => :requester\n end",
"title": ""
}
] | [
{
"docid": "acdb9ff635bf7ccbc7aaa686dae5c7fd",
"score": "0.8301274",
"text": "def pending_user_requests\n self.friendships.where(state: \"pending\")\n end",
"title": ""
},
{
"docid": "aa4178e2f8532e76dec7616199831007",
"score": "0.82883084",
"text": "def requests\n @friendship... |
55654a2d2e74a552187ecc9427a69ab1 | final provisioning step (server side) | [
{
"docid": "eabcb35355b7957bf4ead543175529e7",
"score": "0.0",
"text": "def provision(params = {})\n raise \"you need an :approval_code\" if params[:approval_code].blank?\n raise \"you need an :identity\" if params[:identity].blank?\n\n post(\"pairing/provision\", params)\n end... | [
{
"docid": "da39969a52fda0972257205358cee40a",
"score": "0.7518971",
"text": "def provision!; end",
"title": ""
},
{
"docid": "da39969a52fda0972257205358cee40a",
"score": "0.7518971",
"text": "def provision!; end",
"title": ""
},
{
"docid": "da39969a52fda0972257205358cee4... |
5fc229b881c4407f96236f56b8887c06 | GET /date_event_types/1 GET /date_event_types/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "7f3652f7c84060b2f0162181e7b52e81",
"score": "0.73328227",
"text": "def index\n @events = Event.get_all_events_by_date.includes(:event_type)\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @events }\n end\n end",
"title": ""
},
... |
23f0113f96125ab064ecf3cb63aec1c4 | view on users through _filter_ | [
{
"docid": "77619489678f9c38dbf2af9d1e6fd811",
"score": "0.7555095",
"text": "def users(filter=@wiki.filter)\n a = Set.new\n revisions(filter).each { |r| a << r.user }\n UsersView.new(a, filter)\n end",
"title": ""
}
] | [
{
"docid": "95fce0166a599fa90df941dd99f45601",
"score": "0.8258914",
"text": "def users(filter=@filter)\n UsersView.new(@users_id, filter) # is this to heavyweighted? Reuse views?\n end",
"title": ""
},
{
"docid": "a621688fa0f82fdb2ef03643428f2f5b",
"score": "0.77371156",
"te... |
67b1cdfd8929e8aabaf1ae7fc4f3c257 | POST /audio/spots POST /audio/spots.:format | [
{
"docid": "10648e0b402adf6deb00f10da4e70a9f",
"score": "0.70192885",
"text": "def create\n @spot = Spot.new(params[:spot])\n respond_to do |format|\n if @spot.save\n flash[:notice] = 'Spot registered successfully.'\n format.html { redirect_to audio_spot_path(@spot) }\n f... | [
{
"docid": "226ad98778776e24cb2d1b3d8c1091bf",
"score": "0.6705858",
"text": "def create\n spot2 = Spot.order(\"created_at\").last\n id = (spot2.id.to_i) + 1\n @spot = Spot.new(spot_params)\n @spot.id = id\n respond_to do |format|\n if @spot.save\n HTTParty.post(\"http://local... |
cf8faafd87c8368e4a9d6982cd0cffc5 | PATCH /items/1 PATCH /items/1.json | [
{
"docid": "64bf7ad81917016cd5bbc372191d6c42",
"score": "0.0",
"text": "def update\n respond_to do |format|\n if @item.update(item_params)\n flash[:success] = \"Item was successfully updated.\"\n format.html { redirect_to order_path(@item.order) }\n format.json { render :sho... | [
{
"docid": "0886720a82e037d1feaa9397bf1e4d5f",
"score": "0.7384298",
"text": "def update\n item = Item.find(params[\"id\"])\n item.update_attributes(items_params)\n respond_with item, json: item\n end",
"title": ""
},
{
"docid": "ab7b511e7fdb14f278ada05c46659bfc",
"score": "0.7... |
9581def0fe893889543db17545a9a0a6 | syntactic predicate synpred76_Plsql (in plsql.ruby.g) 152:5: synpred76_Plsql : keySERIALLY_REUSABLE ; This is an imaginary rule inserted by ANTLR to implement a syntactic predicate decision | [
{
"docid": "f1adcc6b555572f38c2daead40f4ff8f",
"score": "0.73098826",
"text": "def synpred76_Plsql\n # -> uncomment the next line to manually enable rule tracing\n # trace_in( __method__, 443 )\n\n # at line 152:5: keySERIALLY_REUSABLE\n @state.following.push( TOKENS_FOLLOWING_keySER... | [
{
"docid": "f9b9848c03ea00409b69f3a95e5ec936",
"score": "0.66333276",
"text": "def synpred291_Plsql\n # -> uncomment the next line to manually enable rule tracing\n # trace_in( __method__, 658 )\n\n # at line 624:6: keyFULL\n @state.following.push( TOKENS_FOLLOWING_keyFULL_IN_synpred... |
295195315805573a878e910862eb9e9c | Auto refresh access token flag | [
{
"docid": "cd18beb5b859a5ad837691f7ca8271e6",
"score": "0.75782037",
"text": "def access_token_auto_refresh?\n @access_token_auto_refresh && !@grant_type.nil?\n end",
"title": ""
}
] | [
{
"docid": "c1bfaf32d60052b544b3d1c451ad70da",
"score": "0.8064423",
"text": "def refresh\n set_access_token\n\n logger.info(\"Successfully refreshed/created access token.\")\n head :ok\n end",
"title": ""
},
{
"docid": "bc30c436dfee0bc32f47b98171dac8ec",
"score": "0.80281734",... |
5d88d07506ad251715e906fd4792c449 | Which parameters have not been provided? | [
{
"docid": "f0d89d6b201dfcb9ace632a9b44492d3",
"score": "0.0",
"text": "def parameters\n @function.parameters.reject { |_, name| known.keys.include? name }\n end",
"title": ""
}
] | [
{
"docid": "6aae25eb94dc1caf76eb4315c615b6fa",
"score": "0.7553176",
"text": "def missing_params\n \"Please make sure you enter all required information.\"\n end",
"title": ""
},
{
"docid": "8916df3fcfe57aa51052e80f8c266037",
"score": "0.75508165",
"text": "def has_parameters?\n ... |
bef90a5f4e75ad54840d0bce0d777c2c | Forces TableView to reload Rows by index paths | [
{
"docid": "ede0ff40b2629ee61d6386b77fabddd3",
"score": "0.6906232",
"text": "def reload_cells(*paths)\n collection_view.reloadRowsAtIndexPaths(Array.wrap(paths), withRowAnimation: UITableViewRowAnimationFade)\n collection_view.reloadData # do not use reload_collection_data (due to async_form_... | [
{
"docid": "2c9b249648cb6934866481f51fe12545",
"score": "0.63952935",
"text": "def reload\n\t\tload_table_names\n\t\tload_rows_and_columns\n\n\t\t@tableView.reloadData\n\t\t@tableContentView.reloadData\n\tend",
"title": ""
},
{
"docid": "72cc551dc87279f3fa9cc956c620cfd9",
"score": "0.626... |
e4ae5b38934d1a1fdac517eb8b4e493a | POST /response_histories POST /response_histories.json | [
{
"docid": "6f61431e82510c5ab888dba172dac629",
"score": "0.67660856",
"text": "def create\n @response_history = ResponseHistory.new(response_history_params)\n\n respond_to do |format|\n if @response_history.save\n format.html { redirect_to @response_history, notice: 'Response history w... | [
{
"docid": "27c14e87213c38701582dc41a2003d5e",
"score": "0.689736",
"text": "def create\n megam_rest.post_billedhistories(to_hash)\n end",
"title": ""
},
{
"docid": "ff7fe24cee39ea71bff8e0a460b45212",
"score": "0.6725315",
"text": "def index\n @response_histories... |
3471684dd1471ea333da1c401c3fe970 | Destroy the current session | [
{
"docid": "25768c25518148c3992941026ad1d367",
"score": "0.0",
"text": "def logout\n params = {\n 'method' => :delete,\n 'command' => '/session'\n }\n\n _response, _headers = send_request(params)\n # reset auth key to nil\n @auth_key = ... | [
{
"docid": "cfd5fc29b4812bbad3c1e9978df2f361",
"score": "0.8859313",
"text": "def destroy\n @@sessions.delete(@session)\n @session = nil\n end",
"title": ""
},
{
"docid": "cabf387a9c63338c5d0cf049e003a4e7",
"score": "0.8500251",
"text": "def destroy\n @session.destroy... |
1158c42712ffcc01cd2ecb28780b07fe | PATCH/PUT /time_slots_lists/1 PATCH/PUT /time_slots_lists/1.json | [
{
"docid": "05cd0f3a404429b491c4ea18dc07c686",
"score": "0.79535013",
"text": "def update\n respond_to do |format|\n if @time_slots_list.update(time_slots_list_params)\n format.html { redirect_to @time_slots_list, notice: 'Time slots list was successfully updated.' }\n format.json ... | [
{
"docid": "24b695af051de6eedc85b25737670611",
"score": "0.7002298",
"text": "def update\n @timeslot = current_event.timeslots.find(params[:id])\n respond_to do |format|\n @timeslot.start_time_will_change!\n @timeslot.slot_date_will_change!\n if @timeslot.update_attributes(params[:t... |
9458a88b12ace2bab59e041b7ff815fb | Invokes the given block once for each value in _hsh_, replacing it with the new value returned by the block, and then returns _hsh_. This method does not change the keys. If no block is given, an enumerator is returned instead. | [
{
"docid": "a3d4db332cf0a41765a449bb40ce8dcb",
"score": "0.50246346",
"text": "def transform_values! &block # :yields: value\n return enum_for(:transform_values!) unless block_given?\n each do |k, v|\n store k, (yield v)\n end\n self\n end",
"title": ""
}
] | [
{
"docid": "14fd739a92d5978076592a3512e6480e",
"score": "0.71794957",
"text": "def block_by_hash(_hsh)\n raise NotImplementedError\n end",
"title": ""
},
{
"docid": "ee3288d244b81a05c1b986a6ae66af82",
"score": "0.6866956",
"text": "def merge!(hsh)\n raise ArgumentErr... |
e7fc9b386e92586f0dc751dcc1f4af43 | Sets the oauth2PermissionScopes property value. The delegated permissions exposed by the application. For more information see the oauth2PermissionScopes property on the application entity's api property. Not nullable. | [
{
"docid": "156164b912104a50bb2b608b4dcd803a",
"score": "0.8008219",
"text": "def oauth2_permission_scopes=(value)\n @oauth2_permission_scopes = value\n end",
"title": ""
}
] | [
{
"docid": "b974157e97c373c274de250f79ef73e8",
"score": "0.64226985",
"text": "def oauth2_permission_grants=(value)\n @oauth2_permission_grants = value\n end",
"title": ""
},
{
"docid": "b974157e97c373c274de250f79ef73e8",
"score": "0.64226985",
"text": "def ... |
bf38e46c792125c1b9e97f99d6db9269 | Fetches the access token from the authorization server. The method expects the authorization token, the authorization token secret and the authorization verifier. The result comprises the access token, the access token secret and a list of additional fields extracted from the server's response. The list of additional f... | [
{
"docid": "1ea01613393a7546ecc3313b8fa46969",
"score": "0.7939603",
"text": "def fetch_access_token auth_token, auth_token_secret, auth_verifier\n request_token = OAuth::RequestToken.new(oauth_consumer, auth_token, auth_token_secret)\n access_token = request_token.get_access_token(:oauth_... | [
{
"docid": "4295ef742ff5e3be162c68116b377aff",
"score": "0.84143263",
"text": "def fetch_access_token auth_token, auth_token_secret, auth_verifier, additional_fields_to_extract = []\n access_token_resp = https_post(auth_host, access_token_path, access_token_req_params(auth_token, auth_token_secre... |
c443023c3a839c0ab4a2ea1ed4427591 | Update a Group Update a [group]( under your account. Prerequisite: Pro, Business, or Education account Scopes: &x60;group:write:admin&x60; | [
{
"docid": "6c09f5396194e5ea17e3377bdfabdbdc",
"score": "0.0",
"text": "def group_update_with_http_info(group_id, body, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: GroupsApi.group_update ...'\n end\n # verify the required parameter '... | [
{
"docid": "ec36e491aa5e69bc0da0412d4ac49ae8",
"score": "0.78551245",
"text": "def update_group(group_id, request)\n start.uri('/api/group')\n .url_segment(group_id)\n .body_handler(FusionAuth::JSONBodyHandler.new(request))\n .put()\n .go()\n end",
"ti... |
4f3c407a85e622b4ef598bcf17a88b2f | This method takes the sorted data taken from the API request and puts it into a Hash RETURNS A HASH | [
{
"docid": "406f1c06d58713616a57b4d7a3065634",
"score": "0.0",
"text": "def change_the_arrays()\n\t\tnew_hash = {}\n\t\t@change_array = []\n\n\t\t\t@all_records.each do |pokemon|\n\n\t\t\t\tnew_hash[\"name\"] = pokemon[0]\n\t\t\t\tnew_hash[\"height\"] = pokemon[1]\n\t\t\t\tnew_hash[\"weight\"] = pokemon... | [
{
"docid": "cf9005853bcfc82de861119ffecf5162",
"score": "0.5971706",
"text": "def sort_hash\n base_hash = JSON.parse(File.read(\"tmp/skills.json\"))\n sorted_hash = base_hash.sort_by {|a,b| -b}\n sorted_hashery = sorted_hash.to_h\n \n File.open(\"tmp/sorted_skills.json\",\"w\") do |f|\n f.write(... |
6926bb2d8f99cfadab3bc649b2122eea | Reverses through content and gets last number as last ingredient. This doesn't work for all cases as some ingredients dont have num leader | [
{
"docid": "0260f8fbd3ee4a1f88e5786268b663b9",
"score": "0.59339947",
"text": "def scrape_ingredients\n begin\n removed = @content.first.content\n @content = @content[1..-1]\n end while removed != \"Print this Recipe!\"\n\n \n # http://joythebaker.com/2012/03/biscuit-cinnamon-rolls/... | [
{
"docid": "ec4f5d1d59c18c123a5389977b66b867",
"score": "0.581792",
"text": "def reversed_number(num)\n new_num = num.to_s.split('')\n result = []\n\n loop do\n break if new_num.length.zero?\n result << new_num.pop\n end\n p result.join.to_i\nend",
"title": ""
},
{
"docid": "09f77... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "ba881064e68e5a9f508d299f73da7921",
"score": "0.0",
"text": "def set_user_profile\n @user_profile = UserProfile.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;... |
8e10d131662a1c87678cbd3bfc70e393 | Lookup and cache every generator from the source list. | [
{
"docid": "418d86f5d3d4ac0deeb393af9fb0e31d",
"score": "0.6772914",
"text": "def cache\r\n @cache ||= sources.inject([]) { |cache, source| cache + source.to_a }\r\n end",
"title": ""
}
] | [
{
"docid": "2a897b70aa48fa22d6c2fe6a83b7ef52",
"score": "0.6899102",
"text": "def sources\n generators.map{ |generator| generator.source } \n end",
"title": ""
},
{
"docid": "8120a24d067581c28901335bf0266648",
"score": "0.6429037",
"text": "def propagation_source_generat... |
2144f60870a906fc1847c0282227ea1f | PUT /items/1 PUT /items/1.xml | [
{
"docid": "d61c1f9c860cb74d13ae0fa9b56a87a8",
"score": "0.6112112",
"text": "def update\n @item = Item.find(params[:id])\n respond_to do |format|\n @item.replace_tags(params[:tags]) if !params[:tags].blank?\n if @item.update_attributes(params[:item].merge(:modified_flag=>true))\n ... | [
{
"docid": "4de8d067c151eda0c5d4fabee90dd31d",
"score": "0.6973529",
"text": "def update_rest\n @item = Item.find(params[:id])\n\n respond_to do |format|\n if @item.update_attributes(params[:item])\n flash[:notice] = 'Item was successfully updated.'\n format.html { redirect_to(@... |
3b826b26e95f6641981684ee5ff65358 | Provide a user friendly representation | [
{
"docid": "0c11187139058f5e399a7fe4c5d06ac3",
"score": "0.0",
"text": "def to_s\n '<Twilio::REST::Preview::DeployedDevices>'\n end",
"title": ""
}
] | [
{
"docid": "8813d23ea53482a215f5e5b971468e2d",
"score": "0.75752455",
"text": "def representation; end",
"title": ""
},
{
"docid": "dad7e7041772f906c35bc43f5390a274",
"score": "0.70985687",
"text": "def to_human\n super\n end",
"title": ""
},
{
"docid": "1e72b... |
52f9669b378d0ad714526b9516668a10 | POST /assistance_fare_groups POST /assistance_fare_groups.json | [
{
"docid": "8c491286a57e96950ce77f4fdc42a349",
"score": "0.7380813",
"text": "def create\n @assistance_fare_group = AssistanceFareGroup.new(assistance_fare_group_params)\n\n respond_to do |format|\n if @assistance_fare_group.save\n format.html { redirect_to @assistance_fare_group, noti... | [
{
"docid": "ecc9b64a1516fecb822587efacf06413",
"score": "0.6649784",
"text": "def assistance_fare_group_params\n params.require(:assistance_fare_group).permit(:name, :provider_aptour_id, :operator_aptour_id)\n end",
"title": ""
},
{
"docid": "ea456dcde49a0af4f20ee5a5b6ed2069",
"s... |
7daa3e7bd4845f8afed9401a614a84bb | Get all persons Returns all persons | [
{
"docid": "47633f35ef69315d91896311b712218d",
"score": "0.6870632",
"text": "def persons_get(opts = {})\n persons_get_with_http_info(opts)\n end",
"title": ""
}
] | [
{
"docid": "9f8c5eca85a413769dbe8552fd70a07b",
"score": "0.8283439",
"text": "def get_persons\n @repository.get_persons\n end",
"title": ""
},
{
"docid": "c03530fd4f4b73049a38d50718c6775e",
"score": "0.81997347",
"text": "def get_persons\n @persons = Person.all\n end",
... |
66c5c631cc8cc8e7846dda0045b16755 | execute a simple query just to keep session alive | [
{
"docid": "590569ba9052a82653c4627171be882b",
"score": "0.0",
"text": "def ping\r\n\t\tif @successfulLogin\r\n\t\t\tbegin\r\n\t\t\t\tquery(\"SELECT Id FROM User WHERE Id = '\" + @userId + \"'\")\r\n\t\t\trescue Exception => exception\r\n\t\t\t\tlogException('ping()', exception.message, exception.backtr... | [
{
"docid": "9288b124d5fc93f1a2d8be8acfb6ef65",
"score": "0.6215046",
"text": "def pause_session; end",
"title": ""
},
{
"docid": "9288b124d5fc93f1a2d8be8acfb6ef65",
"score": "0.6215046",
"text": "def pause_session; end",
"title": ""
},
{
"docid": "abfe05196565cfbf8c22797a... |
08e257eb18382dfab88f18d6b2c08cb8 | Auto generated FRBR relationship Returns all FRBR objects for the relationship notates to which_expressions? | [
{
"docid": "1d1af07eba7f59a42df82414ec425363",
"score": "0.71874475",
"text": "def notations\n find_related_frbr_objects( :notates, :which_expressions?) \n end",
"title": ""
}
] | [
{
"docid": "18e7f6aa0b1865d3380e6239f963462e",
"score": "0.67243624",
"text": "def frbr_relationships\n frbr_relationships=Array.new()\n for rel in relationships.uniq\n reltype=RelationshipType.find(rel.relationship_type_id)\n \n #Choose the entity_type that does not match... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "04ce80b6df8a7d68ca90ca1473059df1",
"score": "0.0",
"text": "def update!(**args)\n @id = args[:id] if args.key?(:id)\n @redirect_uri = args[:redirect_uri] if args.key?(:redirect_uri)\n @secret = args[:secret] if args.key?(:secret)\n end",
"title": ""
}
... | [
{
"docid": "184b1b1ed771473d3eb9f338c0734c38",
"score": "0.73066413",
"text": "def update *args\n opts = args.extract_options!\n fill_properties opts\n self.save\n end",
"title": ""
},
{
"docid": "5076c5a88404ae72986f958710f5687a",
"score": "0.72631145",
"text": "def update... |
0e3693787b4adba61b100f81bd33ac78 | DELETE /tubuyakis/1 DELETE /tubuyakis/1.json | [
{
"docid": "1cf765439e49c3fd48dcb97313066b02",
"score": "0.6960146",
"text": "def destroy\n @tubuyaki.destroy\n respond_to do |format|\n format.html { redirect_to tubuyakis_url, notice: 'Tubuyaki was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"tit... | [
{
"docid": "689d5a07a403c4b765ba178e4aff08a3",
"score": "0.751891",
"text": "def delete\n client.delete(\"/#{id}\")\n end",
"title": ""
},
{
"docid": "522e787502895f0a05c9b2c6ca4e5ced",
"score": "0.7188657",
"text": "def delete\n request(:delete)\n end",
"title": ... |
0c540ced01a4d40b32d65f9dabdbabf4 | for local refs (instead of cfn_ref) | [
{
"docid": "de71f3985c0f8d5f19d0b2c37f5575b1",
"score": "0.0",
"text": "def cfn_cfnpp_ref(s)\n return @opts[s]\n end",
"title": ""
}
] | [
{
"docid": "8da1df1557234a543794e67af5ddb224",
"score": "0.72171867",
"text": "def ref; end",
"title": ""
},
{
"docid": "4897e625e60997ba6afef6ab7ed3a773",
"score": "0.67082125",
"text": "def refs_at; end",
"title": ""
},
{
"docid": "a7764d5104c6a962dcd29f09ea7b6c62",
... |
28ffa4de63b1304cc0366f7d92c21295 | DELETE /stories/1 DELETE /stories/1.xml | [
{
"docid": "3501b932af585093a56718308f412376",
"score": "0.75707257",
"text": "def destroy\n @story = Story.find(params[:id])\n @story.destroy\n\n respond_to do |format|\n format.html { redirect_to(stories_url) }\n format.xml { head :ok }\n end\n end",
"title": ""
}
] | [
{
"docid": "2fe0ff2d3807f3503ba64b6c3dca326e",
"score": "0.76261795",
"text": "def delete_story(id)\n xml = delete_request('/projects/' + PIVOTAL_PROJECT + '/stories/' + id)\n end",
"title": ""
},
{
"docid": "ec9a6e64827b8cf14ca01fe18e3461f3",
"score": "0.7586934",
"text": "d... |
9c343231c0b8117db486301f9eefb08a | PATCH/PUT /user_addresses/1 PATCH/PUT /user_addresses/1.json | [
{
"docid": "c0b586c6cc4a9c1dec8c50f22a96aeb0",
"score": "0.689274",
"text": "def update\n respond_to do |format|\n if @user_address.update(user_address_params)\n format.html { redirect_to @user_address, notice: 'User address was successfully updated.' }\n format.json { render :show... | [
{
"docid": "a56761928b594fca41f6871153415e13",
"score": "0.7059594",
"text": "def update_json\n\n user_id = params[:id]\n first_name = params[:first_name]\n last_name = params[:last_name]\n email = params[:email]\n birth_month = params[:birth_month]\n birth_day = p... |
150d1314de1abdaebcdce5b3363a8dac | Returns normal swallow line given subject (with food and line properties) | [
{
"docid": "7cc51446cef74bc09cede3623a6f230d",
"score": "0.7212363",
"text": "def swallow(subject)\n [\n \"I know an old lady who swallowed a #{ subject[:food] }.\",\n subject[:line]\n ]\n end",
"title": ""
}
] | [
{
"docid": "9e03efccbdf3d6535961d73c5a4cf17e",
"score": "0.6173285",
"text": "def generate_fly_line(index)\n SUBJECTS[0][:line] if non_boundary?(index)\n end",
"title": ""
},
{
"docid": "00d90a454dbdee40c23b8e003e58eb93",
"score": "0.5369766",
"text": "def get_subject_line(ma... |
b9830578caee9066c4a8002c00c79794 | Set file date d:: [Time] or nil | [
{
"docid": "31cda3861f0a3c1dafb37a2f309dbb7a",
"score": "0.6189831",
"text": "def date=(d)\n attributes['date'] = (d ? d.xmlschema : nil)\n end",
"title": ""
}
] | [
{
"docid": "b60984bb9948f6fab49553d7f288156a",
"score": "0.79794407",
"text": "def set_date\n return if self.filename.nil? || self.date\n match = self.filename.match(TIMESTAMP_MATCH)\n date = match[1]\n time = match[2]\n # convert the timestamp in the filname to a Ruby Time object\n se... |
14a4ff6d1329d4759aad3467a290fbc9 | GET /baz95s or /baz95s.json | [
{
"docid": "9097dcf7f5321c789b5dff2870038613",
"score": "0.0",
"text": "def index\n @baz95s = Baz95.all\n end",
"title": ""
}
] | [
{
"docid": "7cd6ca78f8717d0f399feaef65251e05",
"score": "0.60107124",
"text": "def get! *args\n get *args\n expect(last_response.status).to eq(200)\n end",
"title": ""
},
{
"docid": "152509a510973eda04508f65c584a7d3",
"score": "0.59447753",
"text": "def get_index_by_gems_reque... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "615f9ddaa5fd968f73165b1fca700864",
"score": "0.0",
"text": "def set_task\n @task = Task.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6164095",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.6046031",
"text": "def action_hook;... |
b12c368bc651fdacb8d39b848c3745ca | Create websocket connections for active tokens | [
{
"docid": "64ec82ebdff672176cc30ed782fcf5bf",
"score": "0.5636414",
"text": "def start\n # Clear RTM connections\n storage.delete_all(teams_key)\n\n # Start a new connection for each team\n storage.get_all(tokens_key).each do |id, token|\n create(id, token)\n end\n en... | [
{
"docid": "31fd0ffa6a3c4da28d370ebe901d159d",
"score": "0.687634",
"text": "def on_open(ws, req)\n uri = WebsocketUri.find_by_socket_id(req.params['token'].to_s)\n if uri\n client = WebsocketClient.create(\n socket_id: uri.socket_id,\n tags: uri.tags,\n created_at:... |
115116d4d7f37017bb2cc0af609cafbc | METHODS FOR REQUIRED INFORMATION IDENTIFICATION For most of the following methods : 1. We try to detect the required information in the Key Phrases of the Article, extracted by Text Analysis => If we have a match, we save its presence and we attribute the maximum score. (Deep semantic relationships => ++ probability of... | [
{
"docid": "8c4fd9dae0823caaf1ff06c612425195",
"score": "0.5962209",
"text": "def cgvu_service_access(article_body, article_key_phrases)\n #We firstly test on the article_key_phrases => Score maximized\n raw_target = article_key_phrases.join(\" \").match(/(?=.*accès)(?=.*service).*|/i)\n\n if r... | [
{
"docid": "73e586f1810517a0ee463cd4d8e8119d",
"score": "0.5895919",
"text": "def scoreArticle(article)\n \tscore = 0\n \t@user = current_user\n \tif article.body == nil or article.body == ''\n \t\treturn 1\n \tend\n\n body = article.body.split(//)\n body = body.uniq\n for char in body # K... |
f3b83d380ebe614f2c65eff5220f5d18 | Returns a hexadecimal string giving a lowlevel platformspecific identifier for window. On Unix platforms, this is the X window identifier. Under Windows, this is the Windows HWND. On the Macintosh the value has no meaning outside Tk. | [
{
"docid": "be6d7b1bc4cfd16af1b4051fc842548d",
"score": "0.71126884",
"text": "def id(window)\n Tk.execute(:winfo, :id, window).to_s\n end",
"title": ""
}
] | [
{
"docid": "afa04ff5f795aa5b1121465721df88d0",
"score": "0.69323105",
"text": "def name\n\t\t\treturn `xdotool getwindowname #{@window}`.chomp\n\t\tend",
"title": ""
},
{
"docid": "54e5b9db77f04a855bcbe7949582c3ff",
"score": "0.6858642",
"text": "def root_id\n out = \"\"\n ... |
beee15ec28e810b6b1f791f1988745d1 | Converts email to all lowercase. | [
{
"docid": "d3b6c058bc8ad36584f931372c1d8e28",
"score": "0.0",
"text": "def downcase_email\n self.email = email.downcase\n end",
"title": ""
}
] | [
{
"docid": "2b2c0688ba3acfcff4c2f18ffcd0d792",
"score": "0.8383631",
"text": "def normalize_email\n self.email.downcase!\n end",
"title": ""
},
{
"docid": "61c6f9455ec34c2acd15663a017f23dc",
"score": "0.8339932",
"text": "def downcase_email\n email.downcase!\n e... |
123be7b3664495779d117cd8026ddd89 | Get a mew token from the authorization server | [
{
"docid": "f2db1c82ce76182971b1f77b014b013e",
"score": "0.0",
"text": "def get_new_token\n binding.pry \n auth = 'Basic ' + Base64.strict_encode64( session[:client_id] +\":\"+session[:client_secret]).chomp\n \n rcResultJson = RestClient.post(\n session[:token_url],\n {\n ... | [
{
"docid": "04a3e8780ecad6ea4f39021eda4a629a",
"score": "0.75639546",
"text": "def get_token\n LastFM.get( \"auth.getToken\", {}, :secure )\n end",
"title": ""
},
{
"docid": "c04fec923ce5cfd0fddad5ec0f383646",
"score": "0.7519761",
"text": "def token\n client.token i... |
f3e80096b35c96e7f177b60fa0b97357 | populate contact fields from LDAP | [
{
"docid": "7f69dc69532a0af7336a225a896aa5fd",
"score": "0.69320065",
"text": "def populateLDAP\n return unless Rails.env.production?\n #quit if no email or netid to work with\n self.email ||= ''\n return if !self.email.include?('@yale.edu') && !self.netid\n\n begin\n ldap = Net::LDA... | [
{
"docid": "af8700e6470756986c1c2f3f60f62d65",
"score": "0.749683",
"text": "def populateLDAP\n \n #quit if no email or netid to work with\n return if !self.netid\n \n ldap = Net::LDAP.new(host: 'directory.yale.edu', port: 389)\n b = 'ou=People,o=yale.edu'\n f = Net::LDAP::Filter.eq('u... |
7cd26b105f33f2030264525d3b12b660 | Called before convergence starts | [
{
"docid": "5ed8b78d7b7e435cf6f0f6dafbccc9de",
"score": "0.5299585",
"text": "def converge_start(run_context)\n @total_count = run_context.resource_collection.all_resources.size # + 150\n @started = true\n puts \"Converging #{run_context.resource_collection.all_resources.size} resou... | [
{
"docid": "f1c49c1f30355cdf8f5320150313cac1",
"score": "0.7498923",
"text": "def convergence\n end",
"title": ""
},
{
"docid": "61702a4745e682e2354f3da298ec1bdf",
"score": "0.6804361",
"text": "def converge_start(run_context); end",
"title": ""
},
{
"docid": "bb61017bf1... |
b8fedf3275aeba71c9760a9c329a8056 | PUT /expense_categories/1 PUT /expense_categories/1.xml | [
{
"docid": "3dfd268b13a98ff4ef97890ea8aa6f09",
"score": "0.6755134",
"text": "def update\n @expense_category = ExpenseCategory.find(params[:id])\n\n respond_to do |format|\n if @expense_category.update_attributes(params[:expense_category])\n format.html { redirect_to(@expense_category,... | [
{
"docid": "5d378eec0e1ae4e1c577d2432be30a37",
"score": "0.71385366",
"text": "def update\n @expense.date = expense_params[:date]\n @expense.description = expense_params[:description]\n @expense.amount = expense_params[:amount].to_f\n @expense.expense_categories.clear\n\n expense_params[:... |
3f2ce5fbae613d03272c4a7d72e42731 | reduce 343 omitted reduce 344 omitted | [
{
"docid": "447674bdcd01814250b8b8475830564f",
"score": "0.0",
"text": "def _reduce_345(val, _values, result)\n @static_env.declare val[0][0]\n\n result = @builder.arg(val[0])\n \n result\nend",
"title": ""
}
] | [
{
"docid": "bcc77ea412992f9c87aad138efd40a40",
"score": "0.75342166",
"text": "def _reduce_236(val, _values, result)\n result = nil\n \n result\nend",
"title": ""
},
{
"docid": "56bd5579a3a2de64f1337e1168c579a4",
"score": "0.7531806",
"text"... |
f5f738432c08508b1090085b1bb6daa7 | maxLength attribute Indicates whether to show the values of the cells on which this data bar is applied. The default value is true | [
{
"docid": "5565be47843812496d07c6290c8c8a60",
"score": "0.0",
"text": "def showValue; end",
"title": ""
}
] | [
{
"docid": "4ca02c3cefd5d525f9afd5d3f4f5d934",
"score": "0.6258916",
"text": "def max_cols=(value)\n @options.delete(:max_rows)\n @options[:max_cols] = value\n end",
"title": ""
},
{
"docid": "81b563095b0c19f959fc8842ce78377d",
"score": "0.6189585",
"text": "def maxL... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "e0f7d1a045a59cac078c2ffb9e1f47ef",
"score": "0.0",
"text": "def offer_params\n params.require(:offer).permit(:name,'category_id', :description, :picture, :state)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69792545",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781151",
"text": "def strong_params\n params.requ... |
c3a4a9fac7cdc8f2a7eb5ceb9c6e4314 | Returns the member&39;s bags Returns the member&39;s bags. Behavior should match that of &x60;&x60;&x60;/bags/?member&x3D;&x60;&x60;&x60;, including querystring options except for &x60;&x60;&x60;member&x60;&x60;&x60;. | [
{
"docid": "30ef6b79112cb4e5628948b31b4fd9e3",
"score": "0.6487778",
"text": "def member_member_id_bags_get_with_http_info(member_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: BagApi.member_member_id_bags_get ...\"\n end\n # verif... | [
{
"docid": "ac46274943d2344f35aa39d0660cf7ab",
"score": "0.6570444",
"text": "def member_member_id_bags_get(member_id, opts = {})\n data, _status_code, _headers = member_member_id_bags_get_with_http_info(member_id, opts)\n return data\n end",
"title": ""
},
{
"docid": "ac4627494... |
08a02e83feb412c53cdd061998442ace | POST /weeklines POST /weeklines.json | [
{
"docid": "4584214cf2887329cd368460939b54c2",
"score": "0.7830588",
"text": "def create\n @weekline = Weekline.new(params[:weekline])\n\n respond_to do |format|\n if @weekline.save\n format.html { redirect_to @weekline, notice: 'Weekline was successfully created.' }\n format.js... | [
{
"docid": "8f820358d42005e5573b303bb824c175",
"score": "0.6702959",
"text": "def new\n @weekline = Weekline.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @weekline }\n end\n end",
"title": ""
},
{
"docid": "0eb9edb7201b976a58341... |
b2526cf493ddd442f9ad6fe9a6d6c33b | GET /appearances/1 GET /appearances/1.xml | [
{
"docid": "553670adfd1ecda97381f3b81d476c97",
"score": "0.7714539",
"text": "def show\n @appearance = Appearance.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @appearance }\n end\n end",
"title": ""
}
] | [
{
"docid": "fa40483a03a596d36670e9d23fe522c1",
"score": "0.7776457",
"text": "def show\n @appearance = Appearance.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @appearance }\n end\n end",
"title... |
4bfab6ff74e3720eecc93cf00e01b1d1 | For now, require that signature is valid by verifying payload w/ secret. It must have 'aud', with 'sub' optional to be authenticated. If it has both 'aud' and 'sub', then it is userscoped, with the user_id in 'sub'. All authorization middleware should grant access as appropriate. | [
{
"docid": "0afdaab3e6192d42d59b98a1bc08b0a7",
"score": "0.0",
"text": "def jwt_payload\n @jwt_payload ||= request.env['JWT_PAYLOAD']\n end",
"title": ""
}
] | [
{
"docid": "32fc0c55e6f729199e6f79b302979448",
"score": "0.6121923",
"text": "def access_token_request(aud:, sub:, secret:)\n assertion = JSON::JWT.new(\n iss: request.host,\n sub: sub,\n aud: aud.to_s,\n iat: Time.now.to_i,\n exp: 1.minute.from_now,\n jti: SecureRandom.... |