WordPress 主题 图片自适应宽度

其实这个东西已经出现了很久了,刚换主题的时候欢姐就和我说主题的图片宽度会超出,那时候改了一下,但是今天查看的时候发现又出问题了,于是就彻底的修改了一下css的代码。原来的代码是下面的样子滴:

.obaby-article img, img.obaby-article, .obaby-block img, .obaby-footer img
{
   border-color: #B2C2D1;
   border-style: solid;
   border-width: 0;
   margin: 7px 7px 7px 7px;
}

 

修改成下面的样子:

.obaby-article img
{
    margin:5px 0 0 0;
	max-width:650px;
	_width:expression(this.width>650?"650px":"auto");
}

img.obaby-article, .obaby-block img, .obaby-footer img
{
   border-color: #B2C2D1;
   border-style: solid;
   border-width: 0;
   margin: 7px 7px 7px 7px;
}

 

其实出现这个情况主要是Artisteer 3创建的主题的css代码的兼容性有问题。这个东西花了这么多钱买了发现很多的东西还要自己修正,这也够蛋疼的。 😎
另外网上还有还有下面一段代码,但是这段代码会让所有的笑脸符号变成一个大饼,这也够蛋疼的

p img {
 padding: 0;
 max-width: 100%;
 width: 450px;
 }

最后一句是为了兼容ie,但是这行兼容代码让笑脸符号在opera下变成了一张饼。 :8

蛋疼的Mac OS虚拟机和xcode 4.2

安装mac的虚拟机已经很长一段时间了,但是由于总是出现五国语言,导致也没什么兴致折腾这个鸟东西。从网上搜索了一些解决方案,但是基本没什么鸟用。后来不经意发现一个哥们说在安装过程中频繁出现五国语言,只需要将处理器设置为单核心就行了。于是我就想启动之后的五国语言是不是也可以这么搞?于是就试了一下发现果然不死机了。nngx,太神奇鸟。

Continue Reading

C语言混乱代码

偶然看到的这么个东西,话说这个活动很久了。看了代码果然不一般啊,不一般。

                                       /*
                                      +
                                     +
                                    +
                                    +
                                    [         >i>n[t
                                     */   #include
                        /*2w0,1m2,]_r>i>=>(['0n1'0)1;
                     */int/**/main(int/**/n,char**m){FILE*p,*q;int        A,k,a,r,i/*
                   #uinndcelfu_dseti/_*/;char*d="P%"   "d\n%d\40%d"/**/
                 "\n%d\n\00wb+",b[1024],y[]="yuriyurarararayuruyuri*daijiken**akkari~n**"
          "/y*u*k/riinrarararayuruy9uriyu3riyurar_aBrMaPrOaWy^?"
      "*]/f]`;hvroai+b+i>++b++>l[rb";int/**/u;for(i=0;i<101;i++)y[i*2]^="~hktrvg~dmG*eoa+%squ#l2"
     ":(wn\"1l))v?wM353{/Y;lgcGp`vedllwudvOK`cct~[|ju {stkjalor(stwvne\"gt\"yogYURUYURI"[
     i]^y[i*2+1]^4;/*!*/p=(n>1&&(m[1][0]-'-'||m[1][1]  !='\0'))?fopen(m[1],y+298):stdin;
      /*y/riynrt~(^w^)],]c+h+a+r+*+*[n>)+{>f+oy++>u>>+r >+u+++y>--u---r>++i+++"  < )<      ;[>-m-.>a-.-i.++n.>[(w)*/!q/**/)
    return+printf("Can "  "not\x20open\40%s\40"    ""       "for\40%sing\n",m[!p?1:2],!p?/*
  o=82]5< <+(+3+1+&.(+  m  +-+1.)<)<|<|.6>4>-+(>    m-        &-1.9-2-)-|-|.28>-w-?-m.:>([28+
 */"read":"writ");for  (   a=k=u= 0;y[u];  u=2    +u){y[k++   ]=y[u];}if((a=fread(b,1,1024/*
,mY/R*Y"R*/,p/*U*/)/*          R*/ )>/*U{  */   2&& b/*Y*/[0]/*U*/=='P' &&4==/*"y*r/y)r\}
*/sscanf(b,d,&k,& A,&           i,  &r)&&        !   (k-6&&k -5)&&r==255){u=A;if(n>3){/*
]&<1<6< ?3> +:+ .1>3+++     .   -m-)      -;.u+=++.1<0< <; f>1,i>>1,r);u  = k-5?8:4;k=3;}else
  /*]>*/{(u)=/*{   p> >u  >t>-]s                >++(.yryr*/+(    n+14>17)?8/4:8*5/
     4;}for(r=i=0  ;  ;){u*=6;u+=                (n>3?1:0);if    (y[u]&01)fputc(/*
      h.a r  -(-).)8+<1.                 >;+i.(< )<     <)+{+i.f>([180*/1*
      (r),q);if(y[u   ]&16)k=A;if                               (y[u]&2)k--;if(i/*
      ("^w^NAMORI; {   I*/==a/*"                               )*/){/**/i=a=(u)*11
       &255;if(1&&0>=     (a=                                 fread(b,1,1024,p))&&
        ")]i>(w)-;} {                                         /i-f-(-m--M1-0.)< {"
         [ 8]==59/* */                                       )break;i=0;}r=b[i++]
            ;u+=(/**>>                                      *..*&*^&%%$^**/+8&*
            (y+u))?(10-              r?4:2):(y[u]         &4)?(k?2:4):2;u=y[u/*
             49;7i\(w)/;}             y}ru\=*ri[        ,mc]o;n}trientuu ren (
             */]-(int)'`';}             fclose(          p);k= +fclose( q);
              /*] < *.na/m*o{ri{                       d;^w^;}  }^_^}}
               "   */   return  k-                -1+   /*\'   '-`*/
                     (   -/*}/   */0x01        );       {;{    }}
                            ;           /*^w^*/        ;}
Continue Reading

OSX and iOS Kernel Programming

虽然有了电子版,但是还是喜欢纸质的书。习惯原始的阅读,那种书捧在手里的感觉。本来想找同学帮忙去打印的,但是话说现在不知道谁还在北京于是,就从淘宝上随便找了一个打印的地方,打印了一本。整体来说打印的质量还算不错,图片也比较清晰,但是装订的时候装订成了两本,这个感觉有点郁郁。本来以为很厚的,但是发现其实装订成一本问题也不大。另外发现了一个很郁闷的事情,有的地方的页码实在装订线那边的,仔细看了一下发现少了50页。刚开始还以为是装订漏了,后来才发现原来原书的pdf版本里面也没有50,于是后面的页面就有正有反。这个有点郁闷,不过也还好不影响阅读。

Continue Reading

Interactive Delphi Reconstructor 2.5.3 Beta

IDR (Interactive Delphi Reconstructor) – a decompiler of executable files (EXE) and dynamic libraries (DLL), written in Delphi and executed in Windows32 environment.

The program firstly is intended for the companies, engaged by development of anti-virus software. It can also help programmers to recover lost source code of programs appreciably.

The current version of the program can process files (GUI and console applications), compiled by Delphi compilers of versions Delphi2 – Delphi2010.

Continue Reading