http://www.sarahmei.com/blog/2013/11/11/why-you-should-never-use-mongodb/
尽管标题略显偏激,但内容还是挺有意思的。当你的模型适合使用关系数据库时,那就用吧。(嗯……)
System.WeakReference<T>
http://www.sarahmei.com/blog/2013/11/11/why-you-should-never-use-mongodb/
尽管标题略显偏激,但内容还是挺有意思的。当你的模型适合使用关系数据库时,那就用吧。(嗯……)
如果你在.NET下编写应用程序/类库的时候,还在纠结于用什么来打日志的话,不妨看看这个issue:spnet/Logging#332
https://birrell.org/andrew/papers/ImplementingCVs.pdf
另外,C#的Monitor.Wait和Monitor.Pulse看起来可以用来实现CV。在这篇文章中提到了一些使用细节。看起来和pthread_cond_wait() 的用法有点类似,都要在函数返回后重新确认producer有没有产生需要的内容,然后在必要时继续等待。
值得一提的是,在第二篇文章中,作者实际上构造出了一个简易的AutoResetEvent 。
http://blog.wolksoftware.com/setting-up-your-typescript-vs-code-development-environment
Sub UnselectTextBoxes() Dim c As New Collection For Each s In ActiveWindow.Selection.ShapeRange If s.TextFrame.HasText <> msoTrue Then c.Add s End If Next ActiveWindow.Selection.Unselect For Each s In c s.Select MsoTriState.msoFalse Next End Sub
cite=LINQ to SQL FAQ – XML columns in SQL
However, LINQ to SQL does not appear to support ANY translations of XML queries on XElement to SQL – this mans that the following statement :
var filtered = from t in Table where t.XmlCol.Descendants("SomeElement").Value == somevar select twill fail at runtime as the LINQ-to-SQL parser is unable to translate on our XML data column XmlCol query into an Xpath.
A LINQ to SQL xml datatype column is represented as an XElement. If you modify this be careful as LINQ to SQL will not spot internal changes to XElement and save them to the database.
For example:
Dim myElement as XElement = Table.XMLdata myElement.Value = "test" db.SubmitChanges()will not alter the instance XElement and so will not change the Table.XMLdata entry. The workaround for this is to write it back as a new element:
Dim myElement as XElement = Table.XMLdata myElement.Value = "test" Table.XMLdata = new XElement(myElement) db.SubmitChanges()