query
stringlengths
7
6.41k
document
stringlengths
12
28.8k
metadata
dict
negatives
listlengths
30
30
negative_scores
listlengths
30
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
DELETE /tipo_actividads/1 DELETE /tipo_actividads/1.json
def destroy @tipo_actividad.destroy respond_to do |format| format.html { redirect_to tipo_actividads_url, notice: 'Tipo actividad se elimino correctamente.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @tipo_actividad = TipoActividad.find(params[:id])\n @tipo_actividad.destroy\n\n respond_to do |format|\n format.html { redirect_to tipo_actividads_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @actividad = Actividad.find(params[:id])\n @actividad...
[ "0.76893437", "0.7383738", "0.72604406", "0.71526295", "0.7123539", "0.7116351", "0.7107664", "0.708317", "0.7082692", "0.7078241", "0.7053908", "0.6991266", "0.69856894", "0.6976074", "0.6941976", "0.6931941", "0.6929264", "0.69285107", "0.69122094", "0.69119054", "0.6911905...
0.7429858
1
POST /informacoes_ged POST /informacoes_ged.json
def create @informacao_ged = InformacaoGed.new(informacao_ged_params) respond_to do |format| if @informacao_ged.save format.html { redirect_to @informacao_ged, notice: 'Informação sobre o GED criada com sucesso.' } format.json { render action: 'show', status: :created, location: @informac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def informacao_ged_params\n params.require(:informacao_ged).permit(:orgao_id, :processo_digitalizacao, :numero_digitalizacao, :documentos_indexados, :hospedado_sepog)\n end", "def create\n @iglesia = Iglesia.new(iglesia_params)\n\n respond_to do |format|\n if @iglesia.save\n format.html...
[ "0.61919296", "0.5664271", "0.5592055", "0.55362755", "0.54687685", "0.5461491", "0.5444696", "0.5438037", "0.5422431", "0.5421057", "0.53874725", "0.5376109", "0.5353349", "0.5352899", "0.53444093", "0.53421116", "0.5342051", "0.5331872", "0.5320823", "0.5291916", "0.5288176...
0.6628796
0
PATCH/PUT /informacoes_ged/1 PATCH/PUT /informacoes_ged/1.json
def update respond_to do |format| if @informacao_ged.update(informacao_ged_params) format.html { redirect_to @informacao_ged, notice: 'Informação sobre o GED atualizada com sucesso.' } format.json { head :no_content } else format.html { render action: 'edit' } format.json...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n respond_to do |format|\n if @iglesia.update(iglesia_params)\n format.html { redirect_to @iglesia, notice: 'La iglesia #{@iglesia.nombre} ha sido actualizada.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { re...
[ "0.6117247", "0.61013395", "0.6085796", "0.6083696", "0.60835725", "0.6041479", "0.60056084", "0.60016745", "0.5988916", "0.598638", "0.5985714", "0.5942156", "0.59323734", "0.5915774", "0.59122556", "0.5898158", "0.5880322", "0.58672965", "0.58635664", "0.5850036", "0.583121...
0.65446734
0
DELETE /informacoes_ged/1 DELETE /informacoes_ged/1.json
def destroy @informacao_ged.destroy respond_to do |format| format.html { redirect_to informacoes_ged_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete(path)\n path = relativize_path path\n\n Precog.connect self do |http|\n uri = Addressable::URI.new\n uri.query_values = { :apiKey => api_key }\n\n http.delete \"/ingest/v#{VERSION}/fs/#{path}?#{uri.query}\"\n end\n end", "def delete\n client.delete(\"/#{id}\...
[ "0.6847203", "0.6821208", "0.679435", "0.67873424", "0.6773591", "0.6754265", "0.6725233", "0.6665187", "0.66379046", "0.663154", "0.663154", "0.663154", "0.663154", "0.6624666", "0.65945697", "0.65843564", "0.657652", "0.655621", "0.65480536", "0.65317947", "0.6528203", "0...
0.70700896
0
GET /status_de_la_inscripcions GET /status_de_la_inscripcions.json
def index @status_de_la_inscripcions = StatusDeLaInscripcion.all respond_to do |format| format.html # index.html.erb format.json { render json: @status_de_la_inscripcions } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @status_de_la_notificacions = StatusDeLaNotificacion.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @status_de_la_notificacions }\n end\n end", "def index\n @status_ref_pago_inscs = StatusRefPagoInsc.all\n\n respond_to do |format|\...
[ "0.6817553", "0.6750615", "0.6737539", "0.6696948", "0.6389955", "0.6274525", "0.62664276", "0.62091666", "0.6182181", "0.618101", "0.6176908", "0.6150047", "0.6121304", "0.61050725", "0.61016417", "0.60100645", "0.60027856", "0.5997084", "0.597072", "0.5937746", "0.592776", ...
0.7461563
0
GET /status_de_la_inscripcions/1 GET /status_de_la_inscripcions/1.json
def show @status_de_la_inscripcion = StatusDeLaInscripcion.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @status_de_la_inscripcion } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @status_de_la_inscripcions = StatusDeLaInscripcion.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @status_de_la_inscripcions }\n end\n end", "def index\n @status_de_la_notificacions = StatusDeLaNotificacion.all\n\n respond_to do |f...
[ "0.73690134", "0.6739656", "0.66322225", "0.65064174", "0.6447876", "0.6446406", "0.63924336", "0.63177633", "0.63115704", "0.6276682", "0.62350416", "0.6232295", "0.6220298", "0.62199974", "0.62154335", "0.6141549", "0.61362237", "0.6094502", "0.60912776", "0.6070321", "0.60...
0.7122019
1
GET /status_de_la_inscripcions/new GET /status_de_la_inscripcions/new.json
def new @status_de_la_inscripcion = StatusDeLaInscripcion.new respond_to do |format| format.html # new.html.erb format.json { render json: @status_de_la_inscripcion } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @status_de_la_notificacion = StatusDeLaNotificacion.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @status_de_la_notificacion }\n end\n end", "def new\n @new_status = NewStatus.new\n\n respond_to do |format|\n format.html # new.ht...
[ "0.740104", "0.73748904", "0.69888073", "0.6972228", "0.69482505", "0.6943155", "0.6906172", "0.6898177", "0.6893697", "0.68728787", "0.6843964", "0.6828469", "0.6769151", "0.6768448", "0.6748386", "0.6746288", "0.6740954", "0.6739909", "0.6729575", "0.67295265", "0.67252254"...
0.7762496
0
POST /status_de_la_inscripcions POST /status_de_la_inscripcions.json
def create @status_de_la_inscripcion = StatusDeLaInscripcion.new(params[:status_de_la_inscripcion]) respond_to do |format| if @status_de_la_inscripcion.save format.html { redirect_to @status_de_la_inscripcion, notice: 'Status de la inscripcion was successfully created.' } format.json { re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @inscripcion = Inscripcion.new(inscripcion_params)\n\n respond_to do |format|\n if @inscripcion.save\n format.html { redirect_to @inscripcion, notice: 'Inscripcion was successfully created.' }\n format.json { render :show, status: :created, location: @inscripcion }\n else...
[ "0.6513466", "0.6204412", "0.6174564", "0.6056668", "0.5968436", "0.5911479", "0.58587986", "0.58019316", "0.57594216", "0.5749314", "0.5697092", "0.56924576", "0.56914103", "0.5672923", "0.56533813", "0.56482595", "0.56437844", "0.5611982", "0.55920184", "0.55852854", "0.558...
0.6544218
0
PUT /status_de_la_inscripcions/1 PUT /status_de_la_inscripcions/1.json
def update @status_de_la_inscripcion = StatusDeLaInscripcion.find(params[:id]) respond_to do |format| if @status_de_la_inscripcion.update_attributes(params[:status_de_la_inscripcion]) format.html { redirect_to @status_de_la_inscripcion, notice: 'Status de la inscripcion was successfully updated.'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def suscribe\n @estate = Estate.find(params[:id])\n @estate.update_attribute(:status, true)\n respond_to do |format|\n format.html { redirect_to estates_url, notice: 'Propiedad publicada exitosamente.' }\n format.json { head :no_content }\n end\n end", "def update\n respond_to do |forma...
[ "0.6380254", "0.627651", "0.61416256", "0.61043155", "0.60850084", "0.6033485", "0.6012915", "0.6007504", "0.5993994", "0.5984675", "0.59749246", "0.594909", "0.59403986", "0.5934573", "0.59191024", "0.5898397", "0.5866879", "0.5849501", "0.5835973", "0.58139676", "0.5787276"...
0.66473645
0
SHOW / HIDE FORM Hides the Use of Collections Information form
def hide_uoc_info_form logger.info 'Hiding the Use of Collections Info form' wait_for_element_and_click form_show_hide_button('Use of Collections Information') end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hide_uoc_info_form\n wait_for_element_and_click form_show_hide_button('Use of Collections Information')\n end", "def show_uoc_info_form\n logger.info 'Showing the Use of Collections Info form'\n wait_for_element_and_click form_show_hide_button('Use of Collections Information')\n end", "def show_...
[ "0.7118138", "0.67549753", "0.64603233", "0.61388296", "0.60713583", "0.60540086", "0.596597", "0.596597", "0.5956695", "0.59062546", "0.5876109", "0.5767108", "0.5704933", "0.56766367", "0.56766367", "0.5676521", "0.5676521", "0.56571317", "0.5640662", "0.5640662", "0.563819...
0.7515609
0
REFERENCE NUMBER Selects the next autogenerated reference number and inserts it into the test data set
def select_auto_reference_nbr(test_data) hide_notifications_bar ref_nbr = select_id_generator_option(reference_nbr_input, reference_nbr_options) logger.info "Selected auto-generated reference number '#{ref_nbr}'" test_data.merge!({CoreUseOfCollectionsData::REFERENCE_NBR.name => ref_nbr}) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def select_auto_reference_nbr(test_data)\n hide_notifications_bar\n ref_nbr = select_id_generator_option(reference_nbr_input, reference_nbr_options)\n test_data.merge!({ UseOfCollections::REFERENCE_NBR.name => ref_nbr})\n end", "def enter_reference_nbr(test_data)\n hide_notifications_bar\n logger...
[ "0.73228556", "0.6703032", "0.642455", "0.6364688", "0.6173592", "0.6141458", "0.60801643", "0.58830035", "0.5871635", "0.5862146", "0.58420545", "0.58301", "0.57963765", "0.57961184", "0.57651025", "0.57562673", "0.57513845", "0.5722359", "0.56142944", "0.5597772", "0.557936...
0.731959
1
Verifies that the reference number matches test data
def verify_reference_nbr(test_data) verify_values_match(test_data[CoreUseOfCollectionsData::REFERENCE_NBR.name], element_value(reference_nbr_input)) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_reference_nbr(test_data)\n verify_values_match(test_data[UseOfCollections::REFERENCE_NBR.name], element_value(reference_nbr_input))\n end", "def test_verify_data_positions\n result = verify_data_positions(@warehouse_data)\n assert_equal(true,result)\nend", "def check_solution(test_number, argu...
[ "0.8212068", "0.6081907", "0.6033673", "0.597357", "0.5970292", "0.59285074", "0.5892478", "0.58428234", "0.5833653", "0.58187497", "0.58135235", "0.5802544", "0.5802495", "0.58012086", "0.5772549", "0.57659805", "0.5756517", "0.5742261", "0.57177", "0.5711213", "0.56960005",...
0.8157735
1
PROJECT ID Selects the autogenerated project ID and returns it. If a test data set is given, inserts the ID.
def select_auto_project_id(test_data=nil) hide_notifications_bar id = select_id_generator_option(project_id_input, project_id_options) logger.info "Selected auto-generated project ID '#{id}'" test_data.merge!({CoreUseOfCollectionsData::PROJECT_ID.name => id}) if test_data id end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def select_auto_project_id(test_data=nil)\n hide_notifications_bar\n id = select_id_generator_option(project_id_input, project_id_options)\n test_data.merge!({ UseOfCollections::PROJECT_ID.name => id}) if test_data\n id\n end", "def project_id=(value)\n @project_id = value\n ...
[ "0.79203147", "0.7268741", "0.71865326", "0.71851313", "0.7110384", "0.70827234", "0.70095074", "0.6907711", "0.6833138", "0.68052846", "0.6702941", "0.66431975", "0.6634928", "0.6634928", "0.6634928", "0.6630542", "0.6628057", "0.6624162", "0.6620479", "0.66204554", "0.66098...
0.78171176
1
Enters a project ID per a given set of test data
def select_project_id(test_data) hide_notifications_bar logger.info "Entering project ID '#{test_data[CoreUseOfCollectionsData::PROJECT_ID.name]}'" wait_for_options_and_select(project_id_input, project_id_options, test_data[CoreUseOfCollectionsData::PROJECT_ID.name]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def select_auto_project_id(test_data=nil)\n hide_notifications_bar\n id = select_id_generator_option(project_id_input, project_id_options)\n test_data.merge!({ UseOfCollections::PROJECT_ID.name => id}) if test_data\n id\n end", "def select_project_id(test_data)\n hide_notifications_bar\n wait_...
[ "0.70523965", "0.6975713", "0.68460196", "0.6595247", "0.6561248", "0.636094", "0.63221335", "0.60930926", "0.6076015", "0.6063935", "0.6032345", "0.5850612", "0.5850452", "0.5807385", "0.58002424", "0.57622015", "0.5726558", "0.57243687", "0.56805694", "0.5672121", "0.565653...
0.7086459
0
Verifies a project ID matches test data
def verify_project_id(test_data) verify_values_match(test_data[CoreUseOfCollectionsData::PROJECT_ID.name], element_value(project_id_input)) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_project_id(test_data)\n verify_values_match(test_data[UseOfCollections::PROJECT_ID.name], element_value(project_id_input))\n end", "def verify_project_desc(test_data)\n verify_values_match(test_data[CoreUseOfCollectionsData::PROJECT_DESC.name], element_value(project_desc_text_area))\n end", ...
[ "0.82428104", "0.606331", "0.6037059", "0.600743", "0.5998955", "0.58873504", "0.58233535", "0.58202916", "0.5815638", "0.5767355", "0.5765058", "0.5727829", "0.57093954", "0.57072514", "0.5702081", "0.5693344", "0.56857747", "0.56680983", "0.5664844", "0.56332624", "0.562270...
0.824223
1
METHODS Selects or removes UoC methods per a given set of test data
def select_methods(test_data) test_methods = test_data[CoreUseOfCollectionsData::METHOD_LIST.name] hide_notifications_bar test_methods = [{CoreUseOfCollectionsData::METHOD.name => ''}] unless test_methods prep_fieldsets_for_test_data([fieldset(CoreUseOfCollectionsData::METHOD_LIST.name)], test_methods) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def select_methods(test_data)\n test_methods = test_data[UseOfCollections::METHOD_LIST.name]\n test_methods = [{ UseOfCollections::METHOD.name => ''}] unless test_methods\n prep_fieldsets_for_test_data([fieldset(UseOfCollections::METHOD_LIST.name)], test_methods)\n\n test_methods.each_with_index do |me...
[ "0.70495033", "0.5854722", "0.58523846", "0.54527867", "0.5427867", "0.53290844", "0.5313165", "0.52532786", "0.5209976", "0.52067477", "0.5191136", "0.5143307", "0.51115346", "0.50907755", "0.50867933", "0.5065239", "0.50629497", "0.5032853", "0.5029713", "0.50059325", "0.50...
0.7028503
1
Verifies that the methods match test data
def verify_methods(test_data) test_methods = test_data[CoreUseOfCollectionsData::METHOD_LIST.name] test_methods = [{CoreUseOfCollectionsData::METHOD.name => ''}] unless test_methods test_methods.each_with_index { |test_method, index| verify_values_match(test_method[CoreUseOfCollectionsData::METHOD.name], el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_methods(test_data)\n test_methods = test_data[UseOfCollections::METHOD_LIST.name]\n test_methods = [{ UseOfCollections::METHOD.name => ''}] unless test_methods\n test_methods.each_with_index { |test_method, index| verify_values_match(test_method[UseOfCollections::METHOD.name], element_value(met...
[ "0.8013722", "0.7122673", "0.7068992", "0.6806825", "0.6743819", "0.6634731", "0.66051084", "0.65887034", "0.65598166", "0.65438324", "0.65086675", "0.6503619", "0.6463923", "0.64303386", "0.64132994", "0.6397789", "0.63871634", "0.63600063", "0.63037246", "0.62977415", "0.62...
0.80452883
0
COLLECTION TYPE Selects collection types per a given set of test data
def select_collection_types(test_data) types = test_data[CoreUseOfCollectionsData::COLLECTION_TYPE_LIST.name] || [{CoreUseOfCollectionsData::COLLECTION_TYPE.name => ''}] hide_notifications_bar prep_fieldsets_for_test_data([fieldset(CoreUseOfCollectionsData::COLLECTION_TYPE_LIST.name)], types) types.eac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def select_collection_types(test_data)\n types = test_data[UseOfCollections::COLLECTION_TYPE_LIST.name] || [{ UseOfCollections::COLLECTION_TYPE.name => ''}]\n prep_fieldsets_for_test_data([fieldset(UseOfCollections::COLLECTION_TYPE_LIST.name)], types)\n\n types.each_with_index do |type, index|\n wait...
[ "0.7981642", "0.73535734", "0.7240342", "0.6451149", "0.61875546", "0.6155347", "0.61327434", "0.6115007", "0.6094356", "0.5970014", "0.5865509", "0.58474404", "0.58366066", "0.5832844", "0.573668", "0.57352275", "0.57003826", "0.57003826", "0.56800413", "0.5589772", "0.55513...
0.7683633
1
Verifies collection types match test data
def verify_collection_types(test_data) types = test_data[CoreUseOfCollectionsData::COLLECTION_TYPE_LIST.name] || [{CoreUseOfCollectionsData::COLLECTION_TYPE.name => ''}] types.each_with_index { |type, index| verify_values_match(type[CoreUseOfCollectionsData::COLLECTION_TYPE.name], element_value(collection_type_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_collection_types(test_data)\n types = test_data[UseOfCollections::COLLECTION_TYPE_LIST.name] || [{ UseOfCollections::COLLECTION_TYPE.name => ''}]\n types.each_with_index { |type, index| verify_values_match(type[UseOfCollections::COLLECTION_TYPE.name], element_value(collection_type_input index)) }\...
[ "0.8485936", "0.72509843", "0.7112232", "0.69382584", "0.6560072", "0.6537137", "0.62807506", "0.62482685", "0.62462085", "0.62047637", "0.6187995", "0.61844355", "0.61744356", "0.61450964", "0.60818154", "0.607067", "0.6007147", "0.5998209", "0.59925616", "0.5934632", "0.592...
0.84081537
1
MATERIAL TYPE Selects material types per a given set of test data
def select_material_types(test_data) types = test_data[CoreUseOfCollectionsData::MATERIAL_TYPE_LIST.name] || [{CoreUseOfCollectionsData::MATERIAL_TYPE.name => ''}] hide_notifications_bar prep_fieldsets_for_test_data([fieldset(CoreUseOfCollectionsData::MATERIAL_TYPE_LIST.name)], types) types.each_with_i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def select_material_types(test_data)\n types = test_data[UseOfCollections::MATERIAL_TYPE_LIST.name] || [{ UseOfCollections::MATERIAL_TYPE.name => ''}]\n prep_fieldsets_for_test_data([fieldset(UseOfCollections::MATERIAL_TYPE_LIST.name)], types)\n\n types.each_with_index do |type, index|\n wait_for_opt...
[ "0.80065763", "0.7580582", "0.7498252", "0.6767219", "0.6767219", "0.658974", "0.6354749", "0.6354749", "0.6114087", "0.6076884", "0.60666686", "0.60666686", "0.601766", "0.5950648", "0.5894276", "0.5893818", "0.58537537", "0.58061254", "0.5797567", "0.579412", "0.5750425", ...
0.791595
1
Verifies material types match test data
def verify_material_types(test_data) types = test_data[CoreUseOfCollectionsData::MATERIAL_TYPE_LIST.name] || [{CoreUseOfCollectionsData::MATERIAL_TYPE.name => ''}] types.each_with_index { |type, index| verify_values_match(type[CoreUseOfCollectionsData::MATERIAL_TYPE.name], element_value(material_type_input inde...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_material_types(test_data)\n types = test_data[UseOfCollections::MATERIAL_TYPE_LIST.name] || [{ UseOfCollections::MATERIAL_TYPE.name => ''}]\n types.each_with_index { |type, index| verify_values_match(type[UseOfCollections::MATERIAL_TYPE.name], element_value(material_type_input index)) }\n end", ...
[ "0.83487576", "0.70979154", "0.6338917", "0.62564254", "0.60257024", "0.598183", "0.59112257", "0.5895662", "0.5881709", "0.5857173", "0.5820585", "0.58130556", "0.58076584", "0.57677066", "0.57661945", "0.5734019", "0.5653002", "0.5621054", "0.5612898", "0.55921984", "0.5586...
0.8319044
1
USERS Enters users data per a given set of test data
def enter_users(test_data) users = test_data[CoreUseOfCollectionsData::USER_GRP.name] || [CoreUseOfCollectionsData.empty_user] hide_notifications_bar prep_fieldsets_for_test_data([fieldset(CoreUseOfCollectionsData::USER_GRP.name)], users) users.each_with_index do |user, index| logger.info "Enteri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def enter_users(test_data)\n users = test_data[UseOfCollections::USER_GRP.name] || [UseOfCollections.empty_user]\n prep_fieldsets_for_test_data([fieldset(UseOfCollections::USER_GRP.name)], users)\n\n users.each_with_index do |user, index|\n enter_auto_complete(user_name_input(index), user_name_option...
[ "0.67769736", "0.66842794", "0.6639067", "0.6607368", "0.6545218", "0.65018505", "0.6457336", "0.6306099", "0.62721264", "0.6192115", "0.6191121", "0.6189597", "0.6107406", "0.610279", "0.60416794", "0.6029497", "0.60209984", "0.6008897", "0.5998435", "0.59935635", "0.5970462...
0.70134825
0
Verifies that the users data matches test data
def verify_users(test_data) users = test_data[CoreUseOfCollectionsData::USER_GRP.name] || [CoreUseOfCollectionsData.empty_user] users.each_with_index do |user, index| verify_values_match(user[CoreUseOfCollectionsData::USER.name], element_value(user_name_input index)) verify_values_match(user[CoreUse...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_users(test_data)\n users = test_data[UseOfCollections::USER_GRP.name] || [UseOfCollections.empty_user]\n users.each_with_index do |user, index|\n verify_values_match(user[UseOfCollections::USER.name], element_value(user_name_input index))\n verify_values_match(user[UseOfCollections::USER...
[ "0.7462034", "0.6795422", "0.6402874", "0.6344402", "0.6316823", "0.61643094", "0.6157272", "0.61483634", "0.61266863", "0.6124156", "0.6095644", "0.6052236", "0.6044671", "0.6033212", "0.6024998", "0.59950775", "0.5969058", "0.5906203", "0.58998317", "0.58980805", "0.5854002...
0.740942
1
Verifies that the title matches test data
def verify_title(test_data) verify_values_match(test_data[CoreUseOfCollectionsData::TITLE.name], element_value(title_input)) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_title(test_data)\n verify_values_match(test_data[UseOfCollections::TITLE.name], element_value(title_input))\n end", "def assert_title(title)\n assert_seen title, :within => \"head title\"\n end", "def title_check\n \n\n if self.title\n \n if !self.title.include? \"Bel...
[ "0.8420171", "0.6995966", "0.6959363", "0.69580567", "0.69216394", "0.68472767", "0.6770389", "0.6705961", "0.66408145", "0.6490771", "0.6489154", "0.6463696", "0.64600486", "0.6415759", "0.6334921", "0.6272647", "0.62379944", "0.6235383", "0.6148467", "0.6126681", "0.6126098...
0.8483728
0
Verifies date requested matches test data
def verify_date_requested(test_data) verify_values_match(test_data[CoreUseOfCollectionsData::DATE_REQUESTED.name], element_value(date_requested_input)) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_date_requested(test_data)\n verify_values_match(test_data[UseOfCollections::DATE_REQUESTED.name], element_value(date_requested_input))\n end", "def verify_foundation_date(test_data)\n errors = []\n text_values_match?(test_data[Org::FOUNDING_DATE.name], element_value(foundation_date_input), e...
[ "0.80194193", "0.7471824", "0.743819", "0.7415723", "0.7403816", "0.73284316", "0.73203146", "0.7101655", "0.6920093", "0.67597854", "0.67322046", "0.6729371", "0.66519946", "0.6644999", "0.6637887", "0.6637822", "0.6621194", "0.6607913", "0.65953946", "0.65491605", "0.653543...
0.8073814
0
Verifies date completed matches test data
def verify_date_completed(test_data) verify_values_match(test_data[CoreUseOfCollectionsData::DATE_COMPLETED.name], element_value(date_completed_input)) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_date_completed(test_data)\n verify_values_match(test_data[UseOfCollections::DATE_COMPLETED.name], element_value(date_completed_input))\n end", "def verify_date_requested(test_data)\n verify_values_match(test_data[CoreUseOfCollectionsData::DATE_REQUESTED.name], element_value(date_requested_input...
[ "0.8341166", "0.7105125", "0.70442903", "0.666714", "0.6660662", "0.66597664", "0.6641813", "0.66349506", "0.658938", "0.65710187", "0.64267975", "0.6424494", "0.6405465", "0.6322645", "0.62721294", "0.6220005", "0.6211923", "0.6203252", "0.6202072", "0.6157452", "0.6153661",...
0.8371164
0
OCCASIONS Enters occasions per a given set of test data
def enter_occasions(test_data) occasions = test_data[CoreUseOfCollectionsData::OCCASION_LIST.name] || [{CoreUseOfCollectionsData::OCCASION.name => ''}] hide_notifications_bar prep_fieldsets_for_test_data([fieldset(CoreUseOfCollectionsData::OCCASION_LIST.name)], occasions) occasions.each_with_index do |o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_occasions(test_data)\n occasions = test_data[CoreUseOfCollectionsData::OCCASION_LIST.name] || [{CoreUseOfCollectionsData::OCCASION.name => ''}]\n occasions.each_with_index { |occasion, index| verify_values_match(occasion[CoreUseOfCollectionsData::OCCASION.name], element_value(occasion_input index)...
[ "0.6667795", "0.6657743", "0.64520264", "0.6071771", "0.5657711", "0.5128094", "0.5081924", "0.50161386", "0.5003963", "0.49939463", "0.49630982", "0.4942076", "0.4942076", "0.4942076", "0.49415475", "0.49330622", "0.4888488", "0.48785657", "0.48690873", "0.4866526", "0.48584...
0.66651464
1
Verifies project description matches test data
def verify_project_desc(test_data) verify_values_match(test_data[CoreUseOfCollectionsData::PROJECT_DESC.name], element_value(project_desc_text_area)) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_project_desc(test_data)\n verify_values_match(test_data[UseOfCollections::PROJECT_DESC.name], element_value(project_desc_text_area))\n end", "def verify_project_id(test_data)\n verify_values_match(test_data[UseOfCollections::PROJECT_ID.name], element_value(project_id_input))\n end", "def ver...
[ "0.825243", "0.6627522", "0.65851676", "0.63383394", "0.6198498", "0.61342806", "0.6125127", "0.61203575", "0.6052599", "0.6051125", "0.6023687", "0.59743345", "0.5962489", "0.58685297", "0.5855546", "0.58372307", "0.5831967", "0.58305585", "0.58274776", "0.58077896", "0.5807...
0.827891
0
Verifies authorizations match test data
def verify_authorizations(test_data) authorizations = test_data[CoreUseOfCollectionsData::AUTHORIZATION_GRP.name] || [CoreUseOfCollectionsData.empty_authorization] authorizations.each_with_index do |auth, index| verify_values_match(auth[CoreUseOfCollectionsData::AUTHORIZED_BY.name], element_value(authoriz...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_authorizations(test_data)\n authorizations = test_data[UseOfCollections::AUTHORIZATION_GRP.name] || [UseOfCollections.empty_authorization]\n authorizations.each_with_index do |auth, index|\n verify_values_match(auth[UseOfCollections::AUTHORIZED_BY.name], element_value(authorized_by_input inde...
[ "0.8358752", "0.6307299", "0.63008535", "0.6188723", "0.61446315", "0.61429673", "0.608929", "0.60514903", "0.60482997", "0.59818226", "0.597407", "0.5931718", "0.59058934", "0.5903351", "0.58933544", "0.5871764", "0.5817203", "0.58089256", "0.58004326", "0.57967824", "0.5779...
0.83103573
1
Verifies use dates match test data
def verify_use_dates(test_data) dates = test_data[CoreUseOfCollectionsData::USE_DATE_GRP.name] || [CoreUseOfCollectionsData.empty_use_date] dates.each_with_index do |date, index| verify_values_match(date[CoreUseOfCollectionsData::USE_DATE.name], element_value(use_date_input index)) verify_values_mat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_use_dates(test_data)\n dates = test_data[UseOfCollections::USE_DATE_GRP.name] || [UseOfCollections.empty_use_date]\n dates.each_with_index do |date, index|\n verify_values_match(date[UseOfCollections::USE_DATE.name], element_value(use_date_input index))\n verify_values_match(date[UseOfCo...
[ "0.83223957", "0.7540422", "0.75246006", "0.7374537", "0.7211184", "0.7193179", "0.7189002", "0.70658135", "0.67955405", "0.6784354", "0.6760487", "0.6750339", "0.66987586", "0.66741383", "0.6640236", "0.65985096", "0.6556969", "0.649744", "0.6467938", "0.6462258", "0.6452838...
0.8342175
0
Verifies that the end date matches test data
def verify_end_date(test_data) verify_values_match(test_data[CoreUseOfCollectionsData::END_DATE.name], element_value(end_date_input)) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_end_date(test_data)\n verify_values_match(test_data[UseOfCollections::END_DATE.name], element_value(end_date_input))\n end", "def test_end_date_after_start_date\r\n @moderated_search.start_date = Date.today\r\n @moderated_search.end_date = Date.tomorrow\r\n @moderated_search.cobrand_id ...
[ "0.84818196", "0.7233434", "0.7230404", "0.7134945", "0.70578676", "0.69782734", "0.696285", "0.6957164", "0.6913282", "0.68879133", "0.68874925", "0.68628925", "0.6856296", "0.68358004", "0.68188196", "0.68188196", "0.670295", "0.6698731", "0.66931", "0.6664221", "0.6654288"...
0.8507463
0
Verifies staff match test data
def verify_staff(test_data) staff = test_data[CoreUseOfCollectionsData::STAFF_GRP.name] || [CoreUseOfCollectionsData.empty_staff] staff.each_with_index do |staf, index| verify_values_match(staf[CoreUseOfCollectionsData::STAFF_NAME.name], element_value(staff_name_input index)) verify_values_match(sta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_staff(test_data)\n staff = test_data[UseOfCollections::STAFF_GRP.name] || [UseOfCollections.empty_staff]\n staff.each_with_index do |staf, index|\n verify_values_match(staf[UseOfCollections::STAFF_NAME.name], element_value(staff_name_input index))\n verify_values_match(staf[UseOfCollecti...
[ "0.7881304", "0.6380798", "0.6353641", "0.6246095", "0.6234794", "0.62119454", "0.61281", "0.6124484", "0.6103201", "0.6087095", "0.6020533", "0.6010558", "0.59397715", "0.5916913", "0.58997613", "0.585314", "0.58262813", "0.5813097", "0.58024675", "0.5764486", "0.57613873", ...
0.7840825
1
LOCATIONS Enters locations per a given set of test data
def enter_locations(test_data) locations = test_data[CoreUseOfCollectionsData::LOCATION_LIST.name] || [{CoreUseOfCollectionsData::LOCATION.name => ''}] hide_notifications_bar prep_fieldsets_for_test_data([fieldset(CoreUseOfCollectionsData::LOCATION_LIST.name)], locations) locations.each_with_index do |l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def enter_locations(test_data)\n locations = test_data[UseOfCollections::LOCATION_LIST.name] || [{ UseOfCollections::LOCATION.name => ''}]\n prep_fieldsets_for_test_data([fieldset(UseOfCollections::LOCATION_LIST.name)], locations)\n locations.each_with_index do |location, index|\n enter_auto_complete...
[ "0.7358205", "0.7197582", "0.7186002", "0.66445935", "0.66213596", "0.65132487", "0.65008503", "0.6458574", "0.64343363", "0.64279574", "0.6394133", "0.6322496", "0.6299176", "0.6299176", "0.6274033", "0.61833894", "0.61833894", "0.61792886", "0.6113836", "0.6078811", "0.6038...
0.7382622
0
Verifies locations match a given set of test data
def verify_locations(test_data) locations = test_data[CoreUseOfCollectionsData::LOCATION_LIST.name] || [{CoreUseOfCollectionsData::LOCATION.name => ''}] locations.each_with_index { |location, index| verify_values_match(location[CoreUseOfCollectionsData::LOCATION.name], element_value(location_input index)) } e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_locations(test_data)\n locations = test_data[UseOfCollections::LOCATION_LIST.name] || [{ UseOfCollections::LOCATION.name => ''}]\n locations.each_with_index { |location, index| verify_values_match(location[UseOfCollections::LOCATION.name], element_value(location_input index)) }\n end", "def tes...
[ "0.7846891", "0.6538321", "0.6509385", "0.61529636", "0.59977186", "0.597671", "0.59543914", "0.5935601", "0.59063804", "0.59042025", "0.58744466", "0.5868029", "0.5826107", "0.5803772", "0.5783328", "0.5753785", "0.57491106", "0.5711637", "0.56879723", "0.5683051", "0.567260...
0.78097284
1
Verifies fees match test data
def verify_fees(test_data) fees = test_data[CoreUseOfCollectionsData::FEE_GRP.name] || [CoreUseOfCollectionsData.empty_fee] fees.each_with_index do |fee, index| verify_values_match(fee[CoreUseOfCollectionsData::FEE_CURRENCY.name], element_value(fee_currency_input index)) verify_values_match(fee[Core...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_fees(test_data)\n fees = test_data[UseOfCollections::FEE_GRP.name] || [UseOfCollections.empty_fee]\n fees.each_with_index do |fee, index|\n verify_values_match(fee[UseOfCollections::FEE_CURRENCY.name], element_value(fee_currency_input index))\n verify_values_match(fee[UseOfCollections::F...
[ "0.83063674", "0.62973666", "0.6166606", "0.6162033", "0.5983335", "0.59627163", "0.5927743", "0.5905976", "0.58138597", "0.58053136", "0.5782406", "0.5765115", "0.5746944", "0.56767064", "0.5674568", "0.5674419", "0.5647779", "0.5635091", "0.5623951", "0.5619228", "0.5603061...
0.82692397
1
Verifies that the note matches test data
def verify_note(test_data) verify_values_match(test_data[CoreUseOfCollectionsData::NOTE.name], element_value(note_text_area)) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_note(test_data)\n verify_values_match(test_data[UseOfCollections::NOTE.name], element_value(note_text_area))\n end", "def verify_history_notes(test_data)\n test_histories = test_data[Org::HISTORY_NOTES.name]\n errors = []\n test_histories = [{ Org::HISTORY_NOTE.name => ''}] unless test_hi...
[ "0.8228131", "0.7070411", "0.6932775", "0.60628676", "0.59932244", "0.5953828", "0.5859783", "0.5825521", "0.5762382", "0.57510424", "0.57493937", "0.57026863", "0.566392", "0.5652546", "0.56464803", "0.5595954", "0.5570968", "0.55679035", "0.5567318", "0.55651224", "0.551667...
0.823546
0
PROVISOS Enters or removes provisos per a given set of test data
def enter_provisos(test_data) hide_notifications_bar logger.info "Entering provisos '#{test_data[CoreUseOfCollectionsData::PROVISOS.name]}'" wait_for_element_and_type(provisos_text_area, test_data[CoreUseOfCollectionsData::PROVISOS.name]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_002\n # delete all existed projects\n delete_all_pus\n begin\n # there is no project\n open_pu_management_page\n assert is_element_not_present(xpath[\"pu_management\"][\"search_box\"])\n assert is_element_not_present(xpath[\"pu_management\"][\"pu_table\"])\n logout\n r...
[ "0.6101667", "0.5871965", "0.5866242", "0.5758524", "0.5736607", "0.5681461", "0.56410456", "0.5619978", "0.55291146", "0.5479975", "0.5469446", "0.54309833", "0.5392201", "0.538284", "0.5313692", "0.5274072", "0.52509636", "0.5216407", "0.5213342", "0.52042246", "0.51963884"...
0.5955965
1
Verifies that the provisos match test data
def verify_provisos(test_data) verify_values_match(test_data[CoreUseOfCollectionsData::PROVISOS.name], element_value(provisos_text_area)) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_provisos(test_data)\n verify_values_match(test_data[UseOfCollections::PROVISOS.name], element_value(provisos_text_area))\n end", "def test_verify_data_positions\n result = verify_data_positions(@warehouse_data)\n assert_equal(true,result)\nend", "def verify_result(test_data)\n verify_values...
[ "0.74271333", "0.6471244", "0.643594", "0.6350065", "0.6345271", "0.6323167", "0.6268271", "0.6247416", "0.62469137", "0.62074935", "0.6188318", "0.61853796", "0.6042191", "0.60177153", "0.60109514", "0.59783953", "0.5936607", "0.5891009", "0.58907545", "0.58778477", "0.58754...
0.74541885
0
Verifies that the result matches test data
def verify_result(test_data) verify_values_match(test_data[CoreUseOfCollectionsData::RESULT.name], element_value(result_text_area)) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_result(test_data)\n verify_values_match(test_data[UseOfCollections::RESULT.name], element_value(result_text_area))\n end", "def verify_result(expect, model)\n puts \"running query: #{build_query(model)}\"\n result = search(build_query(model))\n assert_equal(expect.size, result.hit.size)\n...
[ "0.77462626", "0.7147781", "0.7025612", "0.6886706", "0.66408885", "0.6549903", "0.65296674", "0.6512537", "0.64803106", "0.6453954", "0.6433727", "0.6397276", "0.63816094", "0.62602884", "0.6233375", "0.6233375", "0.62136537", "0.62130344", "0.61987656", "0.61943716", "0.619...
0.78071636
0
OBLIGATIONS Clicks the obligations fulfilled checkbox, though it knows nothing about whether it is checking or unchecking
def click_obligations_fulfilled wait_for_element_and_click obligations_input end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check\n click unless checked?\n end", "def offenses_to_check; end", "def check_box; end", "def legal_terms_acceptance_on!\n @legal_terms_acceptance = true\n end", "def uncheck\n click unless unchecked?\n end", "def ensure_user_checked_terms\n account_required(nil)\n en...
[ "0.60629874", "0.5994372", "0.5858613", "0.57750976", "0.5540947", "0.5488588", "0.5463598", "0.5460786", "0.5459908", "0.5417722", "0.5397253", "0.53897214", "0.5342777", "0.5339122", "0.53008366", "0.5289087", "0.5288259", "0.52799505", "0.527131", "0.52597016", "0.5257368"...
0.71981066
1
return the line and column of a given offset into this string line and column are 1based
def line_column(string, offset) return 1,1 if string.length==0 || offset==0 lines = (string[0..offset-1] + " ").split("\n") return lines.length, lines[-1].length end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_line_and_column_from_chunk(offset)\n if offset.zero?\n return [@chunk_line, @chunk_column]\n end\n\n string =\n offset >= @chunk.size ? @chunk : @chunk[0..offset-1]\n\n line_count = string.count(\"\\n\")\n\n column = @chunk_column\n if line_count > 0\n lines = string.split(...
[ "0.7780862", "0.777223", "0.77504903", "0.771346", "0.7664354", "0.75300133", "0.7514555", "0.7513169", "0.74829495", "0.7435217", "0.7395403", "0.72273517", "0.72117454", "0.7208537", "0.70074046", "0.69908077", "0.6919554", "0.69150877", "0.68561566", "0.6836645", "0.683664...
0.79417413
0
Takes an array of Strings and Regexp and generates a new Regexp that matches the or ("|") of all strings and Regexp
def array_to_or_regexp_string(array) array = symbols_to_strings array.flatten array = sort_operator_patterns array array = regexp_and_strings_to_regexpstrings array array.collect {|op| "(#{op})"}.join('|') end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_regex(arr)\n return nil if arr.empty?\n\n regex_str = arr.join('|')\n Regexp.new(regex_str)\nend", "def or(*array_matchers, **keyword_matchers)\n create_matcher('or', array_matchers, keyword_matchers)\n end", "def or(*array_matchers, **keyword_matchers)\n create_matcher('or', a...
[ "0.7485174", "0.6648452", "0.6648452", "0.6321851", "0.6293496", "0.6088856", "0.5971724", "0.5868424", "0.57127434", "0.57005244", "0.5695597", "0.5613001", "0.55720836", "0.5564028", "0.5548862", "0.55442566", "0.5536933", "0.54876405", "0.54561657", "0.54528064", "0.545280...
0.6960057
1
generates a tree of nodes of the specified node_class The nodes have access to the following useful methods: self.left > return the left operand parsetreenode self.right > return the right operand parsetreenode self.operator_node > return the operator parsetreenode self.operator > return the operator as a ruby symbol
def generate_tree(operands, operators, parent_node) return operands[0] if operands.length==1 i = index_of_lowest_precedence(operators) operator = operators[i] new_operand = node_class.new(parent_node) new_operand.add_match generate_tree(operands[0..i], operators[0..i-1],new_operand), :left new_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tree\n while token = @tokens.next\n case token.type\n when :operator\n token.build(@nodes.pop, tree).tap do |node|\n @nodes.push(node)\n end\n when :value\n token.build.tap do |leaf|\n ...
[ "0.6275866", "0.62736005", "0.6018715", "0.60012925", "0.585359", "0.5835047", "0.58197993", "0.58078945", "0.57921153", "0.57454836", "0.5729815", "0.57293296", "0.56752497", "0.5658922", "0.56317186", "0.5609146", "0.556063", "0.5557924", "0.5543804", "0.553794", "0.5505827...
0.6900111
0
check getting checksums of a stream
def test_get_checksum_stream basechecksum = Cfruby::Checksum::Checksum.get_checksums(@tempfile.path) File.open(@tempfile.path) { |fp| streamchecksum = Cfruby::Checksum::Checksum.get_checksums(fp) assert_equal(basechecksum, streamchecksum) } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def checksums; end", "def verify_checksum!\n log.info(log_key) { \"Verifying checksum\" }\n\n expected = checksum\n actual = digest(downloaded_file, digest_type)\n\n if expected != actual\n raise ChecksumMismatch.new(self, expected, actual)\n end\n end", "def checksum\n ...
[ "0.7468779", "0.71035594", "0.6917121", "0.68430865", "0.6829304", "0.6769859", "0.6753421", "0.6686078", "0.66789913", "0.66578263", "0.66264963", "0.6616337", "0.66141623", "0.66036636", "0.6599573", "0.6489481", "0.6464086", "0.64549595", "0.6429551", "0.64264727", "0.6416...
0.75762135
0
checks the permission, existence, and ownership controls on the database file
def test_database_checks() currentmode = File.stat(@databasefile).mode Cfruby::FileOps.chmod(@databasefile, 0700) assert_not_equal(currentmode, File.stat(@databasefile).mode) assert_raise(Cfruby::Checksum::ChecksumPermissionError) { @checksum.update_all } Cfruby::FileOps.chmod(@databasefile, 0600) i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_file(file = @dbrc_file)\n File.open(file) do |f|\n # Permissions must be set to 600 or better on Unix systems.\n # Must be hidden on Win32 systems.\n if WINDOWS\n raise Error, 'The .dbrc file must be hidden' unless File.hidden?(file)\n else\n raise Error...
[ "0.6985257", "0.6840328", "0.6332122", "0.6323429", "0.6215494", "0.61220217", "0.6069742", "0.6066387", "0.6066387", "0.6066387", "0.6039412", "0.6029911", "0.5968827", "0.5933483", "0.5931091", "0.5923775", "0.58590275", "0.582068", "0.57200634", "0.5705908", "0.56982094", ...
0.7618825
0
Runs before the build begins
def prebuild(build, listener) # do any setup that needs to be done before this build runs. end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def prebuild(build, listener)\n # do any setup that needs to be done before this build runs.\n end", "def before_setup\n # do nothing by default\n end", "def before_run; end", "def post_setup\n end", "def prebuild(build, listener)\n end", "def prebuild(build, listener)\n end", ...
[ "0.75876105", "0.70303434", "0.7024104", "0.6919467", "0.68747675", "0.68747675", "0.68747675", "0.6644995", "0.6642181", "0.66390675", "0.66047144", "0.65400916", "0.6499688", "0.64914507", "0.6444174", "0.63720775", "0.63720775", "0.6365221", "0.6362908", "0.63565016", "0.6...
0.7666797
0
Generate a password if no password define. This password if generate by rangexp. A gem require by dmsweatshop. If password no send after by mail, the password is not getting another time.
def generate_password if new_record? self.password = self.password_confirmation = /\w{0,10}/.gen unless password end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate\n @password = (1..@length).map { (33 + rand(89)).chr }.join \n check_password_contents\n @password\n end", "def generate_password\n self.password = Digest::SHA1.hexdigest(\"--#{Time.now.to_s}--#{self.email}--#{self.id}\")\n end", "def generate_new_password\n chars = 'abcde...
[ "0.79126346", "0.76742905", "0.7668596", "0.7574189", "0.7570792", "0.7567037", "0.75636303", "0.75169516", "0.7503771", "0.7464348", "0.74511606", "0.7421255", "0.7279182", "0.72705656", "0.7221403", "0.7165341", "0.71633637", "0.7150701", "0.7140875", "0.7084795", "0.708058...
0.7891413
1
GET /trip_routes GET /trip_routes.json
def index @trip_routes = TripRoute.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def routes\n routes = get('/gtfs/routes')\n routes.map do |route|\n Route.from_json(route)\n end\n end", "def trips\n get '/gtfs/trips'\n end", "def trips_by_route_id(route_id)\n get \"/gtfs/trips/routeid/#{route_id}\"\n end", "def index\n Rails.logger.info('👻 Dis...
[ "0.7030553", "0.7006096", "0.69626975", "0.6746778", "0.67030895", "0.65971345", "0.6565987", "0.65631354", "0.64541", "0.64541", "0.6431112", "0.6431112", "0.640581", "0.63941807", "0.638933", "0.6389246", "0.6334889", "0.6334889", "0.6334889", "0.6334889", "0.63313705", "...
0.7836891
0
POST /trip_routes POST /trip_routes.json
def create @trip_route = TripRoute.new(trip_route_params) respond_to do |format| if @trip_route.save format.html { redirect_to @trip_route, notice: 'Trip route was successfully created.' } format.json { render :show, status: :created, location: @trip_route } else format.html...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def post_route(route, message)\n raise TypeError unless route.is_a? Route\n @changeset = @api.create_changeset(message, tags={'created_by'=>'ITCR'})\n ways_list = []\n nodes_list = create_node_list(route.path)\n\n until nodes_list.empty? # For node's maximum limit of a way\n way_nodes = nodes_l...
[ "0.7198111", "0.6731935", "0.66497546", "0.662146", "0.6363889", "0.62762296", "0.62604165", "0.6230909", "0.6227994", "0.62254465", "0.62159413", "0.62015706", "0.6197352", "0.6174321", "0.61385125", "0.612738", "0.6107465", "0.60945064", "0.6089672", "0.6085119", "0.6070074...
0.69839543
1
PATCH/PUT /trip_routes/1 PATCH/PUT /trip_routes/1.json
def update respond_to do |format| if @trip_route.update(trip_route_params) format.html { redirect_to @trip_route, notice: 'Trip route was successfully updated.' } format.json { render :show, status: :ok, location: @trip_route } else format.html { render :edit } format.jso...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @route = Route.find(params[:id])\n if user_signed_in?\n routeInfo = JSON.parse(params[:route_map_points].gsub(\"jb\",\"latitude\").gsub(\"kb\",\"longitude\"))\n \n \n @route.route_points = routeInfo['overview_path']\n @route.starting_point = routeInfo['overview_path'].fi...
[ "0.67473924", "0.66796476", "0.6358128", "0.63258094", "0.63078284", "0.63078284", "0.63063705", "0.6288646", "0.6273215", "0.62713164", "0.62097603", "0.62097603", "0.6171023", "0.6149323", "0.6144342", "0.6134545", "0.61335737", "0.61186916", "0.6099913", "0.6099913", "0.60...
0.6914655
0
DELETE /trip_routes/1 DELETE /trip_routes/1.json
def destroy @trip_route.destroy respond_to do |format| format.html { redirect_to trip_routes_url, notice: 'Trip route was successfully destroyed.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n trip = Trip.find(params[:id])\n trip.destroy\n render json: {message: \"Successfully deleted trip\"}\n end", "def destroy\n @trip = Trip.find(params[:id])\n @trip.destroy\n\n respond_to do |format|\n format.html { redirect_to trips_url }\n format.json { head :ok }\n ...
[ "0.7145841", "0.7142615", "0.7142615", "0.71369636", "0.71369636", "0.71369636", "0.7111704", "0.7103552", "0.70966786", "0.70966786", "0.70966786", "0.70195603", "0.69662875", "0.69591546", "0.6954721", "0.6954721", "0.6954721", "0.6954721", "0.6951944", "0.6938198", "0.6930...
0.75354147
0
GET /ped_programs GET /ped_programs.json
def index @ped_programs = PedProgram.all respond_to do |format| format.html # index.html.erb format.json { render json: @ped_programs } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_programs\n uri = URI.parse(URL)\n response = Net::HTTP.get_response(uri)\n response.body\n end", "def show\n @ped_program = PedProgram.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @ped_program }\n end\...
[ "0.73311335", "0.6878419", "0.6875702", "0.68594396", "0.68486893", "0.68486893", "0.68138915", "0.6601128", "0.65932405", "0.6561959", "0.64414346", "0.63657534", "0.6334446", "0.63279384", "0.63015985", "0.6276734", "0.6264216", "0.62576157", "0.61734676", "0.6151699", "0.6...
0.7347414
0
POST /ped_programs POST /ped_programs.json
def create @ped_program = PedProgram.new(params[:ped_program]) respond_to do |format| if @ped_program.save format.html { redirect_to @ped_program, notice: 'Ped program was successfully created.' } format.json { render json: @ped_program, status: :created, location: @ped_program } el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @program = Program.new(params[:program])\n\n respond_to do |format|\n if @program.save\n format.html { redirect_to @program, :notice => 'Program was successfully created.' }\n format.json { render :json => @program, :status => :created, :location => @program }\n else\n ...
[ "0.6897134", "0.68759775", "0.65981025", "0.6593094", "0.6563242", "0.64376944", "0.63941115", "0.63401514", "0.6332472", "0.62788737", "0.62684083", "0.6233224", "0.62068486", "0.61877185", "0.6179231", "0.61584264", "0.61286414", "0.612771", "0.6104234", "0.60931903", "0.60...
0.699054
0
Calculates the row / column of an adjoining tile, based on the side 'sides' are numbered 0 through 5, with 0 being upper left, and moving clockwise. Returns a tuple of [row, column] for the resulting tile.
def adjoiningTile(row, column, side) if( row.is_a?(Integer) && column.is_a?(Integer) && side.is_a?(Integer) ) case side when 0 return [row - 1, column - 1] when 1 return [row - 1, column] when 2 return [row, column + 1] when 3 return [row + 1, column] when 4 return [row + 1, column...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def adjacent_tiles(row, col)\n adj_tiles = []\n\n if row.positive?\n adj_tiles << tile_at(row - 1, col)\n adj_tiles << tile_at(row - 1, col - 1) unless col.zero?\n adj_tiles << tile_at(row - 1, col + 1) unless col == @size - 1\n end\n\n adj_tiles << tile_at(row, col - 1) unless col.zero?...
[ "0.6080967", "0.583671", "0.5737862", "0.5715071", "0.5705014", "0.5667341", "0.5632189", "0.5615154", "0.5582474", "0.55503035", "0.5535825", "0.5484313", "0.5461644", "0.54614824", "0.54484874", "0.5445892", "0.54359275", "0.5403869", "0.5376977", "0.536974", "0.5360599", ...
0.775937
0
Returns the PublicEarth::Db::Collection, rather than an Atlas::Collection. TODO: Finish conversion of PublicEarth::Db::Collection to Atlas::Collection.
def collection @collection ||= PublicEarth::Db::Collection.find_by_id!(collection_id) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def collection\n @collection ||= self.db.collection(self.collection_name)\n end", "def collection\n @collection ||= database.collection Crocoduck::Store.server_collection\n end", "def collection\n Jrodb::Collection::Basic.new(self)\n end", "def collection\n @collection ||= Co...
[ "0.77548736", "0.75899637", "0.7507125", "0.7496576", "0.7479419", "0.73512304", "0.7310169", "0.72744805", "0.726776", "0.7264631", "0.7139148", "0.7103905", "0.7050674", "0.702575", "0.6961634", "0.6953748", "0.69424254", "0.68506646", "0.68506646", "0.6803446", "0.6801915"...
0.82306665
0
We rewrite the provided canvas ids to: ensure it exists in the manifest (if they don't, mirador puts the user into a weird initial state) rewrite precocina canvas ids to postcocina canvas ids as appropriate (to avoid breaking embeds that used to work) rubocop:disable Metrics/AbcSize
def canvas_id return if request.canvas_id.blank? if canvases.any? { |canvas| canvas['@id'] == request.canvas_id } request.canvas_id elsif cocinafied_canvases? && request.canvas_id.exclude?('cocina-fileSet') cocinafied_canvas_id else Honeybadger.notify( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setMultipleCanvas\n # @annotationIn['canvas'] = '|'\n # @annotationIn['on'].each do |on|\n # @annotationIn['canvas'] += on['full'] + '|'\n # end\n # return @annotationIn['canvas']\n\n @annotationIn['on'][0]['full']\n end", "def configureCanvasProvider(config_hash)\n logger.error \"@@@...
[ "0.51671386", "0.5106367", "0.47858417", "0.47071484", "0.47009945", "0.4624035", "0.46234953", "0.45965797", "0.45164967", "0.4490806", "0.44689232", "0.44512233", "0.44357508", "0.44357508", "0.44298148", "0.44162613", "0.44056684", "0.4389592", "0.4387859", "0.4379568", "0...
0.6614143
0
true if the message with this message_id has already been seen
def message_seen?(message_id) self.seen_messages.include?(message_id) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_for_duplicate_message_id\n old_mail_log = nil\n user_thread.schedule do\n old_mail_log = user.mail_logs.find_by_message_id(message_id)\n end\n\n if old_mail_log\n Log.librato(:count, \"system.process_uid.duplicate_message_id\", 1)\n return false\n else\n return true\n ...
[ "0.74475425", "0.71343803", "0.67167675", "0.6710433", "0.65891194", "0.6497441", "0.6490817", "0.6423188", "0.6337952", "0.62972265", "0.62096894", "0.6209079", "0.60864866", "0.6074277", "0.6048109", "0.59912544", "0.5973836", "0.59602016", "0.5937324", "0.59320825", "0.590...
0.81583023
0
store the remembered message ids in a yaml file
def store_remembered_messages if configuration.single_delivery File.open(seen_messages_file, 'w') do |file| file.write seen_messages.to_yaml end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save_ids\n File.write('id_store.yml', @ids.to_yaml)\n end", "def restore_remembered_messages\n if configuration.single_delivery\n yaml = default_yaml = \"--- []\"\n begin\n File.open(seen_messages_file, 'r') do |file|\n yaml = file.read\n end\n rescu...
[ "0.69648445", "0.62123877", "0.6093182", "0.5935149", "0.5897799", "0.5793896", "0.57560015", "0.55887014", "0.55494744", "0.5519192", "0.55181724", "0.54580945", "0.5446532", "0.5443786", "0.54124045", "0.5408175", "0.53848606", "0.53788054", "0.5378623", "0.53710407", "0.53...
0.78094614
0
reload remembered message ids from a yaml file
def restore_remembered_messages if configuration.single_delivery yaml = default_yaml = "--- []" begin File.open(seen_messages_file, 'r') do |file| yaml = file.read end rescue Object yaml = default_yaml end buffer = [] begin ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def store_remembered_messages\n if configuration.single_delivery\n File.open(seen_messages_file, 'w') do |file|\n file.write seen_messages.to_yaml\n end\n end\n end", "def refresh_ids\n\t\t# Find all puzzle IDs retrieved\n\t\tpuzzle_files = Dir[\"./puzzles/*.pdf\"]\n\t\tids = ...
[ "0.6067601", "0.55923957", "0.552981", "0.53130126", "0.5267287", "0.5262154", "0.5253328", "0.5194698", "0.5186023", "0.5156309", "0.5147844", "0.5147844", "0.5126403", "0.5110791", "0.5106194", "0.5104633", "0.5100757", "0.50864136", "0.50720274", "0.50593495", "0.5049124",...
0.66215736
0
acknowledge message (if headers["ack"] == "client")
def ack(subscription_headers, message) #p [:ack, message.headers["message-id"]] if message.headers["message-id"].to_s.strip != "" && subscription_headers["ack"].to_s == "client" SMQueue.dbg { [:smqueue, :ack, :message, message].inspect } connection.ack message.headers["message-id"], { } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ack\n @mq.callback do\n @mq.send Protocol::Basic::Ack.new({ :delivery_tag => @header_obj.properties[:delivery_tag] })\n end\n end", "def acknowledge(authcode = nil)\n true\n end", "def ack(msg_info)\n end", "def send_ack\n sock.put('+')\n vprint_status('Sendin...
[ "0.731329", "0.72715193", "0.7054563", "0.7003026", "0.6985769", "0.6956", "0.68579894", "0.6819857", "0.6819005", "0.6783214", "0.67802364", "0.6771343", "0.6744129", "0.67260116", "0.6704331", "0.6699316", "0.667671", "0.6612508", "0.66004956", "0.6594611", "0.65939575", ...
0.79772866
0
get message from queue if block supplied, loop forever and yield(message) for each message received default headers are: :ack => "client" :client_id => configuration.client_id :subscription_name => configuration.subscription_name
def get(headers = {}, &block) self.connect SMQueue.dbg { [:smqueue, :get, headers].inspect } subscription_headers = {"ack" => "client", "activemq.prefetchSize" => 1 } if client_id = configuration.client_id subscription_headers["client_id"] = client_id end if sub_name = config...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fetch queue_name, source_uri\n ReliableMsg::Queue.new(queue_name, :drb_uri => source_uri).get { |m|\n begin\n tx = Thread.current[ReliableMsg::Client::THREAD_CURRENT_TX]\n Thread.current[ReliableMsg::Client::THREAD_CURRENT_TX] = nil\n\n @logger.info { \"message fetched - ...
[ "0.6847475", "0.6817764", "0.6575516", "0.6494402", "0.6459551", "0.6417673", "0.635251", "0.6325152", "0.6324526", "0.62579566", "0.621319", "0.6132365", "0.6126845", "0.61154455", "0.60985917", "0.6041152", "0.60304594", "0.6026462", "0.6013326", "0.6007478", "0.5997147", ...
0.754202
0
GET /heights GET /heights.json
def index @heights = Height.all respond_to do |format| format.html # index.html.erb format.json { render json: @heights } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show\n @height = Height.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @height }\n end\n end", "def blocks_height_get(height, opts = {})\n data, _status_code, _headers = blocks_height_get_with_http_info(height, opts)\n dat...
[ "0.70800406", "0.65383637", "0.64297676", "0.6352048", "0.6190382", "0.61019766", "0.60021526", "0.5912485", "0.5897405", "0.5841711", "0.583789", "0.5820834", "0.58119255", "0.57751393", "0.57445395", "0.56987196", "0.5695987", "0.5653103", "0.55643266", "0.55571854", "0.548...
0.76686114
0
GET /heights/1 GET /heights/1.json
def show @height = Height.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @height } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @heights = Height.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @heights }\n end\n end", "def new\n @height = Height.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @height }\n ...
[ "0.7662199", "0.690821", "0.6573263", "0.65249145", "0.6465763", "0.64495623", "0.63425446", "0.6262459", "0.6211445", "0.6207669", "0.6182893", "0.6169202", "0.60852957", "0.6051031", "0.60239697", "0.5986553", "0.5965826", "0.5965826", "0.5917062", "0.5917062", "0.59003615"...
0.7750798
0
GET /heights/new GET /heights/new.json
def new @height = Height.new respond_to do |format| format.html # new.html.erb format.json { render json: @height } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @height = Height.new(params[:height])\n\n respond_to do |format|\n if @height.save\n format.html { redirect_to [:admin,@height], notice: 'Height was successfully created.' }\n format.json { render json: @height, status: :created, location: @height }\n else\n format...
[ "0.7268724", "0.67484576", "0.6658037", "0.6649552", "0.6649552", "0.6629322", "0.66126955", "0.6609386", "0.6587612", "0.6558441", "0.65201265", "0.6518075", "0.6496735", "0.64885277", "0.64797276", "0.6457502", "0.6457502", "0.64382243", "0.64379805", "0.64379805", "0.64342...
0.8330437
0
POST /heights POST /heights.json
def create @height = Height.new(params[:height]) respond_to do |format| if @height.save format.html { redirect_to [:admin,@height], notice: 'Height was successfully created.' } format.json { render json: @height, status: :created, location: @height } else format.html { rende...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @heights = Height.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @heights }\n end\n end", "def new\n @height = Height.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @height }\n ...
[ "0.6345655", "0.62291074", "0.61206025", "0.5885749", "0.586413", "0.5859676", "0.5771747", "0.5670831", "0.5569124", "0.556342", "0.53458285", "0.53324974", "0.53019625", "0.5291227", "0.52649796", "0.522007", "0.522007", "0.5205171", "0.5119396", "0.5110129", "0.504688", ...
0.66400814
0
PUT /heights/1 PUT /heights/1.json
def update @height = Height.find(params[:id]) respond_to do |format| if @height.update_attributes(params[:height]) format.html { redirect_to [:admin,@height], notice: 'Height was successfully updated.' } format.json { head :ok } else format.html { render action: "edit" } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_height(height) \n op = {:operation => :set_height, :height => height}\n add_operation op\n end", "def destroy\n @height = Height.find(params[:id])\n @height.destroy\n\n respond_to do |format|\n format.html { redirect_to admin_heights_url }\n format.json { head :ok }\n end\n ...
[ "0.68623585", "0.6494575", "0.6396879", "0.63206464", "0.62699413", "0.6145354", "0.60840815", "0.6052528", "0.6035753", "0.6024977", "0.6024977", "0.59800327", "0.5978973", "0.5818782", "0.5803534", "0.5776734", "0.5741394", "0.5738084", "0.57372826", "0.5650065", "0.5623416...
0.72002494
0
DELETE /heights/1 DELETE /heights/1.json
def destroy @height = Height.find(params[:id]) @height.destroy respond_to do |format| format.html { redirect_to admin_heights_url } format.json { head :ok } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @attack_height.destroy\n respond_to do |format|\n format.html { redirect_to attack_heights_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @hoge = Hoge.find(params[:id])\n @hoge.destroy\n\n respond_to do |format|\n format.html { redirect_to ho...
[ "0.6963586", "0.65752274", "0.6524143", "0.6413734", "0.6382759", "0.63695645", "0.6369511", "0.62958413", "0.6287775", "0.6242096", "0.62301177", "0.6222153", "0.621128", "0.6185798", "0.6182409", "0.6178444", "0.6176936", "0.6176364", "0.6171362", "0.61710143", "0.6170305",...
0.801813
0
update target craft sync attrs after moving a sync'd craft
def update_sync_targets old_campaign_id, new_campaign_id sync_with_campaigns = sync_targets return if sync_with_campaigns.blank? target_craft = Craft.where(:campaign_id => sync_with_campaigns, :name => self.name) target_craft.each do |c| next if c.sync[:with].blank? c.sync = {:with => c.sy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_removed_from_list \n if @removed_from_sync_list && !@removed_from_sync_list.blank?\n rem_craft = Craft.where(:name => self.name, :campaign_id => @removed_from_sync_list)\n rem_craft.each do |c|\n c.sync = {:with => c.sync[:with].select{|id| ![self.campaign_id, self.sync[:with]].flat...
[ "0.63234824", "0.5925684", "0.58874685", "0.58519167", "0.5642389", "0.5482552", "0.54771453", "0.5442153", "0.54298294", "0.5409485", "0.53230095", "0.53222114", "0.5284291", "0.5212498", "0.52035415", "0.51966465", "0.5182097", "0.5177199", "0.51751125", "0.5165404", "0.515...
0.6838039
0
takes either a Campaign object or an id for a campaign and adds it to the crafts sync[:with] list
def sync_with campaign campaign_id = campaign.id if campaign.is_a?(Campaign) campaign_id ||= campaign sync_list = self.sync sync_list[:with] ||= [] sync_list[:with] << campaign_id self.sync = sync_list self.save end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_sync_targets old_campaign_id, new_campaign_id\n sync_with_campaigns = sync_targets\n return if sync_with_campaigns.blank?\n\n target_craft = Craft.where(:campaign_id => sync_with_campaigns, :name => self.name)\n target_craft.each do |c|\n next if c.sync[:with].blank? \n c.sync = {:...
[ "0.64817184", "0.6257517", "0.6105462", "0.58810407", "0.5878085", "0.57558006", "0.5595809", "0.54732835", "0.54530966", "0.5350305", "0.5348509", "0.5348509", "0.5348509", "0.5348509", "0.5348509", "0.5348509", "0.5348509", "0.5348509", "0.5348509", "0.5348509", "0.5348509"...
0.76610833
0
process the craft which have been removed from sync to no longer point back at this craft instance var is set by sync= being called. this method is called by the synchronize method
def update_removed_from_list if @removed_from_sync_list && !@removed_from_sync_list.blank? rem_craft = Craft.where(:name => self.name, :campaign_id => @removed_from_sync_list) rem_craft.each do |c| c.sync = {:with => c.sync[:with].select{|id| ![self.campaign_id, self.sync[:with]].flatten.inclu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def post_sync\n reset_movement\n reset_flags\n end", "def sync= sync_list\n cur_list = sync \n @removed_from_sync_list = cur_list[:with] - sync_list[:with] if sync_list[:with] && cur_list[:with]\n sync_list[:with] = sync_list[:with].select{|id| id != self.campaign_id } if sync_list[:with]...
[ "0.57707274", "0.55127895", "0.54536176", "0.5440304", "0.5425826", "0.5278683", "0.5263155", "0.5256147", "0.51834035", "0.5126867", "0.51265687", "0.5110576", "0.51086265", "0.5065961", "0.50260496", "0.50104874", "0.5002443", "0.4984404", "0.49516785", "0.4938274", "0.4929...
0.6329431
0
GET /cloud_providers/1 GET /cloud_providers/1.json
def show @cloud_provider = current_user.cloud_providers.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @cloud_provider } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @cloud_provider = current_user.cloud_providers.new\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @cloud_provider }\n end\n end", "def show\n @provider = current_company.providers.find(params[:id])\n\n respond_to do |format|\n format.ht...
[ "0.72448206", "0.66708875", "0.6643025", "0.6589265", "0.65434766", "0.64967513", "0.645369", "0.64236474", "0.6386545", "0.6386545", "0.63220316", "0.6312886", "0.6206023", "0.61762816", "0.61558086", "0.6119046", "0.610792", "0.6082324", "0.60042185", "0.5968971", "0.595961...
0.7597724
0
GET /cloud_providers/new GET /cloud_providers/new.json
def new @cloud_provider = current_user.cloud_providers.new respond_to do |format| format.html # new.html.erb format.json { render json: @cloud_provider } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @provider = current_company.providers.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @provider }\n end\n end", "def new\n @title = t('view.providers.new_title')\n @provider = Provider.new\n\n respond_to do |format|\n format.htm...
[ "0.77794886", "0.77176195", "0.75059843", "0.75059843", "0.7384776", "0.7295979", "0.72653306", "0.72576916", "0.7080923", "0.70335186", "0.7021476", "0.7007189", "0.6997756", "0.69591427", "0.6878553", "0.67591", "0.668349", "0.6661483", "0.6654626", "0.6640935", "0.66397434...
0.8160487
0
PUT /cloud_providers/1 PUT /cloud_providers/1.json
def update @cloud_provider = current_user.cloud_providers.find(params[:id]) respond_to do |format| if @cloud_provider.update_attributes(params[:cloud_provider]) format.html { redirect_to @cloud_provider, notice: 'Cloud provider was successfully updated.' } format.json { head :no_content }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_provider!(provider, provider_info = {}, access = {})\n Api::Request.new do |request|\n request[:access] = access\n request[:method] = :PUT\n request[:path] = \"/mgmt/{{client_id}}/storages/#{provider}\"\n request[:request_body] = provider_info\n end.execute!\n\n ...
[ "0.67795", "0.6509161", "0.64946884", "0.6317323", "0.6298885", "0.6298885", "0.62078136", "0.6187329", "0.61618406", "0.60791194", "0.6009951", "0.5980971", "0.59672195", "0.59303945", "0.5912396", "0.58625984", "0.5859016", "0.5849602", "0.5839749", "0.58388066", "0.5837862...
0.7211685
0
DELETE /cloud_providers/1 DELETE /cloud_providers/1.json
def destroy @cloud_provider = current_user.cloud_providers.find(params[:id]) @cloud_provider.destroy respond_to do |format| format.html { redirect_to cloud_providers_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @cloud.delete\n respond_to do |format|\n format.html { redirect_to clouds_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @provider.destroy\n respond_to do |format|\n format.html { redirect_to providers_url }\n format.json { head :no_content...
[ "0.71699774", "0.71297544", "0.70931643", "0.7076154", "0.7067633", "0.7067633", "0.7067633", "0.7067169", "0.70613575", "0.6996486", "0.6996486", "0.6996486", "0.6972775", "0.69516116", "0.6892063", "0.68899137", "0.6886542", "0.6852625", "0.6802769", "0.67953634", "0.678562...
0.77228564
0
If the request passed a callback, answer in the appropiate way. Or else, answer normally.
def callback_response(callback,response) if callback.nil? response else callback + "(" + response + ")" end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dispatch_http_response(res, options, &block)\n callback = options.fetch('callback', nil)\n (res.blank? && callback.present?) ? callback.call(res) : block.call(res)\nend", "def callback\n head :ok\n end", "def callback\n return response if called\n self.response = k.inject(\n env.merge(RESP...
[ "0.6531643", "0.6351651", "0.6318307", "0.6264702", "0.6231524", "0.6219892", "0.6219167", "0.6142713", "0.611435", "0.60610545", "0.60595024", "0.6014218", "0.59468335", "0.5936375", "0.59288704", "0.5915881", "0.58784175", "0.58024436", "0.5785593", "0.5768225", "0.5703472"...
0.6469977
1
string ID of automation that created request
def automation_id @attributes[:automation_id] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def automation_id\n return @automation_id\n end", "def request_id; end", "def id\n # FIXME: make this number configurable and document the probabilities of clashes\n @id ||= @env[Action::REQUEST_ID] = SecureRandom.hex(Action::DEFAULT_ID_LENGTH)\n end", "def automa...
[ "0.72546345", "0.7032562", "0.6984385", "0.69742197", "0.68896455", "0.683108", "0.683108", "0.67906207", "0.6688678", "0.6649981", "0.6646388", "0.6619731", "0.6475274", "0.64695436", "0.6407604", "0.63708466", "0.63668334", "0.6337252", "0.6337252", "0.6316858", "0.62934446...
0.7316147
0
Initializes a new Table instance with the specified columns. +columns+:: A list of Column instances representing the columns in the new table.
def initialize(*columns) @columns = columns end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize( table, columns, opts = {} )\n @table = table\n @columns = [ *columns ]\n @opts = opts\n end", "def initialize(columns, arel_table)\n @columns = columns.map do |column|\n OrderByColumnData.new(column, \"order_by_columns_#{column.attribute_name}\", ...
[ "0.7275576", "0.6731631", "0.661504", "0.6569464", "0.64577806", "0.6434311", "0.6242508", "0.6184003", "0.6184003", "0.6042692", "0.60329884", "0.5954066", "0.5930878", "0.5835333", "0.5730677", "0.571784", "0.57127786", "0.5707533", "0.57045555", "0.57003146", "0.56698436",...
0.74814755
0
Sorts the receiver's data in ascending order using the specified sort keys. +sort_keys+:: A list of column IDs to sort on. If table does not have a column with one of the IDs, that ID is ignored.
def sort_data_ascending!(*sort_keys) self.sort_data!(true, sort_keys) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sort_data!(is_ascending, sort_keys)\n sort_key_indices = sort_keys.collect { |key| @columns.index(@columns.find { |column| column.id == key }) }.reject { |e| !e }\n\n @data.sort! do |row1, row2|\n comparison_result = 0\n\n sort_key_indices.each do |index|\n comparison_result = ...
[ "0.75310045", "0.71050555", "0.61659116", "0.61338425", "0.59853387", "0.59486353", "0.5941142", "0.59029365", "0.5882253", "0.58397055", "0.58256537", "0.5752118", "0.5712452", "0.5693306", "0.5688002", "0.56807214", "0.56747276", "0.567059", "0.56665313", "0.565522", "0.562...
0.7546592
0
Sorts the receiver's data in descending order using the specified sort keys. +sort_keys+:: A list of column IDs to sort on. If table does not have a column with one of the IDs, that ID is ignored.
def sort_data_descending!(*sort_keys) self.sort_data!(false, sort_keys) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sort_data!(is_ascending, sort_keys)\n sort_key_indices = sort_keys.collect { |key| @columns.index(@columns.find { |column| column.id == key }) }.reject { |e| !e }\n\n @data.sort! do |row1, row2|\n comparison_result = 0\n\n sort_key_indices.each do |index|\n comparison_result = ...
[ "0.67709315", "0.61913806", "0.6041815", "0.5955657", "0.58654803", "0.5819487", "0.5719023", "0.56759936", "0.56563205", "0.5629016", "0.5552609", "0.5478927", "0.53748477", "0.5373112", "0.5331856", "0.5313344", "0.52585787", "0.5248222", "0.52466464", "0.5220477", "0.52024...
0.8057964
0
Sorts the receiver's data using the specified sort order and keys. +is_ascending+:: Whether to sort the data in ascending order or not. +sort_keys+:: A list of column IDs to sort on. If table does not have a column with one of the IDs, that ID is ignored.
def sort_data!(is_ascending, sort_keys) sort_key_indices = sort_keys.collect { |key| @columns.index(@columns.find { |column| column.id == key }) }.reject { |e| !e } @data.sort! do |row1, row2| comparison_result = 0 sort_key_indices.each do |index| comparison_result = @columns[ind...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sort_data_ascending!(*sort_keys)\n self.sort_data!(true, sort_keys)\n end", "def sort(sort_keys, *args)\n raise NotImplementedError\n end", "def sort_data_descending!(*sort_keys)\n self.sort_data!(false, sort_keys)\n end", "def sort_data\n sort_cols = @columns.selec...
[ "0.7599574", "0.67001396", "0.62033373", "0.5866302", "0.5826033", "0.582195", "0.5780125", "0.57496655", "0.57232267", "0.5716997", "0.5655909", "0.5633429", "0.56311405", "0.5580525", "0.55534935", "0.55394953", "0.5536905", "0.5530142", "0.5525046", "0.5515125", "0.5505150...
0.8025702
0
Initializes a new Column instance with the specified ID and options. Valid keys for options are +:alignment+, +:data_comparator+, +:data_to_s+, +:label+, +:padding+, and +:width+, whose usage should be obvious. +id+:: The new instance's ID. +options+:: An options map specifying zero or more of the column's instance var...
def initialize(id, options = { }) @id = id @alignment = options[:alignment] || :center @data_comparator = options[:data_comparator] || Proc.new { |a, b| a <=> b } @data_to_s = options[:data_to_s] || Proc.new { |o| o.to_s } @label = options[:label] || id @padding = options[:padding] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def column id = nil, options = {}\n unless id\n id = options[:id]\n raise \"Need a column ID\" if id.nil?\n end\n if options.empty?\n @cols << {}\n else\n @cols << options\n end\n @col_count = @cols.size\n @col_ids << id\n end", "def initialize( i...
[ "0.688868", "0.65057254", "0.63720155", "0.6269675", "0.6225198", "0.60997665", "0.5945962", "0.57345974", "0.5703262", "0.5688603", "0.5688603", "0.5675031", "0.56600744", "0.5642941", "0.5642941", "0.55620086", "0.55620086", "0.5556941", "0.5535653", "0.5533228", "0.5533086...
0.7794734
0
Returns a string representation of specified data with the appropriate alignment and padding for the receiver. +data+:: The data to pad and align.
def padded_aligned_data(data) string_repr = @data_to_s.call(data) string_repr = case @alignment when :left string_repr.ljust(@width) when :center string_repr.center(@width) when :right string_repr.rjust(@width) else string_repr end @paddi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def print_data(data, padding)\n p = \"\"\n (0..padding.length - data.to_s.length).map {p += \" \"}\n print data.to_s + p\n end", "def to_s\n pad_field :data\n recalc_block_len\n super\n end", "def fmt(data)\n pkt = \"<190>1 \"\n pkt += \"#{data[:t].strftime(\"%Y-%m-%dT...
[ "0.7239746", "0.63989556", "0.63953304", "0.62947625", "0.6128271", "0.5971051", "0.5968507", "0.5967303", "0.5940357", "0.59368074", "0.59193754", "0.5870094", "0.58287865", "0.5814228", "0.5760539", "0.5665646", "0.565248", "0.5640018", "0.55885226", "0.55612975", "0.550738...
0.8301922
0
S _ _ _ ... row, col = 1 _ _ _ _ Strategy: 1. Solve this for 1 row only. Solve for horizontally only. 2. Transpose the matrix. Then we can use same code on transposed matrix to solve it vertically. Solve for 1 row: Test cases: Word = "test" OK. All same length as word 1. _ _ _ _ All blanks. Left and right of word must ...
def crossword(arr, word) earliest_col = -1 ans = [] arr.each_with_index do |row, i| earliest_col = solve_horiz(row, word) ans = [i, earliest_col] break end tarr = transpose arr tarr.each_with_index do |col, i| earliest_row = solve_horiz(row, word) if earliest_row <= ans[0] && i <= ans[1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def word_square?(arr)\n # first brute force, using i and j \n i = 0 \n while i < arr.length \n j = 0 \n while j < arr.length \n # next if i >= j will overflow as j never increments\n if i >= j \n j+= 1 \n next \n end \n ...
[ "0.6241779", "0.6122972", "0.60796183", "0.6054155", "0.6001216", "0.5909172", "0.58565855", "0.5821083", "0.574051", "0.5735618", "0.57177836", "0.56709856", "0.5650652", "0.5644215", "0.563699", "0.5599014", "0.5588299", "0.5588043", "0.556366", "0.55601954", "0.55505073", ...
0.6513128
0
Start the database transaction, or fail if one is already open.
def start_transaction! fail DbMod::Exceptions::AlreadyInTransaction if @in_transaction @in_transaction = true query 'BEGIN' end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def begin_db_transaction\n log('begin transaction', nil) do\n begin_isolated_db_transaction(default_transaction_isolation)\n end\n end", "def begin_db_transaction\n # PG driver doesn't really do anything on setAutoCommit(false)\n # except for commit-ing a previous pe...
[ "0.77285904", "0.7552407", "0.75057083", "0.75057083", "0.7490247", "0.74283314", "0.73108745", "0.71682006", "0.71258897", "0.706478", "0.7041109", "0.7038126", "0.7038126", "0.70136744", "0.696685", "0.6962065", "0.6883738", "0.6822559", "0.67258966", "0.6724869", "0.670789...
0.8204365
0
End the database transaction
def end_transaction! @in_transaction = false end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def commit_db_transaction\n execute(\"COMMIT\")\n end", "def commit_db_transaction\n execute(\"COMMIT\")\n end", "def rollback_db_transaction() end", "def rollback_db_transaction() end", "def rollback_db_transaction\n execute(\"ROLLBACK\")\n end", "def roll...
[ "0.8019847", "0.8019847", "0.77375084", "0.77375084", "0.76324254", "0.76324254", "0.7618432", "0.7618432", "0.7577138", "0.75130767", "0.74851495", "0.7382211", "0.7234997", "0.7234997", "0.72074765", "0.7205753", "0.71591", "0.71304965", "0.7120575", "0.7098702", "0.7050998...
0.825406
0
returns the customer for that given review
def customer @@all.select {|review| self.restaurant.customers} end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def customers\n self.reviews.collect do |review|\n review.customer\n end\n end", "def reviews\n Review.all.select {|review| review.customer == self}\n end", "def customer\n @customer ||= fetcher.get(Customer, customer_id)\n end", "def customer_info(customer)\n return customer\n en...
[ "0.73927265", "0.7021797", "0.6681378", "0.66530454", "0.6397355", "0.6392147", "0.6286351", "0.6278143", "0.6274091", "0.6260268", "0.6226777", "0.6219151", "0.62127304", "0.621204", "0.6182674", "0.61805177", "0.6160093", "0.6143058", "0.6133048", "0.61160433", "0.61119837"...
0.7124252
1
GET /vocab_words GET /vocab_words.json
def index logger.debug "-----index-----" @vocab_words = VocabWord.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vocab_word_params\n params.require(:vocab_word).permit(:id, :word, :lesson)\n end", "def set_vocab\n @vocab = Vocab.find(params[:id])\n end", "def set_vocab_word\n logger.debug \"-----set_vocab_word----- \" + params[:id].to_s\n @vocab_word = VocabWord.find(params[:id])\n end", ...
[ "0.6881367", "0.67803496", "0.6658347", "0.6625513", "0.6545644", "0.65180147", "0.6476694", "0.6476694", "0.6469742", "0.64538854", "0.6389014", "0.63863206", "0.6380747", "0.6372136", "0.6322738", "0.62874854", "0.6276235", "0.6267971", "0.624049", "0.6160532", "0.61428565"...
0.7528659
0
PATCH/PUT /vocab_words/1 PATCH/PUT /vocab_words/1.json
def update logger.debug "-----update-----" respond_to do |format| if @vocab_word.update(vocab_word_params) format.html { redirect_to @vocab_word, notice: 'Vocab word was successfully updated.' } format.json { render :show, status: :ok, location: @vocab_word } else format.html...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n respond_to do |format|\n if @vocab.update(vocab_params)\n format.html { redirect_to @vocab, notice: \"Vocab was successfully updated.\" }\n format.json { render :show, status: :ok, location: @vocab }\n else\n format.html { render :edit, status: :unprocessable_entity }...
[ "0.7512258", "0.73817486", "0.71767724", "0.6978025", "0.6967143", "0.6788993", "0.67834914", "0.66867137", "0.6663082", "0.6663082", "0.6663082", "0.6663082", "0.66244763", "0.6617048", "0.659911", "0.6586325", "0.65775645", "0.65340495", "0.65164196", "0.64963764", "0.64770...
0.776472
0
Create two line items, then delete one and post.
def test_should_create_and_delete_line_items_before_post assert_difference 'Invoice.count' do assert_difference 'LineItem.count', 1 do @basic_user.creates_new_invoice @basic_user.enter_new_customer( :name => "Test 8 Customer Name 4") #get first row in ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_two_items\n Item.create(id: 1,\n name: \"Ergonomic Steel Bottle\",\n description: \"Sint quasi modi officiis.\",\n image_url: \"http://robohash.org/0.png?set=set2&bgset=bg1&size\",\n created_at: \"2016-03-08 14:53:57\",\n updated_at: \"2016-03-08 14:53:57\")\n\n Item.creat...
[ "0.619228", "0.59818095", "0.5954227", "0.5844343", "0.58334655", "0.58043057", "0.5686945", "0.5669499", "0.55842483", "0.5581403", "0.5569404", "0.5557265", "0.5544393", "0.5426482", "0.54170287", "0.54046047", "0.53990847", "0.5392674", "0.5374734", "0.53691435", "0.536513...
0.61168075
1
Test editing an invoice with line items Remove first line item from existing invoice
def test_should_remove_first_line_item_from_invoice assert_no_difference 'Invoice.count' do assert_difference 'LineItem.count', -1 do @basic_user.edits_invoice(invoices(:invoice_with_line_items).id) #get first row in the table. trows = @basic_user.line_items_rows ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_should_remove_second_line_item_from_invoice\r\n assert_no_difference 'Invoice.count' do\r\n assert_difference 'LineItem.count', -1 do\r\n @basic_user.edits_invoice(invoices(:invoice_with_line_items).id)\r\n \r\n #get first row in the table.\r\n trows = @basic_user.line_...
[ "0.83617604", "0.79391605", "0.7673628", "0.76541674", "0.70887643", "0.6625306", "0.6349206", "0.629921", "0.6234087", "0.62202394", "0.6171657", "0.6151414", "0.61462253", "0.6124051", "0.60942584", "0.60929424", "0.60852313", "0.6070845", "0.60570127", "0.60429543", "0.603...
0.84499925
0
Remove second line item from existing invoice
def test_should_remove_second_line_item_from_invoice assert_no_difference 'Invoice.count' do assert_difference 'LineItem.count', -1 do @basic_user.edits_invoice(invoices(:invoice_with_line_items).id) #get first row in the table. trows = @basic_user.line_items_rows ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_should_remove_first_line_item_from_invoice\r\n assert_no_difference 'Invoice.count' do\r\n assert_difference 'LineItem.count', -1 do\r\n @basic_user.edits_invoice(invoices(:invoice_with_line_items).id)\r\n \r\n #get first row in the table.\r\n trows = @basic_user.line_i...
[ "0.7385918", "0.69709754", "0.6472073", "0.6346085", "0.63355845", "0.6247482", "0.6227869", "0.6215378", "0.6121174", "0.6109852", "0.60717595", "0.604536", "0.6017167", "0.6006678", "0.60055923", "0.59993374", "0.59986085", "0.59845936", "0.5981097", "0.5944877", "0.5933211...
0.75662285
0
DSL tests Test dsl for add, remove, and edit items from existing invoice
def test_dsl_should_add_edit_and_remove_line_items_in_invoice assert_no_difference 'Invoice.count' do assert_no_difference 'LineItem.count' do @basic_user.edits_invoice(invoices(:invoice_with_line_items).id) assert_equal 3, @basic_user.adds_line_item(:unit => 'New line item', :description ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_should_add_edit_and_remove_line_items_in_invoice\r\n assert_no_difference 'Invoice.count' do\r\n assert_no_difference 'LineItem.count' do\r\n @basic_user.edits_invoice(invoices(:invoice_with_line_items).id)\r\n \r\n @basic_user.link(:id, \"add_line_item\").click\r\n\r\n ...
[ "0.7535946", "0.7379648", "0.695239", "0.6883084", "0.6797367", "0.67200434", "0.6701178", "0.66296726", "0.6491032", "0.6433756", "0.64238167", "0.63970625", "0.63964486", "0.63707995", "0.63685155", "0.6353537", "0.63334715", "0.6266988", "0.62041867", "0.61894464", "0.6125...
0.8291523
0
respond to checkjira command same as interval except we answer with 'no issues found' if there are no issues
def checkjira_command(msg) begin msg.speak "no new issues since I last checked #{@lastlast} ago" \ if !check_jira(msg) rescue msg.speak "sorry, we had trouble connecting to JIRA." end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_jira_deploy_task\n jira_search_url = 'https://projects.engineering.redhat.com/rest/api/2/search'\n jira_query = \"Project = ERRATA AND Type = Task AND labels = pntdevops-sysops-deploy ORDER BY updated Desc\"\n response_json = %x{ curl -s -H \"Content-Type: application/json\" \\\n \"#{jira_search_url}...
[ "0.63642186", "0.63343", "0.625044", "0.61547637", "0.6061006", "0.60454756", "0.5998648", "0.5927596", "0.59033316", "0.5882272", "0.5823309", "0.5747291", "0.5721177", "0.570943", "0.5679453", "0.5659468", "0.5638854", "0.56316507", "0.5629341", "0.5620768", "0.5604003", ...
0.74881154
0
fetch jira url and return a list of ticket Hashes
def fetch_jira_poll_url() jiraconfig = bot.config['jira_poll_url'] if jiraconfig.is_a?(Array) searchurls_str = jiraconfig else searchurls_str = [jiraconfig] end tix = [] searchurls_str.each do |searchurl_str| begin @log.info "checking jira for new issues... #{sear...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_issues\n jira_issues = Hash.new\n # This is the REST URL that will be hit. Change the jql query if you want to adjust the query used here\n uri = URI(JIRA_BASE_URL + '/rest/api/2/search?jql=' + JQL)\n\n Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') do |http|\n request =...
[ "0.7108783", "0.7011311", "0.68948025", "0.6683555", "0.65772647", "0.6380045", "0.63721925", "0.6224195", "0.61780363", "0.61041003", "0.6091607", "0.6051491", "0.597635", "0.5954039", "0.5953175", "0.5949902", "0.5934485", "0.5919058", "0.5848761", "0.5840244", "0.58103335"...
0.7252817
0
extract array of comments from an xml element (ticket)
def parse_ticket_for_comments(xml) comments = [] doc = REXML::Document.new(xml) doc.elements.inject('item/comments', comments) do |comments, element| comments.push(parse_comment_info(element)) end return comments end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def comments\n if nodes = @node.xpath(\"comments\")\n nodes.map { |node| node.content }.compact\n end\n end", "def comments\n get_ticket_property_list(\"comments\" , Unfuddled::Comment)\n end", "def extract_ticket_ids\n tickets = message.split('Ref: ').last\n tickets.gsub('#',...
[ "0.68685955", "0.66146517", "0.5963169", "0.59491605", "0.5747329", "0.57101387", "0.5701599", "0.5660127", "0.562449", "0.56160307", "0.56068105", "0.55906016", "0.5577316", "0.5571283", "0.55611193", "0.55536056", "0.5549933", "0.5549933", "0.5549933", "0.5531084", "0.55240...
0.8522526
0
extract comment hash from individual xml element
def parse_comment_info(xml_element) text = xml_element.elements['comment'].text rescue "" author = xml_element.elements['comment'].key['author'] rescue "" created = xml_element.elements['comment'].key['created'] rescue "" return { :text => text, :author => author, :created => created ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_xml_comment(el, opts)\n block = el.options[:category] == :block\n indent = SPACE * @current_indent\n content = el.value\n content.gsub!(/^<!-{2,}\\s*/, \"\") if content.start_with?(\"<!--\")\n content.gsub!(/-{2,}>$/, \"\") if content.end_with?(\"-->\")\n resul...
[ "0.64380425", "0.58777505", "0.56281865", "0.56281865", "0.56281865", "0.5613709", "0.560455", "0.5583392", "0.55376524", "0.55260986", "0.55250883", "0.5472814", "0.544129", "0.5417839", "0.5410514", "0.5402042", "0.5397296", "0.5386199", "0.5317554", "0.53128827", "0.531158...
0.6524682
0
extract ticket hash from individual xml element
def parse_ticket_info(xml_element) id = xml_element.elements['key'].text rescue "" id, spacekey = split_spacekey_and_id(id) rescue "" link = xml_element.elements['link'].text rescue "" title = xml_element.elements['title'].text rescue "" reporter = xml_element.elements['reporter'].text rescue "" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getHash element\n\tfile = File.new(element)\n\thash = Digest::SHA256.file file\n\tfile.close\n\treturn hash.hexdigest \n\tend", "def hash\n element.hash\n end", "def lookup_remote(md5_hash)\n unhash_data = Scrubyt::Extractor.define do\n fetch \"http://gdataonline.com/qkhash.php?mode=txt&has...
[ "0.5922472", "0.58482444", "0.5809524", "0.57388896", "0.56058156", "0.556271", "0.55327725", "0.5470769", "0.5463087", "0.54590654", "0.54402834", "0.5395999", "0.53182447", "0.52731335", "0.52523834", "0.5250259", "0.5247216", "0.52017915", "0.5194405", "0.5184408", "0.5171...
0.619712
0
extract the spacekey and id from the ticket id
def split_spacekey_and_id(key) spacekey = key.scan(/^([A-Z]+)/).to_s id = key.scan(/([0-9]+)$/)[0].to_s.to_i return id, spacekey end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getDetails id\n\t\tticket = @tickets.read ['id', 'pid', 'title', 'description', 'tracker', 'creator', 'created', 'status'], ['id', id]\n\t\tticket = ticket[0]\n\tend", "def parse_ticket_info(xml_element)\n id = xml_element.elements['key'].text rescue \"\"\n id, spacekey = split_spacekey_and_id(id) resc...
[ "0.61230016", "0.60488576", "0.5990504", "0.59409875", "0.5786135", "0.57694894", "0.57614124", "0.57599014", "0.57484484", "0.567149", "0.5654165", "0.5646187", "0.56349105", "0.5570488", "0.55477464", "0.552996", "0.5519182", "0.55168974", "0.5502929", "0.5499951", "0.54960...
0.68602353
0
Format fragment operation as string
def format_fragment_operation(fragment_operation, level) result = [] result << indent(level) + format_fragment_operation_signature(fragment_operation) result << "#{indent(level)}{" result += fragment_operation.__nodes.map { |node| format_node(node, level + 1) } result << "#{inde...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def format_fragment_operation_signature(fragment_operator)\n [\n \"fragment #{fragment_operator.__name}\",\n \"on #{fragment_operator.__type}\",\n format_directives(fragment_operator.__directives, false),\n ].compact.join(' ')\n end", "def fragment(string); end", "...
[ "0.7952485", "0.6508253", "0.64462006", "0.62495637", "0.6096381", "0.59725726", "0.5758454", "0.5752238", "0.5742718", "0.5738212", "0.5724992", "0.5721963", "0.57028353", "0.57016456", "0.5695638", "0.56856865", "0.56808215", "0.5670218", "0.5643368", "0.5639466", "0.561187...
0.72659457
1
Format fragment operation signature as string
def format_fragment_operation_signature(fragment_operator) [ "fragment #{fragment_operator.__name}", "on #{fragment_operator.__type}", format_directives(fragment_operator.__directives, false), ].compact.join(' ') end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def signature_base_string\n \"#{method.to_s.upcase}&#{full_uri}&#{normalise_signature_params}\"\n end", "def signature\n # FIXME merb keeps mangling this by replacing \"+\" with \"\\s\" \n oauth_merged_params[:oauth_signature]\n end", "def string_to_sign\n if content...
[ "0.70344776", "0.66106296", "0.6537091", "0.65270776", "0.6473858", "0.6378303", "0.62362593", "0.6228909", "0.6199462", "0.6150939", "0.6069784", "0.60474354", "0.6043087", "0.60250705", "0.60044414", "0.5975935", "0.596834", "0.5963453", "0.59380937", "0.5929398", "0.592906...
0.78802097
0