create table #cucu(bau varchar(10))
insert into #cucu (bau) values ('123')
insert into #cucu (bau) values ('3888')
insert into #cucu (bau) values ('2888')
insert into #cucu (bau) values ('6888')
insert into #cucu (bau) values ('300a')
select * from #cucu
where bau LIKE '[3,4,6][0-9][0-9][0-9]'
drop table #cucu
SQL, C#, VB, .net, asp, JavaScript, you name it. Code samples, Error messages and stuff like that. Please add coments if you think I said something stupid :D or if you have a better idea ... or anything at all ...
Friday, February 15, 2013
Tuesday, March 13, 2012
Samsung Galaxy S2 connection problems
Samsung Galaxy S2 connection problems
Samsung Galaxy S2 connection problem
I recently wanted to connect my Samsung Galaxy S2 to a PC.
1. My first problem was because of the device has not been recognized.
USB device not recognized windows error messsage.
To fix this:
Settings > Applications > Development > USB debugging checkbox - I checked it
Then it connected.
2. The second error was right after that. Error message:
"Reconnect the device in samsung kies mode"
Well, believe it or not, I had to do it bacwords
Settings > Applications > Development > USB debugging checkbox - I UNchecked it
and it worked
[UPDATE] I tried it again, and found out that I have to have the the phone unlocked too
(I use that unlock-pattern-draw-feature)
This all after long hours of reading forums ... and stuff
Hope it helps, comment if it did ;)
cheers
Samsung Galaxy S2 connection problem
I recently wanted to connect my Samsung Galaxy S2 to a PC.
1. My first problem was because of the device has not been recognized.
USB device not recognized windows error messsage.
To fix this:
Settings > Applications > Development > USB debugging checkbox - I checked it
Then it connected.
2. The second error was right after that. Error message:
"Reconnect the device in samsung kies mode"
Well, believe it or not, I had to do it bacwords
Settings > Applications > Development > USB debugging checkbox - I UNchecked it
and it worked
[UPDATE] I tried it again, and found out that I have to have the the phone unlocked too
(I use that unlock-pattern-draw-feature)
This all after long hours of reading forums ... and stuff
Hope it helps, comment if it did ;)
cheers
Monday, November 21, 2011
How does Add/Remove Programs get the size and other information?
Interesting article on this one here.
Thursday, November 10, 2011
How to Build a Chrome Extension
I saw this article on lifehacker, thought it pretty cool:
How to Build a Chrome Extension
Thursday, July 14, 2011
SQL capitalize words
this is from L.E.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER FUNCTION [dbo].[fn_capitalize]
(
@str AS nvarchar(100)
)
RETURNS nvarchar(100)
AS
BEGIN
DECLARE
@ret_str AS varchar(100),
@pos AS int,
@len AS int
SELECT
@ret_str = N' ' + LOWER(@str),
@pos = 1,
@len = LEN(@str) + 1
WHILE @pos > 0 AND @pos < @len
BEGIN
SET @ret_str = STUFF(@ret_str,
@pos + 1,
1,
UPPER(SUBSTRING(@ret_str,@pos + 1, 1)))
SET @pos = CHARINDEX(N' ', @ret_str, @pos + 1)
END
RETURN RIGHT(@ret_str, @len - 1)
END
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER FUNCTION [dbo].[fn_capitalize]
(
@str AS nvarchar(100)
)
RETURNS nvarchar(100)
AS
BEGIN
DECLARE
@ret_str AS varchar(100),
@pos AS int,
@len AS int
SELECT
@ret_str = N' ' + LOWER(@str),
@pos = 1,
@len = LEN(@str) + 1
WHILE @pos > 0 AND @pos < @len
BEGIN
SET @ret_str = STUFF(@ret_str,
@pos + 1,
1,
UPPER(SUBSTRING(@ret_str,@pos + 1, 1)))
SET @pos = CHARINDEX(N' ', @ret_str, @pos + 1)
END
RETURN RIGHT(@ret_str, @len - 1)
END
Thursday, June 2, 2011
SQL - turn debug on-off
This is what I do in stored procedures to turn debug print stuff on and off
DECLARE @isDebug BIT; SET @isDebug = 0; IF @isDebug = 0 BEGIN SET NOCOUNT ON END
/* ... sql stuff ... */
IF @isDebug = 1 PRINT (@strSQL)
DECLARE @isDebug BIT; SET @isDebug = 0; IF @isDebug = 0 BEGIN SET NOCOUNT ON END
/* ... sql stuff ... */
IF @isDebug = 1 PRINT (@strSQL)
Tuesday, April 26, 2011
DataTable move the Column
If I don't put the code here, I bet I'll never find it again when I need it ...
DataColumn dc = dtRatesManagerAll.Columns["RateId"];
dc.SetOrdinal(dtRatesManagerAll.Columns.Count - 1);
DataColumn dc = dtRatesManagerAll.Columns["RateId"];
dc.SetOrdinal(dtRatesManagerAll.Columns.Count - 1);
Subscribe to:
Posts (Atom)