Change background color of specific rows for a Spark DataGrid

Change background color of specific rows where value in a cell matches the string “sample”.

<fx:Script>
	<![CDATA[
		import mx.core.ClassFactory;			
		import spark.skins.spark.DefaultGridItemRenderer;			

		private function test_itemRendererFunction(item:Object, column:GridColumn):ClassFactory {
			if (item == null) {
				return new ClassFactory(DefaultGridItemRenderer);
			} else {
				// if(item.d1=="sample") 
				if(item[column.dataField]=="sample") {
					return new ClassFactory(GrayGridItemRenderer);						
				} else {
					return new ClassFactory(DefaultGridItemRenderer);
				}
			}
		}			
	]]>
</fx:Script>

<s:DataGrid>
	<s:columns>
		<s:ArrayList>
			<s:GridColumn dataField="d1" headerText="h1" itemRendererFunction="test_itemRendererFunction"></s:GridColumn>
			<s:GridColumn dataField="d2" headerText="h2" itemRendererFunction="test_itemRendererFunction"></s:GridColumn>
			<s:GridColumn dataField="d3" headerText="h3" itemRendererFunction="test_itemRendererFunction"></s:GridColumn>
		</s:ArrayList>
	</s:columns>
</s:DataGrid>

GrayGridItemRenderer.mxml

<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
					xmlns:s="library://ns.adobe.com/flex/spark" 
					xmlns:mx="library://ns.adobe.com/flex/mx" clipAndEnableScrolling="true">	
	<fx:Script>
		<![CDATA[
			override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
				super.updateDisplayList(unscaledWidth, unscaledHeight);
				if (data && data[column.dataField]!=''){
					lblData.text = data[column.dataField];		
				}
			}
		]]>
	</fx:Script>
	<s:Rect top="0" bottom="0" right="0" left="0">
		<s:fill>
			<s:SolidColor color="#E0E0E0" alpha="0.5"/>
		</s:fill>
	</s:Rect>
	<s:Label id="lblData" top="7" left="7" bottom="5" color="0x000000" alpha="0.5"/>	
</s:GridItemRenderer>

De-embedding(ディエンベディング)

高周波測定に関する翻訳で、De-embedding(ディエンベディング)という言葉が出てくる(例えば、物理層テスト・システム・ソフトウェア(PLTS)2016のp9)。

今日のコンピュータ・システムや通信システムには、数Gb/sのデータ・レートのシリアル・バスが使用されるようになり、高速データによる伝送ラインの高周波効果(インピーダンスの不連続部からの反射、周波数依存損失など)を正確に評価して、シグナル・インテグリティを向上する必要がでてきた。このとき、伝送ラインを評価するために、伝送ラインと測定器をインタフェースするコネクタが必要だが、高速デジタル伝送ラインでは、RF/マイクロ波測定器で一般的な同軸インターフェースが使用されないので、非同軸の伝送ラインと同軸伝送ラインを接続するためのフィクスチャ(テスト用治具)を用いる。このフィクスチャによる影響を除去してDUT(ここでは、伝送ライン)のみの特性を抽出するための手法の1つがディエンベディングである。

ディエンベディングの詳細については、以下を参照。

ベクトル・ネットワーク・アナライザを使用したSパラメータ・ネットワークのディエンベディングおよびエンベディング

ものすごい存在感

Tokyo Skytree浅草の街角から写した東京スカイツリーです。

安っぽい合成写真のようにも見えますが、手は加えていません。入道雲をしたがえて比類なき存在感を誇っていました。

残暑はあいも変わらず厳しいです。利根川水系は11日から10%の取水制限が実施されるとのこと。節水を心がけたいと思います。