Skip to content

Commit c81aa5d

Browse files
committed
v 1.9.2 window.open(url);
1 parent ab370d8 commit c81aa5d

File tree

11 files changed

+48
-32
lines changed

11 files changed

+48
-32
lines changed
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
1-
print('SYL_L_001_0排序_1选择排序')
1+
2+
def Sort(arr):
3+
for i in range(len(arr)):
4+
min_i = i
5+
for j in range(i, len(arr)):
6+
if arr[j] < arr[min_i]:
7+
min_i = j
8+
arr[i], arr[min_i] = arr[min_i], arr[i]
9+
return arr
10+
11+
12+
if __name__ == '__main__':
13+
arr = Sort([3, 5, 1, 2, 6, 7, 9, 11])
14+
print(arr)
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
# SYL_L_001_0排序_1选择排序
1+
# SYL_L_001_0排序_1选择排序
2+
3+
n^2遍历,每遍历一轮选择一个最小/大值,
4+
然后与当前位替换,最终得到排序结果

easyleetcode/logs/count_day.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
15
1+
16

easyleetcode/logs/count_view_code.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
88
1+
96

easyleetcode/web/templates/add_file.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919
<h1 align="center"> {[message]} </h1>
2020
<div align="center">
21-
<button><a href="/">Home</a></button>
22-
<button><a href="/view">View</a></button>
23-
<button><a href="/addview"> Add</a></button>
24-
<button><a href="/help">Help</a></button>
21+
<button><a href="/" target="_blank">Home</a></button>
22+
<button><a href="/view" target="_blank">View</a></button>
23+
<button><a href="/addview" target="_blank"> Add</a></button>
24+
<button><a href="/help" target="_blank">Help</a></button>
2525
</div>
2626
<h6></h6>
2727
<div id="code" align="center">
@@ -48,7 +48,7 @@ <h3>like :Leetcode_001_Two_Sum</h3>
4848
.then(function (response) {
4949
host = window.location.host;
5050
url='http://'+host+'/code/'+response.data['name'];
51-
window.location.href = url;
51+
window.open(url);
5252
})
5353
.catch(function (error) {
5454
console.log(error);

easyleetcode/web/templates/code_list.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626

2727
<h1 align="center"> {[message]} </h1>
2828
<div align="center">
29-
<button><a href="/"> Home</a></button>
30-
<button><a href="/addview"> Add</a></button>
31-
<button><a href="/about"> About</a></button>
32-
<button><a href="/help"> Help</a></button>
29+
<button><a href="/" target="_blank"> Home</a></button>
30+
<button><a href="/addview" target="_blank"> Add</a></button>
31+
<button><a href="/about" target="_blank"> About</a></button>
32+
<button><a href="/help" target="_blank"> Help</a></button>
3333
<button><a href="https://github.com/425776024/easy_leetcode" target="_blank">Github</a></button>
3434
<h5>Your Number of open : {[data['count_day']|tojson]} <br/> Your Number of view code :
3535
{[data['count_view_code']|tojson]}
@@ -60,12 +60,12 @@ <H6>Maker:[email protected]</H6>
6060
click_func:function (name) {
6161
host = window.location.host;
6262
url='http://'+host+'/code/'+name;
63-
window.location.href = url;
63+
window.open(url);
6464
},
6565
find_func:function(){
6666
host = window.location.host;
6767
url='http://'+host+'/filter_view/'+sentence_text.keyword;
68-
window.location.href = url;
68+
window.open(url);
6969
},
7070
del_func:function(name) {
7171
if(confirm("realy delete "+name+" ?")){
@@ -79,7 +79,7 @@ <H6>Maker:[email protected]</H6>
7979
.then(function (response) {
8080
host = window.location.host;
8181
url='http://'+host+'/view';
82-
window.location.href = url;
82+
window.open(url);
8383
})
8484
.catch(function (error) {
8585
console.log(error);

easyleetcode/web/templates/code_view.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@
5656

5757
<h1 align="center"> {[message]} </h1>
5858
<div align="center">
59-
<button><a href="/">Home</a></button>
60-
<button><a href="/view">View</a></button>
61-
<button><a href="/addview">Add</a></button>
62-
<button><a href="/help">Help</a></button>
59+
<button><a href="/" target="_blank">Home</a></button>
60+
<button><a href="/view" target="_blank">View</a></button>
61+
<button><a href="/addview" target="_blank">Add</a></button>
62+
<button><a href="/help" target="_blank">Help</a></button>
6363
</div>
6464
<h6></h6>
6565
<div id="code" align="center">
@@ -330,7 +330,7 @@ <h6></h6>
330330
.then(function (response) {
331331
host = window.location.host;
332332
url='http://'+host+'/code/'+response.data['name'];
333-
window.location.href = url;
333+
window.open = url;
334334
})
335335
.catch(function (error) {
336336
console.log(error);
@@ -352,7 +352,7 @@ <h6></h6>
352352
edit_md_func:function(){
353353
host = window.location.host;
354354
url='http://'+host+'/md/'+this.name;
355-
window.location.href = url;
355+
window.open(url);
356356
}
357357
}
358358
});

easyleetcode/web/templates/help.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<body>
1616
<div align="center">
1717
<h1> {[message]} </h1>
18-
<button><a href="/">Home🏠</a></button>
18+
<button><a href="/" target="_blank">Home🏠</a></button>
1919
<br/>
2020
help.....?<br/>
2121
help.....?<br/>

easyleetcode/web/templates/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
<h1 align="center"> {[message]} </h1>
1717
<br/>
1818
<div align="center">
19-
<button><a href="/view"> View</a></button>
20-
<button><a href="/addview"> Add</a></button>
21-
<button><a href="/about"> About</a></button>
22-
<button><a href="/help"> Help</a></button>
19+
<button><a href="/view" target="_blank"> View</a></button>
20+
<button><a href="/addview" target="_blank"> Add</a></button>
21+
<button><a href="/about" target="_blank"> About</a></button>
22+
<button><a href="/help" target="_blank"> Help</a></button>
2323
<button><a href="https://github.com/425776024/easy_leetcode" target="_blank">Github</a></button>
2424
<pre style="font-size: 25px;">
2525
Hello Python 程序员//Hello Python programmer

easyleetcode/web/templates/md.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
<body>
1313
<div align="center" id="md_view">
1414
<h1>{{name}} 's Markdown Edit </h1>
15-
<button><a href="/view"> View</a></button>
16-
<button><a href="/about"> About</a></button>
17-
<button><a href="/help"> Help</a></button>
15+
<button><a href="/view" target="_blank"> View</a></button>
16+
<button><a href="/about" target="_blank"> About</a></button>
17+
<button><a href="/help" target="_blank"> Help</a></button>
1818
<button><a href="https://github.com/425776024/easy_leetcode" target="_blank">Github</a></button>
1919
<button @click="save_func()">Save Markdown</button>
2020
</div>
@@ -297,7 +297,7 @@ <h6></h6>
297297
.then(function (response) {
298298
host = window.location.host;
299299
url='http://'+host+'/code/'+response.data['name'];
300-
window.location.href = url;
300+
window.open(url);
301301
})
302302
.catch(function (error) {
303303
console.log(error);

0 commit comments

Comments
 (0)