Принцип «один язык – одна нация» – это какая-то особенная, исключительно восточноевропейская радость. Австрийцы спокойно разговаривают на немецком, американцы не беспокоятся за свой английский, и даже кубинцы не видят в испанском никакой угрозы для своей независимости. Но в Восточной Европе государственные образования отказываются считать себя полноценными, пока не добьются еще и лингвистического суверенитета, навязав своим гражданам какой-нибудь придуманный на ходу язык. Здесь можно пойти на любые внешнеполитические жертвы, вплоть до остановки интеграции в ЕС, как это сделала Черногория.
Как жить в стране, где несуществующий язык – единственный государственный
Get Missing Aero Glass and Other Personalization Features in Windows 7 Home Basic and Starter Edition
The Starter and Home Basic editions of Windows 7 are crippled when it comes to customization. If you want Aero Glass, Aero Peek, or just wallpaper switching from the desktop context menu, here’s a handy patch.
Golden Rules of Money Management That Will Always Be Relevant
Spend less than you earn and invest the difference
It’s a boring and old piece of advice, but it’s also one you can count on: to increase your wealth, spend less than you earn, and invest the difference. This may be easier said than done, but the principle of living within your means is really the fundamental rule of personal finance.
Invest in assets, not liabilities
Of course, this also begs the question of what to do with the surplus or where to invest it. The other basic rule that will also stand the test of time is to direct your money to those items that will increase in value or produce income (assets), rather than those that will depreciate in value or end up requiring even more investment or upkeep (liabilites). This is the secret to building wealth most people ignore, the Frugal Dad blog says: “Buy Assets, Avoid Liabilities.” As an example, you could spend $200 on a new smartphone and then have to shell out more each month for the data and calling plans…or you could buy $200 in Verizon stock.
We’re all for buying smartphones and value them as a productivity tool, but it makes sense to apply this reasoning to every major purchase: will it improve your quality of life or increase in value, or will this item make you spend additional money each month just to have it?
Source: http://lifehacker.com/5828763/old-money-rules-that-no-longer-apply-and-two-that-still-do
XSL Transformations in .NET 2.0
XSL Transformations in .NET 2.0:
One of the main benefits of XML is that it separates data from its presentation. Without further elaboration, this claim seems ordinary. However, if you combine XML data with an XSL Transformations (XSLT) style sheet, you will then have a powerful way to dynamically transform and present information in any format you want. Furthermore, often the structure of an XML document created by one application does not match the structure required by the other application to process that XML data. To transform the existing XML data structure into one that can be processed, you need to use XSLT. Having realized the need for an efficient built-in support for XSLT processing, Microsoft has built a set of highly optimized classes into the .NET Framework 2.0 that are robust and scalable. This article will explore the rich XSLT support provided by the .NET Framework 2.0 by providing examples on how to use the XSLT related classes to create rich ASP.NET Web applications.
Советы по организации и ведению корпоративного Twitter
Советы по организации и ведению корпоративного Twitter :
Все больше компаний заводят корпоративный Twitter, иногда это просто дань моде, иногда личная увлеченность общением в твиттере руководства компании, а иногда это целенаправленный распланированный процесс. О последнем варианте и поговорим.
LINQ to SQL Connection Strings with class library projects
By default, creating a new LINQ to SQL model (.dbml) will put the connection strings in both the application settings file and also web.config / app.config. This is not so much of a problem for web projects, but what about class library projects? Personally I would rather just define my connection string once, in web.config.
To achieve this, first you need to change your Data Context so that the connection string is not stored in an Application Settings file. Open up your DBML and click the designer service. Expand the Connection property and set “Application Settings” to False.
Doing this hard codes your connection string in the default constructor of your DataContext. If you open up
public AdventureWorksDataContext() :
base(“Your connection string”, mappingSource)
{
OnCreated();
}
To retrieve the connection string from web.config you could simply change this constructor to:
public AdventureWorksDataContext() :
base(ConfigurationManager.ConnectionStrings[“Linq2SqlConnectionString”].ConnectionString, mappingSource)
{
OnCreated();
}
Or better yet, create a new partial class that extends your data context. To do this you will need to remove the default constructor from the generated designer code and add this to your new partial class.
Whilst both methods will work (as far as grabbing the connection string from web.config), as soon as you make any changes to your DBML through the designer, your Data Context constructor will be reset and you will likely get compilation or runtime errors.
My preferred solution is to create a custom Data Context class that inherits from the generated Data Context:
public class DB : AdventureWorksDataContext
{
public DB()
: base(ConfigurationManager.ConnectionStrings[“Linq2SqlConnectionString”].ConnectionString)
{ }
}
Then I just work with my custom Data Context in my data access layer
public IQueryable
{
DB _db = new DB();
return _db.Customers;
}
I can also change my Data Context as much as I like without breaking anything.
One thing worth noting is that even with the above method your connection string is still present in the default constructor of the generated data context class. If you are selling your assembly or perhaps including it in a public project, you may want to change this.
Quick Reference Cards Show All the MS Excel 2010 Keyboard Shortcuts
SPQuery – Few important things
1. Always specify the RowLimit to get limited results.
- oQuery.RowLimit = 100;
2. To Get the Search Items from the sub folders of the list using SPQuery you can do following. Check here
- SPQuery.ViewAttributes = “Scope=’Recursive’”;
- or
- SPQuery.ViewAttributes = “Scope=’RecursiveAll’”;
3. Be sure to create a new SPQuery instance each time you use it. You cannot create one SPQuery instance and then reuse it multiple times in a loop where you alter the SPQuery’s Query value.
- for (int i = 0; i < 10 ; i++)
- {
- SPQuery oQuery = new SPQuery();
- oQuery.Query = “
+i +”Value>Eq>Where>”;” - SPListItemCollection collListItems = list.GetItems(oQuery);
- }
4. SPQuery query object doesn’t need to include tags
- oQuery.Query = ”<WHERE><EQ><FIELDREF name=”Status”><VALUE type=”Text“>Completed”;
5. If you want to do CAML query which also consider the time in datetime fields then try this
- <Where><Eq><FieldRef Name=‘Created’/><Value Type=‘DateTime’ IncludeTimeValue=‘TRUE’><Today />Value>Eq>Where>
6. SPQuery can’t be used to search across site collection.One can use SPSiteDataQuery class to search across multiple Lists.
To query the lookup based value items
- <where><eq><fieldref name=“Employee” lookupid=“TRUE”><value type=“User”>1value>eq>where>
7. To restrict the items to approved, use moderationtype attribute. more details here
- SPQuery.ViewAttributes = “Scope=’Recursive’ ModerationType=’HideUnapproved’”;
8. If you want your query to return empty columns, you have to add Nullable=’TRUE’ to the viewfields.
- query.ViewFields=“
”;
To get the item related within past few days , you can use OffsetDays attribute along with Today.
- <Where><Eq><FieldRef Name=‘Created’/><Value Type=‘DateTime’ ><Today OffsetDays=‘-7’ />Value>Eq>Where>
Using PowerShell to deploy SharePoint Solutions (wsp)
Copy / Move list items to another list / folder
I’ve found the following methods:
1. Programmatically using CopyTo() method of the SPListItem object
- http://blogs.msdn.com/b/mcsnoiwb/archive/2009/04/30/copy-listitems-from-one-custom-list-to-another-then-move-them-into-subfolders.aspx
- http://stackoverflow.com/questions/1075323/copy-list-items-from-one-list-to-another-in-sharepoint
2. Using the Manage Content and Structure page in the Site Settings
- http://blog.henryong.com/2008/01/21/how-to-movemigrate-sharepoint-list-itemsdocuments-and-preserve-metadata-properties-at-the-same-time/
3. Using the stsadm extensions by Gary Lapointe

