Skip to main content

Posts

SQL SERVER - How to capitalize the first letter of a record in SQL

  Cast your ntext to nvarchar(max) and do the upper and left operations. Sample below. SELECT UPPER ( LEFT ( cast (Comments as nvarchar(max)), 1 )) + LOWER ( SUBSTRING ( cast (Comments as nvarchar(max)), 2 , LEN( cast (Comments as nvarchar(max))))) FROM dbo.Template_Survey; Following should work for update. Update dbo.Template_Survey SET Comments = UPPER ( LEFT ( cast (Comments as nvarchar(max)), 1 )) + LOWER ( SUBSTRING ( cast (Comments as nvarchar(max)), 2 , LEN( cast (Comments as nvarchar(max)))));

google - What is Bounce rate, Domain Rating (DR), & ctr?

Bounce rate Bounce rate represents the percentage of visitors who enter the site and then leave ("bounce") rather than continuing to view other pages within the same site Bounce rate (%) = Visits that access only a single page (#) ÷ Total visits (#) to the website Example If user visits single page then bounce rate will be Bounce rate = 1/1*100 = 100% If user visits two page then bounce rate will be Bounce rate = 1/2*100 = 50% What Is Adsense Click-Through Rate (CTR)? Google Adsense Click-through Rate (CTR) represents the number of clicks on your ads against the number of times they’ve been shown o your site visitors. For example,   If your ads get 5 clicks out of 100 views (impressions) your Adsense CTR would be 5%. Here’s the simple formula Google uses to calculate Adsense CTR Total Number of Ad Clicks ÷ Total Number of Impressions = Click-Through Rate (CTR) CTR = No. of clicks / No. of exposures CTR% = No. of clicks * 100 / No. of exposures What does D...

The script has an unsupported MIME type ('text/html').

ServiceWorker: The script has an unsupported MIME type (chrome-extension)   The Error is showing because of the incorrect path and service worker is not accessible. Path defined for js is not correct, might be you have taken relative path and this is vary on different pages. Replacing: 'service-worker.js' with: '/service-worker.js' OR './ service-worker.js' in ( navigator.serviceWorker.register('/service-worker.js') The service worker file is not present at http://domain.com/service-worker.js so the server is returning index.html instead. Then the registration function has no idea of what to do with a index.html file and tells you that the MIME-type is not correct.  A quick fix would be to copy the service-worker.js file to the public folder so that when you hit http://domain.com/service-worker.js you see the file in the browser.  Remember to go to ChromeDev > Applications > ServiceWorkers and hit Unsubscribe. in order to remove the errored...

Install Google Analytics to WordPress Without a Plugin

  Install Google Analytics to WordPress Without a Plugin In order for Google Analytics to start tracking your visitors, the tracking code mentioned above needs to be present on every page of your site you want to track user behavior on. Usually, that’s all of them. Here’s how you can achieve that manually. Option A: Insert the Code Into  header.php One of the main ways to add the tracking code to your site is to insert it into your header. This way, it will load on every page. Most standard themes have a header.php file that is responsible for outputting the site header section. So, you can simply input the Google Analytics code here. However, when you make changes to theme files, be aware that it’s always best to do it in a child theme. Otherwise, they will get lost when you update your main theme. Child themes are super useful in general and you should definitely read up about them. Also, don’t forget to back up your WordPress site when making any changes like this. Once you...

window.location.href not working - asp.net

 window.location.href not working If we are calling function through a submit button. This may be the reason why the browser does not redirect. It will run the code in the function and then submit the page instead of redirect.  In this case Either 1. change the type tag of your button to button           2. you just need to add "return false;" at the bottom of your function

Uncaught (in promise) TypeError: Failed to execute 'Cache' on 'addAll': Request failed

 Error in Service Worker. Uncaught (in promise) TypeError: Failed to execute 'Cache' on 'addAll': Request failed. Main cause of this is typo in one of the filenames/ OR file is not exists that had added to cached_urls. It did not match the name of the real file so I kept getting the error. I Got this issue due to typo in the filename and found it by quickly setting cached_urls to an empty list and found that the error went away.

Advanced SEO - Separate URLs for Mobile and desktop applications

We can configure Separate URLs for Mobile and desktop applications Annotations for desktop and mobile URLs To help Google algorithms understand separate mobile URLs, we recommend using the following annotations: On the desktop page, add a  rel="alternate"  tag pointing to the corresponding mobile URL. This helps Googlebot discover the location of your site's mobile pages. On the mobile page, add a  rel="canonical"  tag pointing to the corresponding desktop URL. google support two methods to have this annotation: in the HTML of the pages themselves and in  sitemaps . For example, suppose that the desktop URL is  http://example.com/page-1  and the corresponding mobile URL is  http://m.example.com/page-1 . The annotations in this example would be as follows. Annotations in the HTML On the desktop page ( http://www.example.com/page-1 ), add the following annotation: <link rel = "alternate" media = "only screen and (max-width: 640px)"   href ...

Plesk - Upgrade the .net Framework to 4.7.2 OR 4.8

 Steps to Upgrade the .net Framework to 4.7.2 OR 4.8 1. First Download the .NET Framework from https://dotnet.microsoft.com/download/dotnet-framework   2. Install on the Server. 3. Login to the Plesk and go to "Tools & Settings" > "Server Components" and refresh the components using the refresh button 4. After update, it will reflect in "Web Script" section at the server component page. All done!!!

How to split column with delimiter into two columns in SQL Server Split

We can use Case and   CHARINDEX  to split column with delimiter into two columns in SQL Server select case when CHARINDEX ( '_' , name )> 0 then SUBSTRING ( name , 1 , CHARINDEX ( '_' , name ) -1 ) else name end firstname, CASE WHEN CHARINDEX ( '_' , name )> 0 THEN SUBSTRING ( name , CHARINDEX ( '_' , name )+ 1 , len ( name )) ELSE NULL END as lastname from emp you can use CASE command to control is last name available. MS SQL Server : Query 1 : declare @t table ( id int , name varchar ( 50 )) insert into @t ( id , name ) values ( 1 , 'abc_rao' ) insert into @t ( id , name ) values ( 2 , 'nani' ) insert into @t ( id , name ) values ( 3 , 'hari_babu' ) insert into @t ( id , name ) values ( 4 , 'kalibabu' ) insert into @t ( id , name ) values ( 5 , 'ab_tan' ) select case when CHARINDEX ( '_' ...

How to cancel your Zoom subscription or add-ons at anytime?

Cancel a Pro (paid) subscription Sign in to the Zoom web portal. Click Account Management, then click Billing. Under the Current Plans tab, find the plan you want to cancel and click Cancel Subscription to stop your subscription's automatic renewal. Confirm your request by selecting Cancel Subscription. Choose why you would no longer like to renew your subscription. Once complete, click Submit. Your plan status will now be updated to Canceled. You will still have use of your paid plan for the remainder of your subscription term. (Optional) If you would no longer like to have the plan canceled, you will be able to reactivate your plan by selecting Reactivate Plan on the Current Plans page. Note: If it says Contact Sales instead of Cancel Subscription, you will need to contact our sales team or your Account Executive to have the plan canceled