infinite

Infinite vertical scroll div element

十年热恋 提交于 2019-12-02 12:53:31
I have sample to vertical scroll slider [sample] : http://jsfiddle.net/e5dtyLjw/ I want to do this sample like infinite, on the sample when scroll is end, its going to top I dont want it, i want to it like infinite Here is my code: var itemCount = 10, activeScroll = 0, countScroll = 0; setInterval(function() { if(countScroll == (itemCount - 6)) { activeScroll = 0; countScroll = 0; $('#list').animate({scrollTop: 0}); } else { activeScroll += 40; countScroll += 1; $('#list').animate({scrollTop: activeScroll}); } }, 1000); update: I did try something new, I want it just like that but this way.

ionic4滑动加载(ion-infinite-scroll)

耗尽温柔 提交于 2019-12-02 10:31:28
效果图如下: 并不是此代码的结果,下面代码只是我源码的部分,但应该够用了。 < ion-list lines = " none " inset = " true " class = " listfen " *ngFor = " let record of pressRecordList; index as i; " > < ion-item > < span style =" width : 80% " > < span *ngIf = " record.integral >= 0 " > < img src = " ../../../assets/imgs/dianZan.1.png " >     {{record.signInfo}} </ span > < span *ngIf = " record.integral < 0 " > < img src = " ../../../assets/imgs/kulian.png " >     {{record.signInfo}} </ span > < br > < span class = " updateTime " > {{record.pressTime}} </ span > </ span > < p style =" width : 20% ; padding-left : 5% " > {{record

loop carousel jquery [duplicate]

最后都变了- 提交于 2019-12-01 20:18:32
Possible Duplicate: my carousel does not work am a bit puzzled! i got this carousel am creating and i desire that it loops. everything else works out fine, but, when the last image has slid up i want the first one to do the same after it, then the second...infinitely. i have tried many things like appending the first image to the last. i have also tried showing back the images after the last(this one tries but gives an undesirable effect). i need to be shown what tweaks i need to make. thanks big time! var images = $("#slideShow div"); var index = 0; for (i = 0; i < images.length; i++) { $

Type error when implementing finger trees

蹲街弑〆低调 提交于 2019-12-01 17:29:53
I wanted to play around with 2-3 finger trees as described in the (Haskell) paper by Hinze (see also this blog ). type Node<'a> = | Node2 of 'a * 'a | Node3 of 'a * 'a * 'a static member OfList = function | [a; b] -> Node2(a, b) | [a; b; c] -> Node3(a, b, c) | _ -> failwith "Only lists of length 2 or 3 accepted!" member me.ToList () = match me with | Node2(a, b) -> [a; b] | Node3(a, b, c) -> [a; b; c] type Digit<'a> = | One of 'a | Two of 'a * 'a | Three of 'a * 'a * 'a | Four of 'a * 'a * 'a * 'a static member OfList = function | [a] -> One(a) | [a; b] -> Two(a, b) | [a; b; c] -> Three(a, b,

Type error when implementing finger trees

谁说我不能喝 提交于 2019-12-01 16:37:20
问题 I wanted to play around with 2-3 finger trees as described in the (Haskell) paper by Hinze (see also this blog). type Node<'a> = | Node2 of 'a * 'a | Node3 of 'a * 'a * 'a static member OfList = function | [a; b] -> Node2(a, b) | [a; b; c] -> Node3(a, b, c) | _ -> failwith "Only lists of length 2 or 3 accepted!" member me.ToList () = match me with | Node2(a, b) -> [a; b] | Node3(a, b, c) -> [a; b; c] type Digit<'a> = | One of 'a | Two of 'a * 'a | Three of 'a * 'a * 'a | Four of 'a * 'a * 'a

Create endless cgpath without framedrops

三世轮回 提交于 2019-12-01 15:15:21
问题 I need to create a cgpath continuously. At the moment I do it like that: func createLine(){ var rand = randomBetweenNumbers(1, 2) currentY-- if rand < 1.5{ currentX-- CGPathAddLineToPoint(leftPath, nil, currentX, currentY) }else{ currentX++ CGPathAddLineToPoint(leftPath, nil, currentX, currentY) } CGPathAddLineToPoint(rightPath, nil, currentX+tileSize, currentY) lineNode.path = leftPath rightNode.path = rightPath } And call it like that: NSTimer.scheduledTimerWithTimeInterval(0.05, target:

C++, getting a infinite loop

给你一囗甜甜゛ 提交于 2019-12-01 11:39:31
i try to do a simple menu using switch. I also want to do a check if the user made a valid input (Only int from 1 to 4). Entering -4 or 44 is working fine with this check. But if i enter something like "w" it gives me a infinite loop. I'm guessing i need another if / else with if (!cin) blabla else go ahead with switch. But i'm not sure how i do that the else is starting the switch. int menu() { int enter; bool exit = false; do { cout << "Wie soll angefangen werden: " << endl; //Enter your choice cout << "1 - Spiel starten" << endl; // do game(); cout << "2 - Highscore " << endl; //do score();

行星运行轨道效果

别来无恙 提交于 2019-12-01 07:45:57
1 <!DOCTYPE html> 2 <html lang="zh"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <meta name="viewport" content="width=device-width, initial-scale=1" /> 7 <title>CSS3实现星系轨道旋转特效</title> 8 <link rel="stylesheet" type="text/css" href="base.css"> 9 </head> 10 11 <body> 12 <div class="xx"> 13 <div class="center"> 14 <div class="ui_base1 u_p3d"> 15 <div class="base u_p3d"> 16 <div class="pan"></div> 17 <div class="ball_base u_p3d ball_1"> 18 <div class="ball">火星</div> 19 </div> 20 <div class="ball_base u_p3d ball_2"> 21 <div class="ball">水星</div> 22 </div> 23 <div class="ball_base u_p3d ball_3"> 24 <div

haskell infinite list of incrementing pairs

北城余情 提交于 2019-12-01 06:22:26
Create an infinite list pairs :: [(Integer, Integer)] containing pairs of the form (m,n) , where each of m and n is a member of [0 ..] . An additional requirement is that if (m,n) is a legit member of the list, then (elem (m,n) pairs) should return True in finite time. An implementation of pairs that violates this requirement is considered a non- solution. ****Fresh edit Thank you for the comments, Lets see if I can make some progress**** pairs :: [(Integer, Integer)] pairs = [(m,n) | t <- [0..], m <- [0..], n <-[0..], m+n == t] Something like this? I just don't know where it's going to return

haskell infinite list of incrementing pairs

痴心易碎 提交于 2019-12-01 04:58:18
问题 Create an infinite list pairs :: [(Integer, Integer)] containing pairs of the form (m,n) , where each of m and n is a member of [0 ..] . An additional requirement is that if (m,n) is a legit member of the list, then (elem (m,n) pairs) should return True in finite time. An implementation of pairs that violates this requirement is considered a non- solution. ****Fresh edit Thank you for the comments, Lets see if I can make some progress**** pairs :: [(Integer, Integer)] pairs = [(m,n) | t <- [0