The following steps will tell you if your database version supports full text searching and if so how to enable it. Open SQL server management console Right click on the database and select properties On the left select files If “Full-Text Indexing” is greyed out it means that full-text indexing is not enabled. NOTE: If you are using SQL Server 2012 Please see the SQL Server 2012 notes at the bottom of this article. How to enable Full Text Searching Click on the New Query button top left of the…
Month: September 2015
How to remove HTML tags from data with SQL
The purpose of this article is to provide a way of cleaning up of HTML tags within the data. When we use various styles or tabular format data in UI using Rich Text Editor/ Rad Grid etc, it will save data in database with HTML tags. When you save in database this kind of field you have: An HTML element starts with a start tag (<p>) and ends with end tag (<p/>) and everything between Start tag and End tag is HTML element. e.g. <b>Following are the popular databases: <br…
SQL SERVER – Find Current Location of Data and Log File of All the Database
As I am doing lots of experiments on my SQL Server test box, I sometime gets too many files in SQL Server data installation folder – the place where I have all the .mdf and .ldf files are stored. I often go to that folder and clean up all unnecessary files I have left there taking up my hard drive space. I run following query to find out which .mdf and .ldf files are used and delete all other files. If your SQL Server is up and running OS will…
How to strip all HTML tags and entities and get clear text?
I was encouraged to write this Tip/Trick because of so many questions received for this issue. Suppose you’re having a bunch of HTML strings, but you just want to remove all the HTML tags and want a plain text. You can use Regex to come to the rescue. The Regex I had developed before was more cumbersome, then Chris made a suggestion, so I will now go further with the regex suggested by Chris that is a "\<[^\>]*\>". I have tested it for many cases. It detects all types of…
Microsoft Announces Office 2016 Will Arrive September 22
Microsoft announced this morning the official launch date for the long-anticipated new version of Microsoft Office: Office 2016 will be broadly available starting on September 22, the company says. Meanwhile, Office Customers with volume licensing agreements will be able to download the software on October 1st. The updated version of Office includes a number of new features for desktop customers, including the ability to co-edit documents at the same time, sync files to OneDrive in the cloud, and more. Alongside the announcement of the launch date, Microsoft noted a few…
Print a table structure in SQL Server
I was wondering how it’s possible to get the structure of one or more table(s) in a database, using possibly a SELECT; I need to retrieve the composition of the DB I’m working onto to attach it in some docs about the webapp I’m currently developing. SELECT TABLE_NAME, COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH FROM INFORMATION_SCHEMA.COLUMNS ORDER BY TABLE_NAME
Track events for Google Analytics and Piwik
After my post of yesterday, I’ve worked for creating a script to integrate Google Analytics (new version with analytics.js) and Piwik (Piwik is the leading open-source analytics platform similar to Google Analytics. You can download it from its site or directly in your IIS with WebMatrix). With this code you have only one function to call in every part of your page. Automatically the function detects download, email, phone number, external links and tracks them. You can insert in an anchor a code like: <a href=”https://puresourcecode.com/” onclick=”TrackEvent(‘Link to my site’, ‘PSC’,…
Templated Razor Delegates
What’s that? I’ll let the code do the speaking. @{ Func<dynamic, object> b = @<strong>@item</strong>; } <span>This sentence is @b(“In Bold”).</span> That could come in handy if you have friends who’ll jump on your case for using the bold tag instead of the strong tag because it’s “not semantic”. Note that the delegate that’s generated is a Func<T, HelperResult>. Also, the @item parameter is a special magic parameter. These delegates are only allowed one such parameter, but the template can call into that parameter as many times as it needs.…
Creating reusable HTML components in ASP.NET MVC using Razor
Whilst working on a side project I started to notice I was using a lot of the same HTML to create floating boxes. Whilst these boxes looked the same, the content of them changed quite dramatically; for instance, some of the content boxes contained forms, others contained straight text, like so: <div class="panel"> <div class=panel-inner"> <h2 class="panel-title">Panel Title</h2> <div class="panel-content"> /* Can I pass content to be rendered in here here? */ </div> </div> </div> </div> As my side project progressed and grew, I found myself making more and…