这太棒了!看看它有多长!哈哈哈哈哈哈 [英] This is brilliant! Just look how long it is! Ha ha ha ha ha ha

查看:61
本文介绍了这太棒了!看看它有多长!哈哈哈哈哈哈的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://www.15seconds.com/Issue /030812.htm?voteresult=1


可怜的家伙为了制作页面控件而努力工作


和然后他们发表了它


ha ha ha ha ha


tohelp其他的


哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈/>
显然他研究如何在书中做到这一点


我的上帝我很乐意看到这个家伙绑鞋带


它必须花费数小时并涉及大量复杂的数学


哈哈哈哈


也许可怜的家伙每小时的费率是这样的低价他必须过度复杂化

一切只需支付租金


哈哈哈哈


想象他工作整个晚上

我会做出最好的页面控制!


我有它!他讨厌新手...所以他发表了荒谬的文章,让他们士气低落,消耗能量


并没有告诉他们通用页面控件是只需10行

代码,猴子可以写出来''EVIL


摘自他的文章:


"有效地显示代码,因此它让新手感到困惑是一个主要目标

几乎所有我的网络文章。在

文章中显示20行代码是难以忍受的,但显示10,000肯定会有所帮助。

编写好的代码,是一种常用的解决方案,我不是

推荐。

http://www.15seconds.com/Issue/030812.htm?voteresult=1

poor guy worked his heart out, just to make a page control

and then they published it

ha ha ha ha ha

to "help" others

ha ha ha ha ha ha

just imagine the face of a newbie looking at that mountain of code

apparently he researched how to do it in books

my god i would love to watch this guy tie his shoelaces

it must take hours and involve lots of complex mathematics

ha ha ha ha

maybe the poor guy''s hourly rate is so low he has to overcomplicate
everything just to pay the rent

ha ha ha ha

imagine him working through the night
"i''ll make the best page control, ever!"

i''ve got it! he hates newbies ... so he publishes ridiculous
articles to demoralise them and drain their energy

doesn''t tell them that a generic page control is just 10 lines
of code that a monkey could write HE''S EVIL

extract from his article:

"Effectively showing code so it confuses newbies is a main objective
in writing almost all my web articles. Showing 20 lines of code in an
article is unbearable but showing 10,000 certainly can be helpful.
Writing good code, is a commonly employed solution, that I do not
recommend."

推荐答案

您可以发布10个代码行代码来执行此操作吗?只是想知道从你的优势角度来看它是什么样子。


谢谢!


" John Rivers" ; <音响***** @ btinternet.com>在消息中写道

news:11 ********************* @ z14g2000cwz.googlegro ups.com ...
Can you post 10 sample lines of code to do this? Just wondering what it
would look like from your vantage pt.

Thanks!

"John Rivers" <fi*****@btinternet.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
http://www.15seconds.com/Issue /030812.htm?voteresult=1

可怜的家伙全心全意地工作,只是为了制作一个页面控件

然后他们发布了它

哈哈哈哈哈

到帮助别人

哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈它在书中

我的上帝我很想看到这个家伙绑鞋带

它必须花费数小时并涉及大量复杂的数学

ha哈哈哈
也许那个可怜的家伙的小时工资是如此之低,他不得不过度复杂化一切只是为了支付租金

哈哈哈哈<想象一下,他整晚都在工作
我会做出最好的页面控制!

我已经知道了!他讨厌新手...所以他发表了荒谬的文章,让他们士气低落,消耗他们的能量

并没有告诉他们通用页面控件只有10行
一个猴子可以写的代码他的文章提取了

从他的文章摘录:

有效地显示代码,因此它混淆了新手是一个主要目标
写几乎所有我的网络文章。在
文章中显示20行代码是难以忍受的,但显示10,000肯定会有所帮助。
编写好的代码,是一种常用的解决方案,我不建议。
http://www.15seconds.com/Issue/030812.htm?voteresult=1

poor guy worked his heart out, just to make a page control

and then they published it

ha ha ha ha ha

to "help" others

ha ha ha ha ha ha

just imagine the face of a newbie looking at that mountain of code

apparently he researched how to do it in books

my god i would love to watch this guy tie his shoelaces

it must take hours and involve lots of complex mathematics

ha ha ha ha

maybe the poor guy''s hourly rate is so low he has to overcomplicate
everything just to pay the rent

ha ha ha ha

imagine him working through the night
"i''ll make the best page control, ever!"

i''ve got it! he hates newbies ... so he publishes ridiculous
articles to demoralise them and drain their energy

doesn''t tell them that a generic page control is just 10 lines
of code that a monkey could write HE''S EVIL

extract from his article:

"Effectively showing code so it confuses newbies is a main objective
in writing almost all my web articles. Showing 20 lines of code in an
article is unbearable but showing 10,000 certainly can be helpful.
Writing good code, is a commonly employed solution, that I do not
recommend."



如果它不是一篇好文章,它将不会达到15秒。

归功于Tomasz给予回馈的东西社区。


问候


John Timney

ASP.NET MVP

微软区域总监


" John Rivers" <音响***** @ btinternet.com>在消息中写道

news:11 ********************* @ z14g2000cwz.googlegro ups.com ...
If it wasn''t a good article it would not have made it onto 15seconds.
Credit to Tomasz for giving something back to the community.

Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"John Rivers" <fi*****@btinternet.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
http://www.15seconds.com/Issue /030812.htm?voteresult=1

可怜的家伙全心全意地工作,只是为了制作一个页面控件

然后他们发布了它

哈哈哈哈哈

到帮助别人

哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈它在书中

我的上帝我很想看到这个家伙绑鞋带

它必须花费数小时并涉及大量复杂的数学

ha哈哈哈
也许那个可怜的家伙的小时工资是如此之低,他不得不过度复杂化一切只是为了支付租金

哈哈哈哈<想象一下,他整晚都在工作
我会做出最好的页面控制!

我已经知道了!他讨厌新手...所以他发表了荒谬的文章,让他们士气低落,消耗他们的能量

并没有告诉他们通用页面控件只有10行
一个猴子可以写的代码他的文章提取了

从他的文章摘录:

有效地显示代码,因此它混淆了新手是一个主要目标
写几乎所有我的网络文章。在
文章中显示20行代码是难以忍受的,但显示10,000肯定会有所帮助。
编写好的代码,是一种常用的解决方案,我不建议。
http://www.15seconds.com/Issue/030812.htm?voteresult=1

poor guy worked his heart out, just to make a page control

and then they published it

ha ha ha ha ha

to "help" others

ha ha ha ha ha ha

just imagine the face of a newbie looking at that mountain of code

apparently he researched how to do it in books

my god i would love to watch this guy tie his shoelaces

it must take hours and involve lots of complex mathematics

ha ha ha ha

maybe the poor guy''s hourly rate is so low he has to overcomplicate
everything just to pay the rent

ha ha ha ha

imagine him working through the night
"i''ll make the best page control, ever!"

i''ve got it! he hates newbies ... so he publishes ridiculous
articles to demoralise them and drain their energy

doesn''t tell them that a generic page control is just 10 lines
of code that a monkey could write HE''S EVIL

extract from his article:

"Effectively showing code so it confuses newbies is a main objective
in writing almost all my web articles. Showing 20 lines of code in an
article is unbearable but showing 10,000 certainly can be helpful.
Writing good code, is a commonly employed solution, that I do not
recommend."



很高兴,


这正是十行代码(不包括函数声明)

和html东西)


原谅classicasp,我把它用得很方便


函数PageControl(PageNumber,PageCount)

Const PropName =" PageNumber"

%>< table width =" 100%" CELLPADDING = QUOT; 4英寸cellspacing =" 0"

bgcolor =" #EEEEEE">

<!---->

< tr>

< td nowrap><%=" Page" &安培; PageNumber& " 的&安培; PageCount%>< / td>

< td align =" right" nowrap>< b><%

Dim URL

URL = ThisPage& StripQueryString(Request.QueryString,PropName)

如果PageNumber> 1然后

%> [< a href ="<%= HTML(URL& QPX(PropName,1))%>"> First< / a>]

[< a href ="<%= HTML(URL& QPX(PropName,PageNumber - 1))%>"> Prev< / a>]<%

Else

%>< span style =" color:#CCCCCC"> [First]

[上一页]<如果

%>& PageCount然后

%> [< a href ="<%= HTML(URL& QPX(PropName,PageNumber + 1))%>"> Next< / a> ;]

[< a href ="<%= HTML(URL& QPX(PropName,PageCount))%>"> Last< / a>]<%

Else

%>< span style =" color:#CCCCCC"> [Next]

[Last]< / span><%

结束如果

%>< / b>< / td>

< / tr>

<!---->

< / table><%

结束功能

>
(HTML是节省输入Server.HTMLEncode等的便利功能)

(QPX是Server.URLEncode(name)&" +"&

Server.URLEncode(value)&"&")

(StripQueryString返回给定的查询字符串减去给定的

参数)


当然我会在存储过程中完成分页逻辑

而不是重复传输成堆的数据t无缘无故

喜欢那种愚蠢的数据网格控制确实


我可以在这里给你看:


CREATE proc spTestCursorPagination

@start int

,@ size int

as

-

声明CRS光标滚动read_only用于从垃圾中选择recordid

(tablock)按记录订购

声明@index int

声明@recordid int

-

创建表#temp(

orderid int主键身份

,recordid int



set nocount on

set @index = 0

打开CRS

-

而@index< @size

开始

如果@index = 0

从CRS获取绝对@start到@recordid

else

从CRS获取下一个到@recordid

使用(tablockx)(recordid)值插入#temp(@recordid)

set @index = @index + 1

结束

-

关闭CRS

deallocate CRS

-

选择垃圾。*来自垃圾(tablock)

内连接#temp(tablock)

on junk.recordid =# temp.recordid

订购#temp.orderid

- (完)

我不需要读书到这样做

i只用了我的大脑20分钟


加上如果你在10,000,000的数据库上测试我的解决方案

记录它将比他的垃圾跑得更快,拥有10,000

的记录,并且使用更少的ram和cpu以及网络资源

www.15seconds.com 很有用,但大多数文章都是总帐


欢迎来到层蛋糕儿子


VB程序员写道:
with pleasure,

this is exactly ten lines of code (exluding the function declaration
and html stuff)

excuse the classicasp, i had it handy

Function PageControl(PageNumber, PageCount)
Const PropName = "PageNumber"
%><table width="100%" cellpadding="4" cellspacing="0"
bgcolor="#EEEEEE">
<!---->
<tr>
<td nowrap><%="Page " & PageNumber & " of " & PageCount%></td>
<td align="right" nowrap><b><%
Dim URL
URL = ThisPage & StripQueryString(Request.QueryString, PropName)
If PageNumber > 1 Then
%>[<a href="<%=HTML(URL & QPX(PropName, 1))%>">First</a>]
[<a href="<%=HTML(URL & QPX(PropName, PageNumber - 1))%>">Prev</a>]<%
Else
%><span style="color:#CCCCCC">[First]
[Prev]</span><%
End If
%>&nbsp;<%
If PageNumber < PageCount Then
%>[<a href="<%=HTML(URL & QPX(PropName, PageNumber + 1))%>">Next</a>]
[<a href="<%=HTML(URL & QPX(PropName, PageCount))%>">Last</a>]<%
Else
%><span style="color:#CCCCCC">[Next]
[Last]</span><%
End If
%></b></td>
</tr>
<!---->
</table><%
End Function

(HTML is convenience function to save typing Server.HTMLEncode etc.)
(QPX is shorthand for Server.URLEncode(name) & "+" &
Server.URLEncode(value) & "&")
(StripQueryString returns the given querystring minus the given
parameter)

and of course i would have done the paging logic in a stored procedure
rather than repeatedly transferring piles of data about for no reason
like that idiotic "datagrid" control does

which i can show you here:

CREATE proc spTestCursorPagination
@start int
, @size int
as
--
declare CRS cursor scroll read_only for select recordid from junk
(tablock) order by recordid
declare @index int
declare @recordid int
--
create table #temp (
orderid int primary key identity
, recordid int
)
set nocount on
set @index = 0
open CRS
--
while @index < @size
begin
if @index = 0
fetch absolute @start from CRS into @recordid
else
fetch next from CRS into @recordid
insert into #temp with (tablockx) (recordid) values (@recordid)
set @index = @index + 1
end
--
close CRS
deallocate CRS
--
select junk.* from junk (tablock)
inner join #temp (tablock)
on junk.recordid = #temp.recordid
order by #temp.orderid
--(end)
and i didn''t need to read a book to do that
i just used my brain and 20 minutes

plus if you test my solution on a db of 10,000,000
records it will run faster than his junk with 10,000
records and use much less ram and cpu and network resources

www.15seconds.com is useful but most of the articles are total tripe

welcome to the layer cake son


VB Programmer wrote:
你能不能发布10个代码行代码来做到这一点?只是想知道从你的优势角度看它会是什么样子。

谢谢!

John Rivers <音响***** @ btinternet.com>在消息中写道
新闻:11 ********************* @ z14g2000cwz.googlegro ups.com ...
Can you post 10 sample lines of code to do this? Just wondering what it
would look like from your vantage pt.

Thanks!

"John Rivers" <fi*****@btinternet.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
< a rel =nofollowhref =http://www.15seconds.com/Issue/030812.htm?voteresult=1target =_ blank> http://www.15seconds.com/Issue/030812.htm ?voteresult = 1

可怜的家伙全心全意地工作,只是为了制作一个页面控件

然后他们发布了它

哈哈哈哈哈

到帮助别人

哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈它在书中

我的上帝我很想看到这个家伙绑鞋带

它必须花费数小时并涉及大量复杂的数学

ha哈哈哈
也许那个可怜的家伙的小时工资是如此之低,他不得不过度复杂化一切只是为了支付租金

哈哈哈哈<想象一下,他整晚都在工作
我会做出最好的页面控制!

我已经知道了!他讨厌新手...所以他发表了荒谬的文章,让他们士气低落,消耗他们的能量

并没有告诉他们通用页面控件只有10行
一个猴子可以写的代码他的文章提取了

从他的文章摘录:

有效地显示代码,因此它混淆了新手是一个主要目标
写几乎所有我的网络文章。在
文章中显示20行代码是难以忍受的,但显示10,000肯定会有所帮助。
编写好的代码,是一种常用的解决方案,我不建议。
http://www.15seconds.com/Issue/030812.htm?voteresult=1

poor guy worked his heart out, just to make a page control

and then they published it

ha ha ha ha ha

to "help" others

ha ha ha ha ha ha

just imagine the face of a newbie looking at that mountain of code

apparently he researched how to do it in books

my god i would love to watch this guy tie his shoelaces

it must take hours and involve lots of complex mathematics

ha ha ha ha

maybe the poor guy''s hourly rate is so low he has to overcomplicate
everything just to pay the rent

ha ha ha ha

imagine him working through the night
"i''ll make the best page control, ever!"

i''ve got it! he hates newbies ... so he publishes ridiculous
articles to demoralise them and drain their energy

doesn''t tell them that a generic page control is just 10 lines
of code that a monkey could write HE''S EVIL

extract from his article:

"Effectively showing code so it confuses newbies is a main objective
in writing almost all my web articles. Showing 20 lines of code in an
article is unbearable but showing 10,000 certainly can be helpful.
Writing good code, is a commonly employed solution, that I do not
recommend."






这篇关于这太棒了!看看它有多长!哈哈哈哈哈哈的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆