Angular Basic MVC pattern in AngulaJS //defining module var app=angular.module(“app”,[]); //defining controller app.controller(‘Ctrl’, function ($scope) { //defining book’s authors model var bookAuthors=[“Leardershiop”,”Human”] //defining book viewmodel $scope.books = { id: ‘ABXY01’, name: ‘Welcome to this blog’, authors: bookAuthors} }); Book Id : Name : Authors : </table
Category Archives: Uncategorized
Value of ‘null’ is not valid for ‘stream’
Visual Studio Route Cause : You might have add new image file in resource.resx file of your visual studio projects, and the file property Build Action is “Content” Image File –>Right Click –> Properties –> Build Action = Content Solution : Right click on the image file you added, and change the file property to Embedded ResourceContinue reading “Value of ‘null’ is not valid for ‘stream’”
The breakpoint will not currently be hit. No symbols have been loaded for this document
Visual Studio Right click on the startup visual studio project , change the Debugging mode to Mixed. Now run the project.
Things make LIFE worth
1. Be fearlessBeing fearless does not mean being without fear, being fearless means admitting your fears and going beyond them. A real man is not in denial of his fears, holding up a mask of invulnerability but is willing to face his fears and work on them. He has the courage to do things thatContinue reading “Things make LIFE worth”
How to find first and last occurrence of any char or word in sql query?
How to find first and last occurrence of any char or word in sql query? Find First occurrence of any character or word in the string : In the given below example, we need to search for the first occurrence of word ‘the’ in the sentence. DECLARE @String AS VARCHAR(100) DECLARE @strSearch AS VARCHAR(100) SET @String =’Hi SQL SERVER is fromContinue reading “How to find first and last occurrence of any char or word in sql query?”
How to find number of occurrence of char or word in a string ?
SQL Query To get number of occurrence of a char in string DECLARE @myvar VARCHAR(20) SET @myvar = ‘Hello World‘ SELECT LEN(@myvar) – LEN(REPLACE(@myvar,’l’,”)) AS [No-of-times char] Number of times char ‘l’ is repeated 3 times Output : 3 SQL Query to get number of occurrence of a word in string DECLARE @myvar VARCHAR(MAX), @tosearchContinue reading “How to find number of occurrence of char or word in a string ?”
How to read System Date dynamically from windows registry file in C# ?
Get System Date and Time from windows registry C# sample Code to get date format public static string GetSystemDateFormat() { RegistryKey rkey = Registry.CurrentUser.OpenSubKey(@”Control Panel\International”, true); if (rkey != null) { Continue reading “How to read System Date dynamically from windows registry file in C# ?”
How to get comma separated words with single quote in C#?
LINQ Get comma separated words with single quote in C# First parameter itemCollection is input | Hello+we+are+here Second parameter separator is char | ‘+‘ C# sample Code public static string GetResults(string itemCollection,char separator) { Continue reading “How to get comma separated words with single quote in C#?”
How to backup mysql database from command line?
Easy way to back up MySQL database from command line Steps by Step Open command prompt window; Windows + R ; type cmd Copy the below line fully mysqldump -u root -p -h localhost yourdbname >dbbackfilename.sql Right click on command window and paste it; press enter key It will ask for password; press enter key againContinue reading “How to backup mysql database from command line?”
How to change MySQL root password?
How to change MySQL root password? Steps by Step Open MySQL Command Line Client To remove a password SET PASSWORD FOR root@localhost=PASSWORD(”); To add a password SET PASSWORD FOR root@localhost=PASSWORD(‘root’); Demo image is below