新年将至, 程序员如何以代码送出新春祝福 您所在的位置:网站首页 小年贺词语 新年将至, 程序员如何以代码送出新春祝福

新年将至, 程序员如何以代码送出新春祝福

2023-12-30 12:03| 来源: 网络整理| 查看: 265

导读:农历新年将至,祝福的话汇成千言万语都寄托在贺卡之中,也许今年你受到了很多的挫折,又或者是顺顺利利度过了一年。但不管怎么样,不管是哭与笑,人生的年轮都已经转过了一圈。我们唯有继续向前走,不要回头,未来的自己取决于现在的自己。有时候一句不经意的问候,一句小小的祝福都能让自己身心雀跃,获得短暂的拯救。因此,在即将到来的农历新年之际,程序员们以代码作为载体,以祝福作为载物,送给自己或者送给重要的人,亦或是那憧憬的远方。

各路工程师请在评论区各显神通吧,以代码的方式写下新春祝福语。

目录

前端工程师:

linux工程师

NCL工程师

HarmonyOS

其他工程师

java循环工程师收尾

前端工程师: 孙叫兽的博客-新年快乐 body { /* 背景颜色*/ background-color: #c6070c; /* 字体颜色 */ color: #ffe392; /* 文字居中 */ text-align: center; } table { padding-top: 100px; /* 居中 */ margin: auto; /* 宽比例 */ width: 50%; } .pinyin { height: 20px; /* 字母间距 */ letter-spacing: 3px; font-weight: 400; } td { font-size: 158px; text-align: center; font-weight: 700; padding: 0px; } h2 { margin-top: 15px; margin-bottom: 100px; font-size: 38px; text-transform: uppercase; font-weight: 700; word-spacing: 5px; } p { font-weight: 700; letter-spacing: 1px; word-spacing: 2px; } button { background-color: #ef941a; color: #fffbe2; width: 200px; position: relative; border-radius: 5px; margin: 0; padding: 0; line-height: 0.5; cursor: pointer; border: none; outline: none; font-size: 16px; text-transform: uppercase; letter-spacing: 1px; } button:hover, button:focus { background-color: #efa134; } button:active { transform: translate(0px, 2px); -webkit-transform: translate(0px, 2px); } xīn nián kuài lè 新 年 快 樂 (新年快乐)

新年现金

var pinyin1 = document.getElementById("pinyin1"); var pinyin2 = document.getElementById("pinyin2"); var pinyin3 = document.getElementById("pinyin3"); var pinyin4 = document.getElementById("pinyin4"); var jeskson1 = document.getElementById("jeskson1"); var jeskson2 = document.getElementById("jeskson2"); var jeskson3 = document.getElementById("jeskson3"); var jeskson4 = document.getElementById("jeskson4"); var dadaEnglish = document.getElementById("dadaEnglish"); var button = document.getElementById("button"); var random = Math.random(); var p1 = [ "xīn", "gōng", "dà", "wàn", "nián", "shēn", "xīn", "gōng" ]; var p2 = [ "nián", "xǐ", "jí", "shì", "nián", "tǐ", "xiǎng", "hè" ]; var p3 = [ "kuài", "fā", "dà", "rú", "yǒu", "jiàn", "shì", "xīn" ]; var p4 = [ "lè", "cái", "lì", "yì", "yú", "kāng", "chéng", "xǐ" ]; var dadasC1 = [ "新", "恭", "大", "萬", "年", "身", "心", "恭" ]; var dadasC2 = [ "年", "喜", "吉", "事", "年", "體", "想", "賀" ]; var dadasC3 = [ "快", "發", "大", "如", "有", "健", "事", "新" ]; var dadasC4 = [ "樂", "財", "利", "意", "餘", "康", "成", "禧" ]; var dadasE = [ "(新年快乐)", "(祝贺你的成功)", "(吉星高照)", "(愿一万件事都按你的愿望去做吗)", "(每一年都比你需要的多)", "(祝您身体健康)", "(愿你心想事成)", "(恭贺新禧)" ]; pinyin1.textContent = p1[Math.floor(random * p1.length)]; pinyin2.textContent = p2[Math.floor(random * p2.length)]; pinyin3.textContent = p3[Math.floor(random * p3.length)]; pinyin4.textContent = p4[Math.floor(random * p4.length)]; jeskson1.textContent = dadasC1[Math.floor(random * dadasC1.length)]; jeskson2.textContent = dadasC2[Math.floor(random * dadasC2.length)]; jeskson3.textContent = dadasC3[Math.floor(random * dadasC3.length)]; jeskson4.textContent = dadasC4[Math.floor(random * dadasC4.length)]; dadaEnglish.textContent = dadasE[Math.floor(random * dadasE.length)]; var onClick = function() { var random = Math.random(); pinyin1.textContent = p1[Math.floor(random * p1.length)]; pinyin2.textContent = p2[Math.floor(random * p2.length)]; pinyin3.textContent = p3[Math.floor(random * p3.length)]; pinyin4.textContent = p4[Math.floor(random * p4.length)]; jeskson1.textContent = dadasC1[Math.floor(random * dadasC1.length)]; jeskson2.textContent = dadasC2[Math.floor(random * dadasC2.length)]; jeskson3.textContent = dadasC3[Math.floor(random * dadasC3.length)]; jeskson4.textContent = dadasC4[Math.floor(random * dadasC4.length)]; dadaEnglish.textContent = dadasE[Math.floor(random * dadasE.length)]; } button.addEventListener("click", onClick);

效果图:

 效果图:

Document body { grid-template: 3em/3em; place-content: center; overflow: hidden; margin: 0; height: 100vh; background: #262626; font: 20vmin/1 lalezar, sans-serif; filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5)); } body, body *, body ::before, body ::after { display: grid; grid-area: 1/1; } .scene { overflow: hidden; clip-path: inset(0 round 5px); filter: contrast(0.85); } .scene::before { background: linear-gradient(90deg, #314065, #146a7c, #f0ab3d, #c271b4, #c20d90); content: ""; } .rotor { place-self: center; width: 150%; height: 150%; grid-template-rows: 1fr 1fr; mix-blend-mode: multiply; animation: rotz 4s ease-in infinite; } @keyframes rotz { 41%, 50% { transform: rotate(0.5turn); } 91%, 100% { transform: rotate(1turn); } } .year { --i: 1; --not-i: calc(1 - var(--i)); --not-k: calc(1 - var(--k)); overflow: hidden; transform-origin: 50% 100%; transform: rotate(calc(var(--k)*.5turn)); background: hsla(0, 0%, calc(var(--k)*100%), var(--i)); color: hsla(0, 0%, calc(var(--not-k)*100%), var(--i)); text-shadow: 0 0 calc(var(--not-i)*19px) hsl(0, 0%, calc(var(--not-k)*100%)); text-decoration: none; } [aria-hidden=true] { --i: 0; } del { --k: 0; mix-blend-mode: screen; } ins { --k: 1; mix-blend-mode: multiply; } time { place-self: end center; display: flex; align-items: baseline; padding: 0 0.25em; height: 1.5em; background: inherit; animation: move 4s ease-in infinite, blob calc(var(--i)*2s) ease-out infinite alternate; animation-delay: calc(var(--k)*-2s); } time::before, time::after { display: grid; align-items: end; height: 100%; content: ""; } @keyframes move { 41%, 50% { transform: translatey(calc(1ch + 19px)); } 0%, 91%, 100% { transform: translatey(1px); } } @keyframes blob { 82%, 100% { filter: blur(13px) contrast(39); } } 新年 快乐 新年 快乐 linux工程师# 下载 yum install -y figlet # 输出 figlet happy new year!

效果图:

NCL工程师;************************************************* ; Happy_new_year_2021.ncl ;************************************************ ; ; Concepts illustrated: ; - Print ; ; These files are loaded by default in NCL V6.2.0 and newer ; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" ; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" ;************************************************ begin ;************************************************ print("Happy New Year!") print("I wish you all Good luck in the Year of the Ox!") print("Wishing the Tencent Cloud Community the best of luck in 2021!") print("------------ from Meteorologist") ;************************************************ end ;************************************************HarmonyOSimport ohos.aafwk.ability.AbilitySlice; import ohos.aafwk.content.Intent; import ohos.agp.components.Button; import ohos.agp.components.Component; import ohos.agp.components.DirectionalLayout; import ohos.hiviewdfx.HiLog; import ohos.hiviewdfx.HiLogLabel; public class MainAbilitySlice extends AbilitySlice { private static final HiLogLabel LABEL = new HiLogLabel(HiLog.LOG_APP, 0x00201, "云+社区"); @Override public void onStart(Intent intent) { super.onStart(intent); DirectionalLayout directionalLayout = new DirectionalLayout(getContext()); Button button = new Button(getContext()); button.setText("新年快乐,牛年大吉!"); button.setTextSize(200); if (button != null) { button.setClickedListener(new Component.ClickedListener() { @Override public void onClick(Component component) { HiLog.info(LABEL, "云+社区,祝所有人新年快乐,2021 我们一起加油!!"); } }); } directionalLayout.addComponent(button); super.setUIContent(directionalLayout); } }其他工程师C++ -> cout ?【祝大家新春快乐!!!】 html -> ☆祝大家新春快乐!!!☆ iapp -> tw("祝大家新春快乐!!!") java -> System.out.println("祝大家新春快乐!!!"); JScript -> alert("祝大家新春快乐!!!") Jscript -> document.write("祝大家新春快乐!!!") AS -> Alert.show("祝大家新春快乐!!!"); Asp -> Response.Write"祝大家新春快乐!!!" C#:System.Console.WriteLine("祝大家新春快乐!!!!") perl -> print'祝大家新春快乐!!!' COBOL -> DISPLAY'祝大家新春快乐!!! Delphi -> ShowMessage('祝大家新春快乐!!!'); DOS批处理 -> echo祝大家新春快乐!!! PHP -> echo"祝大家新春快乐!!!"; powerBuilder -> messagebox("祝大家新春快乐!!!") Python -> print("祝大家新春快乐!!!") QBasic -> Print"祝大家新春快乐!!!" shell -> echo祝大家新春快乐!!! VB -> Print"祝大家新春快乐!!!" VBScript -> MsgBox"祝大家新春快乐!!!" VC -> MessageBox("祝大家新春快乐!!!"); 易语言 -> 调试输出(“祝大家新春快乐!!!”)java循环工程师收尾 public static void main(String[] args) { LocalDate now = LocalDate.now(); int year = now.getYear(); int dayOfYear =now.lengthOfYear(); System.out.println("dayOfYear = " + dayOfYear); for (int i = 1; i


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有