query_id
stringlengths
32
32
query
stringlengths
7
6.75k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
538c0bb30093b8677857884ac4fa2451
Run till there is nothing to do
[ { "docid": "014c2f162524fcbdb5b429069605ba2c", "score": "0.0", "text": "def run\n begin\n each { |d| d.process }\n end while (IO.select(self, [], [], 0) rescue nil)\n end", "title": "" } ]
[ { "docid": "f7917f44729c2d21acea9b0424deeec0", "score": "0.7266303", "text": "def done!\n # Do nothing\n end", "title": "" }, { "docid": "f7917f44729c2d21acea9b0424deeec0", "score": "0.7266303", "text": "def done!\n # Do nothing\n end", "title": "" }, ...
ea1eb30459921707be4b8fb58ad23155
Update a 'compute.ServerSetting' resource.
[ { "docid": "efc491f437086fb84ba301ca3a64f011", "score": "0.67047596", "text": "def update_compute_server_setting(moid, compute_server_setting, opts = {})\n data, _status_code, _headers = update_compute_server_setting_with_http_info(moid, compute_server_setting, opts)\n data\n end", "tit...
[ { "docid": "fa3e7577997c3809846ac5bdfe85658c", "score": "0.6899021", "text": "def update\n @server_setting = ServerSetting.find(params[:id])\n\n respond_to do |format|\n if @server_setting.update_attributes(params[:server_setting])\n flash[:notice] = 'ServerSetting was successfully upd...
b9e8071aa68ac56b216164fd30119006
GET /solicitudes/new GET /solicitudes/new.xml
[ { "docid": "4919f2a37b1728df7c36273ca1158ddf", "score": "0.72066814", "text": "def new\n @solicitud = Solicitud.new\n @solicitud.fecha_creacion = l(Date.today)\n @solicitud.solicitante_nombre = \"\"\n @solicitud.solicitante_identificacion = \"No Disponible\"\n @solicitud.motivonegativa_id...
[ { "docid": "611927c565a7feb12e7f45820cfc4b0a", "score": "0.77419174", "text": "def new\n @solicitation = Solicitation.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @solicitation }\n end\n end", "title": "" }, { "docid": "8ffd83...
ee853156fe7ab8f027798c210ce8a7c6
get each semester's hours
[ { "docid": "55f9dd59dd892a79e3172c5669ad46d1", "score": "0.7609122", "text": "def get_semesters_hours\n\t\t@plans_courses_hash = get_semesters_courses\n\t\t@plan_semester_hours = Hash.new\n\t\t@plans_courses_hash.each do |key, array|\n\t\t\t@plan_semester_hours[\"#{key}\"] = 0\n\t\t\tarray.each do |cour...
[ { "docid": "e3e94f03f4286b650c2bacfb32418bb1", "score": "0.69002247", "text": "def hours\n _nudge[0]\n end", "title": "" }, { "docid": "b7a13e8d565ff2498179dbf9e9cfd725", "score": "0.68446225", "text": "def hours\n @hours ||= []\n return @hours if !@hours.empty?\n src['h...
506f351e6f9d9d40b0f1ccbd97add366
Defines how errors that shouldn't break your application should be logged
[ { "docid": "4a94fcffa4511aced9acffeeba107a1e", "score": "0.0", "text": "def on_error(&block)\n @error_logger = block\n end", "title": "" } ]
[ { "docid": "5c07d88a4d977761768cc7150160e664", "score": "0.7458283", "text": "def error_log\n end", "title": "" }, { "docid": "5c07d88a4d977761768cc7150160e664", "score": "0.7458283", "text": "def error_log\n end", "title": "" }, { "docid": "5c07d88a4d977761...
55a08d21600c9c6cc76ac376f0b33a07
def add_review(rating) old_reviews = self.num_reviews old_rating = self.avg_rating new_reviews = old_reviews + 1 new_rating = ((old_rating num_reviews) + rating) / new_reviews self.update_attributes(num_reviews: new_reviews, avg_rating: new_rating) end
[ { "docid": "f53fe92d4570be2ab16aae86ebd0c33d", "score": "0.0", "text": "def update_name(name)\n self.update_attributes(name: name)\n end", "title": "" } ]
[ { "docid": "0420ad4c3d0057e4c941e608b33d852b", "score": "0.8395006", "text": "def update_rating\n # Get the amount of reviews from the database, discarding cache as a review just got written\n size = reviews(true).length\n initial = 0.0\n\n if size < 3 # Gear towards the middle if there are ...
06394453fc4dd526903431c19f18c2ac
Fixme: This should be remove from here and use Ember for that.
[ { "docid": "d07572ac665cf9d2d06ff2535147e2c7", "score": "0.0", "text": "def update_current_classroom\n if current_user.classrooms.pluck(:id).include?(params[:classroom_id].to_i)\n current_user.update_attribute(:current_classroom, Classroom.find(params[:classroom_id]))\n end\n\n redirect_to...
[ { "docid": "262e555f9c7ef4d354fa661c5aec1b36", "score": "0.6088786", "text": "def ember_apps\n Rails.application.config.try(:ember_apps) || []\nend", "title": "" }, { "docid": "68f2f00192bad02461426ac998a45143", "score": "0.55809027", "text": "def responder\n super\n end", ...
c14bd43cd2e3701b891169723b0a40c6
Loads the help argument
[ { "docid": "967ac4384d8f8364f17cb017b3327052", "score": "0.6405417", "text": "def help\n @optparse.on_tail('-h', '--help', 'Show this message') do\n show_help\n end\n end", "title": "" } ]
[ { "docid": "e3f87093f712396c5e8dd6b4870f46f1", "score": "0.7484882", "text": "def load_help_information\n end", "title": "" }, { "docid": "e3f87093f712396c5e8dd6b4870f46f1", "score": "0.7484882", "text": "def load_help_information\n end", "title": "" }, { "docid": "41ee...
13a6067c7297bf69844bb42bd916fb8a
Returns the currently authorized user. Returns false if no user.
[ { "docid": "9c87605c2eb4a44024e01e10170ded20", "score": "0.0", "text": "def api_user\n token = request.headers['Authorization']\n return @current_user ||= User.find_by_api_token(token) if token\n end", "title": "" } ]
[ { "docid": "34974733d2d526d28986f27f0507deb4", "score": "0.78299886", "text": "def current_user\n if session[:user]\n session[:user][0]\n else\n false\n end\n end", "title": "" }, { "docid": "3df0de78e3495f28355a6fb2aa999957", "score": "0.7784986", "text": "def cu...
942e93d7133a3bfa06999da04b057b84
GET cafes/1/menus/new GET cafes/1/menus/new.json
[ { "docid": "20501d831c18ebbcfd91eedc5948fe36", "score": "0.74542165", "text": "def new\n @cafe = Cafe.find(params[:cafe_id])\n @menu = @cafe.menus.build\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @menu }\n end\n end", "title": "" ...
[ { "docid": "db0a6b8e296a4cc5611d1e5e6f15abb9", "score": "0.7876677", "text": "def new\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @menu }\n end\n end", "title": "" }, { "docid": "9f7f7e5f05b536577ecb43927e6dea31", "score": "0.775458...
bf175396629caa04179d5b05a5fdf936
================================================================================ = Create the output values as a string, change formatting based on column type = ================================================================================
[ { "docid": "df3054af706831cc4fe1b0d7136ceb11", "score": "0.5742113", "text": "def map_values(row, columns)\n values = columns.map do |v|\n # TODO - stw - which other cases do we need to handle?\n case v[1]\n when /int/: \n row[v[0]] || 'NULL'\n else \n (row[v...
[ { "docid": "61b3bfdc945977b111d414b66d237493", "score": "0.6552571", "text": "def to_s\n columns.each{|c| \"#{c}: #{self.send(c)}\\n\"}\n end", "title": "" }, { "docid": "72bc0816ac8b0dcd90ea1d007db911a2", "score": "0.648149", "text": "def to_s\n value.map { |ar| ar.map ...
932896e8911047e4d45b929ff2421e71
Public: Send a message to a single user user JID of the receipient Returns nothing
[ { "docid": "221bf4e8c3991211f543d0c99b6697e2", "score": "0.7351661", "text": "def send_message(user)\n Log.logger.debug(\"sending message to user %s\" % user)\n m = Jabber::Message.new(user, generate_message)\n client.send(m)\n Log.logger.debug(\"sent message\")\n end", "title...
[ { "docid": "72776e69c96e2c9412d7465f7ed74c73", "score": "0.75657076", "text": "def send_message_to_user(message, user)\n jabber_message = Message.new(\"#{user}@#{@jid.domain}\", message)\n jabber_message.set_type(:chat).set_id('1')\n @client.send(jabber_message)\n end", "title": "" }, ...
9d57e28d7b6e9f9450577262492b96f3
Return an error message if invalid. Otherwise nil.
[ { "docid": "20ed4dee60417cc4f5afe7324886b368", "score": "0.0", "text": "def error_for_list_name(name)\n if session[:lists].any? { |list| list[:name] == name }\n \"The list name must be unique.\"\n elsif !(1..100).cover? name.length\n \"The list name must be between 1 and 100 characters.\"\n end...
[ { "docid": "db1a49fd6ef8210d1ddb8ebfac785ab8", "score": "0.7332889", "text": "def error\n # Initialize nil values to something meaningful\n @error ||= \"\"\n return @error\n end", "title": "" }, { "docid": "21dad62d206676608a5662619dbd1f98", "score": "0.7289771", "t...
29921af34458c80e298839b379c030d1
Use callbacks to shar common setup or constraints between actions.
[ { "docid": "ba3955bc7cf3c2223845037518603234", "score": "0.0", "text": "def set_inventory\n @inventory = Inventory.find(params[:id])\n end", "title": "" } ]
[ { "docid": "7b068b9055c4e7643d4910e8e694ecdc", "score": "0.6239582", "text": "def on_setup_callbacks; end", "title": "" }, { "docid": "631f4c5b12b423b76503e18a9a606ec3", "score": "0.6222333", "text": "def process_action(...)\n run_callbacks(:process_action) do\n super...
72d18dea75186fb5f610a3823c653786
skip pundit only when I am in the device controller (user that needs to sign up) or when i'm in the admin or pages controller
[ { "docid": "113dea7310ef6d44934cf5e57dd71266", "score": "0.73515296", "text": "def skip_pundit?\n devise_controller? || params[:controller] =~ /(^(rails_)?admin)|(^pages$)/\n end", "title": "" } ]
[ { "docid": "403954c204b1c226de1ea5056011a570", "score": "0.7097919", "text": "def skip_authorization\n @_pundit_policy_authorized = true\n end", "title": "" }, { "docid": "09f3b7b942e483dfe92bd1ecebff3e5c", "score": "0.67632085", "text": "def skip_authorization\n @_pundit_po...
c76cb994c29b222a97541aec43a4d4a2
Add an error message to the messages array
[ { "docid": "9ecaff7cb4f183360949d9f16a445173", "score": "0.88359916", "text": "def add_error(msg)\n messages << msg\n end", "title": "" } ]
[ { "docid": "f2eddf655a0c3a80bffe5bd0134848d2", "score": "0.8109223", "text": "def add_error mess_err\n @errors ||= Array::new\n @errors << mess_err\n end", "title": "" }, { "docid": "a6e6a7bd44cdcc519b01bad630584361", "score": "0.80674124", "text": "def add(message)\n @er...
330a68655111968b0420a2963b48ab1c
GET /ads/1 GET /ads/1.json
[ { "docid": "64542ad7561e0de26f8c6767d86996a2", "score": "0.7084515", "text": "def show\n render json: @ad\n end", "title": "" } ]
[ { "docid": "397753e4473df4d73e604f5001dc8ac7", "score": "0.7766807", "text": "def index\n render json: @ads = Ad.all\n end", "title": "" }, { "docid": "be19c2173d10cd6028819c12f100d511", "score": "0.7701298", "text": "def show\n @ad = Ad.find(params[:id])\n\n render json: @...
a70062a926897dbebbecb1b74a167e68
Returns an array of the current aircraft type and its parent types, all the way up to the highest family it belongs to.
[ { "docid": "9ada6f53cab9543946ff6fda2e5b7c89", "score": "0.73872817", "text": "def type_and_parent_types\n parents = Array.new\n parents.push(self)\n if self.parent\n parents.push(*self.parent.type_and_parent_types)\n end\n return parents\n end", "title": "" } ]
[ { "docid": "d7991f2b780d520e2bcf1c3e14f2d975", "score": "0.74697065", "text": "def family\n fam = []\n g = self\n while g\n fam << g.type\n g = g.parent\n end\n fam\n end", "title": "" }, { "docid": "c01eb6e52ae95f5f2ee74ce0a527c391",...
7674c3367ec0a9d978d17718a1383162
Exposes middleware builder to facilitate custom stacks and easy addition of new extensions such as cache adapter.
[ { "docid": "d0900762eea88bd80f0d88be2bf7aa40", "score": "0.58168465", "text": "def stack(options = {})\n @stack ||= begin\n builder_class = if defined?(Faraday::RackBuilder)\n Faraday::RackBuilder\n else\n Faraday::Buil...
[ { "docid": "3ae0e5901437168e38bc8e2c4d95864f", "score": "0.73397875", "text": "def build_middleware_stack\n Jets.application.build_stack\n end", "title": "" }, { "docid": "3ae0e5901437168e38bc8e2c4d95864f", "score": "0.73397875", "text": "def build_middleware_stack\n Jet...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "42e9b6998f3b326670225379cc7d7dd8", "score": "0.0", "text": "def set_responsibility_transfer\n @responsibility_transfer = ResponsibilityTransfer.find(params[:id])\n end", "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...
3c7fc1ac32fdf32d99be07a7eef5b5e1
get(Symbol) method that returns a node by the id returns
[ { "docid": "15f7132844d895b6e0cddea7fa490446", "score": "0.79646957", "text": "def get id\n @nodes[id]\n end", "title": "" } ]
[ { "docid": "0f8f98326a2a9eb49ce77a90701920fa", "score": "0.77852273", "text": "def get_node(id)\n @nodes[id.to_i]\n end", "title": "" }, { "docid": "d823e25c350f3583e67cbfe392b2ecd9", "score": "0.7746689", "text": "def get_node(id)\n get_object('node', id...
f86d7eebb894eebdd3dbb70c57b65fc7
PUT /messages/1 PUT /messages/1.xml
[ { "docid": "0bfe0433468269ae62ba94469ea8fdd9", "score": "0.58474284", "text": "def update\n @message = @logged_in_user.line.messages.find(params[:id])\n\n respond_to do |format|\n if @message.update_attributes(params[:message])\n flash[:notice] = 'Message was successfully updated.'\n...
[ { "docid": "73afef19411843e596bc1b4b20678610", "score": "0.6371726", "text": "def update\n @msg = Msg.find(params[:id])\n\n respond_to do |format|\n if @msg.update_attributes(params[:msg])\n format.html { redirect_to(@msg, :notice => 'Msg was successfully updated.') }\n format.x...
6d8db21c5f566fafc39ad98fea3aeb14
Returns address object Returns NEBL address object containing information on a specific address
[ { "docid": "1c250d8b0dced1c4de1440d76aa68f48", "score": "0.0", "text": "def testnet_get_address(address, opts = {})\n data, _status_code, _headers = testnet_get_address_with_http_info(address, opts)\n data\n end", "title": "" } ]
[ { "docid": "3e8f0d17c67e70ffda30535d154e0c9e", "score": "0.8087203", "text": "def address\n Address.where(id: object.address_id)[0]\n end", "title": "" }, { "docid": "7fd7ea7f4247e422c378a87618a3f127", "score": "0.79274887", "text": "def address\n address_record.address_li...
07c5f19a2e8108535d4a48e6d4e1de85
Check if all needed Vagrant plugins are installed.
[ { "docid": "246e1b954165ef5cdd29afd52a50effe", "score": "0.8617244", "text": "def check_plugins\n required_plugins = %w(vagrant-vbguest vagrant-triggers vagrant-reload)\n missing_plugins = required_plugins.reject { |plugin| Vagrant.has_plugin? plugin }.join(\" \")\n unless missing_plugins.empty?\n ...
[ { "docid": "9297d9ec7d6e4ac2d31e8923bd15d4d6", "score": "0.79495764", "text": "def checkForVagrantPlugins(plugins_list)\n # Install required vagrant plugins if necessary\n plugins_list.each do |plugin|\n need_restart = false\n unless Vagrant.has_plugin? plugin\n system \"vagrant plugin inst...
f1fa0a7344d711dc28f263773b6b22ec
GET /polls GET /polls.json
[ { "docid": "38ab764c8ff72f4871f607ece6c7f553", "score": "0.7003483", "text": "def index\n @polls = Poll.all\n end", "title": "" } ]
[ { "docid": "82f5d612e1cf3e177588652fa149be72", "score": "0.77985483", "text": "def index\n @polls = Poll.all\n\n render json: @polls\n end", "title": "" }, { "docid": "0800f217b3b35cc54a4a4b49f82c2419", "score": "0.7537631", "text": "def index\n\t\t@polls = Poll.all\n\n\t\tres...
e371ee1e375a9bbd38d7909ebedaaa95
Create a new Application Creates a Application object
[ { "docid": "991999656c26a90a3527be2328a3989b", "score": "0.6317291", "text": "def create_application(application, opts = {})\n data, _status_code, _headers = create_application_with_http_info(application, opts)\n data\n end", "title": "" } ]
[ { "docid": "00e7bb52ee5bd038eeed23e73f5278e8", "score": "0.7620549", "text": "def new\n @application = Application.new\n end", "title": "" }, { "docid": "00e7bb52ee5bd038eeed23e73f5278e8", "score": "0.7620549", "text": "def new\n @application = Application.new\n end", "ti...
347e7599a3ecd39cc2e936febd70f0e5
Converts the DataFrame into an array of hashes where key is vector name and value is the corresponding element. The 0th index of the array contains the array of hashes while the 1th index contains the indexes of each row of the dataframe. Each element in the index array corresponds to its row in the array of hashes, wh...
[ { "docid": "fa90d63859d327af4050d5f016eb93ed", "score": "0.66122204", "text": "def to_a\n arry = [[],[]]\n self.each_row do |row|\n arry[0] << row.to_hash\n end\n arry[1] = @index.to_a\n\n arry\n end", "title": "" } ]
[ { "docid": "c42abb7d094410739bdcb68c5ca8aec7", "score": "0.7017489", "text": "def to_a\r\n data_arr = []\r\n for i in 0...@df[@df.keys[0]].length\r\n data_arr << @df.keys.each_with_object({}) {|col, rhash| rhash[col] = @df[col][i]}\r\n end\r\n data_arr\r\n end", "title": "" }, ...
ab327125050c1a7a75e6891451d0799d
Copy the template into the solution's directory
[ { "docid": "115b90c242f6aba4409d2fde559e9b24", "score": "0.0", "text": "def init solution\n FileUtils.touch(file_path(solution))\n end", "title": "" } ]
[ { "docid": "79eea0a482a86ff5f381639a831527d1", "score": "0.7617025", "text": "def copy_template(*args)\n args.each do |path|\n # puts \"Installing #{path}...\".magenta\n remove_file path\n file path, File.read(File.join(@path_templates, path))\n # puts \"\\n\"\n end\nend", "title": "" ...
5d5f683f73cf131a3ddd25e8db33621c
This function is used to write the graph title. Used with default parameters you must specify the bottom left position of the text. if you are specifying x2 and y2 the text will be centered horizontaly and verticaly in the box of coordinates (x1,y1)(x2,y2). value correspond to the text that will be written on the graph...
[ { "docid": "7971f241703659ce420a7e7fe2a2f0db", "score": "0.7552855", "text": "def draw_title(x_pos,y_pos,value,r,g,b,x_pos2=-1,y_pos2=-1,shadow=false)\n\t\tc_text_color = allocate_color(@picture, r, g, b)\n\t\tif ( x_pos2 != -1 )\n\t\t\tposition = image_ftb_box(@font_size,0,@font_name,value)\n\t\t\tt...
[ { "docid": "708812ad9ceeadb19a131d8b0e194543", "score": "0.6885581", "text": "def title(title, x=@width/30,y = @height*7/9)\n @gc.stroke('transparent')\n @gc.fill('#aaa')\n @gc.font_style(Magick::NormalStyle)\n @gc.font_weight(Magick::BoldWeight)\n @gc.pointsize(x/2)\n @gc....
a17ddf6610fc61c803eb038bbf8f4b31
Return the cummulative total of the amount spent on each transaction in this category.
[ { "docid": "fe7e03c5dc309b74541e86c0a4429d7e", "score": "0.0", "text": "def debit(range = nil)\n debit = (range == nil ? self.transactions : self.transactions.all(:date => range)).all(:amount.lt => 0).sum(:amount)\n debit == nil ? 0.0 : debit\n end", "title": "" } ]
[ { "docid": "ea6e1b2df079fd341eb8a78bd44c5be6", "score": "0.75655425", "text": "def total_amount\n sum = 0\n @transactions.each do |transaction|\n if transaction.category.in? %w[deposit refund purchase]\n sum = sum + transaction.amount\n elsif transaction.category.in? %w[...
042e83dd68f9796585056a88a4bd9798
Create Link Token The &x60;/link/token/create&x60; endpoint creates a &x60;link_token&x60;, which is required as a parameter when initializing Link. Once Link has been initialized, it returns a &x60;public_token&x60;, which can then be exchanged for an &x60;access_token&x60; via &x60;/item/public_token/exchange&x60; as...
[ { "docid": "887e654164565d122f3a2bad3ce3375c", "score": "0.6915689", "text": "def link_token_create_with_http_info(link_token_create_request, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PlaidApi.link_token_create ...'\n end\n # verif...
[ { "docid": "d7f41881ac10e520f09a82a1a716a61d", "score": "0.8111901", "text": "def link_token_create(link_token_create_request, opts = {})\n data, _status_code, _headers = link_token_create_with_http_info(link_token_create_request, opts)\n data\n end", "title": "" }, { "docid": "...
01371ffabbbef6b7b6a076692f71c01a
Recipes to include for this provider to work. Subclasses can override.
[ { "docid": "28ec92fd5633fb10b3b79267683d56d2", "score": "0.73347265", "text": "def recipes\n end", "title": "" } ]
[ { "docid": "08d829e6601a2f4624875eebdbb8e2ee", "score": "0.7252919", "text": "def recipes\n @packer.recipes + @packer.roles.map { |r| recipe_from_role(r) }.flatten\n end", "title": "" }, { "docid": "ecf9db5af255ce35c4ea52ee766a647c", "score": "0.71745044", "text": "def in...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "112d2039b318e13d3e71048b72d2eb80", "score": "0.0", "text": "def drinking_water_params\r\n params.require(:drinking_water).permit(:name,:value)\r\n end", "title": "" } ]
[ { "docid": "e164094e79744552ae1c53246ce8a56c", "score": "0.6980384", "text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end", "title": "" }, { "docid": "e662f0574b56baff056c6fc4d8aa1f47", "score": "0.6782743", "text": "def strong_params\n params.requi...
dd2a35bff344b985550864b18907ff77
Define a method to encrypt a string .next every character in the string print the new string index the word and then apply .next to every indexed character
[ { "docid": "6e49713f763485f4ecff61834efbb4b2", "score": "0.0", "text": "def encrypt(password)\n\tindex = 0\n\twhile index < password.length\n\t\tfor edge in 0...password.length\n\t\t\tif password[edge] == \"z\"\n\t\t\t\tpassword[edge] = \"a\"\n\t\t\telse \n\t\t\tpassword[index] = password[index].next\n\...
[ { "docid": "c5fcfb27560a2aa02d2fc322c4a0c5df", "score": "0.83245224", "text": "def encrypt(word)\r\n \r\nposition = 0\r\nnewstring = \"\"\r\n while position < word.length\r\n crypt = word[position].next\r\n newstring += crypt\r\n position += 1\r\n end\r\n return newstring\r\nend", ...
e9e8064589ba728d40ad6751c87034d0
Used by Sufia::WorkIndexer, although may not be required Aliased to document_type
[ { "docid": "134bf36982b553b172d3243af737d48f", "score": "0.6713662", "text": "def resource_type\n document_type\n end", "title": "" } ]
[ { "docid": "74f25b582d2460682fa96e7f0cc0706d", "score": "0.74107134", "text": "def document_type\n Document\n end", "title": "" }, { "docid": "17cfc82aae3c87610ec5c3ded6ab254a", "score": "0.73910916", "text": "def document_type\n UNKNOWN\n end", "title": "" }, ...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "82b523dd7d944d95e558e934cc1b22a6", "score": "0.0", "text": "def set_like\n @like = Like.find(params[:id])\n end", "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...
2a3d2920854abba154046ee3e25b90f3
POST /items POST /items.json
[ { "docid": "d1d3f879067932208bea3359d19efea1", "score": "0.6771504", "text": "def create\n @item = Item.new(params[:item])\n\n respond_to do |format|\n if @item.save\n format.html { redirect_to lists_path, :notice => 'Item was successfully created.' }\n format.json { render :jso...
[ { "docid": "13c196a8e428eea00eaf7b700acea567", "score": "0.7971939", "text": "def create\n item = list.items.create!(item_params)\n render json: item, status: 201\n end", "title": "" }, { "docid": "2f80597a24a1767e2975552a54aeb0c6", "score": "0.7285761", "text": "def create\n\...
07da2e8255bc38df7895df94454a8ac9
Sugar syntax for calling find if given a string. Otherwise, behaves like normal array access.
[ { "docid": "79b1d0028f520c361d7036ec9bfa9fe5", "score": "0.580163", "text": "def []( path_or_index )\n if path_or_index.is_a? String\n find path_or_index\n else\n super\n end\n end", "title": "" } ]
[ { "docid": "f862531182777b5de32b20a96bd84e8e", "score": "0.66632533", "text": "def find(name); end", "title": "" }, { "docid": "7ea3929cabe4586ea982adf06ae20749", "score": "0.6573024", "text": "def find(name, default: T.unsafe(nil), **options); end", "title": "" }, { "doc...
d43d9b6eacddbfd82580df958f4079a8
Identify and describe the Ruby method(s) you implemented. =begin .map = is a method that copies an array and returns a new array with the same exact size as the original array. In addition each element is also located in the same position of the original array. It basically makes a perfect clone of the original array. ...
[ { "docid": "0a3f73ae1e4bd161810b3eb9920a3640", "score": "0.0", "text": "def my_array_modification_method!(source, thing_to_modify)\n source.dup # This line is here to make sure all tests initially fail. Delete it when you begin coding.\nend", "title": "" } ]
[ { "docid": "7f4ba896a0851aa872c1e6bb52907b46", "score": "0.6476088", "text": "def map!\n %s(puts \"Array#map! not implemented\")\n end", "title": "" }, { "docid": "e4f1c5cd5cb25f5636988b4799d66724", "score": "0.6469647", "text": "def map; end", "title": "" }, { "docid...
767204781f52769a1909d899b4832d49
Autogenerated Actions following. remove them if not needed GET /words/new.json
[ { "docid": "06639fcc54716d5a7afd1344d606c862", "score": "0.5403233", "text": "def new\n @word = Word.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @word }\n end\n end", "title": "" } ]
[ { "docid": "f2b96d62d549be2eb7c3e9c16a309108", "score": "0.65096027", "text": "def on_words_new; end", "title": "" }, { "docid": "4cd0095eae36478f30c934043a611ec9", "score": "0.635602", "text": "def actions\n words[1..-1]\n end", "title": "" }, { "docid": "54368cc...
37ccb214796cc0d1b49e389603ccb568
gets person by params[:id] or params[:padma_id] if no person with :padma_id is found it's created.
[ { "docid": "b1b9830a41b0d37ce5204488be6f90ec", "score": "0.79868627", "text": "def get_person\n if params[:id]\n p = @scope.find(params[:id])\n elsif params[:padma_id]\n p = @scope.find_by_padma_id(params[:padma_id])\n if p.nil?\n current_user.padma.person(params[:padma_id])\...
[ { "docid": "c9ed4da1537c04873ea47654d1ab5957", "score": "0.67970765", "text": "def find_by_padma_id(id)\n Contact.where(padma_id: id) unless id.nil?\n end", "title": "" }, { "docid": "5913bcc348a3bcb989827d595ad24240", "score": "0.679057", "text": "def create\n if params[:...
9624a38489d684b33733cefc64c396a7
def actor_params params.require(:actor).permit(:name,:desc,:actions,:hp_s,:ac_s,:speed,:str_s,:dex_s,:con_s,:int_s,:wis_s,:cha_s,:saving_throws,:skills,:senses,:languages,:abilities,:challenge,:image) end
[ { "docid": "e634fd7c1d36c097663968a4f496b2eb", "score": "0.77709395", "text": "def actor_params\n params.require(:actor).permit(:template)\n end", "title": "" } ]
[ { "docid": "795a7a50507f670d34ec723657ff5412", "score": "0.9038694", "text": "def actor_params\n params.require(:actor).permit(:name, :image, :likes, :on_stage, :comment)\n end", "title": "" }, { "docid": "be1fee0ba16c332e8b58ae61f65372b0", "score": "0.9036011", "text": "def ...
169b3149d178633001e8dce0f9774b24
DELETE /time_records/1 DELETE /time_records/1.json
[ { "docid": "0cfd2506b67518f9d715fe98743dd288", "score": "0.748654", "text": "def destroy\n @time_record = TimeRecord.find(params[:id])\n @time_record.destroy\n\n respond_to do |format|\n format.html { redirect_to time_records_url }\n format.json { head :no_content }\n end\n end", ...
[ { "docid": "b872f7529d9f87a22e5c34000b54111d", "score": "0.7356473", "text": "def destroy\n @time_record.destroy\n respond_to do |format|\n format.html { redirect_to time_records_url, notice: 'Time record was successfully deleted.' }\n format.json { head :no_content }\n end\n end", ...
8af58aa8fcc0f7e6c6fccbb14931a7f7
Loop through all spec files and find those which have not been matched to any task
[ { "docid": "516718d6ca95be45936c719560a7ac44", "score": "0.8561361", "text": "def find_unmatched_specs\n spec_file_names.reject do |spec|\n next true if spec == Noop::Config.spec_name_globals\n task_list.any? do |task|\n task.file_name_spec == spec\n end\n end\n ...
[ { "docid": "d53950b7c3ef72d550d340d2c7a3a86f", "score": "0.83498144", "text": "def find_specs_without_tasks\n spec_file_names.reject do |spec|\n manifest = Noop::Utils.convert_to_manifest spec\n task_file_names.include? manifest\n end\n end", "title": "" }, { "doci...
3da87387ab6ece1b5d98725bc5a78c95
checks the consonant string for matches moves the index to the next letter and returns it
[ { "docid": "225aa7b56a172f817d60b98c126de232", "score": "0.76340824", "text": "def get_next_con (consonant_letter)\n\tconsonants = \"bcdfghjklmnpqrstvwxyz\"\n\tconsonant_index = consonants.index(consonant_letter) + 1\n\tif consonant_index == 21\n\t\tconsonant_index = 0\n\tend\n\n\tconsonant_letter = con...
[ { "docid": "ac3fe15067d7a3943e6a779fcb32b9f5", "score": "0.78990996", "text": "def next_consonant(string)\r\n # multiply by 2 to handle edge cases\r\n consonants = 'bcdfghjklmnpqrstvwxyz' * 2\r\n string = string.downcase\r\n string.gsub(/[bcdfghjklmnpqrstvwxyz]/) do |character|\r\n char_index = c...
53580359fc3dbc98feb9b49196484501
Sets the schema used to validate incoming data. Raises SchemaException when the schema itself is malformed. +schema+:: YAML representation of the schema used for validation
[ { "docid": "0379f97ef74ae67696c79c18f75e308f", "score": "0.6780926", "text": "def initialize(schema)\n @schema = SafeYAML.load(schema, :safe => true)\n\n unless @schema\n raise SchemaException.new \"Schema failed to parse\"\n end\n\n errors = validate_schema\n\n if errors...
[ { "docid": "a02be5517203f601ee28baffd66c4add", "score": "0.7635301", "text": "def set_schema(schema)\n self.schema = schema\n end", "title": "" }, { "docid": "e1288f5266fa3b1e9b41527e16c4aa6b", "score": "0.76170564", "text": "def set_schema!(schema)\n @schema =...
d77eb718f4f9b3aa0c5dcf3ec68d4651
A GitHub Personal Access Token which goes with +username+.
[ { "docid": "88019732dde8776f68c082f48bc08494", "score": "0.0", "text": "def access_token\n @config[\"token\"]\n end", "title": "" } ]
[ { "docid": "064db6eb649438aa309b01937f0a5f9c", "score": "0.7331639", "text": "def github_access_token\n ENV['GITHUB_ACCESS_TOKEN'].to_s.strip\n end", "title": "" }, { "docid": "064db6eb649438aa309b01937f0a5f9c", "score": "0.7331639", "text": "def github_access_token\n ...
d02940d2d29543a677ab6ba98f241831
TODO: This method is long. factor it out later.
[ { "docid": "830ce704c8f487114fdbed53c6fc5889", "score": "0.0", "text": "def deliver(player, weapon)\n if self.finished?\n raise ArgumentError, 'game is already over!'\n else\n if self.has_player?(player)\n if self.has_weapon?(weapon)\n round = self.current_round\n ...
[ { "docid": "b6b2bcc0062aeb115edab7b10cbe6930", "score": "0.6285877", "text": "def desired; end", "title": "" }, { "docid": "9dcc74dd11eb115d21bf9af45b3ec4e3", "score": "0.61551404", "text": "def bodystmt; end", "title": "" }, { "docid": "9dcc74dd11eb115d21bf9af45b3ec4e3",...
4b91fec91424a1fa780eb1d24aa42b2f
This turn function that I stole does not work that well
[ { "docid": "bf14d84596111de46be3a61800178037", "score": "0.0", "text": "def turn2(board)\n puts \"Please enter 1-9:\"\n input=gets.strip\n index=input_to_index(input)\n if valid_move?(board,index)\n move(board,index)\n display_board(board)\n else\n turn(board)\n end\nend", "title": ""...
[ { "docid": "f6812881456bc3ecd4789fb0ace30d83", "score": "0.68265635", "text": "def turn\n\n end", "title": "" }, { "docid": "f6812881456bc3ecd4789fb0ace30d83", "score": "0.68265635", "text": "def turn\n\n end", "title": "" }, { "docid": "2141e3ca82b5551b041b3350b602c33d...
c202fb8876df01706503b9089c1d0b25
POST /loan_manager_profiles POST /loan_manager_profiles.json
[ { "docid": "90b975e45faec068e365f86c8fcc4695", "score": "0.7210892", "text": "def create\n @loan_manager_profile = current_loan_manager.build_loan_manager_profile(loan_manager_profile_params)\n\n authorize @loan_manager_profile\n\n respond_to do |format|\n if @loan_manage...
[ { "docid": "ff6eb1c5322ee39f5de6747048a5a4b6", "score": "0.64756835", "text": "def set_loan_manager_profile\n\n @loan_manager_profile = LoanManagerProfile.find(params[:id])\n\n \n end", "title": "" }, { "docid": "f7b8d122f01eb8b39ce98b906d767266", "score": "0...
716550116d47967f9fb42649efb31409
handle a RestClient::Response object params +response+ (String) => an RestClient response object return +Hash+ if response body is JSON, or +String+ of original body
[ { "docid": "9e78630a95147b8f49b1cc89efb088a9", "score": "0.6688688", "text": "def handle_response(response)\n begin\n if ok?(response.code)\n response.body.present? ? parse_response_body(response.body) : true # blank body\n else\n response.message || parse_response_body(respon...
[ { "docid": "3223b81c19a4a917d1ec433b5267e2b6", "score": "0.78907603", "text": "def handle_response(response)\n response.value\n parsed = JSON.parse(response.body || \"\")\n parsed.is_a?(Hash) ? parsed.with_indifferent_access : parsed\n rescue JSON::ParserError\n response.body\n rescue Net:...
7b866b4a10d75df9f19f2c4d8901d55d
PUT /beneficiaries/1 PUT /beneficiaries/1.json
[ { "docid": "07773a4cd385fd14633b88efa1e85eeb", "score": "0.65718037", "text": "def update\n @beneficiary = Beneficiary.find(params[:id])\n\n respond_to do |format|\n if @beneficiary.update_attributes(params[:beneficiary])\n format.html { redirect_to @beneficiary, notice: 'Beneficiary w...
[ { "docid": "a85fa0a3d70c14ec4ec82c29abe04ac5", "score": "0.68103623", "text": "def update\n respond_to do |format|\n if @beneficiary.update(beneficiary_params)\n format.html { redirect_to @beneficiary, notice: 'Beneficiary was successfully updated.' }\n format.json { render :show, ...
5e4de1796fad1523ca2a0d1b9f8e9e14
transferDomain Parameters domain(required) payment_id(optional) auth(optional): transfer authorization code private(optional): if you want the domain to utilize our free WHOIS privacy service auto_renew(optional) portfolio(optional) coupon(optional) Passing Contact Information(optional): see Passing Contact ID(optional...
[ { "docid": "85e2115d60c72be111ff66fbf6f820f4", "score": "0.7345644", "text": "def transfer_domain(params)\n get_request('transferDomain?'+get_url_parameters(params)).body\n end", "title": "" } ]
[ { "docid": "9cd175ecf155d3e011310295fefcfeea", "score": "0.7214764", "text": "def transfer_domain(domain, auth_info, legal_document, legal_doc_type)\n builder = build_epp_request do |xml|\n xml.command {\n xml.transfer('op' => 'request') {\n xml.transfer('xmlns:do...
87c5b2989e22550afab72e3d741b3a21
$card_db_url = " cardinfo cardsets
[ { "docid": "e727de1fb97ac7c567f7c39c0cf60987", "score": "0.0", "text": "def read_save_file(mode=\"cardinfo\")\n url = $api_url + mode + \".php\"\n remote = open(url)\n local_file = open(\"info/\" + mode + \".json\", \"w\")\n local_file.write remote.read\n local_file.close\nend", "titl...
[ { "docid": "590b5acc0f33586810c22a3c4ea47de1", "score": "0.68770176", "text": "def _get_cards_from_db\n connect_db\n select_query = \"SELECT * FROM cards_staging\"\n result_set = $cn.execute(select_query)\n return result_set\n end", "title": "" }, { "docid": "2554b2077cc86d03131...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "ae6035f4ca67ed3f5e343b0070617fe8", "score": "0.0", "text": "def transaccion_params\n params.require(:transaccion).permit(:client_id, :order_id, :payed, :detail, :pay_method, :status, :authorization_code, :paydate, :gateway_id, :total)\n end", "title": "" } ]
[ { "docid": "3663f9efd3f3bbf73f4830949ab0522b", "score": "0.74954116", "text": "def whitelisted_params\n super\n end", "title": "" }, { "docid": "13a61145b00345517e33319a34f7d385", "score": "0.6956924", "text": "def strong_params\n params.require(:request).permit(param_whit...
7cbe9455aff4b248268109a91105d5b7
Save a file to a given path. Parameters: file The file to save. path The path to save.
[ { "docid": "ad4764a63c749fc05a6970b7b2ddb4de", "score": "0.7283277", "text": "def save(file, path)\n file = File.open(file.path)\n directory.files.create(self.options(path).merge(self.defaults.merge(key: path, body: file)))\n file.close\n end", "title": "" } ]
[ { "docid": "82248006e9250a1480aff59c20623d7a", "score": "0.7632052", "text": "def save_file\n raise ArgumentError, 'Need a Path to save the file' if @path.nil?\n\n File.open(@path, 'w') { |file| file.write(to_s) }\n end", "title": "" }, { "docid": "f79eed90414e860768e6efb6f67ec8...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "4ea8e002debd47e6b40d512e715ac43c", "score": "0.0", "text": "def set_guide\n @guide = Guide.find(params[:id])\n end", "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...
eb25875f94a21ca8f31ec619c45f6e69
PATCH/PUT /categories/1 PATCH/PUT /categories/1.json
[ { "docid": "b5339b026c142b8fdbcdb8cd2fbd82cd", "score": "0.0", "text": "def update\n respond_to do |format|\n if @category.update(category_params)\n format.html { redirect_to settings_category_path(@category.id), notice: 'Category was successfully updated.' }\n else\n...
[ { "docid": "0e368f3f3ea5d905ef00a62df47f2fb5", "score": "0.71798337", "text": "def update\n @cat.update(cat_params)\n render json: @cat\n end", "title": "" }, { "docid": "3a85cd022a5584b85f3e352d7f5d309c", "score": "0.7015337", "text": "def update_many\n if @categ...
38d35b5e0d06df42a6ffdb929e67cb74
Detector attributes in a nicely printed format for viewing
[ { "docid": "5eaa327a4aeb2780913083d3954bbb73", "score": "0.0", "text": "def info\n puts JSON.pretty_generate(to_hash)\n end", "title": "" } ]
[ { "docid": "4e6069be89c8497d56bb9af740425f50", "score": "0.68617475", "text": "def print_attributes\n @attributes.each{|attribute, value| puts \"#{attribute}: #{value}\"}\n end", "title": "" }, { "docid": "d93d0bc5bec078ce57ceb1f5f4c0ab2e", "score": "0.6788745", "text": "def insp...
425699002baaed0d8697955bdbab720d
Returns the value of attribute retry_data. source://azurestoragecommon//lib/azure/core/http/retry_policy.rb30
[ { "docid": "223d34157d6560ea9d0dc069fd09bab0", "score": "0.6675496", "text": "def retry_data; end", "title": "" } ]
[ { "docid": "9d11ed086642a5bc7bba6401796bed1f", "score": "0.63342845", "text": "def apply_retry_policy(retry_data)\n end", "title": "" }, { "docid": "9d11ed086642a5bc7bba6401796bed1f", "score": "0.63342845", "text": "def apply_retry_policy(retry_data)\n end", "title": "" }...
abb2bee61eebf7dc129110444011bc34
Class accessor for the "see also" builder
[ { "docid": "0a3a46d0285637c6f402443ed18038fb", "score": "0.7261508", "text": "def see_also_builder\n ManifestBuilder::SeeAlsoBuilder\n end", "title": "" } ]
[ { "docid": "808630a8abc856985c8bbe71514b051b", "score": "0.72898084", "text": "def see_also_builder\n ManifestBuilderV3::SeeAlsoBuilder\n end", "title": "" }, { "docid": "30fbc5bf85bda5db3b0f3174cc0672b6", "score": "0.6690395", "text": "def see_also\n\t\treturn self.relat...
c65b1efb92d1ff3c647ea5074e0e819c
DELETE /nsgs/1 DELETE /nsgs/1.json
[ { "docid": "ffc256b689a3ce47adfcb44fae6af270", "score": "0.6806488", "text": "def destroy\n @nsg.destroy\n respond_to do |format|\n format.html { redirect_to nsgs_url, notice: 'Nsg was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "title": "" } ]
[ { "docid": "01fb12e52e6408d94b322486020b1f67", "score": "0.69639224", "text": "def delete()\n\n client.delete(\"/unicorns/#{gid}\") && true\n end", "title": "" }, { "docid": "153e58976fdbfa7383392757fbb2a4ab", "score": "0.6765098", "text": "def destroy\n name, type = r...
3a8b163800027010662352e567229e0a
Update a &39;boot.PxeDevice&39; resource.
[ { "docid": "8955b1d1ad7e7f20729fa6f5ba55041c", "score": "0.0", "text": "def patch_boot_pxe_device_with_http_info(moid, boot_pxe_device, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: BootApi.patch_boot_pxe_device ...'\n end\n # verify t...
[ { "docid": "9e9b62e5e54a9feee8f7b331c70d9991", "score": "0.65602535", "text": "def update_boot_pxe_device(moid, boot_pxe_device, opts = {})\n data, _status_code, _headers = update_boot_pxe_device_with_http_info(moid, boot_pxe_device, opts)\n data\n end", "title": "" }, { "docid"...
795da52f627a9d14106df6e621b38978
damage() Function to repair items
[ { "docid": "2c20036c547f037c87eb3dd1fb0ef47f", "score": "0.0", "text": "def repair(num)\n\t\toutputString = \"\"\n\t\tif @currentDurability >= @durability\n\t\t\treturn \"#{@name} is not damaged!\"\n\t\tend\n\t\t@currentDurability = @currentDurability + num\n\t\tif @currentDurability > @durability\n\t\t...
[ { "docid": "337bf8217258a183270b90fdf322d5a5", "score": "0.73782784", "text": "def perform_damage_effect\n end", "title": "" }, { "docid": "337bf8217258a183270b90fdf322d5a5", "score": "0.73782784", "text": "def perform_damage_effect\n end", "title": "" }, { "docid": "33...
5a39d49311f3760411a14a937d897ea5
Returns the variance of the distribution
[ { "docid": "5ac36e1440e24304aec3b4981cd72011", "score": "0.7976774", "text": "def get_variance\n return 1.0/12.0 * (@upper-@lower)**2\n end", "title": "" } ]
[ { "docid": "1b642f9200f66830ebc69baf14ea852b", "score": "0.86444026", "text": "def variance\n stats.variance\n end", "title": "" }, { "docid": "3106896931bfb647c0cc3669ba0cbb07", "score": "0.81977075", "text": "def variance(sample = false)\n a = numerify\n avg = a.a...
738595df73016f2f22abc9d7af664a8a
used for filter search by checkboxes in users list page.
[ { "docid": "6e2d4ce82b2b1fffd46efa3c0c825e9d", "score": "0.59887123", "text": "def filter_search\n case current_user.rc\n when 'EA'\n case params[:mode]\n when \"institution\"\n @centers = Center.includes(:profile).where(institution_id: params[:institution_ids])\n ...
[ { "docid": "03fdcd4a5dd9b27b52936ed44a8a5c73", "score": "0.69321334", "text": "def filter_search\n # SET FORM\n city_id = params[\"user\"][\"city_id\"]\n @user_name = params[\"user\"][\"name\"]\n region_id = params[\"user\"][\"region\"][\"name\"]\n help_opts = params[\"user\"][\...
772e564afc461c1e25e3353e5ad0dd11
receive: a int that represent the days of the week return: the string of the real day of the week
[ { "docid": "bbdacc7d17b36928d2178db1830b7371", "score": "0.7137144", "text": "def what_day(int)\n days = {\n 0 => \"Sunday\",\n 1 => \"Monday\", \n 2 => \"Tuesday\",\n 3 => \"Wednesday\",\n 4 => \"Thursday\",\n 5 => \"Friday\",\n 6 => \"Saturday\"\n }\n return...
[ { "docid": "0f425187106d1b587067c8a3bfc8b103", "score": "0.8084493", "text": "def of_week_as_s() WEEKDAYS_AS_STR[of_week_as_i] end", "title": "" }, { "docid": "eb65bd13951e5c7ce985dba3d9d31d99", "score": "0.7873137", "text": "def day_of_the_week\n if new_day == 0\n \"Sund...
6e88c004208851ec562c124db060b518
To handle the temp code input, set new password and finish the password reset process
[ { "docid": "aef3526005ef7543aa297f0761205681", "score": "0.0", "text": "def finish\n\t\tbegin\n\t\t\twait = Selenium::WebDriver::Wait.new(:timeout => 5)\n\t\t wait.until { $selenium_driver.find_element(:name => \"recovery-sms\").displayed? }\n\t\t $selenium_driver.find_element(:name, \"recovery-sm...
[ { "docid": "5b83afe059194e9d6feb559b6bbe2f6a", "score": "0.68236065", "text": "def finish\n\t\tbegin\n\t\t\twait = Selenium::WebDriver::Wait.new(:timeout => 5)\n\t\t wait.until { $selenium_driver.find_element(:id, \"pinTxtBx\").displayed? }\n\t\t $selenium_driver.find_element(:id, \"pinTxtBx\").se...
317424f500b91531471a1bb79c7008dd
Returns the formatted string of all the addresses in the address list
[ { "docid": "1d0413154c50471e70f2f0409b3921c7", "score": "0.7551026", "text": "def formatted\n list = address_list.addresses.map { |a| a.format }\n Mail::AddressContainer.new(self, list)\n end", "title": "" } ]
[ { "docid": "6e026f8bc61c351dab5fe9eb37290b3a", "score": "0.8186322", "text": "def full_address\n address_list.join(\", \")\n end", "title": "" }, { "docid": "78fdd90ff0cad6d8c2760d5938dc7c05", "score": "0.78728306", "text": "def formatted_address\n a = []\n a << self.street...
d9e8213226ea609c6a6c12f5446917cf
def gear_inches tire goes around rim twice for diameter ratio (rim + (tire 2)) end
[ { "docid": "21a04c32aabef1932077a5cd068fdf42", "score": "0.804545", "text": "def gear_inches\n ratio * diameter\n end", "title": "" } ]
[ { "docid": "1074741f8a550a84af810365164395d4", "score": "0.9175606", "text": "def gear_inches\n # tire goes around rim twice for diameter\n ratio * (rim + (tire * 2))\nend", "title": "" }, { "docid": "021cc611de11e7e8db3ee61dbc790f1c", "score": "0.8690503", "text": "def gear_inches...
7ea8c4f1b33c9c6141514a49adb6a228
called by the indexer thread as long as the server runs
[ { "docid": "3d5d571364418580a2be66206f6f905c", "score": "0.0", "text": "def process_queue\n counter = 0\n max_batch_size = @options[:max_batch_size]\n begin\n while record = @queue.deq and not shutting_down?( :abort )\n process_record( *record )\n brea...
[ { "docid": "4839323151a6c9fc2148962ac3bad175", "score": "0.6954933", "text": "def client_thread; end", "title": "" }, { "docid": "cadf941317f7288d0f1922c0770e00a1", "score": "0.6617647", "text": "def initialize_server\n @queue = UniqueQueue.new\n @logger.info \"#{Time.n...
665ae4dbe1f8eadbed05e93f23639bbb
PUT /prospectos/1 PUT /prospectos/1.json
[ { "docid": "265dd8a826c12c4ddc3ba3dc2d5b2f6e", "score": "0.7036521", "text": "def update\n @prospecto = Prospecto.find(params[:id])\n\n respond_to do |format|\n if @prospecto.update_attributes(params[:prospecto])\n\n format.html { redirect_to @prospecto, notice: \"Prospecto was success...
[ { "docid": "fcc9a191124a6be5d2192292abf4efe2", "score": "0.7027834", "text": "def update\n respond_to do |format|\n if @prospecto.update(prospecto_params)\n format.html { redirect_to @prospecto, notice: 'Prospecto was successfully updated.' }\n format.json { render :show, status: :...
209dbb7cb7c3dace83e8ecb322cb77cc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get Spacing for Items Arranged Side by Side ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ { "docid": "c828e2c055bd8033132fe3ca911ecfc1", "score": "0.0", "text": "def spacing(*args)\n s = $game_message.choice_spacing\n (s.is_a?(Numeric) && s > 0) ? s : super(*args)\n end", "title": "" } ]
[ { "docid": "a57809119f8dc9fe8363b3df7b33f909", "score": "0.6634655", "text": "def spacing\n @spacing || 1\n end", "title": "" }, { "docid": "7e049bd371ab4c0eb02ccd487040450e", "score": "0.65714955", "text": "def spacing\r\n return 32\r\n end", "title": "" }, { ...
d66b7f8f471fafbfc33b5ecb7602d4d5
PATCH/PUT /patients/1 PATCH/PUT /patients/1.json
[ { "docid": "d42b76bfaeee9bc385dd6b9344e8f3ca", "score": "0.7026796", "text": "def update\n respond_to do |format|\n if @patient.preprocess_and_update(patient_params)\n format.html { redirect_to @patient, notice: 'Patient was successfully updated.' }\n format.json { render json: @pa...
[ { "docid": "d5466e81427206f20085bd53c82258c4", "score": "0.73595154", "text": "def update\n @patient = Patient.find(params[:id])\n\n if @patient.update(params[:patient])\n head :no_content\n else\n render json: @patient.errors, status: :unprocessable_entity\n end\n end", "titl...
b0d2eaab31dd6e126229e25ec1199541
/ line_inter_pfas Code pour les horloges des parties
[ { "docid": "1687fba0b8632a2bef0fd6b48ffaf4d6", "score": "0.6887804", "text": "def horloges_parties\n cmd = []\n cmd << %Q{-stroke gray50 -fill -pointsize 6.5 -strokewidth 2}\n # Pour le paradigme absolu\n decs = [0,30,60,90,120] # on en aura besoin ci-dessous\n decs.each do |dec|\n h = Horloge.n...
[ { "docid": "9465852760d840bb19a3870c4a4dc251", "score": "0.5633293", "text": "def line_image\n \"%s%s%s %s%s%s %s%s%s\" % POT.collect{ |i| own(i) }\n end", "title": "" }, { "docid": "23b282340a336e13163892dbff6044a4", "score": "0.5572928", "text": "def line(party, votes, pct, sea...
1d901665886e461fe0c3db93987fa399
POST /receipt_headers POST /receipt_headers.json
[ { "docid": "665f2a79f680eb7cc88f4ce41a6bbe9c", "score": "0.65000963", "text": "def create\n @receipt_header = ReceiptHeader.new(receipt_header_params)\n\n respond_to do |format|\n if @receipt_header.save\n format.html { redirect_to @receipt_header, :flash => { success: 'Receipt header ...
[ { "docid": "c5b7e376da78c5757c64d7f24a3aabbb", "score": "0.62035626", "text": "def receipt_header_params\n params.require(:receipt_header).permit(:store_name, :street_address, :city, :zipcode, :state, :phone, :url)\n end", "title": "" }, { "docid": "8ff91d3463d93fa40272762359333f40",...
98d52e9bc9ec85f93b46c50022769b19
METHODS FOR JSON INPUT, SEPARATED FOR NODES AND RELS for third normalized form, load node/relationship
[ { "docid": "c000d1122959a8ac261cc9d789098217", "score": "0.0", "text": "def load_node(neo, index_name, node_spec)\n node_id = node_spec[\"id\"]\n node = get_or_create_node(neo, index_name, \"id\", node_id)\n\n node_properties = node_spec[\"properties\"]\n node_properties.each do |property|\n key ...
[ { "docid": "c85604f2775d315a5a7a8045dd1ec901", "score": "0.6162753", "text": "def process_rels; end", "title": "" }, { "docid": "be4d8a03c31e72c5ebbdcd709f8321dc", "score": "0.58126706", "text": "def load_from_data(data)\n @id = data[:id]\n @type = data[:type]\n ...
23266de3d971b67fd7dd5dcb805964a2
Convienence class method for creating a new controller and processing the request and response. Calls Acoustic::Controllerprocess.
[ { "docid": "d7f824dfe3f625ac51e89981365da39e", "score": "0.0", "text": "def process(*args)\n new.process(*args)\n end", "title": "" } ]
[ { "docid": "4796ee311a08773c10c9027b04e7c707", "score": "0.675635", "text": "def new_controller\n print 'Controller class name: '\n controller_name = STDIN.gets.chomp\n\n dir_controllers = get_or_create_controllers_folder\n group_controllers = get_or_create_xcode_controllers_group\n\...
9bd2786258099961dccd9e04071fd174
GET /articles GET /articles.json
[ { "docid": "9af7dcf9bfe7f830b049a14625d573af", "score": "0.0", "text": "def index\n set_meta \"description\" => \"Aplicaciones para Android, juegos , temas,herramientas, multimedia y mucho mejor que playstore\"\n set_meta \"title\" => \"DowloadApps - Aplicaciones para Android\"\n set_meta \"o...
[ { "docid": "19a11bbe551c564fa7cca7d31c8cbc3f", "score": "0.81218547", "text": "def show\n @articles = Article.find(params[:id])\n render json: @articles\n end", "title": "" }, { "docid": "d3f6690e96780612b04d7c8ac2519fb1", "score": "0.7839788", "text": "def index\n @artic...
a9cde9fde9ced6c132198fb511e1ff53
Run the callback for the association with the object.
[ { "docid": "85198d3b5262191e9da174f17a5acec9", "score": "0.6049895", "text": "def run_association_callbacks(reflection, callback_type, object)\n raise_error = raise_on_save_failure || !reflection.returns_array?\n stop_on_false = [:before_add, :before_remove].include?(callback_type)\n refl...
[ { "docid": "db78794c59e80578fa1e475b62bfde52", "score": "0.68490565", "text": "def call_association(object, associations); end", "title": "" }, { "docid": "0c7424aa832c722c72f191f52d728990", "score": "0.616512", "text": "def call\n run_callbacks :after_fetched do\n pr...
da9acda309d22f22e7e0ec61dd9c252d
Test that decoding a lambda created at runtime works.
[ { "docid": "744ca30ad0445bc4a034cda4b6f5e5c8", "score": "0.6579066", "text": "def test_decode_new_function()\n input = [\n 131, 112, 0, 0, 0, 71, 0, 184, 143, 129, 148, 32, 145, 63, 179,\n 91, 201, 150, 94, 151, 97, 58, 227, 0, 0, 0, 1, 0, 0, 0, 0, 115,\n 8, 101, 114, 108, 95, 101, 118...
[ { "docid": "b36071293a10ff99043c5a59110791a0", "score": "0.68450123", "text": "def test_can_call_lambda_w_symbol_derefed_in_object\n result = interpret 'a=~{foo: ->() {9}};%a[foo:]'\n assert_eq result, 9\n end", "title": "" }, { "docid": "3e4a7d6d31834d9dc13954c8711e5874", "score"...
a8c9e2af40dcb4ae8705b1f08f9a21e6
The execute_before_callbacks method is used to run any callbacks that have been attached to the class, but these run before a state transition triggered by an event.
[ { "docid": "e981f0a0953e747c6a74884be7e665b8", "score": "0.69960463", "text": "def execute_before_callbacks(triggering_event:, **args)\n self.class.before_callbacks[triggering_event].each do |callback|\n callback.call(**args)\n end\n end", "title": "" } ]
[ { "docid": "cde40762f24d15f319504af8ec2aa206", "score": "0.7193944", "text": "def run_before_callbacks(*args)\n self.pending_transition = args\n end", "title": "" }, { "docid": "cde40762f24d15f319504af8ec2aa206", "score": "0.7193944", "text": "def run_before_c...
7c0faeb9321c60d18a25f71bc7ec089a
doctest: Maven URI >> a = maven_to_uri("com.google.guava:guava:13.0") >> a =~ /^.central\.maven\.org.$/ => 0 >> a = maven_to_uri("com.github.bumptech.glide:glide:3.6.1") >> a =~ /^.com\/github.$/ => 0
[ { "docid": "76b24df2ba13c015661a4b5cec6ad921", "score": "0.59148717", "text": "def maven_to_uri(name)\n raise \"No ANDROID_SDK_HOME set\" unless ENV[\"ANDROID_SDK_HOME\"]\n raise \"No name\" unless !name.nil?\n ( path, nname , version) = name.split(\":\")\n #byebug\n path.gsub!(\"\\.\",'/')\n \"ht...
[ { "docid": "c4d2c895715f8277a49a9602383471af", "score": "0.61912465", "text": "def matcher(uri)\n rex = /github.com\\/([\\w-]+\\/[\\w-]+)/\n return rex.match(uri)\n end", "title": "" }, { "docid": "892c79dde55f3d31f0f80c348231fac0", "score": "0.59832925", "text": "def maven_ar...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "56df9239b297804540992eee51938a20", "score": "0.0", "text": "def set_direct_treasure\n @direct_treasure = DirectTreasure.find(params[:id])\n end", "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...
e561e11bcf379ef5dc139c210017366b
Only allow a list of trusted parameters through.
[ { "docid": "1208b425ee008a01fac5a96fc4e5ff9b", "score": "0.0", "text": "def transfer_params\n params.require(:transfer).permit(:date, :concept, :account_id, items: [:id])\n end", "title": "" } ]
[ { "docid": "c1f317213d917a1e3cfa584197f82e6c", "score": "0.69497335", "text": "def allowed_params\n ALLOWED_PARAMS\n end", "title": "" }, { "docid": "e662f0574b56baff056c6fc4d8aa1f47", "score": "0.6812623", "text": "def strong_params\n params.require(:listing_member).permi...
f5c7e45f226f51840030cd6fc406c6fa
METHOD USED FOR FILTER available if in the same date, and this schedule time occurs later than the expect_time
[ { "docid": "a8fef6b1e2935611c2e9353c7234c38e", "score": "0.6229916", "text": "def available?(expect_time)\n return false if start_at.nil? or start_at.empty?\n return false if expect_time.cwday != weekday\n\n start = start_at.to_datetime.utc.strftime( \"%H%M%S%N\" )\n end_ = end_at.to_datetim...
[ { "docid": "a61f9aa3b48334b0ef57d1acae77c635", "score": "0.62078166", "text": "def scheduled_within(time_from_now = 3.days)\n if !self.scheduled?\n return false\n else \n return (self.player_budge.day_starts_at <= self.player_budge.day_starts_at + time_from_now)\n end\n end", "ti...
870c5d35407fe2675c8d42f8ceb1bdb3
Returns a random node from the builder's state. This method does not remove the node.
[ { "docid": "eb91047ee14058995d4fbb64a343695f", "score": "0.62074983", "text": "def sample_node\n @nodes.sample\n end", "title": "" } ]
[ { "docid": "251d7219800ed56454996fd93086a2a2", "score": "0.7556677", "text": "def random_node\n self.to_a.random\n end", "title": "" }, { "docid": "4d4c5020743cdf3cee857ab457f74d14", "score": "0.7092772", "text": "def get_random_node\n select_node = nil\n create_random_list...
8f2eea389420bf3a0548a2435ac05fe5
Create a new keyword
[ { "docid": "de12a5f38bfd5f3c467b9d45a2631d12", "score": "0.67413896", "text": "def keywords_create\n keyword = Keyword.create( params[:keyword] )\n @question.keywords << keyword\n @question.save\n redirect_to edit_admin_question_path( @question )\n end", "title": "" } ]
[ { "docid": "e932cbff94b939bb78fcce75e3373eae", "score": "0.683762", "text": "def user_create_keyword(attribs, dir_info)\n attribs = user_record_name_alternatives(attribs)\n check_critical_attribute( attribs, :record_name )\n\n attribs[:value] = attribs[:value] || attribs[:keywords]\n ...
25385d21c421f02fd828078832628108
rubocop:disable Metrics/ParameterLists rubocop:disable Metrics/MethodLength
[ { "docid": "00d6a840c40dda43e720835a2a2d3b25", "score": "0.0", "text": "def initialize(\n logdev,\n shift_age = 0,\n shift_size = 1_048_576,\n level: DEBUG,\n progname: nil,\n formatter: nil,\n datetime_format: nil,\n ...
[ { "docid": "b6b2bcc0062aeb115edab7b10cbe6930", "score": "0.661017", "text": "def desired; end", "title": "" }, { "docid": "33e1db3c06643dd523dcc31fccf3a005", "score": "0.64638805", "text": "def used; end", "title": "" }, { "docid": "33e1db3c06643dd523dcc31fccf3a005", ...
7ee705dc6a79371e4477287d57d8e67b
Remove the given Packet_Item from the list. This is slow, because the item has to be searched with a linear search. To remove all items use clear.
[ { "docid": "f9be7c90acc637a8b107423a5380b83f", "score": "0.6852727", "text": "def remove_item(item)\n i = 0\n @items.delete item\n fox_item = item.fox_item\n i += 1 while i < numItems && fox_item != getItem(i)\n removeItem(i) if i < numItems\n item\n end", "title": "" } ]
[ { "docid": "7b68c8c066637486a4c82aca46440be9", "score": "0.722572", "text": "def remove_item(item)\n\t$list.delete(item)\n\t $list\nend", "title": "" }, { "docid": "aff0a1a7ae421f89a7a1edee2511bc66", "score": "0.70310503", "text": "def remove_item(item)\n @items.delete(item)\n...
75469c5bac1a910df552a4f6f7d843de
Files should be uploaded if The file doesn't exist in the bucket OR The MD5 hashes don't match
[ { "docid": "589e63bfd08dd66c495851abb4071933", "score": "0.71464753", "text": "def select_files_to_upload\n @files_to_upload = @local_files.select do |file| \n case\n when File.directory?(local_name(file))\n false # Don't upload directories\n when !@bucket[s3_nam...
[ { "docid": "2bdc5c4d4e883bacd8544358edd4e440", "score": "0.719433", "text": "def select_files_to_upload\n @files_to_upload = @local_files.select do |file| \n case\n when File.directory?(local_name(file))\n false # Don't upload directories\n when !@bucket[s3_name(...
d8232edb652fbef8c33c5fd93d32e935
GET /lien_procedures GET /lien_procedures.json
[ { "docid": "dcfa04a0268c9e9b68ba96f5b9f41a66", "score": "0.7050755", "text": "def index\n @car = Car.find(params[:car_id])\n @lien_procedures = @car.lien_procedures\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @lien_procedures }\n end\n en...
[ { "docid": "8184127e4e5f75ff3bc73f5fe78a61b5", "score": "0.6855425", "text": "def show\n @car = Car.find(params[:car_id])\n @lien_procedure = @car.lien_procedures.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @lien_procedure }\...
81f64b02a6dfdcf4b7a8bdde243656f2
Load options +options+: If nil, options are loaded from airake.yml in root. (All paths relative to base directory) +air_path+: Path to AIR file +mxml_path+: Path to the ProjectName.mxml +appxml_path+: Path to application descriptor +assets+: Path to assets +certificate+: Path to certificate ==== More options adt_path a...
[ { "docid": "f63bf658d329d098843df96b46d4b581", "score": "0.7746317", "text": "def load(options = {})\n super(options)\n \n @air_path = File.join(base_dir, options[:air_path]) \n @mxml_path = File.join(base_dir, options[:mxml_path]) \n @appxml_path = File.join...
[ { "docid": "f23dd348806863ed2fac4d7c59226036", "score": "0.66915876", "text": "def load(options = {})\n super(options)\n \n @mxml_path = File.join(base_dir, options[:mxml_path]) \n \n with_keyed_options([ :assets, :mxmlc_path, :adt_path, :asdoc_path, \n :...
287249d534938bc390c66348a2655f0a
bonus most_points_scored returns Ben Gordon
[ { "docid": "b6888c6bd8373ab87fdac4462966813f", "score": "0.76135755", "text": "def most_points_scored\n most_points = nil\n name = nil\n game_hash.each do |home_or_away, team|\n team[:players].each do |key, player|\n if most_points == nil or player[:points] > most_points\n most_points...
[ { "docid": "ff252462d0c94056af2175ffe0791528", "score": "0.86167514", "text": "def most_points_scored\n points = players_points(return_players_info)\n name = who_has_most_points(points.max)\nend", "title": "" }, { "docid": "b5ea6fc9b9d12934e1747555b54cfbd4", "score": "0.81366223", ...
23be0257353498681636c7003b8c55df
Creates a new Event object.
[ { "docid": "61f11c0e3a10a47771420af43b47f6ef", "score": "0.0", "text": "def initialize(map_id, id)\n @map_id = map_id\n @id = id\n @x = data.x\n @y = data.y\n @current_page = nil\n @moveroute = []\n @speed = settings.speed\n @direction = 2\n @moveroute_ignore...
[ { "docid": "d9c6b3d972fd2aa77fda04e2b8a90f53", "score": "0.8263532", "text": "def new\n @event = Event.new\n end", "title": "" }, { "docid": "beedcfe25794386ff69c6f97efb9c3cc", "score": "0.8011962", "text": "def new\n @event = Event.new\n end", "title": "" }, { ...
cb55663653a73cb1b0ca780cac9cfd13
pretty print a BT
[ { "docid": "214637576fb2731b22f352cfa6c56842", "score": "0.0", "text": "def pretty_print(node = @root, prefix = '', is_left = true)\n pretty_print(node.right_child, \"#{prefix}#{is_left ? '│ ' : ' '}\", false) if node.right_child\n puts \"#{prefix}#{is_left ? '└── ' : '┌── '}#{node.data}\"\n ...
[ { "docid": "9e820d4df11432302c6599345b5e3250", "score": "0.64626485", "text": "def to_pretty\n to_s(:prettyprint => true)\n end", "title": "" }, { "docid": "288e133748089ec8f37452c89f630917", "score": "0.6351177", "text": "def pretty_print(pp)\n pp.text \"#{tas...
2f463c3ea09fd38d8d3dc38c34a5798f
orders controller for business to see ordered services once booked
[ { "docid": "60a5527e4e33adaddde5a3cf282676b9", "score": "0.7416146", "text": "def orders\n if current_user.business.id == params[:id].to_i\n @business = current_user.business\n @services = @business.services\n else\n redirect_to root_path\n end\n end", "title": "" } ]
[ { "docid": "866305c5b1653804c743820f772353e6", "score": "0.75608784", "text": "def index\n @business_service_orders = BusinessServiceOrder.all\n end", "title": "" }, { "docid": "6a4efaa1d84e0ac91bf3a7064d4277d6", "score": "0.73155874", "text": "def index\n @service_order_detai...
37fd6b22c4b4a0f025b6e1210e02f3e8
Returns UL of mergable tokens FIXME Just a mock
[ { "docid": "595bb19a90eeb502a08d09ee81e9c6ef", "score": "0.783117", "text": "def list_mergable_tokens\n out = \"<ul>\"\n for token in TOKENS do\n out << content_tag(:li, token, :style => \"list-style-type: none\")\n end\n out << \"</ul>\"\n end", "title": "" } ]
[ { "docid": "47e000c836390e6aab5e67dbeeee360e", "score": "0.72357", "text": "def token_list\n @token_list\n end", "title": "" }, { "docid": "4fd63f2d29418feb549b023deefccafd", "score": "0.67732847", "text": "def collect_tokens; end", "title": "" }, { "docid": "4fd63f2d...
0f26754fc7178a53b6a506f4da0769ae
Patch primary_patient missing attributes using secondary patient data
[ { "docid": "06d033186c10533ae8e69320af65dea4", "score": "0.7223212", "text": "def merge_attributes(primary_patient, secondary_patient)\n secondary_patient.person.person_attributes.each do |attribute|\n next if primary_patient.person.person_attributes.where(\n person_attribute_type_id: att...
[ { "docid": "2bc3b5f4f47d2f95f842893c0c98917d", "score": "0.7243295", "text": "def merge_attributes(primary_patient, secondary_patient)\n secondary_patient.person.person_attributes.each do |attribute|\n next if primary_patient.person.person_attributes.where(\n person_attribute_type_id: att...
12c7a4d88f246a0da1248ef3c728f3f6
which form partial to render for this payment type
[ { "docid": "dbd1c06c6807f0a77fb367351281d733", "score": "0.71741986", "text": "def form_partial\n raise \"form_partial not implemented for this payment service\"\n end", "title": "" } ]
[ { "docid": "35506d68ccb2a31485a1ff682d69b440", "score": "0.7023783", "text": "def form_payment\n render(\"calculations/form_payment_new_template.html.erb\")\n end", "title": "" }, { "docid": "4dfbd73a959bb4382ebe91493a6c32dc", "score": "0.64300084", "text": "def form_type\n ...