Welcome to Nativesoft

We offer complex services in the area of software development, networking and IT consulting. The development of made-to-order software is covered through the whole lifecycle starting with specification of requirements, continuing with analysis of requirements, design, implementation and maintenance. In our work, we use standardized practices, modeling techniques, UML modeling tools and an engineering work approach. The company`s specialists with many years of experience in the area of information technologies will be happy to advice you anytime.

DB2 Error Codes Catalogue

We struggled with DB2 error codes so we think this page will be useful for all the people having the same struggle: find what a DB2 error code means. IBM offered a pdf document with all the codes, we put that document into a database that can be easily queried.

DB2 Error Code
Details


Changing the default SQL Backup directory

Change the registry key located in:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.2\MSSQLServer

See attached image:

regedit1

NativeSoft Validators library

The script offers several functions that usually are needed during a web development process.

The main scope of this library is to eliminate the need of custom javascripts for control validation. Using the library you can use control custom attributes instead of javascripts for doing basic and complex validations like “isnumeric”, min/max values, value in control x bigger/smaller than value in control y and even more complicated checks like value from control x checks complex math functions (ex: (a+b)/c -1/d) etc).
More, we added even FORMULA functionality, meaning it is possibile to set a control value based on a custom formula, similar to Excel functions.

The custom control attributes we created are:

  • valmin : minimum value
  • validatefunction: a custom validation js function for special cases. the function must start with ‘validate’ word.
  • formula: the forumla used for the control value
  • isnumber: selfexplanatory.
  • isrequired: selfexplanatory. 1, yes, true as true and  false, no, 0 as false. however, if used toghether with min value it has priority. if isrequired=false and value is blank the min/max or anyother validation will not be fired,allowing complex validation, allowing null values too.
  • decimals: number of decimals to be displayed. If given, the numbers will be formated also.
  • digitsep: the separator to be used for decimals, if is not standard
  • regexpattern: the regexpattern that control must fit
  • checkexpression: a javascript expression that will be checked. To give control values inside you must use $ special character. if you control name is ‘BALANCE’ then use $BALANCE$ inside checkexpression or Formula attribute. Also $this$ can be used for self value.
  • checkexpressionfailure: the custom message that will be displayed when validation failed
  • requiredText: checks if control contains the specified text (ex: useful for number prefixes or other similar cases)
  • lenmax/lenmin : max/min length of a string. Usefull especially with textarea controls, they dont have a HTML standard max function

 

First we added a few functions to the String prototype :

 

formatNumber(decimals, digitSep, decimalSep)

“1234567.245”.formatNumber(1,”,”,”.”) returns 1,234,567.2

“1234567.248”.formatNumber(2,”#”,”@”) returns 1#234#567.24 (caution: does not do math rounding )

 

unformatNumber(digitSep) 

removes the digit separator from the String data and returns a clean number

 

isNumeric()

“hello”.isNumeric() returns false while “12,444,234.302”.isNumeric() returns true

 

format()
/**
* example: “this is {0} and {1}”.format(‘a’,’b’) returns “this is a and b”
* @returns {String}
*/

String.prototype.format = function()

formats a string with values like in sql statement: ex: “ {0} + {1} “.format(“a”,”b”) becomes “a+b”

 

replaceAll ()

 

/**
* replaces ALL. the ignore param reffers to ignore case
* @param str1
* @param str2
* @param ignore
* @returns
*/

String.prototype.replaceAll = function(str1, str2, ignore)

a function that replaces ALL appeareances of a string. Why this function? Because JavaScript does not have it! The included replace function does not replace ALL.

 

stripHTML(html)

returns a “interpreted” in html text (ex:  gigi&quote becomes ‘ gigi”’

compareValues(a, b)

returns -1 (a<b),0(a==b), 1(a>b). is working correctly with both text and numbers. The standard a>b will return false for “111”>”99”

validateEmail (email) 

validates a string as email

 

Extended FORM VALIDATION

 

Declare the form:

<form action=“userdetails” method=“post” id=“userdetails” name=“userdetails” onsubmit=”return verifysubmit(‘userdetails’,’submit_errors’)”>

verifysubmit is a function included in the script library.

userdetails=the form id

submit_errors=The  “submit_errors” value is the div id where the errors will be displayed. If null or doesn’t exists the errors will be shown in alert

Ex:

<div align=“center”

id=“submit_errors” style=”display: block; margin:0px; border-color:blue;  color:red;background-color:yellow“></div>

 

 

 

<input  id=“email” name=“email” validatefunction=“Email” class=“ctrl” value =<%=user.getEmail()%> />

 

Above the validatefunction attribute will tell the validator to call the function validateEmail (validatexxxxx, where xxxxx is the attribute value) and pass the control value as parameter. So if you have custom validation function you can use validatefunction attribute

 

 

<td align=left  colspan=“2” id=“t_phone”>Phone:</td>

<td bgcolor=“#ffffff” colspan=“5”><input id=“phone” isrequired=“false” regexpattern=“^[\d\.\-]+$” regexpatternfailure=“phone number invalid” checkexpression=“$phone>10”   lenmin=“10” valmin=“999”   name=“phone” class=“ctrl” value =“” /></td>

 

 

Above you can see several attributes:

 

<input type=“password”  id=“pass” checkexpression=“‘$pass’==’$pass2′”  isrequired=“false” lenmin=“4” lenmax=“10” lenmin=“4”  name=“pass” class=“ctrl” value =“” />

 

<input isrequired=“false” lenmin=“4” checkexpression=“‘$pass’==’$pass2′” checkexpressionfailure=“Password and Password Verify  doesnt match!” type=“password”  id=“pass2” name=“pass2” class=“ctrl” value =“” />

 

Note: before calling the verifysubmit function you may set the variable debuginfo=true in order to see debug information.

 

 

Download link: nativesoftvalidator

How to increase IIS buffer limit size

Sometimes IIS gives you HTTP500 server error when trying to write binary data to response (Response.BinaryWrite). Thats because the data is exceeding the buffer limit size. Solution is to increase the limit size (I think default is  4MB).

To increase the buffering limit in IIS 6, follow these steps:

  1. Click Start, click Run, type cmd, and then click OK.
  2. Type the following command, and then press ENTER:
    cd /d %systemdrive%\inetpub\adminscripts
  3. Type the following command, and then press ENTER:
    cscript.exe adsutil.vbs SET w3svc/aspbufferinglimit LimitSize

    Note LimitSize represents the buffering limit size in bytes. For example, the number 67108864 sets the buffering limit size to 64 MB.

Life as a developer

When the boss announces a bonus if the project is completed before the deadline
When a friend of mine asks me to fix his website built with Joomla

When a friend of mine asks me to fix his website built with Joomla

 

When a bug goes unnoticed during a presentation

When a bug goes unnoticed during a presentation

 

Ninja-fixing a bug 10 minutes before the demo for client

Ninja-fixing a bug 10 minutes before the demo for client

 

When they tell me the website has to be supported by IE6

When they tell me the website has to be supported by IE6

 

When the sales people announce they have sold our product to the customer

When the sales people announce they have sold our product to the customer

 

When the project manager suddenly looks on my screen

When the project manager suddenly looks on my screen

 

When the project manager enters the office

When the project manager enters the office

 

When the intern tells me that “the tests are for those who can not program

When the intern tells me that “the tests are for those who can not program

 

When the code that I have not tested on dev works perfectly in production

When the code that I have not tested on dev works perfectly in production

 

When the client tries to click on the mockups

When the client tries to click on the mockups

 

 

When the app goes into beta and the first bug reports arrive

When the app goes into beta and the first bug reports arrive

 

When sysadmin finally gives us the root access

When sysadmin finally gives us the root access

 

When project manager thinks that I can handle whole project all by myself

When project manager thinks that I can handle whole project all by myself

 

When my script finally worked

When my script finally worked

 

When my regex returned exactly what I expected

When my regex returned exactly what I expected

 

When I’m told that the module on which I have worked all the week will never be used

When I’m told that the module on which I have worked all the week will never be used

 

When I’m told that my code is broken in production

When I’m told that my code is broken in production

 

When I’m deploying code to production

When I’m deploying code to production

 

When I try to fix a bug at 3 in the morning

When I try to fix a bug at 3 in the morning

 

When I try a solution without reading the documentation first

When I try a solution without reading the documentation first

 

When I start coding without doing analysis first

When I start coding without doing analysis first

 

 

When I show the boss that I have finally fixed this bug

When I show the boss that I have finally fixed this bug

 

When I see someone commit 500 files to fix one bug

When I see someone commit 500 files to fix one bug

 

When I realize that I have been blocked for two hours because of a forgotten semicolon

When I realize that I have been blocked for two hours because of a forgotten semicolon

 

When I notice I was editing production code and I quickly correct my errors

When I notice I was editing production code and I quickly correct my errors

 

 

When I manage to replace 200 lines of the algorithm by only 10 lines

When I manage to replace 200 lines of the algorithm by only 10 lines

 

When I launch my script for the first time after several hours of development

When I launch my script for the first time after several hours of development

 

When I go off for the weekend while everyone else is still trying to fix bugs

When I go off for the weekend while everyone else is still trying to fix bugs

 

When I find out that someone has accidentally overwritten my changes in git

When I find out that someone has accidentally overwritten my changes in git

 

When I find a solution without searching Google

When I find a solution without searching Google

 

When I apply a new CSS for the first time

When I apply a new CSS for the first time

 

When I am the only one to notice a bug on friday night

When I am the only one to notice a bug on friday night

 

When I am asked to continue the work of a newbie colleague

When I am asked to continue the work of a newbie colleague

 

When I am asked about something from the 900 pages of documentation

When I am asked about something from the 900 pages of documentation

 

When customer wants to change specification 2 days before pushing to production

When customer wants to change specification 2 days before pushing to production

 

When asked to lend a hand on a Friday afternoon

When asked to lend a hand on a Friday afternoon

 

When after a productive day I’m so confident that I think I can handle parkour tricks on the way home

When after a productive day I’m so confident that I think I can handle parkour tricks on the way home

 

When after a big update I test the new site with IE

When after a big update I test the new site with IE

 

When a thing that worked on Friday no longer works on Monday

When a thing that worked on Friday no longer works on Monday

 

When a newbie suggests to add a new feature to project

When a newbie suggests to add a new feature to project

 

When the boss is looking for someone to urgently fix a difficult bug

When the boss is looking for someone to urgently fix a difficult bug

 

When the boss announces a bonus if the project is completed before the deadline

When the boss announces a bonus if the project is completed before the deadline

 

When a misformed sql query actually returns me the correct results

When a misformed sql query actually returns me the correct results