This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2011-02-12 00:27:30 SQL: DELETE FROM corpse WHERE corpse_type = '0' OR time < (UNIX_TIMESTAMP()-'259200') | |
2011-02-12 00:27:30 SQL ERROR: function unix_timestamp() does not exist | |
LINE 1: ...TE FROM corpse WHERE corpse_type = '0' OR time < (UNIX_TIMES... | |
^ | |
HINT: No function matches the given name and argument types. You might need to add explicit type casts. | |
2011-02-12 00:27:33 SQL: DELETE FROM creature_respawn WHERE respawntime <= UNIX_TIMESTAMP(NOW()) | |
2011-02-12 00:27:33 SQL ERROR: function unix_timestamp(timestamp with time zone) does not exist | |
LINE 1: DELETE FROM creature_respawn WHERE respawntime <= UNIX_TIMES... | |
^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef _DatabasePostgre_H | |
LoginDatabase.PExecute("INSERT INTO account_banned VALUES ('%u',round(date_part('epoch',now())),round(date_part('epoch',now()))+'%u','MaNGOS realmd','Failed login autoban',1)",acc_id, WrongPassBanTime); | |
#else | |
LoginDatabase.PExecute("INSERT INTO account_banned VALUES ('%u',UNIX_TIMESTAMP(),UNIX_TIMESTAMP()+'%u','MaNGOS realmd','Failed login autoban',1)",acc_id, WrongPassBanTime); | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION from_unixtime(integer) RETURNS timestamp AS ' | |
SELECT to_timestamp($1)::timestamp AS result | |
' LANGUAGE 'SQL'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- ./cpp/src/Freeze/MapI.cpp | |
+++ ./cpp/src/Freeze/MapI.cpp | |
@@ -1487,10 +1487,10 @@ | |
try | |
{ | |
-#if DB_VERSION_MAJOR != 4 | |
-#error Freeze requires DB 4.x | |
+#if DB_VERSION_MAJOR < 4 | |
+#error Freeze requires DB 4.x or greater |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* pagination (base.css) */ | |
.pagination a,span { | |
float: left; | |
} | |
.pagination span.current, span.gap { | |
padding: 2px 5px; | |
margin-right: 5px; | |
border-style: solid; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task :clear_all do | |
%w(tmp:clear log:clear assets:clean).each do |t| | |
puts "Running #{t}" | |
task(t).execute | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module FixUpdateCounters | |
def fix_updated_counters | |
self.changes.each {|key, value| | |
# key should match /master_files_id/ or /bibls_id/ | |
# value should be an array ['old value', 'new value'] | |
if key =~ /_id/ | |
changed_class = key.sub(/_id/, '') | |
# Get real class of changed attribute, so work both with namespaced/normal models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Article | |
include Mongoid::Document | |
include Mongoid::Timestamps | |
include Mongoid::Document::Taggable # https://github.com/chebyte/mongoid-simple-tags | |
## Fields ## | |
field :title, type: String | |
## Accessors ## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# With layout | |
# | |
Started GET "/redaction/actus/3/assets?_=1355002463845" for ::ffff:192.168.0.254 at 2012-12-08 21:34:23 +0000 | |
Processing by Redaction::AssetsController#index as JS | |
Parameters: {"_"=>"1355002463845", "actu_id"=>"3"} | |
User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 | |
Actu Load (1.7ms) SELECT "articles".* FROM "articles" WHERE "articles"."type" IN ('Actu') AND "articles"."id" = $1 LIMIT 1 [["id", "3"]] | |
Rendered redaction/assets/index.js.erb (0.1ms) | |
Completed 200 OK in 31ms (Views: 17.6ms | ActiveRecord: 2.3ms) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DemoController < ApplicationController | |
before_filter :define_some_variables, only: [:index, :hello] | |
def index | |
# Renders the action it would render if it were the "hello" action. | |
# render({:action => 'hello'}) # This is the old way, Rails 1.x. | |
# Specifies the template to render. | |
render({:tamplate => 'demo/hello'}) | |
OlderNewer