标签: php底层 | 分类: [web]
| | 返回顶部
标签: js | 分类: [资源]
| | 返回顶部
-
-
-
-
-
String.prototype.charlen = function() {
-
var arr = this.match(/[^\x00-\xff]/ig);
-
return this.length + (arr == null ? 0 : arr.length);
-
}
-
-
-
-
-
-
String.prototype.format = function() {
-
var args = arguments;
-
return this.replace(/\$\{(\d+)\}/g,
-
function(m, i){
-
return args[i];
-
});
-
}
-
-
-
-
-
-
String.prototype.trim = function() {
-
return this.replace(/(^\s*)|(\s*$)/g, "");
-
}
-
-
-
-
-
-
String.prototype.contains = function(sub) {
-
return this.indexOf(sub) != -1;
-
}
-
-
-
-
-
-
String.prototype.compare = function(b) {
-
if(!b)
-
return -1;
-
-
if(this.length != b.length)
-
return this.length - b.length;
-
-
var i = 0;
-
for (; i < this.length; i++){
-
var val = this.charCodeAt(i) - b.charCodeAt(i);
-
if(val != 0)
-
return val;
-
}
-
-
return 0;
-
}
-
-
-
-
-
-
String.prototype.replaceLen = function(start, len, replaced) {
-
if(!len)
-
return this;
-
-
if(start >= this.length)
-
return this;
-
-
var returnSeg = '';
-
var returnSeg2 = '';
-
var i = 0;
-
for (; i < this.length; i++){
-
var c = this.charAt(i);
-
if(i < start)
-
returnSeg += c;
-
-
if(i >= start + len)
-
returnSeg2 += c;
-
}
-
-
return returnSeg + replaced + returnSeg2;
-
}
-
-
-
-
-
-
String.prototype.replaceChar = function(target, replaced, start) {
-
if(!target)
-
return this;
-
-
if(!start)
-
start = 0;
-
-
var returnVal = this.substring(0, start);
-
var index = 0;
-
for (var i = start; i < this.length; i++) {
-
var c = this.charAt(i);
-
target = typeof target == 'function' ? target.call(this, index) : target;
-
if (c == target) {
-
returnVal += typeof replaced == 'function' ? replaced.call(this, index) : replaced;
-
while (i < this.length - 1 && this.charAt(i + 1) == c) {
-
i++;
-
}
-
index++;
-
}else{
-
returnVal += c;
-
}
-
}
-
-
return returnVal;
-
}
-
-
-
-
-
-
Array.prototype.clone = function(){
-
var arr = [];
-
var i = 0;
-
for(; i < this.length; i++){
-
switch(typeof this[i]){
-
case 'object':
-
var obj = {};
-
for(key in this[i])
-
obj[key] = this[i][key];
-
arr.push(obj);
-
break;
-
default:
-
arr.push(this[i]);
-
break;
-
}
-
}
-
return arr;
-
}
-
-
-
-
-
-
Array.prototype.clear = function() {
-
this.splice(0, this.length);
-
}
-
-
-
-
-
-
Array.prototype.contains = function(el) {
-
var i;
-
for(i = 0; i < this.length; i++) {
-
if(this[i] == el)
-
return true;
-
}
-
return false;
-
}
-
-
-
-
-
-
Array.prototype.merge = function(arr) {
-
if(arr){
-
var i;
-
for(i = 0; i < arr.length; i++) {
-
this.push(arr[i]);
-
}
-
}
-
}
-
-
-
-
-
-
Array.prototype.indexOf = function(val, field){
-
var i = 0;
-
for(; i < this.length; i++){
-
if(this[i] && (field ? this[i][field] == val : this[i] == val)){
-
return i;
-
}
-
}
-
return -1;
-
}
-
-
-
-
-
-
Array.prototype.lastIndexOf = function(val, field){
-
var i = 0;
-
var max = -1;
-
for(; i < this.length; i++){
-
if(this[i] && (field ? this[i][field] == val : this[i] == val)){
-
max = i;
-
}
-
}
-
return max;
-
}
-
-
-
-
-
-
Array.prototype.unique = function(field){
-
var arr = [];
-
-
var i = 0;
-
for(; i < this.length; i++){
-
var val = field ? this[i][field] : this[i];
-
var index = this.lastIndexOf(val, field);
-
if(index == i)
-
arr.push(this[i]);
-
}
-
-
return arr;
-
}
-
-
-
-
-
-
Array.prototype.max = function(field){
-
var result = -1;
-
-
var i = 0;
-
for(; i < this.length; i++){
-
var val = field ? this[i][field] : this[i];
-
if(val > result)
-
result = val;
-
}
-
-
return result;
-
}
-
-
-
-
-
-
Array.prototype.min = function(field){
-
var result = -1;
-
-
var i = 0;
-
for(; i < this.length; i++){
-
var val = field ? this[i][field] : this[i];
-
if(val < result)
-
result = val;
-
}
-
-
return result;
-
}
-
-
-
-
-
-
Date.prototype.format = function(pat){
-
var year = this.getFullYear();
-
var month = this.getMonth() + 1;
-
var day = this.getDate();
-
var hour = this.getHours();
-
var minute = this.getMinutes();
-
var second = this.getSeconds();
-
-
month = month > 9 ? month : "0" + month;
-
day = day > 9 ? day : "0" + day;
-
hour = hour > 9 ? hour : "0" + hour;
-
minute = minute > 9 ? minute : "0" + minute;
-
second = second > 9 ? second : "0" + second;
-
if(!pat){
-
pat = "yyyy-MM-dd";
-
}
-
pat = pat.replace(/yyyy/g, year);
-
pat = pat.replace(/MM/g, month);
-
pat = pat.replace(/dd/g, day);
-
pat = pat.replace(/HH/gi, hour);
-
pat = pat.replace(/mm/g, minute);
-
pat = pat.replace(/ss/g, second);
-
return pat;
-
}
-
-
-
Date.prototype.getTime2 = function(){
-
-
return this.getTime() - this.getTimezoneOffset() / 60 * 3600 * 1000;
-
}
-
-
-
Date.prototype.diff = function(date){
-
return Math.ceil((this - date) / (1000 * 60 * 60 * 24));
-
}
-
-
-
Date.prototype.add = function(days){
-
return new Date(this.getTime() + days * (1000 * 60 * 60 * 24));
-
}
-
-
-
Date.prototype.addMonth = function(months){
-
var day = this.getDate();
-
var month = this.getMonth() + 1;
-
var year = this.getFullYear();
-
month += months;
-
if(month > 12){
-
year += Math.floor(month / 12);
-
month = month % 12;
-
}
-
return Date.parse(month + '/' + day + '/' + year);
-
}
-
-
-
Date.parse2 = function(str, pat){
-
if(str == null || str == '')
-
return new Date();
-
var rstr = str.replace(/(\d{4})([-\./])(\d{1,2})\2(\d{1,2})/, "$3/$4/$1");
-
return new Date(Date.parse(rstr));
-
}
-
-
-
-
Date.parse3 = function(obj){
-
-
return new Date(obj.time - new Date().getTimezoneOffset() / 60 * 3600 * 1000);
-
-
-
-
}
-
-
-
-
-
Array.prototype.clone = function(){
-
return this.splice(0);
-
}
-
-
-
-
-
-
Array.prototype.clear = function() {
-
this.length = 0;
-
}
-
标签: prototype js 基础类常用方法 | 分类: [javascript]
| | 返回顶部
Javascript 中的原型函数(prototype)的工作原理,在 javascript 中每次声明新函数的过程中,就会为其创建一个 prototype 的属性。在未加其他附带条件情况下,所有的 prototype 属性都会自动获取 constractor 属性,constructor 内包含一个指向 prototype 属性所属函数的指针(就是说 constructor 回指构造函数本身)。
举个例子来说,Fruit.prototype.constructor 指向 Fruit。并且可以通过这个构造函数,为其添加更多的属性和方法。
当调用构造函数创建一个新实例后,该实例内部包含一个指针指向构造函数的原型函数。此时我们不用去关心内部的这个指针到底是什么(这个指针还的确有个名字:__proto__ 估计是为了对应 prototype 而起的名字吧 ~\(≧▽≦)/~ ),只需记住它的指向即可(指向构造函数的原型函数)。需要注意的是,这个 __proto__ 只存在于函数实例与构造函数的原型函数之间,而非实例与构造函数之间。

如上图所示,Fruit_1, Fruit_2 与构造函数没有直接的联系,只是这两个实例的 __proto__ 属性指向了 Fruit.prototype。虽然这两个实例都不包含属性和方法,但却可以通过 fruit_1.showPrice() 来调用。其理论依据是通过查找对象属性的过程来实现的。
举个例子来说:
-
function Fruit(){
-
}
-
-
Fruit.prototype.category = "apple";
-
Fruit.prototype.price = 19.9;
-
Fruit.prototype.showPrice = function(){
-
alert(this.price);
-
}
-
-
var fruit_1 = new Fruit();
-
var fruit_2 = new Fruit();
-
alert(fruit_1.constructor == fruit_2.constructor);
-
fruit_1.showPrice();
此时,Fruit()构造函数变成了一个空函数,但却可以通过调用 prototype 往构造函数内直接增加属性和方法。并且在此时,仍然可以调用构造函数来 new 新对象,并且新对象具有通过原型函数向构造函数直接增加的属性和方法(有点拗口啊,就是说,通过原型函数直接向构造函数增加属性和方法,增加的这些属性和方法,在通过构造函数 new 出来新实例中也具有)。
并且通过上面的例子可以看出,通过构造函数 new 出来的不同对象,具有与构造函数相同的属性和方法。并且这些都是共有的。
这一切的一切表明,在构造函数外部可以通过原型函数为其增加属性和方法,并且与在构造函数内部声明具有相同的效果。
上述代码是在没有构造函数的情况下,如果存在构造函数,则变量首先去检索具有给定名字的对象的实例函数,如果存在则执行实例函数,如果不存在,则继续向前检索原型函数。
犹如这条检索链:对象 -> 实例函数属性或方法 -> (若没有找到)则检索原型函数。
下面一个例子很好的说明了这一点:
-
function Fruit(){
-
this.showPrice = showPrice;
-
}
-
-
function showPrice(){
-
alert("100000");
-
}
-
-
Fruit.prototype.category = "apple";
-
Fruit.prototype.price = 19.9;
-
Fruit.prototype.showPrice = function(){
-
alert(this.price);
-
}
-
-
var fruit_1 = new Fruit();
-
var fruit_2 = new Fruit();
-
fruit_1.showPrice();
输出为100000,则正面首先从构造函数去检索,检索到了之后就不再去执行原型函数了,但如果按照 javascript 解释性语言来解释的话,输出就应该是 19.9 了。
但是在使用 prototype 的时候一共有两种方法,一种方法就如上面所示,Fruit.prototype.xxx = "xxx";就可以。
-
function Fruit(){
-
}
-
-
Fruit.prototype = {
-
category :"apple" ,
-
price : 19.9 ,
-
showPrice : function(){
-
alert(price);
-
}
-
}
-
-
var fruit = new Fruit();
-
alert(fruit.constructor == Fruit);
-
alert(fruit.constructor == Object);
很奇怪的一点是,fruit.constructor == Fruit() 的输出false,不再是 true 了。这是因为本质上我们已经重写了默认的 prototype 对象,因此 constructor 属性所指向的内容也就变成了新对象的 constructor 属性,而这个属性指向的是 Object 构造函数。
可以通过增加一句话来定义 constructor。
-
function Fruit(){
-
}
-
-
Fruit.prototype = {
-
constructor:Fruit ,
-
category :"apple" ,
-
price : 19.9 ,
-
showPrice : function(){
-
alert(price);
-
}
-
}
-
-
var fruit = new Fruit();
-
alert(fruit.constructor == Fruit);
-
alert(fruit.constructor == Object);
显示的声明 constructor 就可以让它知道所指的构造函数。
标签: js原型函数 prototype | 分类: [javascript]
| | 返回顶部
一、建立一个目录如下

二、建立一个测试页面如下
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
-
<head>
-
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
-
<title>图片剪切测试页</title>
-
<link href="style.css" media="screen" rel="stylesheet" type="text/css" />
-
<link href="resources/js/imageCrop/jquery.imagecrop.css" media="screen" rel="stylesheet" type="text/css" />
-
<script src="resources/js/jquery-1.6.2.min.js" type="text/javascript"></script>
-
<script src="resources/js/imageCrop/jquery.imagecrop.js" type="text/javascript"></script>
-
</head>
-
-
<body>
-
<div id="wrapper">
-
<h1>jQuery Image Cropping Plug-In</h1>
-
-
<div class="image-decorator">
-
<img alt="jQuery Image Cropping Plug-In" height="360" id="example" src="resources/images/example.jpg" width="480" />
-
</div>
-
</div>
-
</body>
-
</html>
三、新建一个css样式表如下
-
* {
-
margin : 0;
-
outline : 0;
-
padding : 0;
-
}
-
-
body {
-
background-color : #ededed;
-
color : #646464;
-
font-family : 'Verdana', 'Geneva', sans-serif;
-
font-size : 12px;
-
text-shadow : 0 1px 0 #ffffff;
-
}
-
-
h1 {
-
font-size : 24px;
-
font-weight : normal;
-
margin : 0 0 10px 0;
-
}
-
-
div#wrapper {
-
margin : 25px 25px 25px 25px;
-
}
-
-
div.image-decorator {
-
-moz-border-radius : 5px 5px 5px 5px;
-
-moz-box-shadow : 0 0 6px #c8c8c8;
-
-webkit-border-radius : 5px 5px 5px 5px;
-
-webkit-box-shadow : 0 0 6px #c8c8c8;
-
background-color : #ffffff;
-
border : 1px solid #c8c8c8;
-
border-radius : 5px 5px 5px 5px;
-
box-shadow : 0 0 6px #c8c8c8;
-
display : inline-block;
-
height : 360px;
-
padding : 5px 5px 5px 5px;
-
width : 480px;
-
}
四、写jquery插件
打开 /resources/js/imageCrop/jquery.imagecrop.js文件
-
-
(function($) {
-
$.imageCrop = function(object, customOptions) {};
-
-
$.fn.imageCrop = function(customOptions) {
-
-
this.each(function() {
-
var currentObject = this,
-
image = new Image();
-
-
-
image.onload = function() {
-
$.imageCrop(currentObject, customOptions);
-
};
-
-
-
image.src = currentObject.src;
-
});
-
-
return this;
-
};
-
}) (jQuery);
五、写操作选项
-
$.imageCrop = function(object, customOptions) {
-
-
var defaultOptions = {
-
allowMove : true,
-
allowResize : true,
-
allowSelect : true,
-
minSelect : [0, 0],
-
outlineOpacity : 0.5,
-
overlayOpacity : 0.5,
-
selectionPosition : [0, 0],
-
selectionWidth : 0,
-
selectionHeight : 0
-
};
-
-
-
var options = defaultOptions;
-
-
-
setOptions(customOptions);
-
};
-
-
-
function setOptions(customOptions) {
-
options = $.extend(options, customOptions);
-
};
-
-
allowMove –选区是否可以移动 (默认可以).
-
allowResize – 选区是否可以重设大小 (默认可以).
-
allowSelect – 是否应许用户建立选区 (默认可以).
-
minSelect – 选区最小尺寸 (默认
[0, 0]).
-
outlineOpacity – 外边线透明度 (默认
0.5).
-
overlayOpacity – 覆盖层透明度 (默认
0.5).
-
selectionPosition –选区相对位置 (默认
[0, 0]).
-
selectionWidth – 选区宽度(默认
0).
-
selectionHeight – 选区高度 (默认
0).
五、建立层

先看下这张图,来认识下图片各层
-
...
-
-
-
var $image = $(object);
-
-
-
var $holder = $('<div />')
-
.css({
-
position : 'relative'
-
})
-
.width($image.width())
-
.height($image.height());
-
-
-
$image.wrap($holder)
-
.css({
-
position : 'absolute'
-
});
-
-
-
-
var $overlay = $('<div id="image-crop-overlay" />')
-
.css({
-
opacity : options.overlayOpacity,
-
position : 'absolute'
-
})
-
.width($image.width())
-
.height($image.height())
-
.insertAfter($image);
-
-
-
var $overlay = $('<div id="image-crop-overlay" />')
-
.css({
-
opacity : options.overlayOpacity,
-
position : 'absolute'
-
})
-
.width($image.width())
-
.height($image.height())
-
.insertAfter($image);
-
-
-
var $trigger = $('<div />')
-
.css({
-
backgroundColor : '#000000',
-
opacity : 0,
-
position : 'absolute'
-
})
-
.width($image.width())
-
.height($image.height())
-
.insertAfter($overlay);
-
-
-
var $outline = $('<div id="image-crop-outline" />')
-
.css({
-
opacity : options.outlineOpacity,
-
position : 'absolute'
-
})
-
.insertAfter($trigger);
-
-
-
var $selection = $('<div />')
-
.css({
-
background : 'url(' + $image.attr('src') + ') no-repeat',
-
position : 'absolute'
-
})
-
.insertAfter($outline);
为了能够在一个相对定位元素内控制决定定位元素,所以控制层是相对定位的而其他层都是绝对定位
六、更新接口
-
-
var selectionExists,
-
selectionOffset = [0, 0],
-
selectionOrigin = [0, 0];
-
-
-
if (options.selectionWidth > options.minSelect[0] &&
-
options.selectionHeight > options.minSelect[1])
-
selectionExists = true;
-
else
-
selectionExists = false;
-
-
...
-
-
-
updateInterface();
-
...
-
if (options.allowSelect)
-
-
$trigger.mousedown(setSelection);
-
...
-
-
-
function getElementOffset(object) {
-
var offset = $(object).offset();
-
-
return [offset.left, offset.top];
-
};
-
-
-
function getMousePosition(event) {
-
var imageOffset = getElementOffset($image);
-
-
var x = event.pageX - imageOffset[0],
-
y = event.pageY - imageOffset[1];
-
-
x = (x < 0) ? 0 : (x > $image.width()) ? $image.width() : x;
-
y = (y < 0) ? 0 : (y > $image.height()) ? $image.height() : y;
-
-
return [x, y];
-
};
-
-
...
-
-
-
function updateOverlayLayer() {
-
$overlay.css({
-
display : selectionExists ? 'block' : 'none'
-
});
-
};
-
-
...
-
-
-
function updateTriggerLayer() {
-
$trigger.css({
-
cursor : options.allowSelect ? 'crosshair' : 'default'
-
});
-
};
-
...
-
-
-
function updateSelection() {
-
-
$outline.css({
-
cursor : 'default',
-
display : selectionExists ? 'block' : 'none',
-
left : options.selectionPosition[0],
-
top : options.selectionPosition[1]
-
})
-
.width(options.selectionWidth)
-
.height(options.selectionHeight);
-
-
-
$selection.css({
-
backgroundPosition : ( - options.selectionPosition[0] - 1) + 'px ' + ( - options.selectionPosition[1] - 1) + 'px',
-
cursor : options.allowMove ? 'move' : 'default',
-
display : selectionExists ? 'block' : 'none',
-
left : options.selectionPosition[0] + 1,
-
top : options.selectionPosition[1] + 1
-
})
-
.width((options.selectionWidth - 2 > 0) ? (options.selectionWidth - 2) : 0)
-
.height((options.selectionHeight - 2 > 0) ? (options.selectionHeight - 2) : 0);
-
};
-
...
-
-
-
function updateCursor(cursorType) {
-
$trigger.css({
-
cursor : cursorType
-
});
-
-
$outline.css({
-
cursor : cursorType
-
});
-
-
$selection.css({
-
cursor : cursorType
-
});
-
};
-
...
-
-
function updateInterface(sender) {
-
switch (sender) {
-
case 'setSelection' :
-
updateOverlayLayer();
-
updateSelection();
-
-
break;
-
case 'resizeSelection' :
-
updateSelection();
-
updateCursor('crosshair');
-
-
break;
-
default :
-
updateTriggerLayer();
-
updateOverlayLayer();
-
updateSelection();
-
}
-
};
七、设置选区
-
...
-
-
-
function setSelection(event) {
-
-
event.preventDefault();
-
-
-
event.stopPropagation();
-
-
-
$(document).mousemove(resizeSelection).mouseup(releaseSelection);
-
-
-
selectionExists = true;
-
-
-
options.selectionWidth = 0;
-
options.selectionHeight = 0;
-
-
-
selectionOrigin = getMousePosition(event);
-
-
-
options.selectionPosition[0] = selectionOrigin[0];
-
options.selectionPosition[1] = selectionOrigin[1];
-
-
-
updateInterface('setSelection');
-
};
八、重置选区
-
...
-
-
-
function resizeSelection(event) {
-
-
event.preventDefault();
-
-
-
event.stopPropagation();
-
-
var mousePosition = getMousePosition(event);
-
-
-
options.selectionWidth = mousePosition[0] - selectionOrigin[0];
-
options.selectionHeight = mousePosition[1] - selectionOrigin[1];
-
-
if (options.selectionWidth < 0) {
-
options.selectionWidth = Math.abs(options.selectionWidth);
-
options.selectionPosition[0] = selectionOrigin[0] - options.selectionWidth;
-
} else
-
options.selectionPosition[0] = selectionOrigin[0];
-
-
if (options.selectionHeight < 0) {
-
options.selectionHeight = Math.abs(options.selectionHeight);
-
options.selectionPosition[1] = selectionOrigin[1] - options.selectionHeight;
-
} else
-
options.selectionPosition[1] = selectionOrigin[1];
-
-
-
updateInterface('resizeSelection');
-
};
九、释放选区
-
...
-
-
-
function releaseSelection(event) {
-
-
event.preventDefault();
-
-
-
event.stopPropagation();
-
-
-
$(document).unbind('mousemove');
-
-
-
$(document).unbind('mouseup');
-
-
-
selectionOrigin[0] = options.selectionPosition[0];
-
selectionOrigin[1] = options.selectionPosition[1];
-
-
-
if (options.selectionWidth > options.minSelect[0] &&
-
options.selectionHeight > options.minSelect[1])
-
selectionExists = true;
-
else
-
selectionExists = false;
-
-
-
updateInterface('releaseSelection');
-
};
十、设置插件样式
-
div#image-crop-overlay {
-
background-color : #ffffff;
-
overflow : hidden;
-
}
-
-
div#image-crop-outline {
-
background : #ffffff url('outline.gif');
-
overflow : hidden;
-
}
十一、测试
标签: jquery 图片剪切 插件 | 分类: [web]
| | 返回顶部
1、不要逃避恐惧。对它加以分析,你会发现它不过是一种身体上的感受。不要被这种感觉吓到
2、接受所有与神经衰弱有关的奇怪感觉。不要抗争,飘然地将他们抛在脑后
3、不要自怜
4、尽快解决你的问题,即使没有行动,你也应该换个角度看待问题
5、不要浪费时间想什么“或许就会......”和“要是......”
6、直面悲痛,告诉自己时间能缓解痛苦
7、找点事做,不要躺在床上胡思乱想。做事时要心平气和,不要烦躁地试图忘掉自己
8、记住肌肉的力量取决你使用它时的信心
9、接受你的强迫观念并暂时容忍它们的存在,不要抗争试图将它们推开。让时间去完成这一工作吧
10、记住,你的康复不想很多人想要告诉你的那样一定“完全依赖与你自己”,你可能会得到帮助。不妨欣然地接受,而不必感到羞耻
11、不要因为有病的时候无法作出决定而感到沮丧,一旦你好起来了,做决定将是件很容易的事情、
12、不要一天天地衡量自己的进步,也不要计算自己生病的时间并为此感到绝望,一旦你 走上恢复的道路,无论你的病会拖延多久,恢复都将是必然的
13、永远不要承认失败。记住,任何时候再给自己一次机会都不算太晚
14、面对、接受、飘然、等待
| 分类: [感悟]
| | 返回顶部
写的挺好的一本书,我看过后挺有感触的,所以推荐给那些有焦虑症、抑郁症、失眠、强迫症、神经衰弱等神经疾病朋友们,可在附件中下载
目录:
一、内在的力量
二、我们的神经系统是如何工作的
三、什么是神经疾病
四、比较简单的神经疾病
五、如何治疗简单的神经疾病
六、经常性症状的治疗
七、间歇性发作症状的治疗
八、重新找回自己
九、因问题、悲伤、内疚或羞耻而变得复杂的神经疾病
十、如何治疗变得复杂的神经疾病
十一、问题
十二、悲伤
十三、内疚与羞耻感
十四、强迫症
十五、失眠
十六、清晨恐惧症
十七、抑郁
十八、丧失信心
十九、于他人交往困难
二十、回家困难
二十一、焦虑
二十二、三大法宝:工作、勇气、信仰
二十三、该做的和不该做的
二十四、给害怕再次患病之人的寄语
二十五、给患者家人的建议
二十六、什么人容易得神经疾病
标签: 失眠 焦虑 抑郁 自救书籍 | 分类: [感悟]
| | 返回顶部
昨晚到了1点多还没睡着,也没想什么,大脑就是一直清醒着,然后就起来吃了半粒的安明药,睡了几小时,早上被奇奇怪怪的梦弄醒了,这种状况刚好已经持续半年了,时好时坏的,整的自己整个人都很消沉,刚开始的时候很挣扎,现在已经不怎么挣扎了,但偶尔还会有挣扎。
心理疾病还是的心医,但就是一直找不到自己的心理纠结所在,我还是相信时间是治疗心理疾病的良药,只要你保持着良好的习惯,随着时间流逝,一切都会好起来的。
| 分类: [感悟]
| | 返回顶部
一生都是修来的――求什么 今日不知明日事――愁什么
不礼爹娘礼世尊――敬什么 兄弟姐妹皆同气――争什么
儿孙自有儿孙福――忧什么 岂可人无得运时――急什么
人世难逢开口笑――苦什么 补破遮寒暖即休――摆什么
食过三寸成何物――馋什么 死后一文带不去――悭什么
前人田地后人收――占什么 得便宜处失便宜――贪什么
举头三尺有神明――欺什么 荣华富贵眼前花――傲什么
他家富贵前生定――妒什么 前世不修今受苦――怨什么
赌博之人无下梢――耍什么 治家勤俭胜求人――奢什么
冤冤相报几时休――结什么 世事如同棋一局――算什么
聪明反被聪明误――巧什么 虚言折尽平生福――谎什么
是非到底见分明――辩什么 谁能保得常无事――诮什么
穴在人心不在山――谋什么 欺人是祸饶人福――卜什么
寿自护生爱物增――杀什么 一旦无常万事休――忙什
| 分类: [感悟]
| | 返回顶部