git clone git://gist.github.com/923934.git redisearch
cd redisearch
# With thanks to https://github.com/optoro/activerecord-callback_notification for original inspiration | |
if Rails.env.development? | |
module ActiveRecord | |
module CallbackNotifications | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def notify_all_callbacks | |
# Make sure all models are loaded before trying to enumerate |
# see: http://weblog.therealadam.com/2011/02/12/simple-ruby-pleasures/comment-page-1/#comment-315 | |
class QueryTracer < ActiveSupport::LogSubscriber | |
ACCEPT = %r{^(app|config|lib)}.freeze | |
FRAMES = 5 | |
THRESHOLD = 300 # In ms | |
def sql(event) | |
return unless event.duration > THRESHOLD |
As a global platform for creativity and self-expression, Tumblr is deeply committed to supporting and protecting freedom of speech. At the same time, we draw lines around a few narrowly defined but deeply important categories of content and behavior that jeopardize our users, threaten our infrastructure, and damage our community.
What Tumblr is for:
Tumblr celebrates creativity. We want you to express yourself freely and use Tumblr to reflect who you are, and what you love, think, and stand for. What Tumblr is not for:
-
Malicious Speech. Don't encourage violence or hatred on the basis of things like race, ethnic origin, religion, disability, gender, age, veteran status, or sexual orientation. We encourage you to dismantle negative speech through argument rather than censorship. We will, however, remove anything that is overtly malicious.
-
Harm to Minors. Be thoughtful when posting anything involving a minor. Don't post or solicit anything relating to minors that is sexually suggestive or violent. Don’
cat log/development.log|grep SELECT |grep -v CACHE | ruby -e "ARGF.each{|line| puts line.match(/(\d+\.\d+)ms/).captures rescue nil}" |
Lo que quería decir es que en caso de polisemia, la connotación con la que se interpreta un término depende de nosotros mismos, pero lo que este denota depende del contexto en el que es aplicado.
Master/Slave es un término ampliamente aceptado para designar un concepto en sistemas de gestión de bases de datos, usaré la definición de la wikipedia:
"Master/slave is a model of communication where one device or process has unidirectional control over one or more other devices. In some systems a master is elected from a group of eligible devices, with the other devices acting in the role of slaves" - Wikipedia
Se pretende cambiarlo por ser ofensivo. Mi pregunta es, de la semántica del término ¿Qué parte es ofensiva?
De la semántica del término ninguna. Sólo es ofensivo en el momento en el que el término se asocia a otro contexto, i.e. se varía su semátnica aplicándola a otro escenario que no le corresponde, como a la exclavitud humana.
def obfuscated(): | |
d=[0x20]*0x0D;o=0x61; | |
for x in [[7,11],2,[10,12],[1],[0],2,[3,9],2,[2],1,[6],7,[8],3,[4]]: | |
if hasattr(x, '__len__'): | |
for c in x: | |
d[c]=o | |
o=o+1 | |
else: | |
o=o+x | |
return "".join(map(chr, d)) |
{ | |
"_index" : "development_movida_titles", | |
"_type" : "title", | |
"_id" : "366615", | |
"_version" : 2, | |
"found" : true, | |
"_source":{"company_id":4,"external_id":null,"name":"Test Upload","tag":[],"metadata":[{"key":4890,"value":"0"},{"key":86,"value":"MYCAT"},{"key":87,"value":"MYDET"},{"key":88,"value":"LONG DESC"},{"key":89,"value":"MYCAT"},{"key":93,"value":"BOOM"}],"asset":["366615A","366615B","366615C"],"licensor":"Bebanjo"} | |
} |
- Assigning an object to a
belongs_to
association does not automatically save the object. It does not save the associated object either.
- When you assign an object to a
has_one
association, that object is automatically saved (in order to update its foreign key). - In addition, any object being replaced is also automatically saved, because its foreign key will change too
- If either of these saves fails due to validation errors, then the assignment statement returns false and the assignment itself is cancelled.
- If the parent object (the one declaring the
has_one
association) is unsaved (that is,new_record?
returns true) then the child objects are not saved. They will automatically when the parent object is saved.