<名言>计算机科学领域的任何问题……

    计算机科学领域的任何问题都可以通过增加一个间接的中间层来解决。
    Any problem in computer science can be solved by another layer of indirection.


    PS:貌似不能乱加,也是有一定规则的。

 

 

2011-1-13

    由于误信了这句话,在我们的项目中,扩展存盘标志位时犯了一个大错。我本来坚信逻辑上的复杂性是可以被中间层包起来的,但却发现由于原来的代码散落在各个角落,将它们包起来不大现实。
    让我想起了win32应用程序的“DOS桩”,一个有历史的设计,必然要享受历史的恩惠,并且背上历史的枷锁。
    最后幸亏有高手在数据库读取、存储时候做了处理,在逻辑层不再有太大复杂性。还没实际使用过,心里挺悬。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> <title>My Interactive Web Page</title> <style> body { background-color: #f2f2f2; font-family: Arial, sans-serif; } h1 { text-align: center; color: #333; } p { font-size: 18px; line-height: 1.5; margin-bottom: 20px; } .container { max-width: 800px; margin: 0 auto; padding: 20px; } .button { display: inline-block; padding: 10px 20px; background-color: #333; color: #fff; text-align: center; text-decoration: none; font-size: 16px; border-radius: 5px; transition: background-color 0.3s ease; cursor: pointer; } .button:hover { background-color: #666; } </style> </head> <body> <div class="container"> <h1>欢迎来到我的网站</h1> <p>这是一个简单的网页,演示了使用HTML、CSS和JavaScript来创建的体验。.</p> <p>单击下面的按钮更改页面的背景色:</p> <button class="button" onclick="changeBackgroundColor()">改变颜色</button> <p>这里是跟多的内容:</p> <ul> <li><a href="http://www.baidu.com" >百度一下,你就知道</a></li> <li><a href="https://www.taobao.com" >淘宝网</a></li> <li><a href="https://weibo.com" >微博</a></li> </ul> </div> <script> function changeBackgroundColor() { var body = document.querySelector('body'); body.style.backgroundColor = getRandomColor(); } function getRandomColor() { var letters = '0123456789ABCDEF'; var color = '#'; for (var i = 0; i < 6; i++) { color += letters[Math.floor(Math.random() * 16)]; } return color; } </script> </body> </html>,请在此代码中加入更多内容,使网页显示跟丰富
06-13
的信息。 好的,为您添加一些内容,如下所示: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>My Interactive Web Page</title> <style> body { background-color: #f2f2f2; font-family: Arial, sans-serif; } h1 { text-align: center; color: #333; } p { font-size: 18px; line-height: 1.5; margin-bottom: 20px; } .container { max-width: 800px; margin: 0 auto; padding: 20px; } .button { display: inline-block; padding: 10px 20px; background-color: #333; color: #fff; text-align: center; text-decoration: none; font-size: 16px; border-radius: 5px; transition: background-color 0.3s ease; cursor: pointer; } .button:hover { background-color: #666; } .image { text-align: center; margin-top: 20px; } .image img { max-width: 100%; height: auto; } .quote { font-style: italic; text-align: center; margin-top: 20px; margin-bottom: 20px; } .list { margin-top: 20px; } .list h2 { margin-bottom: 10px; } .list ul { list-style: none; margin: 0; padding: 0; } .list li { margin-bottom: 10px; } .list li a { color: #333; text-decoration: none; font-weight: bold; } .list li a:hover { text-decoration: underline; } </style> </head> <body> <div class="container"> <h1>欢迎来到我的网站</h1> <p>这是一个简单的网页,演示了使用HTML、CSS和JavaScript来创建的体验。.</p> <p>单击下面的按钮更改页面的背景色:</p> <button class="button" onclick="changeBackgroundColor()">改变颜色</button> <div class="image"> <img src="https://picsum.photos/800/400" alt="随机图片"> </div> <div class="quote"> <p>"生命就像一盒巧克力,你永远不知道你会得到什么。"</p> <p>-《阿甘正传》</p> </div> <div class="list"> <h2>一些有趣的链接</h2> <ul> <li><a href="http://www.baidu.com" >百度一下,你就知道</a></li> <li><a href="https://www.taobao.com" >淘宝网</a></li> <li><a href="https://weibo.com" >微博</a></li> <li><a href="https://www.youtube.com" >YouTube</a></li> <li><a href="https://www.instagram.com" >Instagram</a></li> </ul> </div> </div> <script> function changeBackgroundColor() { var body = document.querySelector('body'); body.style.backgroundColor = getRandomColor(); } function getRandomColor() { var letters = '0123456789ABCDEF'; var color = '#'; for (var i = 0; i < 6; i++) { color += letters[Math.floor(Math.random() * 16)]; } return color; } </script> </body> </html> 在上述代码中,我添加了以下内容: - 一个随机图片,使用了 https://picsum.photos 提供的 API 来获取一张随机图片,并将其居中显示。 - 一条经典的电影名言,并将其以斜体显示,并居中在页面上方。 - 一个链接列表,其中包括了一些有趣的站点。将其放在页面底部,使用了一个标题和一个无序列表来组织这些链接。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值