본문 바로가기

분류 전체보기

(242)
[Ionic2] ion-infinite-scroll 사용하기 src>app>pages>search.html {{audio.title}} ⚬ {{audio.artist}} {{track.title}} ⚬ {{track.artist}} src>app>pages>search.ts doInfinite(infiniteScroll) { this.limit = 3; let offset = this.page * this.limit; setTimeout(() => {; this.searchList(this.keyword, offset).subscribe( data2 => { for(let index = 0;index < data2.length;index++){ let itemTrack:any; itemTrack = []; itemTrack.art = 'img/johnmayer.j..
[ionic2] 앱페이지 추가하기 src>app>app.compoment.ts import { Component, ViewChild } from '@angular/core';import { Nav, Platform } from 'ionic-angular';import { StatusBar, Splashscreen } from 'ionic-native'; import { Page1 } from '../pages/page1/page1';import { Page2 } from '../pages/page2/page2';import { Search } from '../pages/search/search';import { PlayList } from '../pages/playList/playList'; @Component({ templateUrl:..
[function] 문자열에서 숫자만 뽑아내기 CREATE FUNCTION fn_GetNumeric (@strAlphaNumeric VARCHAR(256)) returns VARCHAR(256) AS BEGIN DECLARE @intAlpha INT SET @intAlpha = Patindex('%[^0-9]%', @strAlphaNumeric) BEGIN WHILE @intAlpha > 0 BEGIN SET @strAlphaNumeric = Stuff(@strAlphaNumeric, @intAlpha, 1, '') SET @intAlpha = Patindex('%[^0-9]%', @strAlphaNumeric) END END RETURN Isnull(@strAlphaNumeric, 0) END 예) SELECT dbo.fn_GetNumeric('1..
[function] 숫자에 억,만 단위 붙이기 CREATE FUNCTION [dbo].[fn_MoneyToKor]( @price FLOAT)RETURNS NVARCHAR(500)ASBEGINDECLARE @salePrice FLOATDECLARE @deposit FLOATDECLARE @monthlyRent FLOATDECLARE @tempMoney1 FLOATDECLARE @tempMoney2 FLOATDECLARE @tempMoney NVARCHAR(500) = '' SET @deposit = @price;SET @monthlyRent = 100; SET @tempMoney1 = FLOOR(@deposit / 100000000)SET @tempMoney2 = FLOOR((@deposit - (@tempMoney1 * 100000000)) / 10..
[function] 구분자가 있는 문자열 테이블로 만들기 CREATE FUNCTION [dbo].[fn_Split]( @pSource NVARCHAR(MAX), @pSeparator VARCHAR(1))RETURNS @TAB_RETURN TABLE( ItemIndex INT, ItemValue NVARCHAR(1000))ASBEGIN DECLARE @buffer VARCHAR(MAX); DECLARE @item NVARCHAR(MAX); DECLARE @tmp INT; DECLARE @index INT; SET @index = 1; WHILE LEN(@pSource) > 0 BEGIN SET @tmp = CHARINDEX(@pSeparator, @pSource); IF @tmp > 0 BEGIN SET @item = SUBSTRING(@pSource, 1, @..
error CS1061: 'int' does not contain a definition for 'ToList' and no extension method 'ToList' accepting a first argument of type 'int' could be found (are you missing a using directive or an assembly reference?) error CS1061: 'int' does not contain a definition for 'ToList' and no extension method 'ToList' accepting a first argument of type 'int' could be found (are you missing a using directive or an assembly reference?) 1. 원인 entoty framework 에 매핑 한 stored procedure 가 model 을 제대로 생성 할 수 없을때 발생하는 오류입니다.1-1. 예sp 내부에 #TEMP 테이블 join이나 select 가 있으며 list 로 가져올 컬럼을 매핑 할 수 없을 때 발생합니다. 즉, var onbidObjectList =..
[javascript] 숫자 3자리 마다 콤마찍기 function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } 출처 : https://goo.gl/v5VnQ
[mssql] paging limit offset DECLARE @page INT = 1DECLARE @offset INT = 5 ;WITH TempTable AS( SELECT ROW_NUMBER() OVER (ORDER BY 정렬컬럼 ) AS RowNum , * FROM Table WITH(NOLOCK) WHERE 조건)SELECT *FROM TempTableWHERE RowNum > ( CASE WHEN @page > 1 THEN ( @page - 1 ) * @offset ELSE 0 END ) AND RowNum