>DansTonCode();

Tous les codes sourcespage 48

JavaScript
 12 July, 2014 à 02:23
#148
$('a').click(function () {

            var id = '';
            var id2 = '';
            id = $(this).attr('id');
            id2 = $(this).attr('id');

            if (id == "search11") {
                //...
            }
            if (id2 == "search1") {

                //...
            }
            });
Java
 12 July, 2014 à 02:14
#130
return !finished || notFinished; // even horse can not understand this.
SQL
 11 July, 2014 à 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