headermask image

header image

信仰

点亮心中的那团火吧,它期待着你轻轻的吟唱,
如果你温柔的对待你的内心,他也将温柔的对待你,

他将在你的眼中绘画出梦一样的色彩。
轻灵的自然之声将融入你的耳朵里, 他会释放出早就准备好的那一双白色的翅膀, 你将欢笑着再一次振翅飞翔。

去飞入那属于自由的天空里,
去飞入那属于爱的温暖里,
去飞入那爱人一般友善的云朵里,

当你位于云朵之上的时候,自由和爱之神的雕像将巍峨耸立,
太阳光芒再一次的播撒于天际,那光芒跳跃而闪亮,像是在向你发出从未停止过的邀请。
那光芒热爱你,他欢迎你的到来。
而你
将聆听诸神的诉说,并找到你关于爱的信仰

点亮心中的那团火吧,
它期待着你轻轻的吟唱,
如果你温柔的对待你的内心,
他也将温柔的对待你。

HEY JUDE

第一个是The Beatles 的原唱版本
第二个是SIMON 和毕夏的在中国好声音的版本
歌词:
Hey Jude
The Beatles

Hey Jude, don’t make it bad.
Take a sad song and make it better.
Remember to let her into your heart,
Then you can start to make it better.
Hey Jude, don’t be afraid.
You were made to go out and get her.
The minute you let her under your skin,
Then you begin to make it better.

And anytime you feel the pain, hey Jude, refrain,
Don’t carry the world upon your shoulders.
For well you know that it’s a fool who plays it cool
By making his world a little colder.

Hey Jude, don’t let me down.
You have found her, now go and get her.
Remember to let her into your heart,
Then you can start to make it better.
better.better.better….
Na na na, na na na na, na na na, hey Jude
Na na na, na na na na, na na na, hey Jude
Na na na, na na na na, na na na, hey Jude
Na na na, na na na na, na na na, hey Jude
Na na na, na na na na, na na na, hey Jude
Na na na, na na na na, na na na, hey Jude
Na na na, na na na na, na na na, hey Jude
Na na na, na na na na, na na na, hey Jude
Na na na, na na na na, na na na, hey Jude

马背上的伯爵夫人

故事背景:

据说大约在1040年,统治Coventry城市的Leofric the Dane伯爵决定向人民征收重税,支持军队出战,令人民的生活苦不堪言。伯爵善良美丽的妻子Godiva夫人眼见民生疾苦,决定恳求伯爵减收徵税,减轻人民的负担。Leofric伯爵勃然大怒,认为Godiva夫人为了这班爱哭哭啼啼的贱民苦苦衷求,实在丢脸。Godiva夫人却回答说伯爵定会发现这些人民是多么可敬。他们决定打赌——Godiva夫人要赤裸身躯骑马走过城中大街,仅以长发遮掩身体,假如人民全部留在屋内,不偷望Godiva夫人的话,伯爵便会宣布减税。翌日早上,Godiva夫人骑上马走向城中,Coventry市所有百姓都诚实地躲避在屋内,令大恩人不至蒙羞。事后,Leofric伯爵信守诺言,宣布全城减税。这就是著名的Godiva夫人传说。时至今日,挂毯、油画、雕塑和文学作品等众多欧洲艺术品中亦载有 Godiva夫人的肖像,以示表扬。
c23f68600c3387446c2797ee510fd9f9d62aa059
其中最出名的绘画就是这张John Collier画的,作者是英国皇家艺术协会的会员,祖上从商人发家,到他这一代,哥哥当上了议会议长,弟弟也成为皇家艺术会员,算是新兴贵族吧。John Collier的丈人是著名的博物学家赫胥黎,他的两任妻子都是赫胥黎的女儿。

John Collier的绘画风格上承拉斐尔前派,擅长肖像绘画,也热衷于画一些中古传说,比如这个《马背上的Godiva夫人》。

随着日不落帝国的兴盛,各地的对中世纪以及之前的历史的发掘,人体美的表现极大激发了英国画家们的热情。《马背上的Godiva夫人》是中世纪中一个直接触及裸体但不色情的故事,可以认为是部分贵族好善的美德与教会清规戒律的保守的一次碰撞。故事以及由这个故事延伸的艺术作品的都可以算是人文主义在现实社会中的具体表现。

另外,Godiva还是著名的巧克力品牌,这牌子也是来自于这个传说。
42124836acaf2edd1715f17b8d1001e938019353

e4b90ff431adcbefc6d0c694acaf2edda2cc9f53

8c1578ec54e736d1907f359a9b504fc2d46269cb

fe9b66380cd79123306d2ce6ad345982b3b780aa

42124836acaf2edd1402f67b8d1001e938019348

android 在外部存储中保存文件

Because the external storage may be unavailable—such as when the user has mounted the storage to a PC or has removed the SD card that provides the external storage—you should always verify that the volume is available before accessing it. You can query the external storage state by calling getExternalStorageState(). If the returned state is equal to MEDIA_MOUNTED, then you can read and write your files. For example, the following methods are useful to determine the storage availability:

/* Checks if external storage is available for read and write */ 
public boolean isExternalStorageWritable() { 
    String state = Environment.getExternalStorageState(); 
    if (Environment.MEDIA_MOUNTED.equals(state)) { 
        return true; 
    } 
    return false; 
} 

/* Checks if external storage is available to at least read */ 
public boolean isExternalStorageReadable() { 
    String state = Environment.getExternalStorageState(); 
    if (Environment.MEDIA_MOUNTED.equals(state) || 
        Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) { 
        return true; 
    } 
    return false; 
}

Although the external storage is modifiable by the user and other apps, there are two categories of files you might save here:

Public files
Files that should be freely available to other apps and to the user. When the user uninstalls your app, these files should remain available to the user.For example, photos captured by your app or other downloaded files.
Private files
Files that rightfully belong to your app and should be deleted when the user uninstalls your app. Although these files are technically accessible by the user and other apps because they are on the external storage, they are files that realistically don’t provide value to the user outside your app. When the user uninstalls your app, the system deletes all files in your app’s external private directory.For example, additional resources downloaded by your app or temporary media files.

If you want to save public files on the external storage, use the getExternalStoragePublicDirectory() method to get a File representing the appropriate directory on the external storage. The method takes an argument specifying the type of file you want to save so that they can be logically organized with other public files, such as DIRECTORY_MUSIC or DIRECTORY_PICTURES. For example:

public File getAlbumStorageDir(String albumName) { 
    // Get the directory for the user's public pictures directory.  
    File file = new File(Environment.getExternalStoragePublicDirectory( 
            Environment.DIRECTORY_PICTURES), albumName); 
    if (!file.mkdirs()) { 
        Log.e(LOG_TAG, "Directory not created"); 
    } 
    return file; 
}

If you want to save files that are private to your app, you can acquire the appropriate directory by calling getExternalFilesDir() and passing it a name indicating the type of directory you’d like. Each directory created this way is added to a parent directory that encapsulates all your app’s external storage files, which the system deletes when the user uninstalls your app.

For example, here’s a method you can use to create a directory for an individual photo album:

public File getAlbumStorageDir(Context context, String albumName) { 
    // Get the directory for the app's private pictures directory.  
    File file = new File(context.getExternalFilesDir( 
            Environment.DIRECTORY_PICTURES), albumName); 
    if (!file.mkdirs()) { 
        Log.e(LOG_TAG, "Directory not created"); 
    } 
    return file; 
}

If none of the pre-defined sub-directory names suit your files, you can instead call getExternalFilesDir() and pass null. This returns the root directory for your app’s private directory on the external storage.

Remember that getExternalFilesDir() creates a directory inside a directory that is deleted when the user uninstalls your app. If the files you’re saving should remain available after the user uninstalls your app—such as when your app is a camera and the user will want to keep the photos—you should instead use getExternalStoragePublicDirectory().

Regardless of whether you use getExternalStoragePublicDirectory() for files that are shared or getExternalFilesDir() for files that are private to your app, it’s important that you use directory names provided by API constants like DIRECTORY_PICTURES. These directory names ensure that the files are treated properly by the system. For instance, files saved in DIRECTORY_RINGTONES are categorized by the system media scanner as ringtones instead of music.

via Saving Files | Android Developers.

Drawable和Bitmap转换

一、Bitmap转Drawable

Bitmap bm=xxx; //xxx根据你的情况获取

BitmapDrawable bd=new BitmapDrawable(bm);

因为BtimapDrawable是Drawable的子类,最终直接使用bd对象即可。

二、 Drawable转Bitmap

转成Bitmap对象后,可以将Drawable对象通过Android的SK库存成一个字节输出流,最终还可以保存成为jpg和png的文件。

Drawable d=xxx; //xxx根据自己的情况获取drawable

BitmapDrawable bd = (BitmapDrawable) d;

Bitmap bm = bd.getBitmap();

最终bm就是我们需要的Bitmap对象了。

// 从资源中获取Bitmap

public static Bitmap getBitmapFromResources(Activity act, int resId) {

Resources res = act.getResources();

return BitmapFactory.decodeResource(res, resId);

}

// byte[] → Bitmap

public static Bitmap convertBytes2Bimap(byte[] b) {

if (b.length == 0) {

return null;

}

return BitmapFactory.decodeByteArray(b, 0, b.length);

}

// Bitmap → byte[]

public static byte[] convertBitmap2Bytes(Bitmap bm) {

ByteArrayOutputStream baos = new ByteArrayOutputStream();

bm.compress(Bitmap.CompressFormat.PNG, 100, baos);

return baos.toByteArray();

}

// 1)Drawable → Bitmap

public static Bitmap convertDrawable2BitmapByCanvas(Drawable drawable) {

Bitmap bitmap = Bitmap

.createBitmap(

drawable.getIntrinsicWidth(),

drawable.getIntrinsicHeight(),

drawable.getOpacity() != PixelFormat.OPAQUE ? Bitmap.Config.ARGB_8888

: Bitmap.Config.RGB_565);

Canvas canvas = new Canvas(bitmap);

// canvas.setBitmap(bitmap);

drawable.setBounds(0, 0, drawable.getIntrinsicWidth(),

drawable.getIntrinsicHeight());

drawable.draw(canvas);

return bitmap;

}

// 2)Drawable → Bitmap

public static Bitmap convertDrawable2BitmapSimple(Drawable drawable){

BitmapDrawable bd = (BitmapDrawable) drawable;

return bd.getBitmap();

}

// Bitmap → Drawable

public static Drawable convertBitmap2Drawable(Bitmap bitmap) {

BitmapDrawable bd = new BitmapDrawable(bitmap);

// 因为BtimapDrawable是Drawable的子类,最终直接使用bd对象即可。

return bd;

}

via Drawable和Bitmap转换_某源_新浪博客.