query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
2bb15e771bdbb136b218ad78107fd701 | payment of 300 should expire | [
{
"docid": "050af5f524a6fd17abc8af135ca8fbe2",
"score": "0.6210452",
"text": "def test_transaction_expired\n response = @gateway.setup_purchase(300, @options)\n\n # now try to authorize the payment, issuer simulator let the payment expire\n response = @gateway.capture(response.transaction['tran... | [
{
"docid": "f3787759d7e33b2a4f620ad318118002",
"score": "0.7316651",
"text": "def simulate_expire; end",
"title": ""
},
{
"docid": "57c47d32caf13afd19c38ab2111f1a10",
"score": "0.7073033",
"text": "def verify_expiration; end",
"title": ""
},
{
"docid": "57c47d32caf13afd19... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "9abab41d62cba9cb26f4e77e3111f924",
"score": "0.0",
"text": "def tennis_facility_params\n params.require(:tennis_facility).permit(:name, :address, :zipcode, :city, :courts, :lights, :courtstypes, :comments, :phone)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7495027",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.69566035",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
dadf38571a83394bb9f22dba95371dbf | Internal: Converts a provided string into a date object In MT940 documents the date is provided as a 6 char string (YYMMDD) or as a 4 char string (MMDD) If a 4 char string is provided a second parameter with the year should be provided. If no year is present the current year is assumed. Example: to_date('140909') to_da... | [
{
"docid": "9b49931045808af5c1eb2d2c8f2690ce",
"score": "0.7194253",
"text": "def to_date(date, year=nil)\n if match = date.to_s.match(DATE)\n year ||= \"20#{match['year'] || Date.today.strftime(\"%y\")}\"\n month = match['month']\n day = match['day']\n Date.new(year.to_... | [
{
"docid": "b19d49356e0f823efcf45ee14753fb2b",
"score": "0.78992695",
"text": "def to_date(string)\n list = string.split(SPLITTER)\n return nil unless valid_year?(list.first) || valid_year?(list.last)\n if @american_format # US format dates need to have month and day swapped for Dat... |
5a1969b0f8f824f75b9e9bcde6dc83b5 | DELETE /microposts/1 DELETE /microposts/1.json | [
{
"docid": "330a8c55875cea26a14d2ee14af32b06",
"score": "0.7640458",
"text": "def destroy\n @micropost.destroy\n respond_to do |format|\n format.html { redirect_to root_path, flash: { success: 'Micropost was successfully destroyed.' } }\n format.json { head :no_content }\n end\n end"... | [
{
"docid": "286ee4a9e05a6ec39814eaef4d70773d",
"score": "0.8109305",
"text": "def destroy\n @micropost = Micropost.find(params[:id])\n @micropost.destroy\n\n respond_to do |format|\n format.html { redirect_to microposts_path }\n format.json { head :no_content }\n end\n end",
"... |
a0533eba6370d909c10dd2489d8d31b3 | Takes in the input from the _form for announcement and parse the data into a new announcement object | [
{
"docid": "e5108cbc00d81440f647510a436cf72f",
"score": "0.5918746",
"text": "def create \n announceData = params[:announce]\n #currentCourse = Course.find(announceData[:course_id])\n # Had to put in time manually\n date = params['date'] \n time = params['time'] \n\n # TODO: Turn into ... | [
{
"docid": "f9bcf1a11eb31bbf9e9e63d03501f28e",
"score": "0.69117725",
"text": "def parse_announcement(url, creds)\n rqstream = open(url, http_basic_authentication: creds)\n rqdoc = Nokogiri::HTML(rqstream)\n text = rqdoc.xpath('//body//text()').to_s # this is a really cool line\n return nil unless /... |
f538a96921bf924b06eaa4097e3631f3 | Provides a protected block where a sequence of multiple rewrite actions are handled atomically. If any of the actions failed by clobbering, all the actions are rolled back. Transactions can be nested. | [
{
"docid": "4304a0ffbfccd7445ca2549a2deb0aca",
"score": "0.0",
"text": "def transaction; end",
"title": ""
}
] | [
{
"docid": "64dcd34e3a297ab2195a48379224fcb2",
"score": "0.59123796",
"text": "def commit!\n @rewrites << @rewrite\n @rewrite = nil\n end",
"title": ""
},
{
"docid": "21d22846b063b484bfbfbb69c27896dc",
"score": "0.5912011",
"text": "def exec(&block)\n raise In... |
c4e99ce7d4d2207ea2b29eaf3aded7af | Is this decision ID the same as another? | [
{
"docid": "8c75697ab793de2b38a90e96df734d4c",
"score": "0.0",
"text": "def eql?(other)\n\n end",
"title": ""
}
] | [
{
"docid": "baaec70dafd4544d8de7a994489b39f0",
"score": "0.6954724",
"text": "def has_same_identity_as?(other)\n @label == other.label && !@label.nil?\n end",
"title": ""
},
{
"docid": "f173a6910d0c842feacf6ebc794ac52a",
"score": "0.64959025",
"text": "def eql?(other)\n ... |
389290d7dd9bb702e92e9474b7572be9 | POST /orders POST /orders.json | [
{
"docid": "035907a99b5a0740ad6b57752c449c01",
"score": "0.0",
"text": "def create\n # Public method\n\n @order = Order.new(order_params)\n\n @current_coupon = get_current_coupon\n\n @shipping_type = ShippingType.first\n #@shipping_type = get_shipping_type\n #if !@shipping_type\n # ... | [
{
"docid": "e351d40efb5569993155750656dc7979",
"score": "0.75886714",
"text": "def orders\n authenticated_post(\"orders\").body\n end",
"title": ""
},
{
"docid": "4e46e5bc223a332a8352fa259adf12e8",
"score": "0.7490972",
"text": "def orders\n authenticated_post(\"auth/r/o... |
a88a2dcb0974e8ba332d76a21fb47795 | DELETE /stocks/1 DELETE /stocks/1.json | [
{
"docid": "b7cb26f8c7d0112f08666922df9c2b8e",
"score": "0.7569704",
"text": "def destroy\n @stock.destroy\n respond_to do |format|\n format.html { redirect_to stocks_url, notice: 'Stock was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title": ""
... | [
{
"docid": "63b90bea78c3f39123e9d0ab09142e16",
"score": "0.79579663",
"text": "def destroy\n @stock.destroy\n respond_to do |format|\n format.html { redirect_to api_stocks_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "396395a37b436a47a0... |
973a121bf09605d611715cd9f5ec6621 | Removes all elements from the queue | [
{
"docid": "707b830f4afc030d23b16be86b699031",
"score": "0.0",
"text": "def clear\n @collection.remove(@id, @options.remove_options)\n nil\n rescue Error::DocumentNotFound\n nil\n end",
"title": ""
}
] | [
{
"docid": "2f4b6be940f16681d90c5fbeae20c012",
"score": "0.8078894",
"text": "def clear\n items = []\n\n loop { items << @queue.pop(true) }\n rescue ThreadError\n # Last queue item reached\n items\n end",
"title": ""
},
{
"docid":... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "41cbca50ffdd788b1f99c2653e948feb",
"score": "0.0",
"text": "def set_city\n @city = City.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;... |
93d788d0afc66addd922bd746c62e30c | DELETE /caps/1 DELETE /caps/1.xml | [
{
"docid": "732ad4961797779665eac5db00b387c9",
"score": "0.70616716",
"text": "def destroy\n @cap = Cap.find(params[:id])\n @cap.destroy\n\n respond_to do |format|\n format.html { redirect_to(caps_url) }\n format.xml { head :ok }\n end\n end",
"title": ""
}
] | [
{
"docid": "c1592c9a7c989d01a99d8c2f4e789eab",
"score": "0.64969826",
"text": "def netdev_resxml_delete( xml )\n top = netdev_resxml_top( xml )\n par = top.instance_variable_get(:@parent)\n par['delete'] = 'delete'\n end",
"title": ""
},
{
"docid": "6837a837e68dc03d5a09e58415a2476b... |
63fcbcb4c9ce8fd42a795b6576c23dd2 | out the current state. | [
{
"docid": "9a43e84809a509fce140546d6a36e6d9",
"score": "0.0",
"text": "def display_board(board = \" \")\n board_row_1 = \" #{board[0]} | #{board[1]} | #{board[2]} \"\n board_row_2 = \" #{board[3]} | #{board[4]} | #{board[5]} \"\n board_row_3 = \" #{board[6]} | #{board[7]} | #{board[8]} \"\n board_b... | [
{
"docid": "7b2800cedb1d335f3cb25042620f5541",
"score": "0.7593203",
"text": "def out\n state.last.flatten\n end",
"title": ""
},
{
"docid": "34a90713a0e701353e983def5d8e600e",
"score": "0.7330737",
"text": "def state\n output(:state)\n end",
"title": ""
},
{
... |
61fb48647538c7c590a24e4743501da0 | required[:service_name] optional [ :engine_name,:service_handle,:sub_handle] | [
{
"docid": "b838b3fb126f27df01177fd40d5c6242",
"score": "0.0",
"text": "def subservice_is_registered?(params)\n is_registered?(subservices_consumers ,params)\n end",
"title": ""
}
] | [
{
"docid": "80cd2da31c601f95d2248a381cecfddd",
"score": "0.6848503",
"text": "def service_params\n params.require(:service).permit(:name, :sub_name)\n end",
"title": ""
},
{
"docid": "d5bbe8b0286b6105b52bab1ec519a267",
"score": "0.66682285",
"text": "def service_params\n ... |
8c4d2d22842b449078d8941d5fae87a6 | Wrapper to shorten the syntax and create a central place to modify in case preferences are stored differently in the future. | [
{
"docid": "4c1b1d163da840a63c7ee8ee048e69ef",
"score": "0.0",
"text": "def write_setting(key, value)\n Sketchup.write_default(PREF_KEY, key, value)\n end",
"title": ""
}
] | [
{
"docid": "b33018a0d6c81a45db0f918e32777f64",
"score": "0.60158163",
"text": "def methodize_preferences\n #raise @options.to_yaml\n #convert preferences into methods for easier use in forms and form helpers\n #options = options.clone[0] if options[0].is_a?(Array) #allows you to pa... |
88cf511ae15905373138455c3a5d5cd7 | Create new HBase connection using Thrift API with defined constants HBASE_HOST and HBASE_PORT | [
{
"docid": "23f79dd83f5acce79c57ecac1f9f6754",
"score": "0.69188476",
"text": "def initialize(tablename)\r\n @connection = OkHbase::Connection.new(auto_connect: true, host: HBASE_HOST, port: HBASE_PORT)\r\n @table = get_table(tablename, @connection) \r\n end",
"title": ""
}
] | [
{
"docid": "6fadf70ad1be54174655eebaa8c8cfef",
"score": "0.6312196",
"text": "def connect(table_name)\n conf = HBaseConfiguration.create\n admin = HBaseAdmin.new(conf)\n admin.tableExists('enron2')\n tables = admin.listTables\n table = HTable.new(conf, 'enron2')\nend",
"title": ""
},
{
... |
83c5caf2e4eccefcb8e14bb34951abe1 | GET /places_interests/new GET /places_interests/new.json | [
{
"docid": "cd8b159b03708ca735e0070e4ca3d018",
"score": "0.8127695",
"text": "def new\n @places_interest = PlacesInterest.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @places_interest }\n end\n end",
"title": ""
}
] | [
{
"docid": "4c70952365d73148054208407cf8b3b2",
"score": "0.75496143",
"text": "def create\n @places_interest = PlacesInterest.new(params[:places_interest])\n\n respond_to do |format|\n if @places_interest.save\n format.html { redirect_to @places_interest, notice: 'Places interest was s... |
590ef55e0509f85b189bb7db88bc26e4 | GET /staff/list GET /staff/list.json | [
{
"docid": "d8c96c916f6c19c5a42077351f26ceab",
"score": "0.6820642",
"text": "def list\n name = params[:name].blank? ? '' : params[:name]\n status = params[:status].blank? ? 0 : params[:status].to_i\n \n pgnum = params[:pgnum].blank? ? 1 : params[:pgnum].to_i\n pgsize = params[:pgsize].bl... | [
{
"docid": "db46911b127271208772173fcbffef26",
"score": "0.79638815",
"text": "def index\n @staffs = Staff.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @staffs }\n end\n end",
"title": ""
},
{
"docid": "846da2a30f38c028876d8c6... |
310ef3bdfb78cbcf5eef5f256824d939 | Rank is the calcualated by taking the inverse log of the probability divided by ten and multipying it by `max`. Thus higher the number, the more likely it is to occur. This is used to normalize the set of probablities to a limited integer range. Rank requires a ceiling, so it defaults to 65535 if none is given. Returns... | [
{
"docid": "13a7dc139d6a9e34caaa285125c69292",
"score": "0.6031834",
"text": "def ilog(probability)\n max = ceil || 65535\n log10 = Math.log10(probability / 10)\n ((-1 / log10) * max).to_i\n end",
"title": ""
}
] | [
{
"docid": "0d00b9bfb7ebd1987bde35b9989a9961",
"score": "0.6984732",
"text": "def max(max_rank, rank_lev1)\n max_rank = 0.to_i if max_rank.nil?\n rank_lev1.prioriy = max_rank + 1.to_i\n rank_lev1\n end",
"title": ""
},
{
"docid": "e989bf60f8f370c273578b6797c89925",
"score": "0.... |
590130ec84c94f07198c3c318045285f | Returns options that are to be passed to the Attacher. | [
{
"docid": "4ec5d4dd79cf2b437acebe635400d516",
"score": "0.7204574",
"text": "def options\n @options\n end",
"title": ""
}
] | [
{
"docid": "897779473d5fe12afc2c61dc783bf5b2",
"score": "0.72842664",
"text": "def options\n return @options\n end",
"title": ""
},
{
"docid": "19aa6a04338992c4fcbea81880af3cd9",
"score": "0.7263428",
"text": "def options\n @options\n end",
"title": ""
},
{
... |
3090c233fdff0c5025d2e7f49d1b4e34 | PATCH/PUT /unit_skills/1 PATCH/PUT /unit_skills/1.json | [
{
"docid": "adb822b6b5206c2036c3ee9cfdc6bfb2",
"score": "0.7255663",
"text": "def update\n respond_to do |format|\n if @unit_skill.update(unit_skill_params)\n format.html { redirect_to @unit_skill, notice: 'Unit skill was successfully updated.' }\n format.json { render :show, statu... | [
{
"docid": "b06fb99cc148c7c14b258627ec68390d",
"score": "0.73191285",
"text": "def update\n if @skill.update(basic_params)\n render json: @skill\n else\n render json: @skill.errors, status: :unprocessable_entity\n end\n end",
"title": ""
},
{
"docid": "4569ec04b3e6caf9947... |
84cc2667346c3a743ceafa8fab89d0ae | Check and see whether a word has a valid vector, incidentally putting it into the cache in the process. Could be used for preemptive loading of vectors if one were to do something _really_ clever in the future. | [
{
"docid": "1976c8ebcbe32a9b8c63b9f80fab2d8c",
"score": "0.5305984",
"text": "def query(word)\n v = cache(word)\n if v and v.size > 1 and v.uniq.size > 1\n return true\n else\n return false\n end\n end",
"title": ""
}
] | [
{
"docid": "5b5a5b5ac86c3076eaaf528d307b0876",
"score": "0.69957757",
"text": "def word_present?(word)\n vectors.keys.include?(word)\n end",
"title": ""
},
{
"docid": "2e5ca3268c38a1ed99035ba86f39ff2f",
"score": "0.6523701",
"text": "def has_vector? name\n !!@vectors[name]\n... |
a98bfcd5d4cddcea02859746402d2a4a | GET /proposals/new GET /proposals/new.xml | [
{
"docid": "010a80e7e06f8cc40be21ca3bd7ea618",
"score": "0.6722068",
"text": "def new\n add_breadcrumb @event.title, event_proposals_path(@event)\n add_breadcrumb \"Create a proposal\", new_event_proposal_path(@event)\n\n @proposal = Proposal.new(agreement: false)\n\n # Set default t... | [
{
"docid": "db22c48907f95c69b4ebc3de4d5fd49e",
"score": "0.73354644",
"text": "def new\n @restaurants = Restaurant.all\n @proposal = Lunch.next.proposals.new\n \n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @proposal }\n end\n end",
"t... |
2a687a50a3a96ad146f73eb8bf755f05 | TODO: don't hardcode a lot of things that are hardcoded in this module | [
{
"docid": "f7adee945fe2f11487b1512eeee0a163",
"score": "0.0",
"text": "def setup\n @log = Log4r::Logger['lighting']\n Handlers[:trigger].first.bind_trigger :frontdoor, lambda { |key, args, values|\n next if values != [1.0]\n\tcase key\n\t when \"Sync\"\n\t send_lock_update\n\t whe... | [
{
"docid": "9de4306501711176ab8084b28395030d",
"score": "0.6450914",
"text": "def module; end",
"title": ""
},
{
"docid": "b6b2bcc0062aeb115edab7b10cbe6930",
"score": "0.6422905",
"text": "def desired; end",
"title": ""
},
{
"docid": "3660c5f35373aec34a5a7b0869a4a8bd",
... |
5b08b354b8c3ea3b638e1cdbe5c48250 | PATCH/PUT /news_firsts/1 PATCH/PUT /news_firsts/1.json | [
{
"docid": "5b60e168d8f0f9517b52c64be756f81a",
"score": "0.70401186",
"text": "def update\n respond_to do |format|\n if @news_first.update(news_first_params)\n format.html { redirect_to action: \"index\", notice: 'News first was successfully updated.' }\n format.json { render :show... | [
{
"docid": "6cd135c7d040bde7b1f68a867ae05091",
"score": "0.6509859",
"text": "def update\n @news = News.find(params[:id])\n\n respond_to do |format|\n if @news.update_attributes(params[:news])\n format.html { redirect_to news_path, notice: 'News was successfully updated.' }\n fo... |
d2c5ebd362b94f4d8061d62cbc9d1c40 | Get string from stream. | [
{
"docid": "a32cc2343789b41efb5e681af74f69ee",
"score": "0.6921426",
"text": "def get_string\n length = get_int\n raise EOFError if @position + length > @size\n value = length > 0 ? @response[@position, length] : ''\n @position += length\n return value\n end",
"title": ""... | [
{
"docid": "b800dc7710edc7f6980666bc8e9374bc",
"score": "0.6938008",
"text": "def gets\n in_stream ? in_stream.gets : ''\n end",
"title": ""
},
{
"docid": "52ea5db28abca0456c068abda27574b4",
"score": "0.6836838",
"text": "def get_string(offset)\n @contents.pos = offset... |
582f085071f633474921b08e0ca31340 | Format a 1D or 2D array into 'field[tab]field' lines. | [
{
"docid": "19118ff9f7d6a000235a65c7b169f6e1",
"score": "0.0",
"text": "def to_string(separator = \"\\t\")\n lines = Array.new\n each do |record|\n #Join fields with tabs, or just append record if no fields.\n lines << (record.respond_to?(:join) ? record.join(separator) : record)\n en... | [
{
"docid": "c869eeacf506f9a1a1694c40a4eaa007",
"score": "0.7218587",
"text": "def line_formatter(array)\n if array.any? {|item| item.is_a?(Array)}\n cols = []\n array.each do |item|\n if item.is_a?(Array)\n item.each_with_index { |val,idx| cols[idx] = [cols[idx]||0... |
b33afffa0ec73aaa30064fa97b26c29d | The window has been expanded by the given amount. | [
{
"docid": "cfd6b508513abc22d81d28d6e93d4338",
"score": "0.54144585",
"text": "def window_updated(size)\n\t\t\t\treturn false\n\t\t\tend",
"title": ""
}
] | [
{
"docid": "60196486da29112f283559e84a083cc4",
"score": "0.66705245",
"text": "def expand(amount = 1)\n\t\t\t\t@total += amount\n\t\t\t\t\n\t\t\t\t@bar&.update(@current, @total, self.to_s)\n\t\t\t\t@lines&.redraw(0)\n\t\t\t\t\n\t\t\t\treturn self\n\t\t\tend",
"title": ""
},
{
"docid": "3ff83... |
7c1152a80952de8e1268513450bd3d3a | Gives the allocation table for a member within a project, during his project window(s) | [
{
"docid": "0725a49a146357446ba34e044a682df0",
"score": "0.6101777",
"text": "def wl_table_allocation\r\n\t\t\t\treturn WlLogic.generate_allocations_table_member(self)\r\n\t\t\tend",
"title": ""
}
] | [
{
"docid": "e96ade68aa2f60a57352b4ac335053f3",
"score": "0.693471",
"text": "def wl_global_table_allocation\r\n\t\t\t\t#user_table_alloc = self.user.wl_table_allocation\r\n\r\n\t\t\t\twl_custom_project_windows = WlCustomProjectWindow.where(user_id: self.user.id, wl_project_window_id: self.project.wl_pro... |
18285cf1aeddf1a2dbd894d6d6047643 | GET /venta_detalles/new GET /venta_detalles/new.json | [
{
"docid": "66de52da91f361e656152428fdb42299",
"score": "0.80491537",
"text": "def new\n @venta_detalle = VentaDetalle.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @venta_detalle }\n end\n end",
"title": ""
}
] | [
{
"docid": "732d16a41750c3d6df2d997351f6a876",
"score": "0.7943998",
"text": "def new\n @venta = Venta.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @venta }\n end\n end",
"title": ""
},
{
"docid": "0bc0f610502a53cc7a5910a5cb4108... |
7632fc1132421a43b8cf2c98770ecb26 | Locate restaurant text file, or create a new one if needed | [
{
"docid": "70c483a6183e1067a2421986518eccb1",
"score": "0.5666836",
"text": "def initialize(path=nil)\n Restaurant.filepath=path\n \n if (!Restaurant.file_usable?())\n Restaurant.create_file()\n end\n \n end",
"title": ""
}
] | [
{
"docid": "7ccc4f91a7eb0c56504b9631b5994fc9",
"score": "0.60654265",
"text": "def initialize(path=nil)\n Restaurant.filepath = path\n\n # ? should this kind of stuff be in initialize? -- i guess makes sense cuz don't want a Guide instance which doesnt have valid associated file, so must check tha... |
17ac1118a8c8eff0574703297943fb66 | Render the tag's contents if the condition is true, or any else or elsif sections if the condition isn't true. | [
{
"docid": "15b5279eb740304ed79d7eacc4092960",
"score": "0.0",
"text": "def render( state )\n\t\toutput = []\n\n\t\terrhandler = self.method( :handle_exception )\n\t\tstate.with_destination( output ) do\n\t\t\tstate.with_error_handler( errhandler ) do\n\t\t\t\tcatch( :stop_rendering ) do\n\t\t\t\t\tsupe... | [
{
"docid": "f707421093338bfe2d6f8dc66e008f56",
"score": "0.70321316",
"text": "def span_tag_if_content(content_as_condition, options={})\n span_tag(options.merge(:content => content_as_condition)) unless content_as_condition.to_s.empty?\n end",
"title": ""
},
{
"docid": "7850fa57cd77b5ec... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "faf55e73c90889953ba8b1d4e74897f0",
"score": "0.0",
"text": "def set_lead\n @lead = Lead.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;... |
26665350b9f9f27f6593485926dc3cbf | GET /situations GET /situations.json | [
{
"docid": "882268ee171e5ae871b4302a5ebeb68f",
"score": "0.0",
"text": "def index\n if current_user.rol == 1\n @situations = Situation.order(:id)\n @situation = Situation.new\n else\n @mensaje = \"Seccion solo para administrador\"\n end\n end",
"title": ""
}
] | [
{
"docid": "77acf8ce650a12bfc08437d342bb022e",
"score": "0.76364154",
"text": "def index\n @situations = Situation.all\n end",
"title": ""
},
{
"docid": "77acf8ce650a12bfc08437d342bb022e",
"score": "0.76364154",
"text": "def index\n @situations = Situation.all\n end",
"ti... |
7ec0c4eee09dbbbd47d01f46a3fd2ab6 | Is there a Hell, where people who have led bad lives and die without being sorry are eternally punished? | [
{
"docid": "de0abf275df55ed68ab877c2317b717d",
"score": "0.0",
"text": "def determine_hell(hell_data)\n\tcase hell_data\n\twhen 1\n\t\t:hell_is_real\n\twhen 2\n\t\t:hell_is_a_lie\n\telse\n\t\t:unknown\n\tend\nend",
"title": ""
}
] | [
{
"docid": "3a08f0b6befe64b02ec85ef94157cdbe",
"score": "0.624039",
"text": "def mermithization_unstrictured_hersed()\n technonomy(wrangler)\n sock_reassociate_supratemporal(jacket_gloomingly, metrometer, urtica_siegecraft)\n end",
"title": ""
},
{
"docid": "06b284a85c524f4a33b3... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "710fe61142464d6459586b7c7c0285e2",
"score": "0.0",
"text": "def set_earn\n @earn = Earn.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... |
e5e1e4ebd8fc9067c93d1b2f997c7bc3 | GET /mixproductos/new GET /mixproductos/new.json | [
{
"docid": "f4c2cc95b460916f492e948368663542",
"score": "0.7606285",
"text": "def new\n @mixproducto = Mixproducto.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @mixproducto }\n end\n end",
"title": ""
}
] | [
{
"docid": "b4f0fda41850dcb37ae7a2b090e6f8c9",
"score": "0.7418802",
"text": "def new\n @product = Product.new\n\n render json: @product\n end",
"title": ""
},
{
"docid": "ac387d90ed67b2ef6fa4feefd399cc21",
"score": "0.7345511",
"text": "def new\n @product = Product.new\n ... |
8c242bfc02e7fbb55a55f096d9eb7419 | Sets the firstSeenDateTime property value. The first date and time when this hostTracker was observed by Microsoft Defender Threat Intelligence. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 20140101T00:00:00Z. | [
{
"docid": "3168c16429bd68b9b732624feb57b06b",
"score": "0.8031667",
"text": "def first_seen_date_time=(value)\n @first_seen_date_time = value\n end",
"title": ""
}
] | [
{
"docid": "a15c92d97254780351873bf85030e78c",
"score": "0.700986",
"text": "def first_seen_date_time\n return @first_seen_date_time\n end",
"title": ""
},
{
"docid": "a15c92d97254780351873bf85030e78c",
"score": "0.700986",
"text": "def first_seen_date_time\... |
d8d1ad1f27ca668d3a6376aba7cfc711 | def self.find(name) end def self.sort(name) end | [
{
"docid": "ee1c92238d1a22e970be6b302b0937dc",
"score": "0.0",
"text": "def save()\n @@list.push(self)\n end",
"title": ""
}
] | [
{
"docid": "86019c3d93e69c6816d05e6230817693",
"score": "0.6974692",
"text": "def find_by_name(name)\n end",
"title": ""
},
{
"docid": "f862531182777b5de32b20a96bd84e8e",
"score": "0.69059044",
"text": "def find(name); end",
"title": ""
},
{
"docid": "839c953b92868fbc8... |
7a3f5521a70544775fbe0f1cc5ae0be6 | Method 3: should be able to add students, using name of student and the grade they're in | [
{
"docid": "2fc4f17a8a73eed6b32c11c251c54891",
"score": "0.8253514",
"text": "def add_student(name, grade)\r\n if @roster[grade] != nil \r\n @roster[grade] << name\r\n else\r\n @roster[grade] = [name]\r\n end\r\n end",
"title": ""
}
] | [
{
"docid": "16e7e48dd3754fc51c58b3f01e489396",
"score": "0.85021967",
"text": "def add_student(student_name, student_grade)\n\t\tSCHOOL[:students] << {:name => student_name, :grade => student_grade}\n\tend",
"title": ""
},
{
"docid": "cf191b13184b7b4f1481574ff63c194f",
"score": "0.837939... |
4c8a908e08a068800a2abee4bbed5574 | Determina se la quest sta aspettando una variabile | [
{
"docid": "27660c4d63f8482df7fa4d3ee2d22282",
"score": "0.0",
"text": "def wait_for_variable?; !completed? && actual_task.wait_for_variable?; end",
"title": ""
}
] | [
{
"docid": "64fa55d1ac362230e4637869be083510",
"score": "0.69549406",
"text": "def var?(id,a) return $state.var?(id,a) end",
"title": ""
},
{
"docid": "0f6a18cf8613b4b3227a16079434eac1",
"score": "0.69053555",
"text": "def store_var?\n if custom?\n return false if value == 0\... |
0d2b74e712bcca9fe83ad085f5beca50 | GET /communications/1 GET /communications/1.json | [
{
"docid": "d750fbcfe7426254105f38cb7c2efbc3",
"score": "0.72316897",
"text": "def show\n @communication = Communication.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @communication }\n end\n end",
"title": ""
}
] | [
{
"docid": "3aecfab7fdef142d7a295b0099acf446",
"score": "0.69999945",
"text": "def index\n @communications = Communication.all\n end",
"title": ""
},
{
"docid": "3aecfab7fdef142d7a295b0099acf446",
"score": "0.69999945",
"text": "def index\n @communications = Communication.all\... |
fe1313d3ad41ab31df691a61c152bb0b | Replace this with your real tests. | [
{
"docid": "e949014a6c6d669e1a18165e2f8ca8a6",
"score": "0.0",
"text": "def test_truth\n assert_kind_of Picture, pictures(:first)\n end",
"title": ""
}
] | [
{
"docid": "35a51327dd0b5c9a884bb0e6f7155697",
"score": "0.7446459",
"text": "def testing\n # ...\n end",
"title": ""
},
{
"docid": "1a6186064d8218f9aa0c8b82bcc4fdae",
"score": "0.6956364",
"text": "def __dummy_test__\n end",
"title": ""
},
{
"docid": "8fbc... |
90a4679c1899b37fa8542711d8f21460 | Only deletes a Category Object if no Food Objects are assigned to it Returns true/false Boolean | [
{
"docid": "57d5d34fe26d26fb4776509c86448eb9",
"score": "0.8658603",
"text": "def delete_category\n if self.foods.empty?\n self.destroy\n else\n false\n end\n end",
"title": ""
}
] | [
{
"docid": "fc7cee37a42ea9c32e2ba90574d81aec",
"score": "0.77415824",
"text": "def delete_category\n if self.shoes.empty?\n self.delete\n else\n return false\n end\n end",
"title": ""
},
{
"docid": "46236cbbf9a106634ada5fd272536d03",
"score": "0.7656477",
"text": ... |
846897abd2be11c1e0facb6a00677f9a | Consumes an escaped code point and returns its unescaped value. This method assumes that the `\` has already been consumed, and that the next character in the input has already been verified not to be a newline or EOF. | [
{
"docid": "ce42aac2d5dfff0f222366fe8a3b16cd",
"score": "0.7147952",
"text": "def consume_escaped\n case\n when @s.eos?\n \"\\ufffd\"\n\n when hex_str = @s.scan(RE_HEX)\n @s.consume if @s.peek =~ RE_WHITESPACE\n\n codepoint = hex_str.hex\n\n if codepoint == 0 |... | [
{
"docid": "369483e9a43a42d8f45a43c668255b53",
"score": "0.70237404",
"text": "def consume_escaped\n return \"\\ufffd\" if @s.eos?\n\n if hex_str = @s.scan(RE_HEX)\n @s.consume if @s.peek =~ RE_WHITESPACE\n\n codepoint = hex_str.hex\n\n if codepoint == 0 ||\n co... |
70cb66a199c6777f6a20996a2b743c26 | GET /talks/new GET /talks/new.json | [
{
"docid": "598b631f0aa0246713c7705594a49107",
"score": "0.817317",
"text": "def new\n @talk = Talk.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @talk }\n end\n end",
"title": ""
}
] | [
{
"docid": "ecb4dd029861d5891de0b5a34dd71b70",
"score": "0.8245346",
"text": "def new\n @talk = Talk.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @talk }\n end\n end",
"title": ""
},
{
"docid": "ecb4dd029861d5891de0b5a34dd71b70"... |
98e48fcdb704279d0718eb6fbf8b6c2a | Used in correlation with prize limits that adhere to the prize, not just the inventory. | [
{
"docid": "ebd21e90bcfcc0b1742bdf95f23a2653",
"score": "0.0",
"text": "def purchase_count(prize)\n\t\t\t \tcase prize.class.name.demodulize\n\t\t\t \twhen \"Prize\"\n\t\t\t \tPurchase.where(employee_id: self.IDnum).where(prize_id: prize.id).where(returned: false).count\n\t\t\t when \"Inventory\... | [
{
"docid": "344d29e8ad908a1b0d419b16f50955f1",
"score": "0.7145246",
"text": "def reduce_inventory\n Inventory.reduce_inventory(prize)\n end",
"title": ""
},
{
"docid": "986f158b7ee45b7e9ae47cb2a5a2d957",
"score": "0.62238634",
"text": "def potential_revenue\n @inventory.injec... |
288db6faac3079c892e7e7b56e04d77a | Adds freight items to the current quote Note: Either before or during the addFreight call you must call the to_hash method on the freight object ==== Usage quote = Odfl.new quote.addFreight(pallet.to_hash) | [
{
"docid": "83b1ed7e5ff8db5f8767977411842a52",
"score": "0.8137172",
"text": "def addFreight(pallet)\n self.freight.push(pallet)\n end",
"title": ""
}
] | [
{
"docid": "f1ae16c3aae877d56c5da43363cd4a1e",
"score": "0.6894152",
"text": "def add_freight_line(al)\n add_additional_charge_line(:freight, al)\n end",
"title": ""
},
{
"docid": "3a098eb6025eda3400fcba1ab9edc640",
"score": "0.6448783",
"text": "def add_shipping_as_line_item(ext... |
cacb3230bc790432521ae3b682647169 | returns same string with WORDS in reverse order | [
{
"docid": "9ed36b8a4d0dc6d76b38fd29d2e4282c",
"score": "0.0",
"text": "def reverse_sentence(string)\n string.split.reverse.join(' ')\nend",
"title": ""
}
] | [
{
"docid": "f9fde8bb14e2f1d8523e94b6d06d1ae2",
"score": "0.77903944",
"text": "def word_reverse str\n\tstr.split(\" \").reverse.join(\" \") \nend",
"title": ""
},
{
"docid": "f1063da8f96f9a1fdc4a0848f382162b",
"score": "0.77860606",
"text": "def word_reverse(string)\n string.split... |
9e200fa016cfb259531e729f28067c57 | Worth giving this collection a go? | [
{
"docid": "a8d12cdbbc32ad648970425f8ec8f86a",
"score": "0.0",
"text": "def ready?\n items.length > 0\n end",
"title": ""
}
] | [
{
"docid": "f127ec29ac281385cfe8262a0ce0f7ee",
"score": "0.72931606",
"text": "def collection; end",
"title": ""
},
{
"docid": "f127ec29ac281385cfe8262a0ce0f7ee",
"score": "0.72931606",
"text": "def collection; end",
"title": ""
},
{
"docid": "f127ec29ac281385cfe8262a0ce0... |
d61cbe4c07ce9402013d7ce939430727 | Iterates through route sets and returns the first matching route. | [
{
"docid": "d9c2840daaf1ebf4bedf9b75735a865c",
"score": "0.68215984",
"text": "def route(name, group = nil)\n @sets.each { |set|\n if r = set[1].route(name, group)\n return r\n end\n }\n\n nil\n end",
"title": ""
}
] | [
{
"docid": "948a28dd4404b91b14eb810723044c34",
"score": "0.7267655",
"text": "def first_route\n\t\t\t\tvalues.find { |value| value.is_a?(Route) }\n\t\t\tend",
"title": ""
},
{
"docid": "4d704f18c49ea940363c49ef633e78ff",
"score": "0.67286474",
"text": "def first_route\n ensure_c... |
8c14493c2406e5a5d7a850e11d7c8958 | add a '' after the field label if the field is required | [
{
"docid": "1222182be3bf42cae8c045bb6abd49bc",
"score": "0.6162839",
"text": "def label(method, content_or_options = nil, options = nil, &block)\n\t\tif content_or_options && content_or_options.class == Hash\n\t\t\toptions = content_or_options\n\t\telse\n\t\t\tcontent = content_or_options\n\t\tend\n ... | [
{
"docid": "098323984840c8eb13dc61a4b8f1755b",
"score": "0.7580551",
"text": "def required_label(method, text=nil)\n text ||= method.to_s.titleize\n #label(method) do \n # \"#{text}#{content_tag(:abbr, '*', :title => 'Required Field')}\"\n #end\n label(method,text)\n end",
"title": ... |
a6fee62bd602f7f9574e6858932fcc3e | Returns the value for the following setting: 'puppet_enterprise::profile::database::work_mem' | [
{
"docid": "92054ebcbb3f6663fb2b8c2c37a58f98",
"score": "0.7726853",
"text": "def database_work_mem\n exclusions = /(maintenance|autovacuum)/\n get_postgres_parameter(\"work_mem\", exclusions)\nend",
"title": ""
}
] | [
{
"docid": "7627cfc8f51ca718787a23c3f5ae5552",
"score": "0.75379175",
"text": "def database_maintenance_work_mem\n get_postgres_parameter(\"maintenance_work_mem\")\nend",
"title": ""
},
{
"docid": "7627cfc8f51ca718787a23c3f5ae5552",
"score": "0.75379175",
"text": "def database_maint... |
3fa2926688e5680459b37129228d645d | POST /articles POST /articles.json | [
{
"docid": "86fce46b36dcd6abd5bf5cc7d63cd219",
"score": "0.0",
"text": "def create\n params[:article][:user_id] = current_user.id\n @article = Article.new(params[:article])\n\n respond_to do |format|\n if @article.save\n format.html { redirect_to @article, notice: 'Article was succe... | [
{
"docid": "0c0325c2aa980b0e3a970095d96ee333",
"score": "0.71525854",
"text": "def create\n @article = Article.new(params[:article])\n\n respond_to do |format|\n if @article.save\n format.html { redirect_to @article, :notice => 'Article was successfully created.' }\n format.json... |
4c6eb03239084bc7dcc6336e32a53e32 | POST /sensor_data POST /sensor_data.json | [
{
"docid": "bd4233f5eb7171004c5d11d7c373affa",
"score": "0.7289946",
"text": "def create\n @sensor_data = SensorData.new(sensor_data_params)\n\n respond_to do |format|\n if @sensor_data.save\n format.html { redirect_to @sensor_data, notice: 'Sensor data was successfully created.' }\n ... | [
{
"docid": "3c033bafec4d54002d5d6a633337d99e",
"score": "0.7047239",
"text": "def postReadings(info, state)\r\n params = {\r\n :device_id => info.deviceId,\r\n :sensor_data => [\r\n {\r\n :type => \"Temperature\",\r\n :value => state.temperature,\r\n ... |
6862c0b51190131f23452fbe4c1c0937 | yell takes in a message convert the message to uppercase adds an exclamation point to the end of the message returns the message | [
{
"docid": "7b82d82ce4d6c7f291d02fec363a49a1",
"score": "0.7156237",
"text": "def yell(msg)\n msg.upcase.concat(\"!\")\nend",
"title": ""
}
] | [
{
"docid": "8eba4a63ebdf1c8d93d9c8969a5ded7c",
"score": "0.7595424",
"text": "def shout(message)\n return message.upcase\nend",
"title": ""
},
{
"docid": "8eba4a63ebdf1c8d93d9c8969a5ded7c",
"score": "0.7595424",
"text": "def shout(message)\n return message.upcase\nend",
"ti... |
c70fffdf12d341bcf1b29d000c3702df | GET /events/1 GET /events/1.json | [
{
"docid": "4bf76f265ac0245b103b1837b8d7c7bd",
"score": "0.0",
"text": "def show\n @events=Event.find(params[:id])\n respond_to do |format|\n format.html { render :layout => 'layout_welc'}\n format.json { render :json => @events.as_json(:include => [:event_translations, :comment_events,... | [
{
"docid": "2d5580b43c7c18bcd8a06713fa4be0f1",
"score": "0.75926495",
"text": "def show\n\t\tevent_id = params[:id]\n\t\tif event_id.present?\n\t\t\t@event = Com::Nbos::Events::Event.active_events.where(:id => event_id)\n\t\t\trender :json => @event\n\t\telse\n\t\t\trender :json => {status: 400, message... |
ba1a91554ebd9160aa83089191ae40ca | Generate the html tags for inserting the OpenCaptcha image and (if wanted) the answer input field in the form to be protected against automatic spam. | [
{
"docid": "894230921c88a806342775c55fcdd0a1",
"score": "0.65917283",
"text": "def open_captcha(opts={})\r\n mopts = @@default_opts.merge(opts)\r\n mopts[:image_name] = \"#{SecureRandom.hex(16)}-#{mopts[:height]}-#{mopts[:width]}.jpgx\"\r\n erb :opencaptcha, :views => File.dirname(__FILE_... | [
{
"docid": "4b7fa0ece8aeae13f14453fc9973b5a7",
"score": "0.7024",
"text": "def kamcaptcha(options = {})\n label = options.fetch(:label, DEFAULT_LABEL)\n image = Kamcaptcha.random\n token = image.split(\".\").first\n\n ret_str = <<-FORM\n <div class=\"kamcaptcha\">\n <... |
7776df0def05d46714f50d1b6878dac1 | params: value is 2element array value[0] is the filename value[1] is the binary string of the image | [
{
"docid": "9282b3ab56fdbcf86f4c4fbb3cf48cb1",
"score": "0.5929967",
"text": "def decode_from_ui(value)\n Site::UploadUtils.uploadSingleFile value[0], Base64.decode64(value[1]) if value[1]\n value[0]\n end",
"title": ""
}
] | [
{
"docid": "89e7b5f6f6976893967fd32cc502d3ac",
"score": "0.68619585",
"text": "def value\n execute\n if @file\n extension = '.png'\n filename = @file.chomp(extension) + extension\n path = File.join(Compass.configuration.images_path, filename)\n FileUtils.mkpat... |
3f6f8e19e0c141f29290abded9780311 | combines operation and its args into a JSON request | [
{
"docid": "83b5e2205ee44c1e88aa45cdfb41313c",
"score": "0.79841805",
"text": "def prepare_request(op, args)\n request = {op: op.to_s}\n request.merge! args\n\n JSON.generate request\n end",
"title": ""
}
] | [
{
"docid": "fc8cf43fee1f82dc9095a7e3d08f0c8e",
"score": "0.6587374",
"text": "def adapter_request(cmd, *args)\n rpc = {\n jsonrpc: \"2.0\",\n id: rand(1 << 16),\n method: cmd\n }\n\n unless args.empty?\n params = args.flatten\n ... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "f175c8a42c70d101a7747560727e4e1a",
"score": "0.0",
"text": "def food_order_params\n params[:food_order][:user_id] = current_user.try(:id) || 1\n params.require(:food_order).permit(:user_id, :food_name, :status, :picked_by, :image_url, :prep_date, :expiry_date, :spice_value)\n en... | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7495027",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.69566035",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
43bd90ca6d829a9ff4f64d952531dcee | GET /tasaivas/new GET /tasaivas/new.xml | [
{
"docid": "4dbe378af675807ba9261ec0250223a9",
"score": "0.75809777",
"text": "def new\n @tasaiva = Tasaiva.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @tasaiva }\n end\n end",
"title": ""
}
] | [
{
"docid": "25385e50d32c5597791c0fbccd29e7a7",
"score": "0.75945127",
"text": "def new\n @tso = Tso.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @tso }\n end\n end",
"title": ""
},
{
"docid": "b28b4baf67c41b19866dc1cb101a2fae"... |
2f399b7a84fe4e94784df08d1e5850b7 | Attempts to bill the survey sponsor. Returns whether or not the operation succeeded. | [
{
"docid": "f0eaddfc91e591ba588dbe2c37e37f73",
"score": "0.8185534",
"text": "def bill_sponsor\n begin\n Gateway.bill_survey_sponsor(self)\n return true\n rescue Exceptions::GatewayException => exception\n self.billing_error_description = exception.message\n return false\n e... | [
{
"docid": "ed2f48cee47a4139fef3eadd87ae4759",
"score": "0.72727513",
"text": "def billing_successful?\n #skip billing process if surveying through an association\n return true if !self.association.nil?\n #bill as usual \n if self.invoice.paying_with_credit_card? then\n # If we are payi... |
2a606ebcc905e5ce38295e73a8672e62 | DELETE /plugins/1 DELETE /plugins/1.json | [
{
"docid": "4812221ad219947c9ef54831134de75c",
"score": "0.7670001",
"text": "def destroy\n @plugin = Plugin.find(params[:name])\n @plugin.destroy\n\n respond_to do |format|\n format.html { redirect_to plugins_url }\n format.json { head :no_content }\n end\n end",
"title": ""
... | [
{
"docid": "9ed526632ac9f11f35806fa0c904aa18",
"score": "0.7590744",
"text": "def destroy\n unless login?\n raise 'not allowed not-login users to delete plugins'\n end\n @plugin = Plugin.find(params[:id])\n @plugin.destroy\n\n respond_to do |format|\n format.html { redirect_to p... |
fe977a978e3bcf0d4e83b5c6b78e8ff8 | test if fucking and stupid a bad word | [
{
"docid": "1b828e74155c544e38d1a603edaea105",
"score": "0.0",
"text": "def test_fucking_stupid\n\t\tassert_equal \"You xxx **** yyy **** zzz\",\n\t\tFilteranddiscount.runfilter(\"You xxx fucking yyy stupid zzz\")\n\tend",
"title": ""
}
] | [
{
"docid": "bb78341f21602c18859d5e3ab524646e",
"score": "0.75553787",
"text": "def is_misspelling?\n !correctly_spelt?\n end",
"title": ""
},
{
"docid": "d56a9d2478c659026f5d2ea7c6f1b14c",
"score": "0.73785275",
"text": "def spelled_correctly?(word)\n Wrapper.spell(@hunspell... |
2bb7f6987d1b088061ee19259bdeadc1 | Tells if this invite can be deleted, like last project founder can't be. UPDATE: only matters if removing last founder you can remove last INVITE all you want. | [
{
"docid": "0f63548f932968c1bff14a112e144906",
"score": "0.6228505",
"text": "def can_delete?\n return true\n end",
"title": ""
}
] | [
{
"docid": "b9c2992a09e39e6f950ee9db024544ea",
"score": "0.6534566",
"text": "def can_be_deleted_by?(user)\n self.conversation.user_id == user.id\n end",
"title": ""
},
{
"docid": "1c869a999c8a54e85672ce0be14833f1",
"score": "0.6441244",
"text": "def can_be_deleted?\n true\n ... |
efe8a4a6e292592fa9a798cc45f57633 | POST /galeri_video POST /galeri_video.json | [
{
"docid": "81f18fd8018f9ee6f1f86a6c9d08fb3a",
"score": "0.7501887",
"text": "def create\n @galeri_video = GaleriVideo.new(galeri_video_params)\n\n respond_to do |format|\n if @galeri_video.save\n format.html { redirect_to @galeri_video, notice: 'Galeri video telah berhasil dibuat.' }\... | [
{
"docid": "9125ccebf4718b1a1779af62149e5157",
"score": "0.74608463",
"text": "def create\n @video = Video.new(video_params)\n\n if @video.save\n render json: @video, status: :created, location: @video\n else\n render json: @video.errors, status: :unprocessable_entity\n end\n end"... |
98a2a8c5dcb8c931fb2ae46cfe06f24e | Retrieve current killbill server time based on a time zone. if no time zone is provided it will return UTC. if the killbill server is not reachable it will return the time of the Kaui server The arguments are: +time_zone+:: The time zone of the current time to return. +options+:: A hash that contains credentials needed... | [
{
"docid": "51d1bc7ad23e3e4d44755405274d5323",
"score": "0.81604975",
"text": "def current_time(time_zone = nil, options = nil)\n current_utc_time = nil\n begin\n # fetch time from killbill server\n clock = Kaui::Admin.get_clock(time_zone, options || Kaui.current_tenant_user_opti... | [
{
"docid": "dd66de9bdf2fa8f162c4d9f740925d41",
"score": "0.67104506",
"text": "def get_time_zone\n method = \"getTimeZone\"\n post_request(method)\n end",
"title": ""
},
{
"docid": "dd66de9bdf2fa8f162c4d9f740925d41",
"score": "0.67104506",
"text": "def get_time_zone\n metho... |
2f481977e0bded5a2d1700945b5a2187 | count of the number of teams (for a division) on this registration | [
{
"docid": "38fdf599393b68bf1f5000bf6457169f",
"score": "0.81948024",
"text": "def team_count(division)\n total = 0\n teams.each do |team|\n total = total + 1 if !team.division.nil? and team.division.name == division\n end\n total\n end",
"title": ""
}
] | [
{
"docid": "0ea88db810297e3bec9ca3a814e5b35e",
"score": "0.8193624",
"text": "def num_regional_teams\n num_teams = 0\n regional_division = Division.find_by_name('Regional Teams')\n self.team_registrations.each do |team_registration|\n team_registration.teams.each do |team|\n if team... |
89356d6db97a2b83fb75de77914fe145 | Public: Produce a randomized sentence based on the words that have been heard. options Hash of options. At least one is required. :words (Integer) the number of words to be generated. :max_chars (Integer) the maximum number of characters to be generated. Returns a string. | [
{
"docid": "60683667a84bbfd3154e5ea52edd2592",
"score": "0.8262287",
"text": "def spit(options = {})\n if @words_table.words.empty?\n raise StandardError, \"The generator hasn't heard anything yet\"\n end\n\n words = options[:words] && Integer(options[:words])\n max_chars = options[... | [
{
"docid": "2ef98ac81572a2f2e49c2e9eb9a11e51",
"score": "0.720477",
"text": "def any_sentence(options = {})\n min = 11\n max = 21\n\n if options[:max]\n min = 1\n max = options[:max]\n elsif options[:min]\n min = options[:min]\n max = min +... |
b189febd39b9f54f55a8910d860e1732 | Checks if the voting has already started, or if it has already ended | [
{
"docid": "26da37ef1ae6d30399a470ecce3a456e",
"score": "0.5890215",
"text": "def voting_open_or_close(program)\n return if program.voting_period?\n if program.voting_start_date > Time.current\n return 'Voting period has not started yet!'\n else # voting_end_date > Date.today because votin... | [
{
"docid": "f9996b2fd99405dd4efbdd491086da95",
"score": "0.67085415",
"text": "def show_voting?\n return true unless blind_voting\n\n Time.current > voting_end_date\n end",
"title": ""
},
{
"docid": "c25ce2e3e54167ded2d8485cf2ee21a8",
"score": "0.6554142",
"text": "def betting... |
56a5757eb6855510f158fb1041f55c1e | GET /category_questions/new GET /category_questions/new.xml | [
{
"docid": "56e01ec2bde95a03fb548e97d2a055a0",
"score": "0.77134013",
"text": "def new\r\n @category_question = CategoryQuestion.new\r\n\r\n respond_to do |format|\r\n format.html # new.html.erb\r\n format.xml { render :xml => @category_question }\r\n end\r\n end",
"title": ""
... | [
{
"docid": "8929daacdd8764c37c15c8376ba78f66",
"score": "0.77459306",
"text": "def new\n @question_category = QuestionCategory.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @question_category }\n end\n end",
"title": ""
},
{
"d... |
0c3d197228967da2db966422a5488d33 | Check how many customers are going to watch a certain film | [
{
"docid": "c7b0af731d4ecfb381f89e79da669ab0",
"score": "0.6237919",
"text": "def count_customers\n return customers().length\n end",
"title": ""
}
] | [
{
"docid": "6012d5c6e9adfc78491df8f0b629227a",
"score": "0.77947557",
"text": "def count_of_customers_watching_film()\n sql = \"SELECT COUNT(*) FROM customers INNER JOIN tickets ON customers.id = tickets.cust_id WHERE tickets.film_id = $1\"\n # sql = \"SELECT COUNT(*) FROM tickets where film_id = ... |
3992007c43b58ce020c8dd478c34ad6c | hack id nil when Document.new | [
{
"docid": "83aebd233ef91bd3f1a44ce2d683fe94",
"score": "0.0",
"text": "def identify\n Identity.new(self).create\n nil\n end",
"title": ""
}
] | [
{
"docid": "e0c870320d85ae5d5cd3a022d7d8eee0",
"score": "0.74484",
"text": "def ensure_id\n self[:_id] = ( id ? escape_doc_id : database.server.next_uuid )\n end",
"title": ""
},
{
"docid": "3ad22d31e2c2ebe24e4d5b5e345b38ec",
"score": "0.7430775",
"text": "def ensure_id\n ... |
eff3699b633bb949e9d44bceef0fed63 | Create a load balancer rule Create a load balancer rule. | [
{
"docid": "2fafe7130299293f4c8bc5698413f2dc",
"score": "0.6670695",
"text": "def create_load_balancer_rule_with_http_info(lb_rule, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: ServicesApi.create_load_balancer_rule ...\"\n end\n # ve... | [
{
"docid": "18bfc346315376f1e93bbf241889f24a",
"score": "0.77243435",
"text": "def create_load_balancer_rule(name, publicip, private_port, public_port, options = {})\n params = {\n 'command' => 'createLoadBalancerRule',\n 'name' => name,\n 'privateport' => private_port,\n... |
50d1a601a736a2edf7f6ddf9ac6a8d87 | Send mail Author: Puneet Date: 09/12/2018 Reviewed By: | [
{
"docid": "285d8987196b82884dc68f3598757d57",
"score": "0.0",
"text": "def notify_devs\n ApplicationMailer.notify(\n data: @failed_logs,\n body: {manager_id: @manager_id},\n subject: 'Exception in PostTestEconomySetupJob'\n ).deliver if @failed_logs.present?\n end",
"tit... | [
{
"docid": "6bac081401ac0a08cbcdf655f3ba5cf4",
"score": "0.74046797",
"text": "def admin_review_email(user, content, business, rating)\n @user = user\n @content = content\n @business = business\n @rating = rating\n mail(:to => \"consigndotnyc@gmail.com\", :subject => \"New Review on CONSI... |
beb7d847501f2aac388a8729003efd05 | Executes the build process. | [
{
"docid": "41e6a1d89170dc92d1ccd1be6767ca5a",
"score": "0.59027165",
"text": "def run\n run_build_tasks before_tasks, basic_tasks, after_tasks\n end",
"title": ""
}
] | [
{
"docid": "3aa5375316ecce2570ce31e6debb8f5c",
"score": "0.7733201",
"text": "def build\n if phase.has_key?('build')\n execute(\"build\", phase['build'])\n end\n end",
"title": ""
},
{
"docid": "f5f806bfbcf22ee3911e0e7fa579d7a2",
"score": "0.7546574",
"text": "def build\n... |
e5e0ef3002dd19ad68f6a5740678c565 | Force the user to be have an SSO session open. | [
{
"docid": "594ff6647e3f70cac27af0891423d773",
"score": "0.0",
"text": "def current_user_required\n\t\t# Have to add \".filter(self)\" when not in before_filter line.\n\t\tCASClient::Frameworks::Rails::Filter.filter(self)\n\tend",
"title": ""
}
] | [
{
"docid": "946ef5a4977e50a7be047900a7299022",
"score": "0.6908167",
"text": "def force_sso_user\n if ! current_user\n session[:original_request] = request.fullpath\n redirect_to login_path and return \n end\n end",
"title": ""
},
{
"docid": "933da5abb48e213e3734e73a7bdfa934... |
da50c4341acbed54f44e453a0696bedf | Constructs a new Configuration instance. Merges passed in options hash, sets instance variables. | [
{
"docid": "a8ab8cdede5813c0e9812f3c72c94d1a",
"score": "0.0",
"text": "def initialize(*attrs)\n options = attrs.empty? ? {} : attrs.first\n options = self.class.defaults.merge(options)\n set_instance_variables options\n end",
"title": ""
}
] | [
{
"docid": "9c096c584b832adad8c1194c5283aa31",
"score": "0.76791835",
"text": "def initialize(options = {})\n application_configuration.merge!(options)\n configuration_options.each do |key|\n send(\"#{key}=\", application_configuration[key])\n end\n end",
"title": ""
},
... |
79fe6f7ae59e3b87564c61de77a8a944 | starting page for filtering distance | [
{
"docid": "6f9b27b873f578977a9841c17db717c3",
"score": "0.0",
"text": "def index\n neighborhood_ids = Journey.within_acceptable_duration(@user.neighborhood_id, @user.commute_time).map(&:neighborhood_b_id)\n neighborhood_ids += Journey.within_acceptable_duration_reverse(@user.neighborhood_id, @use... | [
{
"docid": "33fd8a11f97aa30eee713a282f8d9202",
"score": "0.6196235",
"text": "def begin; pager.offset page; end",
"title": ""
},
{
"docid": "4d9d7dba5418918e33cc1e1198e4ecda",
"score": "0.611704",
"text": "def start_index(page)\n (page - 1) * @count + 1\n end",
"title": ""
... |
d32e745bb69b3c9bc84cc2f55d22fccd | this is read only | [
{
"docid": "3caaf5a4ae9e3b195d1fe193fad50c90",
"score": "0.0",
"text": "def initialize(name, experience, side)\n @name = name\n @experience = experience\n @side = side\n @earnings = 0\n @quota = 0\n end",
"title": ""
}
] | [
{
"docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1",
"score": "0.7921233",
"text": "def private; end",
"title": ""
},
{
"docid": "11d8ce3a9ea099e7fdb8cf1548acb6c1",
"score": "0.67942196",
"text": "def read_only?; end",
"title": ""
},
{
"docid": "11d8ce3a9ea099e7fdb8cf1548acb6c1... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "c3272f3d10c46dbac25983893910e61c",
"score": "0.0",
"text": "def album_params\n params.require(:album).permit(:name, :description, :release_date, :artist_id)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7943618",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "f6060519cb0c56a439976f0c978690db",
"score": "0.69572574",
"text": "def permitted_params\n params.permit!\n end",
"title"... |
0dc15faaed6cde4753e73b6cf7810477 | Condizione oro totale guadagnato | [
{
"docid": "116ccbd763d0b50d75c1aef4d4bdcce5",
"score": "0.0",
"text": "def total_gold_condition\n $game_party.total_gold\n end",
"title": ""
}
] | [
{
"docid": "964fb252f8ab06e9ce4602e2a5a0ae71",
"score": "0.6963965",
"text": "def mentu_fu\n point = menzen_kotu.sum { |kotu| apply_multipliers(kotu, 4) } +\n (furou - menzen_kotu).sum { |group| apply_multipliers(group, 2) }\n return unless point > 0\n @subtotals[\"面子\"] = point\n end",
... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "30869e1f76991c8ab8411b9cc1ff12dd",
"score": "0.0",
"text": "def academic_level_params\n params.require(:academic_level).permit(:description)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7493595",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6954758",
"text": "def strong_params\n params.require(:request).permit(param_white... |
c2350108c1b0d888db1f63034445b308 | define what happens when the measure is run | [
{
"docid": "88b1f49af1f312598db6f442a03c4552",
"score": "0.0",
"text": "def run(model, runner, user_arguments)\n super(model, runner, user_arguments)\n\n # use the built-in error checking\n if !runner.validateUserArguments(arguments(model), user_arguments)\n return false\n end\n\n co... | [
{
"docid": "99ab945a1927e84fe17934e1440b9eb0",
"score": "0.7556993",
"text": "def measure(&block); @measure = block; end",
"title": ""
},
{
"docid": "98be183bacea0b93f865dcb476b3ac9c",
"score": "0.71152234",
"text": "def measure(&block)\n @measure = block\n end",
"title": ""
... |
599df196d8a465c9fc22a7c32b61f71e | Create a simple directory environment and puppet.conf at :tmpdir. | [
{
"docid": "7cee222585b21ea58a570889d454a345",
"score": "0.7063996",
"text": "def generate_base_directory_environments(tmpdir)\n puppet_conf = \"#{tmpdir}/puppet2.conf\"\n dir_envs = \"#{tmpdir}/environments\"\n\n step 'Configure a the direnv directory environment'\n apply_ma... | [
{
"docid": "32eccff0f47bdfea82a2fa91fd403f3d",
"score": "0.74212456",
"text": "def create_temp_dir_env(master, env_root_path, env_seed_name, manifest)\n env_name = \"#{env_seed_name}\" + rand(36**16).to_s(36)\n env_path = \"#{env_root_path}/#{env_name}\"\n env_site_pp_path = \"#{env_path}/manifests/s... |
b6c9065c5297539545da93c362b1a287 | DELETE /regions/1 DELETE /regions/1.json | [
{
"docid": "e373cfb8a61959fbe1e94fb748914119",
"score": "0.7364275",
"text": "def destroy\n @region.destroy\n respond_to do |format|\n format.html { redirect_to regions_url, notice: 'Region was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title": "... | [
{
"docid": "552d00bdbdba8a17fdd1a2bf6778ae2d",
"score": "0.773538",
"text": "def destroy\n @region.destroy\n\n respond_to do |format|\n format.html { redirect_to regions_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "a2b79c99487da3add175... |
4f3d011a37a0ebd99bae5289d2b47bd1 | move as much of this as possible to core.js | [
{
"docid": "23a9217fe7a0f8bbc53b891f441200d1",
"score": "0.0",
"text": "def ft_init(options={})\r\n unless @already_initialized\r\n concat \"<script type=\\\"text/javascript\\\">\\n\" << \r\n \"//<![CDATA[\\n\" <<\r\n \"FT.init({\"\r\n # options go here\r\n conc... | [
{
"docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1",
"score": "0.679926",
"text": "def private; end",
"title": ""
},
{
"docid": "2dbabd0eeb642c38aad852e40fc6aca7",
"score": "0.641269",
"text": "def operations; end",
"title": ""
},
{
"docid": "2dbabd0eeb642c38aad852e40fc6aca7",
... |
3fdd365043ae72b9f9732c9e732d39f5 | trajectory : rotation keep camera's position just rotate it | [
{
"docid": "75774d75960f04ffb61481d3ab5be3f0",
"score": "0.6751119",
"text": "def rotate(eye, target, up, params, ind)\n # get direction, velocity, and current time\n v = params[\"velocity\"] / 180.0 * Math::PI\n t = ind.to_f / FRAMERATE\n # calculate new up direction of camera by ro... | [
{
"docid": "485bd3b586b46fd474505a79f42944a3",
"score": "0.7033512",
"text": "def transform(rotation)\n end",
"title": ""
},
{
"docid": "df32c6776c53be9881de5ebbd59be53f",
"score": "0.6910227",
"text": "def rotation(theta) ; ; end",
"title": ""
},
{
"docid": "a95446892... |
1198a3a0fe575066c30b999c7f73b625 | Create a tomcat object. | [
{
"docid": "e0d6b359c20b697cae521eb56439bfe4",
"score": "0.48237038",
"text": "def initialize(*arguments) \n super()\n if(Model::TARGETHOST == Model::CLIENTHOST)\n @runner = System.new(File.join(ZIMBRAPATH,'bin','tomcat'), ZIMBRAUSER, *arguments)\n else \n @runner = StafSyst... | [
{
"docid": "d5c2cdfeef2c4cb27cbb4ecfe5c99c75",
"score": "0.5650233",
"text": "def override_tomcat?; false; end",
"title": ""
},
{
"docid": "299aa912252773e37daed8882ed29f9c",
"score": "0.55627155",
"text": "def initialize(tomcat, *app_holders)\n app_holders.map! do |app_holder... |
f370fa66cf1abcf7450c499f111dfb6b | feature types are added to the annotation list; if they are not present in the user's list they are added | [
{
"docid": "04ce91f52f1c308b3ffefbf98c789d7e",
"score": "0.66805005",
"text": "def create_feature_types\n ft_names = GTServer.gff3_feature_types(File.expand_path(gff3_data_storage))\n ft_names.each do |ft_name|\n ft = user.configuration.feature_types.find_by_name(ft_name)\n unless ft\n ... | [
{
"docid": "ea5879655a60f234eb855eb3e48223de",
"score": "0.68870395",
"text": "def added_skill_types\n features_set(FEATURE_STYPE_ADD)\n end",
"title": ""
},
{
"docid": "7500741d700b2363f63a1d17a8de2fb7",
"score": "0.66663605",
"text": "def create_feature_types\n ft_names = GT... |
5853aad935d6442b0d41c1ce2dc00f90 | Insert as an html string | [
{
"docid": "9cc3a5643b5424edf5a87b744c8b9d99",
"score": "0.0",
"text": "def to_s\n tracks_html = @tracks.inject('') do |html, track|\n html += track.to_s\n end\n Template % [@album_title, tracks_html]\n end",
"title": ""
}
] | [
{
"docid": "d0d05cb7c4a7bd9c49e3284afde44795",
"score": "0.67829025",
"text": "def _(data=\"\"); self.__ self.escape_html(data.to_s); end",
"title": ""
},
{
"docid": "cf3e3f44c248c90b71ec8ca648d950ec",
"score": "0.6636266",
"text": "def add_html message\n # message.gsub(/</,HTML_L... |
314e106f10d75ff797d71b22c1e3360e | returns volume virtual capacity | [
{
"docid": "987223bed66c3339153d919e63551e60",
"score": "0.6955294",
"text": "def volume_size(vol_path)\n # default values\n vol_vsize = {:size => 10, :unit => 'G'}\n vsize_regex = %r{virtual size:\\s+(?<size>\\d+(\\.\\d+))?(?<unit>.)\\s+\\((?<bytesize>\\d+)\\sbytes\\)}\n ... | [
{
"docid": "5fdc558ec3837f782beaa5875fc4a1d1",
"score": "0.7025776",
"text": "def d_size\n @diskObj.info[:capacity]\n end",
"title": ""
},
{
"docid": "eb3ac7b2e9b17ec427745606d6855b05",
"score": "0.6923435",
"text": "def capacity\n info[:capacity]\n end",
"title": ""
... |
2cd4931f3e2f88bd1ff490f377bef07f | Creates a new instance of TF2Class based on the assigned XML data | [
{
"docid": "43fd2e6da97c5fbda94397df4e812786",
"score": "0.0",
"text": "def initialize(class_data)\n @name = class_data.elements['className'].text\n @max_buildings_destroyed = class_data.elements['ibuildingsdestroyed'].text.to_i\n @max_captures = class_data.element... | [
{
"docid": "6cb16891f2b13e1b65269798ae0582c0",
"score": "0.5856749",
"text": "def create\n #parse the xml and mappings to the Circule object\n end",
"title": ""
},
{
"docid": "8c1fbf7b665a05e395b4ca2921ff6203",
"score": "0.58405364",
"text": "def from_xml\n\t\tend",
"title": ... |
b0dc6b4b259dcda22764e1caa02166af | if a number is divisible by 3 and 5, return "fizzbuzz" | [
{
"docid": "98538ff9badc142971f91e585ea7c147",
"score": "0.8462193",
"text": "def fizzbuzz(x)\n #if a number is divisible by 3, return \"fizz\"\n if x%5==0 && x%3==0 \n puts \"fizzbuzz\"\n elsif x%3==0\n puts \"fizz\"\n else x%5==0 \n puts \"buzz\"\n end \nend",
"title": ""
}
] | [
{
"docid": "ae434468e83f907ceb44541791fd6125",
"score": "0.8917807",
"text": "def fizzbuzz(number)\n if number%3==0 && !(number%5==0) # divisible by 3 only\n return \"Fizz\"\n elsif number%5==0 && !(number%3==0) # divisible by 5 only\n return \"Buzz\"\n elsif number%5==0 && number%3==0 # divisi... |
6de45e0e4bfc9dbd0afbdb1ef89390b3 | Returns the key from this tag, which should be a string with key separated from val by ':' | [
{
"docid": "83fc3be21fba4c5157060a536f2f804b",
"score": "0.0",
"text": "def value_from(tag)\n val = tag.split(/:\\s+/)[1]\n \n # Value may be surrounded by quotes in some cases. Remove these extra quotes here.\n val =~ /^\\\"(.*)\\\"$/ ? $1 : val\n end",
"title": ""
}
] | [
{
"docid": "5dd02d0dde202d2644698e30f7a0b8c7",
"score": "0.7532461",
"text": "def key\n [@namespace, @tag].compact.map(&:to_s).join(\":\")\n end",
"title": ""
},
{
"docid": "4f02188d2fa72c2cb5c37f9de854d111",
"score": "0.7509146",
"text": "def key(val)\n return... |
057bd27257a19b3f3581a1888be49c10 | Enqueues a command to read from a Buffer object to host memory using the CommandQueue ==== Attributes +buffer+ the Buffer to be read from +ptr+ the Pointer (or convertible to Pointer using to_ptr) to the memory area to use +options+ a hash containing named options ==== Options +:event_wait_list+ if provided, a list of ... | [
{
"docid": "cbe1348d4e00e0b0f3f00d7af7ee5b71",
"score": "0.69465595",
"text": "def enqueue_read_buffer( buffer, ptr, options = {} )\n return OpenCL.enqueue_read_buffer( self, buffer, ptr, options)\n end",
"title": ""
}
] | [
{
"docid": "04f31008c4b1a3023571c796c266ccf4",
"score": "0.77945644",
"text": "def enqueueReadBuffer(buffer, blocking_read, offset, size, ptr, command_queue: @command_queue, event_wait_list: nil, event: nil, error_info: nil)\n buffer = buffer.handle if buffer.kind_of? CLUMemory\n event_buf = event... |
c4c510ac3d7b6160744c4ed316505a97 | given a priority, calculate the final score to be used when adding the job to the queue zset | [
{
"docid": "fcd81c5ce98711568e354ed18093b399",
"score": "0.8016254",
"text": "def calculate_job_score(priority)\n (clean_priority(priority) * PRIORITY_MULTIPLIER) + Time.now.to_i\n end",
"title": ""
}
] | [
{
"docid": "765ebd85cebcff1f1ee31bdd1b10003f",
"score": "0.6612492",
"text": "def priority\n self_score = ( self.type.to_s =~ /Trade/ ) ? 40 : 0\n self_score += ( self.type =~ /IsWaitingForApproval/ ) ? 60 : 0\n self_score += 10 if self.expires_at && self.expires_at - Time.now < 6.hours\n... |
fbe5b07b3cf719ca1d9f578fe1e1d747 | POST /apoderados POST /apoderados.json | [
{
"docid": "2ea2b5a68c6dce23480a63e323ebb8e3",
"score": "0.72953856",
"text": "def create\n @apoderado = Apoderado.new(apoderado_params)\n\n respond_to do |format|\n if @apoderado.save\n format.html { redirect_to @apoderado, notice: 'Apoderado was successfully created.' }\n form... | [
{
"docid": "67678d3b5038e6b5458a7d3bfa780fba",
"score": "0.6775224",
"text": "def create\n @apodo = Apodo.new(params[:apodo])\n\n respond_to do |format|\n if @apodo.save\n format.html { redirect_to @apodo, notice: 'Apodo was successfully created.' }\n format.json { render json: ... |
8a5d568c725b9d3bcfbdebdb9b9a2a6c | End of artist function | [
{
"docid": "e0c46e98be450e459af717f5e75875af",
"score": "0.0",
"text": "def song_line\n return @song_line\n end",
"title": ""
}
] | [
{
"docid": "281e9a43f3408650bd69047a8fabab55",
"score": "0.66865665",
"text": "def end; end",
"title": ""
},
{
"docid": "281e9a43f3408650bd69047a8fabab55",
"score": "0.66865665",
"text": "def end; end",
"title": ""
},
{
"docid": "281e9a43f3408650bd69047a8fabab55",
"sc... |