All the sources codespage 48
SQL
July 11, 2014 am31 09:41
#167
CREATE FUNCTION [dbo].[get_number_of_workers]
(
@number_of_workers varchar(10)
)
RETURNS int
AS
BEGIN
set @number_of_workers = replace(replace(replace(replace(LTRIM(RTRIM(@number_of_workers)), char(9), ''), char(10), ''), char(13),''), char(13)+char(10), '')
DECLARE @temp varchar(10)
SELECT
@temp = number_of_workers
FROM
(SELECT LTRIM(RTRIM(@number_of_workers)) as number_of_workers) as temp
WHERE
number_of_workers like '[0-9]'
or number_of_workers like '[0-9][0-9]'
or number_of_workers like '[0-9][0-9][0-9]'
or number_of_workers like '[0-9][0-9][0-9][0-9]'
or number_of_workers like '[0-9][0-9][0-9][0-9][0-9]'
or number_of_workers like '[0-9][0-9][0-9][0-9][0-9][0-9]'
or number_of_workers like '[0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
or number_of_workers like '[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
or number_of_workers like '[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
or number_of_workers like '[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
or number_of_workers like '[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
RETURN CONVERT(INT, @temp)
END
Java
July 11, 2014 am31 07:42
#121
try {
return true;
} finally {
return false;
}
PHP
July 11, 2014 am31 02:50
#190
// hack for ie browser (assuming that ie is a browser)