New Year Day 1: Original start

专研逆向技术与安全思维

如今我在专研软件的逆向技术,我放弃了可以去的工作,也没有积极去找更多的工作机会,我希望自己能够学到足够多的东西,以支撑自己的发展。

我才意识到,四年以来,我所学到的技术,不过是纸面上的东西,安全,才是我所追求的目标。譬如一扇门,安全就是那把锁,想不被打开就要保证这把锁不被随意打开,也不能被别人很容易就打破进来,这才是安全的本质意义。想要做到安全,首先要知道锁的结构,而我所将专研的技术,不过是其中的一把锁而已,更重要的是安全的思维。

人的某种水平一方面取决于他对此的基础能力和经验,但更取决于他的智慧,智慧决定人前进的广度,而勤奋决定人前进的深度。

我所做的,是应该回忆起那些遗忘的部分,每天无所事事,损失的是自己。我的能力比别人差,同样的程序别人写需要1小时而我需要10小时,所以必须付出别人十倍甚至百倍的时间才能勉强靠近他们的步伐。必须始终铭记,你的强大在于你的勤奋,而不是你的天赋,但智慧这种东西,你必须具备。


2017.1.1 Sunday

var roi = JIzhongnan; Map.centerObject(roi, 6); var luancheng= ee.Geometry.Point(114.689,37.884); Map.addLayer(luancheng); //study year var yearNum = 2011; var start_date = ee.Date(‘2011-06-09’); var setps = ee.Number(15); ///////////////////// update_1 var end_date = ee.Date(‘2011-06-10’).advance(setps.multiply(8),‘day’); var filter_date = ee.Filter.date(start_date, end_date); // print(filter_date); // bug var daysOfYear = ee.Date.fromYMD(yearNum, 1, 1).advance(1,‘year’).difference(ee.Date.fromYMD(yearNum, 1, 1),‘day’); var days = ee.List.sequence(1, daysOfYear, 8); //daysOfYear // print(days);bug // var SM_set = image;//(next) // print(image);bug //------------- soil moisture from GLDAS -----------// var GLDAS_rootzone = GLDAS.filter(ee.Filter.calendarRange(yearNum, yearNum,‘year’)) // .select([‘SoilMoi0_10cm_inst’,‘SoilMoi10_40cm_inst’, ‘SoilMoi40_100cm_inst’]); var SM_gldas_maizeRoot = GLDAS_rootzone.map(function (img){ var sm_10 = img.select(‘SoilMoi0_10cm_inst’); var sm_40 = img.select(‘SoilMoi10_40cm_inst’).add(sm_10); var sm_100 = img.select(‘SoilMoi40_100cm_inst’).add(sm_40); var sm_root = sm_100; return sm_root.rename(‘sm_root’).clip(roi).copyProperties({ source: img, properties: [‘system:index’,‘system:time_start’] }) }); // print(‘SM_gldas_maizeRoot’, SM_gldas_maizeRoot); var SM_daily = ee.ImageCollection.fromImages( days.map(function (d) { // var date = ee.Date.fromYMD(yearNum, 1, 1).advance(ee.Number(d).subtract(1), ‘day’);//new add return SM_gldas_maizeRoot .filter(ee.Filter.calendarRange(d, d, ‘day_of_year’)) .mean() .clip(roi) .set(‘system:time_start’, ee.Date.fromYMD(yearNum, 1, 1) //original // .set(‘system:time_start’, date.millis()) //new add .advance(ee.Number(d).subtract(1), ‘day’))//original }).flatten()); print(‘SM_daily’, SM_daily); //----------export image---------// var SM = SM_daily.filter(filter_date); print('SM',SM); // // bug var images = SM.toList(SM.size()); var exportToAsset = function(image, index) { var date = ee.Date(ee.Image(image).get('system:time_start')).format('YYYYMMdd'); var assetName = ee.String('sm_image_').cat(date); Export.image.toAsset({ image: ee.Image(image).select(['sm_root']), description: assetName, assetId: 'projects/ee-wangynov6/assets/maize/SM/SM_GLDAS' + assetName, region: roi, scale: 1000, crs: 'EPSG:4326', maxPixels: 1e10 }); }; ee.List.sequence(0, images.size().subtract(1)).evaluate(function(length) { for (var i = 0; i < length.length; i++) { exportToAsset(images.get(i), i); } }); 最终export出的image图像是ee.String({ "type": "Invocation", "arguments": { "string1": "sm_image_", "string2": { "type": "Invocation", "arguments": { "date": { "type": "Invocation", "arguments": { "value": { "type": "Invocation", "arguments": { "object": { "type": "Invocation", "arguments": { "list": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "images": { "type": "Invocation", "arguments": { "list": { "type": "Invocation", "arguments": { "list": { "type": "Invocation", "arguments": { "start": 1, "end": { "type": "Invocation", "arguments": { "date": { "type": "Invocation", "arguments": { "date": { "type": "Invocation", "arguments": { "year": 2011, "month": 1, "day": 1 }, "functionName": "Date.fromYMD" }, "delta": 1, "unit": "year" }, "functionName": "Date.advance" }, "start": { "type": "Invocation", "arguments": { "year": 2011, "month": 1, "day": 1 }, "functionName": "Date.fromYMD" }, "unit": "day" }, "functionName": "Date.difference" }, "step": 8 }, "functionName": "List.sequence" }, "baseAlgorithm": { "type": "Function", "argumentNames": [ "_MAPPING_VAR_2_0" ], "body": { "type": "Invocation", "arguments": { "object": { "type": "Invocation", "arguments": { "input": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "id": "NASA/GLDAS/V021/NOAH/G025/T3H" }, "functionName": "ImageCollection.load" }, "filter": { "type": "Invocation", "arguments": { "start": 2011, "end": 2011, "field": "year" }, "functionName": "Filter.calendarRange" } }, "functionName": "Collection.filter" }, "baseAlgorithm": { "type": "Function", "argumentNames": [ "_MAPPING_VAR_0_0" ], "body": { "type": "Invocation", "arguments": { "input": { "type": "ArgumentRef", "value": "_MAPPING_VAR_0_0" }, "bandSelectors": [ "SoilMoi0_10cm_inst", "SoilMoi10_40cm_inst", "SoilMoi40_100cm_inst" ] }, "functionName": "Image.select" } } }, "functionName": "Collection.map" }, "baseAlgorithm": { "type": "Function", "argumentNames": [ "_MAPPING_VAR_0_0" ], "body": { "type": "Invocation", "arguments": { "destination": { "type": "Invocation", "arguments": { "input": { "type": "Invocation", "arguments": { "input": { "type": "Invocation", "arguments": { "image1": { "type": "Invocation", "arguments": { "input": { "type": "ArgumentRef", "value": "_MAPPING_VAR_0_0" }, "bandSelectors": [ "SoilMoi40_100cm_inst" ] }, "functionName": "Image.select" }, "image2": { "type": "Invocation", "arguments": { "image1": { "type": "Invocation", "arguments": { "input": { "type": "ArgumentRef", "value": "_MAPPING_VAR_0_0" }, "bandSelectors": [ "SoilMoi10_40cm_inst" ] }, "functionName": "Image.select" }, "image2": { "type": "Invocation", "arguments": { "input": { "type": "ArgumentRef", "value": "_MAPPING_VAR_0_0" }, "bandSelectors": [ "SoilMoi0_10cm_inst" ] }, "functionName": "Image.select" } }, "functionName": "Image.add" } }, "functionName": "Image.add" }, "names": [ "sm_root" ] }, "functionName": "Image.rename" }, "geometry": { "type": "Invocation", "arguments": { "tableId": "users/wxw/Study_area_Hebei" }, "functionName": "Collection.loadTable" } }, "functionName": "Image.clip" }, "source": { "type": "ArgumentRef", "value": "_MAPPING_VAR_0_0" }, "properties": [ "system:index", "system:time_start" ] }, "functionName": "Image.copyProperties" } } }, "functionName": "Collection.map" }, "filter": { "type": "Invocation", "arguments": { "start": { "type": "ArgumentRef", "value": "_MAPPING_VAR_2_0" }, "end": { "type": "ArgumentRef", "value": "_MAPPING_VAR_2_0" }, "field": "day_of_year" }, "functionName": "Filter.calendarRange" } }, "functionName": "Collection.filter" } }, "functionName": "reduce.mean" }, "geometry": { "type": "Invocation", "arguments": { "tableId": "users/wxw/Study_area_Hebei" }, "functionName": "Collection.loadTable" } }, "functionName": "Image.clip" }, "key": "system:time_start", "value": { "type": "Invocation", "arguments": { "date": { "type": "Invocation", "arguments": { "year": 2011, "month": 1, "day": 1 }, "functionName": "Date.fromYMD" }, "delta": { "type": "Invocation", "arguments": { "left": { "type": "ArgumentRef", "value": "_MAPPING_VAR_2_0" }, "right": 1 }, "functionName": "Number.subtract" }, "unit": "day" }, "functionName": "Date.advance" } }, "functionName": "Element.set" } } }, "functionName": "List.map" } }, "functionName": "List.flatten" } }, "functionName": "ImageCollection.fromImages" }, "filter": { "type": "Invocation", "arguments": { "rightField": "system:time_start", "leftValue": { "type": "Invocation", "arguments": { "start": { "type": "Invocation", "arguments": { "value": "2011-06-09" }, "functionName": "Date" }, "end": { "type": "Invocation", "arguments": { "date": { "type": "Invocation", "arguments": { "value": "2011-06-10" }, "functionName": "Date" }, "delta": { "type": "Invocation", "arguments": { "left": 15, "right": 8 }, "functionName": "Number.multiply" }, "unit": "day" }, "functionName": "Date.advance" } }, "functionName": "DateRange" } }, "functionName": "Filter.dateRangeContains" } }, "functionName": "Collection.filter" }, "count": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "images": { "type": "Invocation", "arguments": { "list": { "type": "Invocation", "arguments": { "list": { "type": "Invocation", "arguments": { "start": 1, "end": { "type": "Invocation", "arguments": { "date": { "type": "Invocation", "arguments": { "date": { "type": "Invocation", "arguments": { "year": 2011, "month": 1, "day": 1 }, "functionName": "Date.fromYMD" }, "delta": 1, "unit": "year" }, "functionName": "Date.advance" }, "start": { "type": "Invocation", "arguments": { "year": 2011, "month": 1, "day": 1 }, "functionName": "Date.fromYMD" }, "unit": "day" }, "functionName": "Date.difference" }, "step": 8 }, "functionName": "List.sequence" }, "baseAlgorithm": { "type": "Function", "argumentNames": [ "_MAPPING_VAR_2_0" ], "body": { "type": "Invocation", "arguments": { "object": { "type": "Invocation", "arguments": { "input": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "id": "NASA/GLDAS/V021/NOAH/G025/T3H" }, "functionName": "ImageCollection.load" }, "filter": { "type": "Invocation", "arguments": { "start": 2011, "end": 2011, "field": "year" }, "functionName": "Filter.calendarRange" } }, "functionName": "Collection.filter" }, "baseAlgorithm": { "type": "Function", "argumentNames": [ "_MAPPING_VAR_0_0" ], "body": { "type": "Invocation", "arguments": { "input": { "type": "ArgumentRef", "value": "_MAPPING_VAR_0_0" }, "bandSelectors": [ "SoilMoi0_10cm_inst", "SoilMoi10_40cm_inst", "SoilMoi40_100cm_inst" ] }, "functionName": "Image.select" } } }, "functionName": "Collection.map" }, "baseAlgorithm": { "type": "Function", "argumentNames": [ "_MAPPING_VAR_0_0" ], "body": { "type": "Invocation", "arguments": { "destination": { "type": "Invocation", "arguments": { "input": { "type": "Invocation", "arguments": { "input": { "type": "Invocation", "arguments": { "image1": { "type": "Invocation", "arguments": { "input": { "type": "ArgumentRef", "value": "_MAPPING_VAR_0_0" }, "bandSelectors": [ "SoilMoi40_100cm_inst" ] }, "functionName": "Image.select" }, "image2": { "type": "Invocation", "arguments": { "image1": { "type": "Invocation", "arguments": { "input": { "type": "ArgumentRef", "value": "_MAPPING_VAR_0_0" }, "bandSelectors": [ "SoilMoi10_40cm_inst" ] }, "functionName": "Image.select" }, "image2": { "type": "Invocation", "arguments": { "input": { "type": "ArgumentRef", "value": "_MAPPING_VAR_0_0" }, "bandSelectors": [ "SoilMoi0_10cm_inst" ] }, "functionName": "Image.select" } }, "functionName": "Image.add" } }, "functionName": "Image.add" }, "names": [ "sm_root" ] }, "functionName": "Image.rename" }, "geometry": { "type": "Invocation", "arguments": { "tableId": "users/wxw/Study_area_Hebei" }, "functionName": "Collection.loadTable" } }, "functionName": "Image.clip" }, "source": { "type": "ArgumentRef", "value": "_MAPPING_VAR_0_0" }, "properties": [ "system:index", "system:time_start" ] }, "functionName": "Image.copyProperties" } } }, "functionName": "Collection.map" }, "filter": { "type": "Invocation", "arguments": { "start": { "type": "ArgumentRef", "value": "_MAPPING_VAR_2_0" }, "end": { "type": "ArgumentRef", "value": "_MAPPING_VAR_2_0" }, "field": "day_of_year" }, "functionName": "Filter.calendarRange" } }, "functionName": "Collection.filter" } }, "functionName": "reduce.mean" }, "geometry": { "type": "Invocation", "arguments": { "tableId": "users/wxw/Study_area_Hebei" }, "functionName": "Collection.loadTable" } }, "functionName": "Image.clip" }, "key": "system:time_start", "value": { "type": "Invocation", "arguments": { "date": { "type": "Invocation", "arguments": { "year": 2011, "month": 1, "day": 1 }, "functionName": "Date.fromYMD" }, "delta": { "type": "Invocation", "arguments": { "left": { "type": "ArgumentRef", "value": "_MAPPING_VAR_2_0" }, "right": 1 }, "functionName": "Number.subtract" }, "unit": "day" }, "functionName": "Date.advance" } }, "functionName": "Element.set" } } }, "functionName": "List.map" } }, "functionName": "List.flatten" } }, "functionName": "ImageCollection.fromImages" }, "filter": { "type": "Invocation", "arguments": { "rightField": "system:time_start", "leftValue": { "type": "Invocation", "arguments": { "start": { "type": "Invocation", "arguments": { "value": "2011-06-09" }, "functionName": "Date" }, "end": { "type": "Invocation", "arguments": { "date": { "type": "Invocation", "arguments": { "value": "2011-06-10" }, "functionName": "Date" }, "delta": { "type": "Invocation", "arguments": { "left": 15, "right": 8 }, "functionName": "Number.multiply" }, "unit": "day" }, "functionName": "Date.advance" } }, "functionName": "DateRange" } }, "functionName": "Filter.dateRangeContains" } }, "functionName": "Collection.filter" } }, "functionName": "Collection.size" } }, "functionName": "Collection.toList" }, "index": 0 }, "functionName": "List.get" }, "property": "system:time_start" }, "functionName": "Element.get" } }, "functionName": "Date" }, "format": "YYYYMMdd" }, "functionName": "Date.format" } }, "functionName": "String.cat"}),怎么修改
最新发布
09-10
var roi = JIzhongnan; Map.centerObject(roi, 6); var luancheng= ee.Geometry.Point(114.689,37.884); Map.addLayer(luancheng); //study year var yearNum = 2020; var start_date = ee.Date('2020-02-17'); //var end_date = ee.Date('2002-10-01'); var setps = ee.Number(12); ///////////////////// update_1 var end_date = ee.Date('2020-02-18').advance(setps.multiply(8),'day'); var filter_date = ee.Filter.date(start_date, end_date); // print(filter_date); // bug var daysOfYear = ee.Date.fromYMD(yearNum, 1, 1).advance(1,'year').difference(ee.Date.fromYMD(yearNum, 1, 1),'day'); var days = ee.List.sequence(1, daysOfYear, 8); //daysOfYear // print(days);bug //------------- soil moisture from GLDAS -----------// var GLDAS_rootzone = GLDAS.filter(ee.Filter.calendarRange(yearNum, yearNum,'year')) // .select(['SoilMoi0_10cm_inst','SoilMoi10_40cm_inst', 'SoilMoi40_100cm_inst']); var SM_gldas_wheatRoot = GLDAS_rootzone.map(function (img){ var sm_10 = img.select('SoilMoi0_10cm_inst'); var sm_40 = img.select('SoilMoi10_40cm_inst').add(sm_10); //var sm_100 = img.select('SoilMoi40_100cm_inst').add(sm_40); var sm_root = sm_40; return sm_root.rename('sm_root').clip(roi).copyProperties({ source: img, properties: ['system:index','system:time_start'] }) }); var SM_daily = ee.ImageCollection.fromImages( days.map(function (d) { // var date = ee.Date.fromYMD(yearNum, 1, 1).advance(ee.Number(d).subtract(1), 'day');//new add return SM_gldas_wheatRoot .filter(ee.Filter.calendarRange(d, d, 'day_of_year')) .mean() .clip(roi) .set('system:time_start', ee.Date.fromYMD(yearNum, 1, 1) //original // .set('system:time_start', date.millis()) //new add .advance(ee.Number(d).subtract(1), 'day'))//original }).flatten()); // print('SM_daily', SM_daily); bug var SM_fc = SM_daily.reduce(ee.Reducer.percentile([90])).multiply(1); ////////// need calibration var SM_wp = SM_daily.reduce(ee.Reducer.percentile([20])); ////////// need calibration // var SM = SM_daily.reduce(ee.Reducer.percentile([80])); // print(SM_fc); // bug // Map.addLayer(SM_fc, {min:0 , max:150, palette: ['FFFFFF','0000FF'] },'SM_fc'); // var SM_stress = SM_daily.map(function (img){ // return img.divide(SM_fc).max(0).min(1).rename('WS') // .set('system:time_start', ee.Date(img.get('system:time_start'))) //.millis() // }); // print(SM_stress) var SM_stress = SM_daily.map(function (img){ return (img.multiply(0.8).subtract(SM_wp)).divide((SM_fc).subtract(SM_wp)) .max(0).min(1) .set('system:time_start', ee.Date(img.get('system:time_start'))) .rename('WS'); //.millis() }); // print(SM_stress); var SM_stress_intial = SM_stress.filter(ee.Filter.date(start_date,end_date)); // print(SM_stress_intial); // var SM_stress_set = SM_set.divide(SM_fc).max(0).min(1) // .set('system:time_start', end_date.advance(-8, 'day')).rename('WS'); //.advance(8,'hour') // Map.addLayer(SM_stress_set, {min:0.8 , max:1, palette: ['FFFFFF','0000FF'] },'SM_stress_set'); // var SM_stress_set = ee.Image(1).set('system:time_start', end_date.advance(-8, 'day')).rename('WS'); // print(SM_stress_set);bug var SM_stress_update = SM_stress_intial; print('SM_stress_update', SM_stress_update); Map.addLayer(SM_stress_update,{min:0.8 , max:1, palette: ['FFFFFF','0000FF'] },'SM_stress_update'); 这个代码里,哪里有错误
08-21
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值