Hello! I have no possibility to use following-sibling
axis. How can I get the same functionality in XPath without using axes? Is it real? Thanks in advance.
savbace
Posts
-
XPath following-sibling -
Bring HTML element to top (cascading)Hello! I'm trying to bring DOM element (
div
) withposition: absolute
to front of others elements with same positioning. All elements are placed in the same container withposition: relative
. So I'm trying to reach similar behavior as desktop windows have when they are cascading. I know about these approaches: 1. Usingz-index
. Manually increment it and manage what is the highest. 2. Removing element from DOM container and appending it back to the end. Please, advice any other approaches or what from these ones is the best (especially from UX and performance point of view). Thanks!savbace
-
WPF First Start PerformanceHi! I have some WPF windows built in a class library. Also I have unmanaged app that calls these windows through ComVisible interface. The problem: I have a big delay on calling WPF windows first time. I suppose it happens because WPF engine loading. Please, suggest some ideas or workarounds on performance improvements. Thanks!
-
Database backup sizeI need to know whether drive free space amount is enough for database backup. How can I approximately calculate SQL Server database backup size (for example in FULL recovery mode) before doing backup? Thanks!
-
SMO Retrieve Table RecordThanks all for your replies! I'm realized that it was not adequate question. I'm going to use one of these methods (just like in ADO.NET :))
Server.ConnectionContext.ExecuteReader
Server.ConnectionContext.ExecuteWithResultsSorry for taking your time.
-
SMO Retrieve Table RecordThanks for reply. But it is not actually I'm looking for. I'll try to clarify. Assume we have table "Users":
| Id | Name | Pass |
| 1 | Kate | qwerty |
| 2 | Mike | asd$f5 |I just want to get a value from second row and column "Name". In this case I'll get value "Mike". It's equal to query SQL:
"SELECT Name FROM Users WHERE Id=2"
I know that I can use ADO.NET, but in this case I must use SMO. Can anybody help me?
-
SMO Retrieve Table RecordI'm using SMO (SQL Server Management Objects). Can I get table records i.e. (table data) using SMO like I can do it with ADO.NET? For example in DataTable or other form. Thanks!
-
Binding to attached propertyI have a RichTextBox with attached property:
which binds to ScrollBar.Value property. I want to bind back ScrollBar.Value to this attached property. Smth like this:
Please advice how can I do it?
savbace
-
How can I learn about under the hood of .NET?Not for advertisement, but take a look to the book "CLR via C#" by J. Richter. It's a nicely describe CLR and programming for CLR.
-
How to Deploy my application along with databaseIf you want to deploy a standalone application and database also it would be better to use an embedded database. For example: SQLite or SQL Server Compact Edition. In this case database engine is represented by set of assemblies. So you can easy deploy them and database file with your app.
-
Comma separeted text fileTry to look at this LINQ to CSV library. I briefly explored it and seems it allows to get IEnumerable<T> from *.csv file and then use LINQ against it.
-
Looking for a specific regexHere is an example of solution using both Regex and string class methods. In Regex I use a group with "FileCode" name to get result. As Pete said not all cases require using of Regex. And in this case I think would be better to use string methods (alternative variant).
const string pattern = @"\_(?(\[^\_\]\[a-zA-Z0-9\])+)\\.txt$"; const string text = @"Directory\\Subdirectory\\Subdir\\Subsubdir\\sub\_sub\_subv009\\filename\_with\_lots\_of\_ABC123.txt"; var groupFileCode = Regex.Match(text, pattern); Console.WriteLine(groupFileCode.Groups\["FileCode"\].Value); // alternatively without regullar expressions int lastUnderscoreIndex = text.LastIndexOf('\_'); int lastPointIndex = text.LastIndexOf('.'); Console.WriteLine(text.Substring(lastUnderscoreIndex + 1, lastPointIndex - lastUnderscoreIndex - 1));
Regards, savbace