Upon posting this question, I learn that it is mandatory, whenever testing/playing with regexes, to make sure you are using an environment that follows/matches the Regular Expression behavior of the language you are programming with.
Otherwise things will not make sense.
Check this for online sandboxes for regex testing, per programming language.
Keeping track of interesting places I put my feet on in the software development world.
Search This Blog
Monday, December 28, 2015
Wednesday, December 16, 2015
Nuget Helpers Package
Uploaded a nuget package containing methods I have been using very often in new projects.
Below is a list of all methods provided at this point:
Nuget install command: Install-Package Helpers
Below is a list of all methods provided at this point:
Nuget install command: Install-Package Helpers
Sunday, December 13, 2015
Enforcing a given number of digits in a numeric value in Javascript
Javascript does not a built-in functionality like C#'s .ToString("0000").
To accomplish the same I came up with the following:
function setNumericFormat(value, numOfDigits, paddingChar) {
var length = value.toString().length;
if (length < numOfDigits) {
var prefix = "";
for (var i = 1; i <= numOfDigits - length; i++) {
prefix += paddingChar;
}
return prefix + value.toString();
}
return value.toString();
}
Resembles a LeftPad function...
To accomplish the same I came up with the following:
function setNumericFormat(value, numOfDigits, paddingChar) {
var length = value.toString().length;
if (length < numOfDigits) {
var prefix = "";
for (var i = 1; i <= numOfDigits - length; i++) {
prefix += paddingChar;
}
return prefix + value.toString();
}
return value.toString();
}
Resembles a LeftPad function...
Wednesday, November 25, 2015
Need to migrate your sql server database and wondering how will you get all the objects sql scripts ?
Found out that it is quite simple.
In case the link gets broken:
In case the link gets broken:
- Mouse right-click on the database in question, in the database explorer
- Select Tasks
- Select Generate Scripts
- Choose all the objects you want the scripts to be generated.
That's all.
Thursday, November 12, 2015
Project will not build after adding function or procedure to edmx
Having issues in trying to add a function/procedure to your Entity Data Model - it will not build after that ?
What's more, it works perfectly with Entity Framework version 5 ? And with 6, which you are trying now, does not ?
Well, here's the solution.
Lessons learned: there is such a thing as Entity Framework Tools for Visual Studio, and we need to make sure we have it updated/in sync with the version of Visual Studio we are using in combination with a package we have just downloaded/added to our project.
Dependencies, dependencies, dependencies...
What's more, it works perfectly with Entity Framework version 5 ? And with 6, which you are trying now, does not ?
Well, here's the solution.
Lessons learned: there is such a thing as Entity Framework Tools for Visual Studio, and we need to make sure we have it updated/in sync with the version of Visual Studio we are using in combination with a package we have just downloaded/added to our project.
Dependencies, dependencies, dependencies...
Monday, November 9, 2015
Nuget packages that seamlessly merge all referenced assemblies into your executable
Today I just learned about 2 of them, used the 1st and it's awesome:
- Costura.Fody
- ILMerge
- ILRepack
Sunday, November 8, 2015
One more chapter on the topic "Do Not Use Regex to Parse Html"
My bit of contribution to the topic of not using regex to parse html, which comes after I put much effort in doing so :-)
See this question in stackoverflow I just posted.
See this question in stackoverflow I just posted.
Subscribe to:
Posts (Atom)
