你可以从我以前的帖子中看出,我有可怕的命名约定.你知道任何关于如何命名东西的教程吗?
我想为像Markdown这样的标记语言编写一个惯用的解析器.我的版本会略有不同,但我认为在Clojure中至少需要一些这样的东西,而且我想加入它.
我不想使用一堆乱七八糟的RegExes(虽然我意识到可能需要一些),而且我想要制作既强大又适用于Ciojure的东西.
我已经开始了一些不同的尝试(主要是在纸面上),但我对它们非常满意,因为我觉得我只是即兴创作.那没关系,但在过去的一两个月里,我已经用Clojure的语言进行了大量的探索,并希望至少部分地遵循巨人的路径.
我想要一些指示,建议或资源(来自O'Reilly的书很棒 - 爱我一些电子书 - 但亚马逊或其他地方也很棒).无论你能提供什么.
编辑 Brian Carper有一篇关于使用Clojure的ANTLR的有趣帖子.
还有clojure-pg和fnparse,它们是Clojure解析器生成器.fnparse甚至看起来它有一些像样的文档.
还在寻找资源等!我以为我会用自己的一些调查结果来更新这些内容.
我正在开发一个应用程序,我需要连接N个数据库系统[N范围在1到350之间].
这个想法是 - 将向用户呈现数据库列表,并将要求用户从列表中选择任何或所有数据库.
选择数据库后,我需要连接到每个数据库并执行存储过程.
我打算使用普通的旧JDBC并一次为每个JDBC获取连接[或者通过在多个线程中运行它们]并执行存储过程并关闭连接.
所有这一切都应该在交易中发生.做这个的最好方式是什么?
如果不是JDBC ...任何其他有效的方式?
更新 -
存储过程实际上涉及运行一些sql - 例如更新列,为用户授予权限等.
我正在创建一个多停止监视应用程序,其中将有多个并行运行的计时器,并且每个通知都绑定到每个计时器.
我可以使用以下代码创建多个计时器.
private void updateNotification(int notificationId, int clockStatusID, CharSequence text) {
// notificationManager.cancel(notificationId);
// throws up an ongoing notification that the timer is running
Log.i("TIMERCOUNT", "Notification id: " + notificationId);
Notification not = new Notification(clockStatusID, // the
// icon
// for
// the
// status
// bar
text, // the text to display in the ticker
System.currentTimeMillis() // the timestamp for the
// notification to appear
);
Intent intent = new Intent();
intent.setClassName("com.intuit.time_catcher.android.activities",
"com.intuit.time_catcher.android.activities.Tabs");
not.setLatestEventInfo(self,
getText(R.string.timer_notification_title),
getText(R.string.timer_on_notification_text), PendingIntent
.getActivity(this, 0, …Run Code Online (Sandbox Code Playgroud) C#调试配置的 Visual Studio调试器
项目设置
"设置编译应用程序的模式.
选择
Active(调试),<========
Debug,<========
Release,
All Configurations."
似乎Active(Debug)和Debug是两个独立的选择.
但是,MSDN库无法解释Active(Debug)和Debug之间的区别 .
这里没有信息:"C#调试配置的Visual Studio调试器项目设置"
我也找不到谷歌的任何解释.
问题:Active(Debug)和Debug
之间有什么区别 ?
visual-studio-2005 visual-studio-2010 visual-studio-2008 visual-studio
以下代码完全有效,
int *ia = (int[]){1,3,5,7};
Run Code Online (Sandbox Code Playgroud)
但是当我编译下一行代码时,
char *p = (char[]) "abc";
Run Code Online (Sandbox Code Playgroud)
gcc说
test.c:87: error: cast specifies array type
Run Code Online (Sandbox Code Playgroud)
它们似乎以同样的方式铸造.为什么第二个得到一个错误的消息?
正如你们所说,"abc"是一个指针,它不能转换为指针.所以我的另一个问题是:为什么呢
char[] s = "abc";
Run Code Online (Sandbox Code Playgroud)
已验证.上面的代码行在编译时如何工作?
我正在使用以下代码来获取一些json格式的数据:
$.ajax({
type: "GET",
url: "MyService.svc/GetSomeData",
dataType: "text",
success: function (data, textStatus) {
alert("Test: " + data.toString());
},
error: function (xhr, textStatus, errorThrown) {
alert("Error: " + (errorThrown ? errorThrown : xhr.status));
}
});
Run Code Online (Sandbox Code Playgroud)
数据成功返回到此调用,它看起来像这样:
{"d":"test data"}
Run Code Online (Sandbox Code Playgroud)
我的猜测是我可以按如下方式访问数据:
var myData = data["d"];
Run Code Online (Sandbox Code Playgroud)
然而,这似乎总是返回"未定义".为了获得单个数据串"测试数据",我缺少什么?
我查看了bash手册页,并[[说它使用条件表达式.然后我查看了Conditional Expressions部分,它列出了与test(和[)相同的运算符.
所以我想知道,Bash [和[[Bash 之间的区别是什么?
使用TARGET_IPHONE_SIMULATOR宏会导致在am应用程序中定义相同的常量值.例如:
#ifdef TARGET_IPHONE_SIMULATOR
NSString * const Mode = @"Simulator";
#else
NSString * const Mode = @"Device";
#endif
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
...
NSLog(@"Mode: %@", Mode);
...
}
Run Code Online (Sandbox Code Playgroud)
始终导致记录"模式:模拟器".我正在运行XCode 3.2.4,如果这有帮助的话.谢谢.
在常规SQL中我可以做类似的事情
SELECT * From T GROUP BY DATEPART(wk, T.Date)
Run Code Online (Sandbox Code Playgroud)
我怎么能在Linq to SQL中做到这一点?
以下不起作用
From F In DB.T Group R By DatePart(DateInterval.WeekOfYear, F.Date)
Run Code Online (Sandbox Code Playgroud)
也不工作:
From F In DB.T Group R By (F.Date.DayOfYear / 7)
Run Code Online (Sandbox Code Playgroud)