This file contains hidden or 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
$('input[type=file]', form).each(function(i, file_input) { | |
// fail if file > 200mb | |
if (file_input.files && | |
file_input.files.length == 1 && | |
(file_input.files[0].size || file_input.files[0].fileSize) > max_upload_file_size) { | |
progress_display.error(MAX_FILE_SIZE_LIMIT); | |
uploading_engine.cancel(); | |
event.preventDefault(); | |
} | |
}); |
This file contains hidden or 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
Connecting directly to the postgresql server | |
Setting standard_conforming_strings to off | |
standard_conforming_strings = off | |
escape of \" is \\" | |
Setting standard_conforming_strings to on | |
standard_conforming_strings = on | |
escape of \" is \" | |
-------------------------------------------------------------------------------- | |
Connecting to the postgresql server via pgpool-II | |
Setting standard_conforming_strings to off |
This file contains hidden or 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
Connecting directly to the postgresql server | |
Setting standard_conforming_strings to off | |
standard_conforming_strings = off | |
escape of \" is \\" | |
Setting standard_conforming_strings to on | |
standard_conforming_strings = on | |
escape of \" is \" | |
-------------------------------------------------------------------------------- | |
Connecting to the postgresql server via pgpool-II | |
Setting standard_conforming_strings to off |
This file contains hidden or 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 Main where | |
import Prelude hiding (getContents, putStrLn) -- версия из Prelude не держит UTF-8 :( | |
import System.IO.UTF8 (getContents, putStrLn) | |
import MyParser | |
import qualified Data.Map as M | |
main = do | |
x <- getContents | |
let a = apply lang x | |
output = case a of |
This file contains hidden or 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
diff --git a/lib/mail/elements/content_disposition_element.rb b/lib/mail/elements/content_disposition_element.rb | |
index 06e2296..57fd1eb 100644 | |
--- a/lib/mail/elements/content_disposition_element.rb | |
+++ b/lib/mail/elements/content_disposition_element.rb | |
@@ -7,7 +7,7 @@ module Mail | |
def initialize( string ) | |
parser = Mail::ContentDispositionParser.new | |
if tree = parser.parse(cleaned(string)) | |
- @disposition_type = tree.disposition_type.text_value | |
+ @disposition_type = tree.disposition_type.text_value.downcase |
This file contains hidden or 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
diff --git a/lib/mail/fields/common/common_message_id.rb b/lib/mail/fields/common/common_message_id.rb | |
index 1223954..d25316d 100644 | |
--- a/lib/mail/fields/common/common_message_id.rb | |
+++ b/lib/mail/fields/common/common_message_id.rb | |
@@ -18,7 +18,11 @@ module Mail | |
end | |
def message_ids | |
- element.message_ids | |
+ unless value.blank? |
This file contains hidden or 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
diff --git a/lib/mail/elements/content_type_element.rb b/lib/mail/elements/content_type_element.rb | |
index 4bed7b7..83e8d8b 100644 | |
--- a/lib/mail/elements/content_type_element.rb | |
+++ b/lib/mail/elements/content_type_element.rb | |
@@ -7,8 +7,8 @@ module Mail | |
def initialize( string ) | |
parser = Mail::ContentTypeParser.new | |
if tree = parser.parse(cleaned(string)) | |
- @main_type = tree.main_type.text_value | |
- @sub_type = tree.sub_type.text_value |
This file contains hidden or 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
commit bc61de4254a7a36f1b305f0a328fa1ba08436659 | |
Author: Eugene Pimenov <[email protected]> | |
Date: Thu Feb 11 02:35:41 2010 +0300 | |
my peephole optimizer | |
diff --git a/lib/compiler.rb b/lib/compiler.rb | |
index d670463..0c53be5 100644 | |
--- a/lib/compiler.rb | |
+++ b/lib/compiler.rb |
This file contains hidden or 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
diff --git a/ext/nokogiri/html_sax_parser_context.c b/ext/nokogiri/html_sax_parser_context.c | |
index be1ea23..f09b901 100644 | |
--- a/ext/nokogiri/html_sax_parser_context.c | |
+++ b/ext/nokogiri/html_sax_parser_context.c | |
@@ -25,9 +25,9 @@ static VALUE parse_memory(VALUE klass, VALUE data, VALUE encoding) | |
); | |
if(RTEST(encoding)) { | |
- xmlCharEncoding enc = xmlParseCharEncoding(StringValuePtr(encoding)); | |
- if(enc != XML_CHAR_ENCODING_ERROR) { |
This file contains hidden or 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
def test_parse_force_encoding | |
@parser.parse_memory(<<-HTML, 'UTF-8') | |
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251"> | |
Информация | |
HTML | |
assert_equal("Информация", | |
@parser.document.data.join.strip) | |
end |