開發WPF程序時,使用Devexpress的GridControl控件用ItemSource綁定數據,在頁面進行編輯時,當屬性繼承INotifyPropertyChanged接口時會同步更新後臺數據。今天在開發時遇到一種情況,當通過GridControl中Row上Button【Command】改變行...
分类:
其他好文 时间:
2014-07-03 06:02:48
阅读次数:
192
经典搜索问题,主要是时间上的优化,我用了三个辅助数组记录信息 row[i][k] = 1表示第i行数字k已经被使用,col[j][k] = 1表第j列数字k已经被使用,blo[i][k]表示第i个小九宫格中数字k已经被使用
还有很重要的一个优化(没有优化的话可能会超时,或者非常慢,像POJ讨论区里有很多说正着搜超时,倒着搜0ms,这的确是一个可以用的方法,但是有一定的随机性),每次填数字时,先扫...
分类:
其他好文 时间:
2014-07-02 07:56:21
阅读次数:
235
ERROR 1665 (HY000): Cannot executestatement: impossible to write to binary log since BINLOG_FORMAT = STATEMENTand at least one table uses a storage engine limited to row-based logging.InnoDB is limited to row-logging when transaction isolation level is REA...
分类:
数据库 时间:
2014-07-02 07:46:46
阅读次数:
322
procedure TForm1.Button1Click(Sender: TObject);var row: TcxEditorRow; i,t: Integer;begin grid.ClearRows; Row := TcxEditorRow(Grid.Add(TcxEditorR...
分类:
其他好文 时间:
2014-07-02 00:14:26
阅读次数:
906
MatrixTime Limit:3000MSMemory Limit:65536KDescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row...
分类:
其他好文 时间:
2014-07-01 21:17:23
阅读次数:
190
字符串题目就先告一段落了,又是在看balabala不知道在说些什么的英语。算法也很简单,用了几个库函数就搞定了。本来还担心题里说的replace-by为空的特殊情况需要特殊处理,后来发现按一般情况处理也能A过去。第一次RE是因为char t[]开小了。对了,strstr()函数我也是第一次用,对这个...
分类:
其他好文 时间:
2014-07-01 19:17:14
阅读次数:
224
// Override to support conditional editing of the table view.- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath...
分类:
其他好文 时间:
2014-07-01 13:18:10
阅读次数:
526
详细介绍 Qt Quick 中的 Anchors 、 Row 、 Column 、 Grid 、Flow 等布局方式。...
分类:
其他好文 时间:
2014-07-01 09:24:44
阅读次数:
293
Consecutive Blocks
Time Limit: 2 Seconds
Memory Limit: 65536 KB
There are N (1 ≤ N ≤ 105) colored blocks (numbered 1 to
N from left to right) which are lined up in a row. And the i-th b...
分类:
其他好文 时间:
2014-07-01 06:51:52
阅读次数:
218
class Solution {public: vector > generate(int numRows) { vector > res; if (numRows row(1, 1); res.push_back(row); ...
分类:
其他好文 时间:
2014-06-30 21:46:08
阅读次数:
256