n2n

n2n is a solution for Virtual LAN.

With VLAN many things can be quite easy, e.g. SMB sharing across NAT.

工E十周年 贺电

大家好,我是马克。首先祝工E十周年生日快乐。

谁能想到,今天十周年的工E,五年前的今天只是一个五周年的工E。那年在礼堂看着前辈们录制的平凡之路被感动得热泪盈眶,现在终于有机会在这里和大家谈谈人生和理想。

工E的核心是设计,而设计的核心则是技术和创造力。信息爆炸的时代,技术的普及和更迭指数式的演进,任何企图掌握所有最新技术的行为都属于以一己之力抗衡全人类创造力的螳臂当车。然而,工E依然选在在此时为大家普及基础的设计技术,不仅是为了给历史和人民做一点微小的贡献,更因为我们发现,技术的普及是培养创造力的最好方式,也是将志同道和的同志们团结起来的最佳途径。

但凡走上设计这一不归路者都对美有着近乎偏执的追求,希望工E能在这不平凡的路上越走越好。

Spirited Away (2001)

Now go, and don't look back.

Spirited Away (2001) Faceless. Exiled by myself.

7 years.

It's time.

General parametric design of a steel-glubam hybrid space truss

Ma, K., and Xiao, Y. “General Parametric Design of a Steel-Glubam Hybrid Space Truss.” In Modern Engineered Bamboo Structures: Proceedings of the Third International Conference on Modern Bamboo Structures (ICBS 2018), June 25-27, 2018, Beijing, China, 1st ed., 223–29. CRC Press, 2019.

K. Ma

Zhejiang Univ.-Univ. of Illinois at Urbana Champaign Institute, Jiaxing, Zhejiang, China

Y. Xiao

Zhejiang Univ.-Univ. of Illinois at Urbana Champaign Institute, Jiaxing, Zhejiang, China

Nanjing Tech University, Nanjing, Jiangsu, China

Department of Civil Engineering, University of Southern California, Los Angeles, CA, USA

ABSTRACT: This paper introduces a parametric design method for a hybrid truss system composed of glued laminated bamboo (glubam) and steel. Experiments on determining material’s physical and mechanical parameters were carried out first, on basis of which design stages from modeling, analysis, optimization to manufacturing are all rendered possible through parametric ways by defining corresponding parameters within one single platform - Grasshopper. By maximizing automation during the process, efficiency and extensibility are taken into consideration for possibly further, larger, and more complex design.

Good Lab

A structural lab that is clean is not a good lab. -- Khalid M. Mosalam on CE 249, Sept. 6, 2019

edit 20220801:

The ZJU Haining campus recruited a new Civ Lab engineer recently, who is dedicated to make the Civ lab 'as clean and beautiful as a museum'. He once proposed that wood cutting should be done outside of the Lab to minimize the noise and ash, and I had to call the Dean in to revert this policy.

With his help everyting is now put in order far away from its supposed working location, just we can not find things when we need, and the lab engineer has no idea too.

How ironically!

Force Loading Earlier Version Extension in Visual Studio 2019

Encountered 'This extension is already installed to all applicable products.' error when trying to install 'NewGrasshopperTemplate.vsix' to vs2019. Open vsix as zip, update all '.json' files by replacing [15.0,16.0\)` with `[15.0,17.0\) And it worked.

Project: Large Waste Transfer Station

20190628 Large Waste Transfer Station 20190628 Large Waste Transfer Station

20190811 Large Waste Transfer Station 20200811 Large Waste Transfer Station

20190815 Large Waste Transfer Station 20200815 Large Waste Transfer Station

Credits

Directed by Prof. Yan Xiao.

Designed by Mark Ma.

Non-commercial project for research and demo purpose.

wm density Crash Rescue

device: Mi MIX 2S system: MIUI 10

Try and fail

My device crashed after trying to modify window density.

su
wm density 120

Screen went dark, adb shell reports error.

.\adb shell wm density reset

Tried force reboot, not working, and adb shell no longer worked due to permission. Device auto reboot into recovery.

Tried everything from Google and nothing works.

Tried adb command when restarting but encountered error.

.\adb shell wm density reset
Security exception: Must hold permission android.permission.WRITE_SECURE_SETTINGS

Solution

This reminds me of a way to circumvent device password lock, which I accidentally bumped into 2 weeks ago when modifying status bar icon.

Simply rename/remove

/system/priv-app/MiuiSystemUI/MiuiSystemUI.apk

Then reboot, you'll find yourself home screen immediately!!! Do anything you like to fix the resolution.

Project: Concrete Dragon

About the project

Concrete is something not often linked to boat, let alone dragon boat. Traditional concept of concrete based building material is embedded deeply not only in common folks but also in Civil Engineering students.

Concrete, usually Portland cement concrete (for its visual resemblance to Portland stone), is a composite material composed of fine and coarse aggregate bonded together with a fluid cement (cement paste) that hardens over time

Concrete - Wikipedia

Still, concrete is just a material, and material evolves as scientific progress advances. New material such as FRP rebars show even better performance than traditional steel rebars. Moreover, as its Chinese name indicated, concrete is just 'some sort of ash mixed and hardens', expanding its concept to a even higher dimension. Comparing to traditional boat building material, concrete has its own pros and cons.

Pros:

  • Stain proof (v.s. steel)
  • Flexible shape (v.s. timber)
  • Economical (v.s. steel and timber)

Cons:

  • Heavier than water and timber
  • Brittle
  • Low tensile strength

The whole project is aimed at exploiting the advantages of concrete while fixing its problems, expanding our knowledge of concrete through engineering practice.

Prototype 1.x - The First FRP Concrete Dragon Boat

Goal

A new type of boat construction method is proposed firstly by Prof. Yan Xiao. The basic idea is to use a self-hardening FRP cloth material as both concrete model and structural part that provides tensile strength.

20190615 Prototype 1.x Cross Section
20190615 Prototype 1.x Cross Section

Material

FRP Clothes

This is some material recently become popular for its ability of free shaping and fast hardening. Most common scenario of usage is replacement of medical bondage and plaster, or electrical wire joint protection. The mechanism is really simple as it's just piece of FRP soaked into glue. Exposition to air solidify the glue in several minutes, providing the structure with some strength.

Things become interesting when several layers of such kind of material are glued together. As FRP clothes is extremely strong in tensile direction, even glue can sustain the relatively less strong shearing force, guaranteeing high bending and shearing strength.

Plastic Hull

A plastic hull is needed for this model, primarily for the shape control of the self-hardening FRP clothes. To achieve better dynamic performance, hull is modeled to be smooth and continuous - NURBS interposition of key points. Therefore, 3D-printing technology is adopted for precise realization of the model.

20190406 3D Printing
20190406 3D Printing
20190223 Modal Boat Hull
20190223 Modal Boat Hull
20190317 Modal Boat Covered by FRP with Kaihang Zhang
20190317 Modal Boat Covered by FRP with Kaihang Zhang

Concrete

ECC concrete is a new kind of concrete which includes PVA fiber to increase its tensile strength and crack resistance. Ingredients are listed as below:

Cement1
Quartz Sand 20-401.1
Silica Fume0.3
Flyash0.15
Mineral Powder0.1
Quartz Sand 3250.1
PVA Fiber
Water0.18
Water Reduce Agents0.10%
Early Strength Agents0.10%

Next Stage

Prototype 1.x focuses itself on boat construction. A boat floating on the water marked success of the first stage. On that occasion, however, path splits for two different prototypes though.

Prototype 2.x stays small and is optimized for wireless remote control. A concrete dragon boat (model) competition is later held based on this. Prototype 3.x is develped with optimization for man-powered sailing in a much larger scale - a real concrete dragon boat.

Prototype 2.x - ICDBC 2019

Goal

Fast, stable, swift steering

To make it fast, the boat has to be speed boat alike, narrow, and light. The concrete layer needs to be as thin as possible. For sure, boat surface still needs to be smooth and continuous.

To make it stable and swift steering, the boat has to be not that narrow in width, motors parallel to each other and as far away as each other as possible.

Power system

Duo RH-380 motors, 1500mAh Li-ion battery

Should gave adopted stronger motors.

Competition

Server

https://www.concretedragon.org/

CentOS7, php7.2, MySQL5.3, Nginx, WordPress Vultr Dallas

See Concrete Dragon Online.

Rule

Should have set limitations on motor power.

Template

Should have provided ai version.

Should have made it clear that theme color can be switched.

Should have designed certificate templates.

Next stage

Should have adopted Arduino.

20190606 ICDBC Boat of My Team
20190606 ICDBC Boat of My Team
20190606 ICDBC Jury Committee with Boats
20190606 ICDBC Jury Committee with Boats
20190606 ICDBC Prof. Yan Xiao
20190606 ICDBC Prof. Yan Xiao
20190606 ICDBC Everyone
20190606 ICDBC Everyone

Prototype 3.x - The Great Dragon Boat

Goal

Strong, stable, light

The large boat is very different from the small boat as construction method can not be inherited directly. It is too slow for the hull to be 3d-printed out. Instead, EPS foam slices cut by CO2 laser are glued (or tied) up to form the basic model of the boat. A FRP clothes layer is then put on the foam, then concrete with FRP bars inside.

20190526 Laser Cut Plastic Foam
20190526 Laser Cut Plastic Foam

To make the boat strong, the boat is modeled even more smooth, to the extent that FRP rebars can be put inside the concrete from head to tail without cut or connect. Such smooth shape without any edge can be regarded as a 2-d arch, making the most of the compressive strength of the concrete. To make the boat stable, the boat should have a lower gravity center.

20190615 Prototype 2.x Cross Section
20190615 Prototype 2.x Cross Section
20190531 Great Dragon Boat Foam and Dr. Dade Lai
20190531 Great Dragon Boat Foam and Dr. Dade Lai
20190601 Great Dragon Boat Covered by Concrete
20190601 Great Dragon Boat Covered by Concrete
20190604 Great Dragon Boat under Painting
20190604 Great Dragon Boat under Painting
20190606 Great Dragon Boat
20190606 Great Dragon Boat

Next stage

  • Should have the whole boat hull made by solid EPS form.
  • Should have adopted sprayed concrete technique.
  • Should have used more PVA.
  • Should have used more FRP fiber clothes.

Credit

Instructor

Yan Xiao 肖岩

Boat Designer, Engineer, Manufacturer, Website Programmer and Designer

Ke Ma 马克

Construction

Ke Ma 马克, Dade Lai 赖大德, Zhiwei He 贺智伟

Also thanks for help by

Anqi Tan 谭安琪, Yiqi Feng 冯亦奇, Kaihang Zhang 张开航, Zhekai Li 李哲楷, Mengjun Wang 王梦君, Guoli Wang 汪郭立, Yang Zhou 周洋, Shangchun Jiang 江上春, Cristoforo Demartino, Zicheng Bao 包梓成

Decoration by

Jiahui Liang 梁嘉惠, Ke Ma 马克, Sicheng Zhou 周思成, Anqi Tan 谭安琪, Qingyun Liu 柳青云

Concrete Recipe

Bo Shan 单波, Dade Lai 赖大德

Logistic Support by

Sicheng Zhou 周思成

Competition Rule Maker

Yan Xiao 肖岩, Ke Ma 马克, Yiqi Feng 冯亦奇, Anqi Tan 谭安琪, Kaihang Zhang 张开航

Activity Organizer

Hang Wu 吴行, Ke Ma 马克, Binbin Li 李宾宾, Yanlong Xie 谢焱龙, Sichen Zhou 周思成, Tao Li 李涛, Jiahui Liang 梁嘉惠, Zhiwei He 贺智伟, Dade Lai 赖大德, Haixiang Zhu 朱海翔, Yi Zhang 张旖, Chenchen Ye 叶晨晨, Qian Yu 余倩, Jinyan Yu 俞静琰, Fengqing Jiang 江凤清 and other volunteers from ZJUI

Special Thanks for

Logistic Support

Jiyao Guo 郭霁瑶, Zhaijin Jia 贾翟菁, Qingbing Xie 谢庆兵

Technical Support

Tianyi Han 韩天屹, Si Li 李斯

Participation

Yue Feng 冯越, Hanyin Shao 邵寒吟

Sponsor

秦山建设,浙江大学创新创业学院

Some Thoughts from the Great Dragon Project

Stress does not get the better of me, but sense of responsibility does. I am accustomed to be alone, still, sense of loneliness and isolation horrified me.

People like me do not climb to leading position due to their ability to lead people, but as a result of responsibility and judgement. Team members may not believe the leader's judgement, but they do rely on it - as long as the leader shoulder all the responsibility, they are happy with it. Such ultra unstable system will collapse as soon as any mistake happens, especially those out of control, either by the leader himself, or by some team member - doesn't matter - team members will soon lose their interest or hope to fix the problem. And mistake is almost definitely to come around.

Problem originates from the responsibility system. Students who I lead, most come to the project with just out of curiosity, or even unwillingness. They have nothing beneficial from me, nor threatened by any power from me. The only reason they follow my order, is out of trust, that I could make sure that the problem be solved at the lowest cost of their time and work.

So the 'solution' is clear now. Under such condition, best solution is to assign tasks and orders as simple as possible to everyone and let them believe that this is the best way that they could get away from this, after they finish their part. Sadly, machine is always stronger than people in terms of obeying orders.

First rule of leadership: PICK the right team member.

UFO

Shot on my way back to office after dinner, in Zhejiang University International Campus, Haining, Zhejinag, China. The flying object was flying with a tail of fixed length, generally from South to North, to the West of the campus. Video shot with my phone, stabilized by Ae and is speeded up to 10 times.

Given the almost horizental track, and the fact that there's no smoke behind, there's high possibility that the object was moving at high altitude.

No news though.

Project: Waste Transfer Station

20190324 Waste Transfer Station 1.0.1 Day 1 20190324 Waste Transfer Station, by Y. Xiao, K. Ma

202001030925 Waste Transfer Station 202001030925 Waste Transfer Station, Photo by S.C. Zhou

Credits

Directed by Prof. Yan Xiao.

Designed by Mark Ma.

Non-commercial project for research and demo purpose.

IBCC 2019 Online

https://www.ibcc2019.org My first commercial web project, fully by myself. Experience from building up my own blog made great contribution, and the whole project was finished in less than 3 days (the most important parts). I guess I can now call myself a full-stack designer now. Well, there's still architecture out there... Credit to all the developers who paved the road for me. Thanks to all IBCC organization committee members (Kewei Liu, Zhi Li, Tao Li, Jinyuan Zhang, et.al.) And guess who designed its logo : )

Employed as Solid Mechanics TA

20190114 Employed as TA of TAM 251
20190114 Employed as TA of TAM 251

http://tam251.intl.zju.edu.cn/people.html(LAN Access Only) It's been like a decade since I was designated as a class president or such sort of things. Still, I feel honoured. It's a fun fact that most of the TAM 251 website is edited by me (revised from UIUC), as years of playing with html, servers, etc. finally get me on the course 🙂 Last time I was soaked in with Solid Mechanics, I scored 94 out of 100. To me, it's almost the most interesting Mechanics subject I learned (comparing with structual mechanics and others). The point is, it's a theory-based subject for scientific research rather than an experience-based one for practical engineering. That means fun for me.

Android Root

Things one can do after gainning root access of their Android. Pls note that this is not a guidance to unlock and root a Android device.

Date

20181110

Device: Xiaomi MIX 2S

Cersei and John Snow???

- How did I get married?   Did I ever learned to play the mandolin?   Who was to living at the end of Game of Thrones? - OMG I forgot u haven't seen it yet!   So, Cersei and John Snow... Planet Money #872: The Hallowing Tapes

Cooperation or Competition

From the first stirring of life beneath water, to the great beast of Stone Age, to man taking his first upright steps, we have come far. All of the progress instilled these two seemingly paradoxical characteristics into mankind: competition and cooperation. Species without competition will surly lose its dominating position soon, and a single man can never protect himself from any physically overwhelming animal. Thousands of years later, these two inherited features still play important roles in modern society regardless of fundamentally massive change within human society itself. We have long evolved from cave Australopithecus to intelligent man who stands on the top of the food chain, and the importance of competition and cooperation shall be rebalanced.

Monopoly from the Perspective of Mass Gambling

There is a live video platform in China called Douyu who offers virtual currency gambling, from which I find out a very interesting phenomenon - the return rates always stay low, i.e. on specific conditions when the outcome is a random event (50% chance on each side), the return rates always stay below 1 (often 0.1 - 0.7) on both sides, rendering it unfair for any gamblers who pays - take it or not.

Mobile Choice

Moving to Android

Finally, I decide to give up iOS, despite having using it for so many years. When I began to use iOS on 2011, it's still far less mature than today. People jailbroke it for better UI and more features. I can still remember some of the classic debian packages, i.e. SBSettings which iOS later introduced as Control Center. Good days back then. With Apple constructing its firewall taller and harder, jailbreaking is becoming much more difficult nowadays, not only for hackers, but also for common geeks. I'm not here to comment on the righteousness of Apple's action to promoting this. Objectively, fewer users means fewer developers, then fewer apps to serve even fewer users. To begin with, after iPhone 4s, iOS users can no longer freely downgrade their devices even one wants to enjoy fluency of earlier version. Year after year, the limits just became stronger and stronger. It finally leads to the collapse of jailbreaking community. A lot of cydia apps began to lose maintaince after iOS 9. I have my iPhone se locked at iOS 9.3.3 to keep it working fluently for 2 years. And after this only 2 years, with the screen malfunctioning, infra-red sensor no longer working, cameras poulluted by ashes and speakers making noises, it's high time I decided to move away from iOS, from Apple. (I'm a bit too objective here. What I am truly thinking, F**k Apple.) I choose to move on, and hope I can find some lost freedom from the Android world.

Project: RE Frame

Non-commercial project for research and demo purpose.

Project Introduction

This project is based on the 1st-prize-winning project 'RE Frame' of the Bamboo Pavilion Competition in Mediterranean University of Reggio Calabria by Stefano Vitale and his team. It's an honor to join him in such a great project. All following are based on my own understanding of the project.

HTTPS!

After being continuously locked up by GFW for a whole week I decide to change my site into a real https site. Given the fact that I can only use port 80 and 443 for all the activities across GFW, I have to make port 443 for both nginx and ShadowsocksR (for scurity reason). Thus, ssr will divide the inbound packages into two parts, one for itself and another redirected to port xxx for nginx, as following.

Percolation

Programming Assignment 1: Percolation Algorithms, Part I Princeton University Write a program to estimate the value of the percolation threshold via Monte Carlo simulation.

Dictionary Patch 3

Goal

With Chrome extension, user-defined protocol and Windows API integrated in C#, the auto-look-up process when reviewing words on Shanbay can be even more cost-efficient and precise comparing with former methods.

BARC 2018 & Beijing Trip

I earned myself this trip to Beijing through my dissertation, with Lin Runze's help. To someone who has already graduated, it was such a surprise that I even don't have time to prepare my suit. Despite the fact that I was working almost the same as a free apprentice, I saw and learned a lot.

Notes from BARC 2018 Ministerial Summit

Before discussing how to promote bamboo industry you’ll have to inspire people how they can benefit from it – especially their superior renewability comparing to trees. In most south America countries, bamboo is still considered as a type of tree which means that they will have to be registered for being cut down, and the register process could last 3-6 months which is almost insane for modern commercial activities.

Moreover, rather than inspiring the youth of the innovation of bamboo structure, it’s better to have them inspire us.

基于Grasshopper的曲面木结构网壳参数化设计研究

马克. 基于Grasshopper的曲面木结构网壳参数化设计研究[D]:[学士学位论文].南京工业大学土木工程学院, 2018.

指导老师:陆伟东

国家重点研发项目(2017YFC0703506)资助

摘要

曲面木结构网壳具有节能、绿色、环保、经济的特点。考虑到曲面网壳形态上的不规则性,其设计、分析、优化通常较一般结构更为复杂。相比传统的设计方法,使用参数化设计方法可以大大提高其设计流程的效率,使得曲面木网壳优良的性能得以充分发挥。

目前,曲面木网壳在国外的应用较为广泛,尤其是大跨的后张拉成型网壳。国内学者在参数化网壳方面也有一定研究,但多基于规则形态的钢网壳,而在曲面木结构网壳方面的参数化研究则开展很少。

本课题基于Rhino平台Grasshopper参数化插件进行曲面木结构网壳的参数化设计研究。通过总结设计方法,归纳设计思路,进而编制参数化建模、分析、优化以及输出的相关程序,使参数化设计的效率优势在木网壳结构中得到尽可能大的发挥,以期最终形成曲面木结构网壳的参数化建模、受力分析、建造等相关问题的一体化通用解决方案,为工程实践提供借鉴和参考。

在参数化建模的具体实现上,对于传统的基于几何外观设计的规则几何形态网壳,本文逐一给出了参数化建立相关模型库的方法和示例;对于自由曲面网壳,本文给出了一种参数化网格划分及优化的思路和示例;对于后张拉成型网壳,本文给出了通过模拟倒悬法动态优化建立模型的思路和示例。

在参数化受力分析、优化的实现上,本文基于Grasshopper插件给出了一种有限元分析方法并验证了其可靠性。该方法不仅能参数化分析传统网壳的受力,也能为模拟倒悬法找形获得的后张拉成型网壳提供精确的找形计算。在此基础上给出了此外,给出了基于进化算法对曲面整体做几何优化的思路和示例。

关键词:木网壳 参数化设计 Grasshopper


Voronoi 4.2
Voronoi 4.2

致谢

感谢陆伟东教授、孙小鸾老师、屈丽荣博士、陆斌辉学长为本课题提供的指导,正是他们给出的指导和建议使本课题的开展成为可能。尤其感谢我的导师陆伟东教授,他敏锐的学术洞察力使我在课题中受益良多;也要感谢屈丽荣博士,她同样在整个课题期间倾注了大量心血和精力,提出了许多宝贵的指导和建议。

感谢Grasshopper的开发者David Rutten以及整个社区,特别是Paneling Tools, Kangaroo(2), LunchBox, NGon, Karamba等插件和他们的开发者。他们的工作为本课题的开展提供了巨大的便利,并在实际应用中带给了我一些思路上的启发。

感谢工E设计,使我在大学期间得以学习到几乎一切用于此论文的展示工具,并指导了我在艺术设计领域上的发展,尤其感谢赵文炀、韦雨杏在建筑学上的指导。

感谢一路关心、理解、支持我的父母,老师,朋友。无论课题进展是喜是忧,总能得到你们的鼓励和帮助。正是你们在过去的二十多年中的不断影响使我走到了现在,我的感恩之情无以言表。

一个人的历史造就了他的如今,而整个人类的历史亦是他的后盾。在学术研究的道路上,无数先人开辟道路,才有了如今我这些微小的工作。感谢所有。


参见

[1] 关于公布南京工业大学2018届本科生优秀毕业设计(论文)、优秀指导教师的通知

Credits

Designed by Mark Ma.

Non-commercial project for research and demo purpose.

Produced with

  • Rhino 6, Educantional License
  • Lumion 6, Trial License
  • Adobe Creative Cloud, Educational License

Wrong Lizard

"Because if they didn't vote for a lizard," said Ford, "the wrong lizard might get in"

— Douglas Adams, So long, and thanks for all the fish

Note that the book was published in 1984. And 32 years later the competition actually began with the same feeling, "Who's worse?" I doubt this has ever happened in the whole U.S. history.

Anyway it's not the right time to discuss any serious topic. Just enjoy the nonesence cause I couldn't help laughing even when it was 2 a.m. and all my roommates were in dream.

十佳 又一年

工E设计工作室 2018 校五星社团 十佳社团

感谢所有

Solution to Abaqus ErrElemMissingSection When Analyzing Truss

Encountered the ErrElemMissingSection problem when analyzing truss, though I did 100% assign the section.

Finally found out that Abaqus would by default Assign Element Type 'Beam' in Module 'Mesh'. So remember to change the setting to 'Truss' when meshing.

GEDesign Order System

It's been 2 years since the first time I thought of building an online order system for 工E设计, the Gong E Design Studio.

Two years ago when I was the chairman of 工E设计, I received orders from all over the campus with different types and requirements. It would have been a mess if I did't manage all the orders with a calendar to remind myself of the deadline. Simple work, but quite annoying, especially when you get quite a lot of messages without a general form to regulate the styles - actually I did try to regulate, and wrote a well composed docx file, on the basis of some former chairman's work. Even then it was too much information to type into a calendar so I end up adding only the title and deadline to the calendar. By then the idea had emerged to have a automatic system developed.

Common Languages

201804121146 Brian A. Murray
201804121146 Brian A. Murray

I don't speak Chinese. But I speak three languages, Chemical, Mathematical and Geometrical language. These are the common languages. — Brian A. Murray, Nanjing Tech-ITT Bilateral Workshop, Nanjing, Apr. 12th, 2018

404

Me: Where can I find you?

Zhang: 404.

 

Well, he does live in 404.

Compact Archives compact.php modify

In order to display the compact archives as a table, I modified part of the compact.php as below, pay attention to the li part.

foreach ( $dates as $year => $months ) {
    $result .= $before . '<li class="theyear"><a href="' . get_year_link( $year ) . '">' . $year . '</a></li>';
    for ( $month = 1; $month <= 12; $month += 1 ) {
        $month_has_posts = ( isset( $months[$month] ) );
        $dummydate = strtotime( "$month/01/2001" );
        // get the month name; strftime() localizes
        $month_name = strftime( "%B", $dummydate );
        switch ( $style ) {
        case 'initial':
            $month_abbrev = $month_name[0]; // the inital of the month
            break;
        case 'block':
            $month_abbrev = strftime( "%b", $dummydate ); // get the short month name; strftime() localizes
            break;
        case 'numeric':
            $month_abbrev = strftime( "%m", $dummydate ); // get the month number, e.g., '04'
            break;
        default:
            $month_abbrev = $month_name[0]; // the inital of the month
        }
        if ( $month_has_posts ) {
            $result .= '<li><a class="amonth" href="' . get_month_link( $year, $month ) . '" title="' . $month_name . ' ' . $year . '">' . $month_abbrev . '</a></li> ';
        } else {
            $result .= '<li><span class="emptymonth">' . $month_abbrev . '</span></li> ';
        }
    }
    $result .= $after."\n";
}

一个人的独裁是如何形成的,为什么很难垮台?

Original post on zhihu, 因「政治敏感」已于Apr 9, 2018 3:47 PM被删除。

Question by [Anonym]

一个国家那么多人,生活艰难,为什么不去推翻,是不是能有什么数学模型能解释这种至上而下的统治。

My Answer

统治集团和平民间悬殊的力量差是维持独裁的根本原因。

常规情况下,维持不是问题。一旦统治集团出现权力空档,无法继续维持力量差,机会就来了。

People of the Same Tarde

People of the same trade seldom meet together, even for merriment and diversion, but the conversation ends in a conspiracy against the public, or in some contrivance to raise prices.

— Adam Smith, An Inquiry into the Nature and Causes of the Wealth of Nations

Hello, World!

Beginner

It’s been five days since I decided to build this site on a boring Sunday afternoon. Now that almost everything feels good, and I think it’s time I paused and wrote something.

系统盘迁移小记

帮舍友迁移系统(Win10)。新买的固态,需要把hdd上的C盘完整复制过去。

舍友电脑上没有ngff接口,所以买了sata口的固态,需要把原硬盘挪到光驱位,再把固态放到原硬盘位。

硬件搞定直接开机,还是从机械硬盘启动,给固态指定盘符然后测速——固态倒是没什么问题,但后来才意识到这一步正是作死第一步。

X3 可利用BUG合集

Original post on deeptimes 以下内容均为本人凭记忆手打,如有出错遗漏欢迎各位大佬指出。 所有BUG基于原版(Vanilla),因为修改版(Modified)作弊可以直接用脚本编辑器调出,不需要利用卡BUG这种低阶方式。所有列出的BUG不会导致Modified Tag。 鉴于LZ本人只玩过TC2.5, AP3.3, 所以下文的适用版本号都是凭印象给的,基本准(cuo)确(wu)。当然如果你看到了Lv.6-7, 你会发现神马版本号都是浮云。

百度云管家同时下载任务上限修改

目标文件:

/users/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/PersonalSetting.xml

先在软件里修改下载任务数,保存以后用Hexeditor定位。规律是每增加一个任务数某个值会减一。

似乎每个版本(或者用户)对应的值都不一样,所以没有通用的搜索、替换模式。

具体修改时:关闭软件,修改,重启。最多修改到9个,否则自动重置。