`
文章列表
def asta_data resp = HTTParty.post("http://si.12333.gov.cn/118733/RemoteQuery003.jspx") result = resp.parsed_response book = Spreadsheet::Workbook.new sheet = book.create_worksheet row = sheet.row 0 row.concat %w(序号 所属行政区 医疗机构名称 医疗机构编码 医院等级 医疗机构分类 地址 联系 ...
业务场景:(系统间还没有接口对调,订单号暂时需要线下处理) 线上订单需要线下第三方票据核对之后才能抽取明细对账开票。 根据第三方提供的票据匹配上双方系统的订单号。 class Report::Importcsv # 上传csv文件load数据到数据库临时表 def self.import_csv(file_root,table_name='mapping_datas') # xlsx 保存为csv # 上传到路径:/var/lib/mysql-files/ new_table_name = "cope_#{table_name}_# ...
class Kpi::Team < ApplicationRecord has_many :crm_teams has_many :business_managers, through: :crm_teams, source: :business_manager has_many :account_managers, through: :crm_teams, source: :account_manager has_many :purchaser_managers, through: :crm_teams, source: :purchaser_manager ...
联合索引 如何联合索引查询? 所以给定查询过滤条件 age=18 的过程就是先从 term index 找到 18 在 term dictionary 的大概位置,然后再从 term dictionary 里精确地找到 18 这个 term,然后得到一个 posting list 或者一个指向 posting list 位置的指针。然后再查询 gender= 女 的过程也是类似的。最后得出 age=18 AND gender= 女 就是把两个 posting list 做一个“与”的合并。 这个理论上的“与”合并的操作可不容易。对于 mysql 来说,如果你给 age 和 gender 两 ...
https://www.cnblogs.com/dwlsxj/p/RabbitMQ.html 几种垃圾回收机制 1.引用计数算法0释放,1有效(如python) 2.标记法(程序需要先停下来)(ruby在此基础上添加了一条可用节点链条) 3.标记-缩并(适合变化量少的) 4.节点拷贝(空间换时间,适合变化快多的) 5.分代收集(如jave先区分老代,新代;老代选3,新代选4) https://blog.csdn.net/qq_26437925/article/details/53728388 ruby使用的是标记清除算法/python使用的是引用计数算法 https://ru ...
    程序员解决问题的时候有时会遇到很多傻逼的需求或者烦恼的需求,这个时候烟是很受他们欢迎的。     由于工作性质,公司里80%的程序员都是资深烟民,不时就成群结伴抽一根,很是惬意的样子,不抽烟的甚至该被怀疑是否在打酱油了!     有那么一次一个同行给我递烟,我说自己不吸烟,他非常惊讶!用他的原话说:不抽烟工作怎么做得直(受得了) 。     想想每天都受着电脑的辐射,抽着烟,还有很多一天要吃几包槟郎的(亚哥啊!)。不知道你们身边有没有这类的现象。     听他们说抽烟真的很难再戒掉,槟郎也会上瘾。身为一个老程序猿,我呼吁现在不抽烟的新程序猿也尽量不要吸烟。     大伙真的很喜欢抽烟的话 ...

一些gem--Seo

    博客分类:
  • Gem
# Seo gem 'meta-tags' gem 'sitemap_generator'
基于searchkick的样例 brew install elasticsearch brew services start elasticsearch gem 'searchkick', '2.5.0' class SearchObj < ApplicationRecord searchkick merge_mappings: true, mappings: { search_obj:{ properties: { name: {type: 'string', analyzer: "standard ...
孙大剩https://music.163.com/#/song?id=32628933 你的爱人等你开着宝马去娶她。 1/烟火里的尘埃https://music.163.com/#/song?id=29004400 孤独者,中年人,自己懂自己。外界的喧闹需要一点自我的孤单坚忍来抵抗。 2/我终于失去了你https://music.163.com/#/song?id=189292 期待成功后,不忘记曾今的过去。 3/蒲公英https://music.163.com/#/song?id=28921664 风雨桥上,没有送奶奶走过,有很多遗憾。 4/Tonighthttps://music.1 ...
require_dependency 'order/scopes' RailsLog::ControllerSubscriber.attach_to :action_controller RailsLog::MailerSubscriber.attach_to :action_mailer helper_method :current_contact, :current_cart_items, :current_currency require 'active_support/configurable' module RailsLog include ...
<span class="ui label yellow compacted basic" onclick="$('#set_campaign_modal').modal({allowMultiple: true}).modal('show');" style="cursor: pointer;">长图分享</span> <div class="ui modal" id="set_campaign_modal"><i class="cl ...
针对某一对象保存实例化之前,异步上传图片保存。 gem 'remotipart', '~> 1.2' //= require jquery.remotipart <div class="ui grid"> <div class="left floated fourteen wide column"> <h2><a href="javascript:history.back()"><i class="blue reply ico ...
gem 'spreadsheet' gem 'roo', require: false, github: 'whmall/roo' gem 'roo-xls' #文件格式要求为.xlsx格式。 另外需要编辑excell的时候建议使用gem 'write_xlsx'或gem 'axlsx' 上传导入excell def create_import_product file = params[:chemical_tag][:file] #校验文件格式 @message = {color:"#ff0000"} @import = { faile ...
def self.sang_carwler agent = Mechanize.new cc1 = ConsumableCategory.find_or_create_by(name: "生命科学", parent_id: 0) resp = agent.get("https://www.XXX.com").search("li.subnav_cat dl.sub_dl") resp.each do |e1| catalog_name2 = e1.search(" ...

一些常用加密方式

    博客分类:
  • RUBY
 
sign = OpenSSL::Digest::SHA256.hexdigest("#{access_token}#{access_sign}#{noncestr}") JSON.parse  Base64.decode64(resp) signature = Base64.encode64(OpenSSL::HMAC.digest('sha1', token['ACCESS_SIGN'], "#{timestamp}#{noncestr}")).strip token = Digest::MD5.hexdigest(Settings.qichac ...
Global site tag (gtag.js) - Google Analytics