您正在查看: 技术研究 分类下的文章
icon-plus

解决浮动脱档问题(clearfix)的常用方法

I''m waking up to ash and dust, I wipe my brow and I sweat my rust, I''m breathing in, the chemicals, gahh ahhh. I''m breaking in, shaping up, then checking out on the prison bus. This is it, the apocalypse, woah. I''m waking up, I feel it in my bones Enough to make my systems go Welcome to the new age, to the new age. Welcome to the new age, to the new age. Woah, woah, I''m radioactive, radioactive. Woah, woah, I''m radioactive, radioactive. I raise my flag and dye my clothes, It''s a revolution I suppose. We''re painted red, to fit right in, woah. I''m breaking in, shaping up, then checking out on the prison bus. This is it, the apocalypse, woah. I''m waking up, I feel it in my bones Enough to make my systems go Welcome to the new age, to the new age. Welcome to the new age, to the new age. Woah, woah, I''m radioactive, radioactive. Woah, woah, I''m radioactive, radioactive. All systems go, sun hasn''t died. Deep in my bones, straight from inside. I''m waking up, I feel it in my bones Enough to make my systems go Welcome to the new age, to the new age. Welcome to the new age, to the new age. Woah, woah, I''m radioactive, radioactive. Woah, woah, I''m radioactive, radioactive.

好久没有写过技术文章了,最近回顾起以前的老知识,感觉都忘掉好多了
这回来记录一下一个凡是做网页就一定会遇到的问题吧
平时做网页处理排版的时候,经常会使用到 css 的浮动功能
但是浮动一直以来都有一个很麻烦的问题,就是元素一旦浮动就会脱离文档流
这是它的缺点,也是它的优点,为什么这么说呢?
它的缺点就缺在于在排版时会增加排版的难度
有时候需要父元素始终包裹住子元素,但是float脱离文档流之后父元素就不能直接包裹住子元素了
就像这样

icon-plus

关于PHP中带减号的变量的处理方法

Tough girl In the fast lane No time for love No time for hate No drama, no time For games Tough girl Whose soul aches I'm at home On my own Check my phone Nothing, though Act busy Order in Pay TV It's agony I may cry, ruining my makeup Wash away all the things you've taken I don't care if I don't look pretty Big girls cry when their hearts are breaking Big girls cry when their hearts are breaking Big girls cry when their heart is breaking Tough girl I'm in pain It's lonely at the top Blackouts and airplanes I still pour you a glass of champagne I'm a tough girl Whose soul aches I'm at home On my own Check my phone Nothing, though Act busy Order in Pay TV It's agony I may cry, ruining my makeup Wash away all the things you've taken I don't care if I don't look pretty Big girls cry when their hearts are breaking Big girls cry when their hearts are breaking Big girls cry when their heart are breaking away i go away i go away i go away i go away i go away i go away i go alone I may cry, ruining my makeup Wash away all the things you've taken I don't care if I don't look pretty Big girls cry when their hearts are breaking Big girls cry when their hearts are breaking Big girls cry when their heart is breaking 最近在研究Challonge的API
在输出tournaments表的时候,看到了一个很奇怪的东西

    $tournamentsList = $api_instance[$key]->getTournaments()->tournament;
    print_r($tournamentsList);


输出结果如下

     SimpleXMLElement Object
(
    [id] => 2213854
    [name] => DFXRC first match
    [url] => DFXRC_first_match
    [description] => <strong>DFXRC</strong> is strong!
    [tournament-type] => single elimination
    [started-at] => 2016-02-04T00:05:26-08:00
    [completed-at] => SimpleXMLElement Object
        (
            [@attributes] => Array
                (
                    [type] => dateTime
                    [nil] => true
                )

        )
.....


看到那个started-at了没?没错!你没看错,变量名里面居然有减号!!!

icon-plus

初次写discuz X 插件的一些感受

I can't believe I had to see The girl of my dreams cheating on me The pain you caused has left me dead inside I'm gonna make sure, you regret that night I feel you close, I feel you breathe And now it's like you're here You're haunting me You're out of line, you're out of sight You're the reason that we started this fight But I know, I just gotta let it go, I, should've known I gotta learn to say goodbye now I throw my armour down, And leave the battleground For the final time now, I, I know. I'm running from a warzone In our house, I hate that place, Everywhere I walk I see your face Try to erase a memory with a flame, And hope I never see you again Standing here, in this burning room, You know the end could never come so soon, It's clear to me, The lies you use, The ones that killed me ain't hurting you, So I know, I just gotta let it go, I, should've known I gotta learn to say goodbye now I throw my armour down, And leave the battleground For the final time now, I, I know. I'm running from a warzone I'm running from a warzone I can't do this anymore I'm running from a warzone What are we fighting for? I'm running from a warzone... I know, I just gotta let it go, I, should've known I gotta learn to say goodbye now I throw my armour down, And leave the battleground For the final time now, I, I know. I'm running from a warzone 某社区打算升级discuzX3.2,不过据说原来的录像解析插件升级了之后不能用了
于是我自发的去帮了一下他们,顺便看看他们的解析是什么样子

本来以为他们的录像解析是以插件的形式嵌入论坛的
直到我开始分析他们的源码......

icon-plus

Manjaro 下设置 yaourt 走ss代理

(白)人间道 道道道道道道 道道道道道道道道道 道可道 非常道 天道地道 人道剑道         黑道白道黄道赤道 乜道物道道道都道 自己嗰道系非常道 呸呸呸呸呸 胡说八道 呢度嗰度 边度系路 (笑)哈哈   花道茶道 哈 阴道阳道 哈     零度密度咸度淡度光度热度雷射角度 鬼哭神号旁门左道狗上瓦坑必然有路   你度佢度豺狼当道 唏 我自求我道 我自求我道       道可道 非常道 天道地道 人道剑道         黑道白道黄道赤道 乜道物道道道都道 自己嗰道系非常道 NO NO NO NO NO 胡说八道 呢度嗰度 边度系路 (笑)哈哈   花道茶道 哈 阴道阳道 哈     海底隧道天后庙道皇后大道罗便臣道 马头围道牛头角道金马伦道铜锣湾道   条条大道条条系路 哈 我自求我道 我自求我道       道可道 非常道 天道地道 人道剑道 一道二道三道四道 东道南道西道北道 左道右道前路后路           都都都都都 系胡说八道 呢度嗰度 边度系路 (笑)哈哈 花道茶道 哈 阴道阳道 哈   零度密度咸度淡度光度热度雷射角度 鬼哭神号旁门左道狗上瓦坑必然有路   你度佢度豺狼当道 唏 各自求各道 各自求各道

Arch系的linux还真不好折腾 AUR上的软件包有些都被wall了

只好自己摸索办法,让 yaourt 去走代理

看了archwiki 知道了 yaourt 是默认支持http_proxy和https_proxy的

于是想到了借助 privoxy 来转发数据流给 ss 的办法

icon-plus

javascript编写正方系统评教脚本

La la, la la la... Hush, don’t speak When you spit your venom, keep it shut I hate it When you hiss and preach About your new messiah ’cause your theories catch fire I can’t find those silver linings I don’t mean to judge But when you read your speech, it’s tiring Enough is enough I’m covering my ears like a kid When your words mean nothing, I go la la la I’m turning off the volume when you speak Cause if my heart can’t stop it, I find a way to block it I go La la, la la la... La la, la la la... I find a way to block it I go La la, la la la... La la, la la la... Yes our love is running out of time I won’t count the hours, rather be a coward When our words collide I’m gonna drown you out before I lose my mind I can’t find those silver linings I don’t mean to judge But when you read your speech, it’s tiring Enough is enough I’m covering my ears like a kid When your words mean nothing, I go la la la I’m turning off the volume when you speak Cause if my heart can’t stop it, I find a way to block it I go La la la la la... La la la la la... I find a way to block it I go La la la la la... La la la la la... I find a way to block you, oh La la la la la... La la la la la... I find a way to block it I go La la la la la... La la la la la... I’m covering my ears like a kid When your words mean nothing, I go la la la I’m turning off the volume when you speak Cause if my heart can’t stop it, I find a way to block it I go I’m covering my ears like a kid When your words mean nothing, I go la la la I’m turning off the volume when you speak Cause if my heart can’t stop it, I find a way to block it I go La la la la la... La la la la la... La la la la la...

之前学校又搞起了评教,觉得每次评教都要鼠标点老半天

实在是不爽,于是想着自己写个快速评教脚本,顺便练习一下久违的javascript

于是动手,用chrome在线调试功能来写

之前只是稍微见过别人调试,没有自己深究过这玩意

现在发现chrome的console还真是挺强大的一个工具

直接按F12,然后切换到console选项卡就可以呼出控制台


于是下意识来个“hello world”,哈哈