直接 itools 进去,把 sqlite 文件 copy 出来就好了
#4 楼 @chairy11 继续看老帖吧: https://ruby-china.org/topics/5844
最下面也有 gmail 的例子: http://guides.rubyonrails.org/action_mailer_basics.html
不要自己搭邮件服务器,如果一周只有几十封,用 QQ 邮件就可以了,帖子里提到的其它国外的 sendgrid 和国内的 https://sendcloud.sohu.com/ 都有免费额度,设置一下 mx 就可以
我刚好开着 VS,翻译的事,还是请有爱心和闲心的来帮忙吧。 楼主,你确定你不用学习 ruby?如果要学,可以自己试着一步步来啊。
private static string myEncoder(string a, byte[] c, bool isToBase64)
{
string result = "";
List<Byte> bytesR = new List<byte>();
int f = 0, h = 0, q = 0;
int[] b = new int[256];
for (int i = 0; i < 256; i++)
b[i] = i;
while (h < 256)
{
f = (f + b[h] + a[h % a.Length]) % 256;
int temp = b[h];
b[h] = b[f];
b[f] = temp;
h++;
}
f = 0; h = 0; q = 0;
while (q < c.Length)
{
h = (h + 1) % 256;
f = (f + b[h]) % 256;
int temp = b[h];
b[h] = b[f];
b[f] = temp;
byte[] bytes = new byte[] { (byte)(c[q] ^ b[(b[h] + b[f]) % 256]) };
bytesR.Add(bytes[0]);
result += System.Text.ASCIIEncoding.ASCII.GetString(bytes);
q++;
}
if (isToBase64)
{
Byte[] byteR = bytesR.ToArray();
result = Convert.ToBase64String(byteR);
}
return result;
}
public static void getEp(string vid, string ep, ref string pNew, ref string token, ref string sid)
{
string template1 = "becaf9be";
string template2 = "bf7e5f01";
byte[] bytes = Convert.FromBase64String(ep);
ep = ystem.Text.ASCIIEncoding.ASCII.GetString(bytes);
string temp = myEncoder(template1, bytes, false);
string[] part = temp.Split('_');
sid = part[0];
token = part[1];
string whole = string.Format("{0}_{1}_{2}", sid, vid, token);
byte[] newbytes = System.Text.ASCIIEncoding.ASCII.GetBytes(whole);
epNew = myEncoder(template2, newbytes, true);
}
现在的广告都做得这么好!写软文的比较起来真的太 Low 了
#3 楼 @vincent 是那整个文本字段 base64 吗?那从数据库管理软件看一篇文章的时候,岂不都是乱码了。 看了这篇文章,发现改动还是太大: http://mumaren.me/blog/2013/11/27/support-emoji-in-rails-3-dot-2-14/
要不先嵌入 bbcode,类似于 [:smile:]
,读出的时候再替换?
不是回答楼主问题的,推荐一下 CASino: http://casino.rbcas.com/
基本上是个成品,拿来就用,而且带 Google TWO-FACTOR AUTHENTICATION
我可能要开一个像薄荷这么多妹子的公司,才能跟薄荷抢程序员啊,愁!
做过,如果两台服务器之间连接速度不快,那很可能出问题,另外,还要设定自增 key 等,如果出问题,要检查两边的同步日志。
建立别这样,你可以做读写分离的主从,别做主主,太折腾
#1 楼 @40hood #3 楼 @flowerwrong 我的问题不在 symbol
请看: https://github.com/svenfuchs/rails-i18n
Available Locales 标准是用zh-CN
,不是下划线,如果用下划线会报错,因为 config/application.rb
里面定义的是中划线。如果在这定义下划线,那 rails-i18n
这样的 gem 又会报错。
我想知道 Discourse 用的下划线,项目还能跑起来,是怎么实现的。
感觉跟 facebook 火是一个道理,就是满足一些人一些愿望
哦耶,对不少了呢!AKRSYZ
#17 楼 @wskongdesheng #19 楼 @visualrun
很明显,逗我们玩的,呵呵
#1 楼 @heylonj 谢谢,搜索了一下,发现很多好文章:
http://viget.com/inspire/extending-paul-irishs-comprehensive-dom-ready-execution http://techblog.treenodes.com/index.php/2012/04/19/organize-javascript-and-jquery-events-dom-ready-execution/
另外问一下,下面这种方式
$('body').data('controller')
是不是不如下面的稳妥呢?
body.getAttribute( "data-controller" )
#2 楼 @chrisloong 楼主你说了很多重要性,对实现讲得很少,只是用了这个程序吗?在 Rails 里面使用的时候有没有什么要注意的? https://github.com/dchest/captcha
谢谢