tag:blogger.com,1999:blog-78094828811337123992024-03-06T04:41:23.762+01:00Lennart SchedinA software developer from SwedenLennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.comBlogger124125tag:blogger.com,1999:blog-7809482881133712399.post-52793735019107359762017-08-05T16:23:00.000+02:002017-08-05T16:23:23.316+02:00Huawei Matebook X sound problems (distortions) at low volumes<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:HyphenationZone>21</w:HyphenationZone>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>SV</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false"
DefSemiHidden="false" DefQFormat="false" DefPriority="99"
LatentStyleCount="375">
<w:LsdException Locked="false" Priority="0" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 9"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footnote text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="header"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footer"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index heading"/>
<w:LsdException Locked="false" Priority="35" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="table of figures"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="envelope address"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="envelope return"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footnote reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="line number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="page number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="endnote reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="endnote text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="table of authorities"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="macro"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="toa heading"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 5"/>
<w:LsdException Locked="false" Priority="10" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Closing"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Signature"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="true"
UnhideWhenUsed="true" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Message Header"/>
<w:LsdException Locked="false" Priority="11" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Salutation"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Date"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text First Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text First Indent 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Note Heading"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Block Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Hyperlink"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="FollowedHyperlink"/>
<w:LsdException Locked="false" Priority="22" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Document Map"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Plain Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="E-mail Signature"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Top of Form"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Bottom of Form"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal (Web)"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Acronym"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Address"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Cite"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Code"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Definition"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Keyboard"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Preformatted"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Sample"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Typewriter"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Variable"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal Table"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation subject"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="No List"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Contemporary"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Elegant"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Professional"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Subtle 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Subtle 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Balloon Text"/>
<w:LsdException Locked="false" Priority="39" Name="Table Grid"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Theme"/>
<w:LsdException Locked="false" SemiHidden="true" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" SemiHidden="true" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" QFormat="true"
Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" QFormat="true"
Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" QFormat="true"
Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" QFormat="true"
Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" QFormat="true"
Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" QFormat="true"
Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" SemiHidden="true"
UnhideWhenUsed="true" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="TOC Heading"/>
<w:LsdException Locked="false" Priority="41" Name="Plain Table 1"/>
<w:LsdException Locked="false" Priority="42" Name="Plain Table 2"/>
<w:LsdException Locked="false" Priority="43" Name="Plain Table 3"/>
<w:LsdException Locked="false" Priority="44" Name="Plain Table 4"/>
<w:LsdException Locked="false" Priority="45" Name="Plain Table 5"/>
<w:LsdException Locked="false" Priority="40" Name="Grid Table Light"/>
<w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark"/>
<w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful"/>
<w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 1"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 1"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 1"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 1"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 1"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 2"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 2"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 2"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 2"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 2"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 3"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 3"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 3"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 3"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 3"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 4"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 4"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 4"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 4"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 4"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 5"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 5"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 5"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 5"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 5"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 6"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 6"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 6"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 6"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 6"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="46" Name="List Table 1 Light"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark"/>
<w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful"/>
<w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 1"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 1"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 1"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 1"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 1"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 2"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 2"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 2"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 2"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 2"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 3"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 3"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 3"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 3"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 3"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 4"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 4"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 4"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 4"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 4"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 5"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 5"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 5"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 5"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 5"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 6"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 6"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 6"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 6"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 6"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Mention"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Smart Hyperlink"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Hashtag"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Unresolved Mention"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:8.0pt;
mso-para-margin-left:0cm;
line-height:107%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;
mso-fareast-language:EN-US;}
</style>
<![endif]-->
<br />
<div class="MsoNormal">
<span lang="EN-GB" style="mso-ansi-language: EN-GB;">I'm having
problem with my Huawei Mateboox X. When playing music or Windows sounds at low
volume I get distortions/cracks in the sound:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/fd7tMxWutIk/0.jpg" src="https://www.youtube.com/embed/fd7tMxWutIk?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-GB" style="mso-ansi-language: EN-GB;">I've got confirmation that another Matebook X user also have this problem. This makes it very likely that it is not a specific problem with my notebook.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-GB" style="mso-ansi-language: EN-GB;">I’m very
sure it is a driver issue. After a clean Windows install (directly from
Microsoft homepage) without network and manually installing the Realtek driver
directly from Realtek home page (saved on a USB stick) there is no sound
problem.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-GB" style="mso-ansi-language: EN-GB;">After I
enable the network and Windows update automatically starts installing drivers I
get the problem back.</span></div>
<div class="MsoNormal">
<span lang="EN-GB" style="mso-ansi-language: EN-GB;"><br /></span></div>
<div class="MsoNormal">
<span lang="EN-GB" style="mso-ansi-language: EN-GB;">I hope that Huawei/Realtek/Dolby can fix this problem.</span></div>
Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com1tag:blogger.com,1999:blog-7809482881133712399.post-29771435897279827512016-04-27T10:34:00.000+02:002016-04-27T10:34:15.464+02:00List the scriptlets of an RPM fileOn Windows <a href="http://www.7-zip.org/">7-Zip</a> is my favorite tool to view RPM files. Just open the file in 7-Zip to view its contents:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTIluNHiJVRgOWgyn_4dYIALbhgWH3cFJ7QVijNW3lqVtpzdXO9YTGEwvEYX0_HRWD0MaM6KKO4ehyNVc1s5WI5QwBjgmRS5XKwgfK0LNdgs5hyphenhyphenwHeznCbG2cp1wbX3zYYYh84twpKR3C6/s1600/7zip_rpm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTIluNHiJVRgOWgyn_4dYIALbhgWH3cFJ7QVijNW3lqVtpzdXO9YTGEwvEYX0_HRWD0MaM6KKO4ehyNVc1s5WI5QwBjgmRS5XKwgfK0LNdgs5hyphenhyphenwHeznCbG2cp1wbX3zYYYh84twpKR3C6/s400/7zip_rpm.png" width="400" /></a></div>
In the above screenshot I have opened the sudo RPM and I can see the files that would be copied into the file system if the RPM is installed.<br />
<br />
Unfortunately you cannot see the RPM scriptlets (the %pre, %post, %preun, %postun etc) with 7-Zip. For that I have not found any GUI alternative, but the Linux rpm command can give the scriptlets:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">[root@krusty temp]# rpm -qp --scripts sudo-1.8.6p7-17.el7_2.x86_64.rpm<br />postinstall scriptlet (using /bin/sh):<br />/bin/chmod 0440 /etc/sudoers || :</span></span><br /><br />
As seen in the above command only one scriptlet exists, the postinstall, that issues a chmod command.Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-71885149650967437732015-12-11T08:38:00.000+01:002015-12-11T08:42:01.307+01:00Close and kill TCP sockets on Linux (and Windows)Sometimes it can be good to test how a program will behave if a TCP socket/connection that the program has created is closed.<br />
<br />
For Windows it can easily be done by using <a href="https://technet.microsoft.com/en-us/sysinternals/tcpview.aspx?f=255&MSPPError=-2147217396">Microsoft Windows Sysinternals program TCPView</a> by right clicking on a TCP connection and choose "Close Connection". I'm not sure how it is implemented but by using Wireshark capture while closing a TCP connection you can see that a RST TCP segment is sent to the from your host to the remote side.<br />
<br />
But with Linux it is a bit tricker. Here is a script I created that can do it:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">#!/bin/bash<br /><br />#Syntax: ./killtcp.sh 5328 10.10.14.41 14001<br /># PID IP PORT<br /><br />pid=$1<br />ip=$2<br />port=$3<br /><br />file_descriptors=`lsof -Pnp $pid`<br /><br />echo "$file_descriptors" |grep TCP | grep $ip:$port | while read file_descriptor<br />do<br /> handle=`echo $file_descriptor | cut -f4 -d' '`<br /> handle=${handle/[a-z]/}<br /> echo "call close($handle)" > gdb_debugger.txt<br /> sudo gdb -p $pid -batch -x gdb_debugger.txt<br />done</span></span><br />
<br />
It uses lsof to find out the internal file descriptor handle(s) of the application. Then it writes gdb close commands to a file (file was the only way I could get it into gdb). Then it uses gdb to connect to the PID of the program with the TCP connection and forces a close on the file handle(s).<br />
<br />
This is not the cleanest way to do it. It might crash your application!? But I have used it successfully on ssh and some java programs I wrote and it worked okay.Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-20506268329186382602015-10-29T16:07:00.000+01:002015-10-29T16:07:34.402+01:00How to make a JTable a specific number of rows highJava Swing is rather complex. You can do just about anything, but it can be hard to know how to do it. I have for a long time tried to adapt the visible (preferred) size of a JTable. I know how many rows I would like to display, but it is hard to know how to write the code for it.<br />
<br />
I figured out this code today:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">package se.lesc.blog;<br /><br />import java.awt.Insets;<br /><br />import javax.swing.GroupLayout;<br />import javax.swing.JFrame;<br />import javax.swing.JLabel;<br />import javax.swing.JScrollPane;<br />import javax.swing.JTable;<br />import static javax.swing.GroupLayout.DEFAULT_SIZE;<br /><br />public class TableRowDemo extends JFrame {<br /><br /> Object[][] data = { {"Kathy", "Smith", "Snowboarding", new Integer(5), new Boolean(false)},<br /> {"John", "Doe", "Rowing", new Integer(3), new Boolean(true)},<br /> {"Sue", "Black", "Knitting", new Integer(2), new Boolean(false)},<br /> {"Jane", "White", "Speed reading", new Integer(20), new Boolean(true)},<br /> {"Joe", "Brown", "Pool", new Integer(10), new Boolean(false)}<br /> };<br /> <br /> String[] columnNames = {"First Name", "Last Name", "Sport", "# of Years", "Vegetarian"};<br /> <br /> public static void main(String [] args) {<br /> new TableRowDemo().setVisible(true);<br /> }<br /> <br /> public TableRowDemo() {<br /> GroupLayout layout = new GroupLayout(getContentPane());<br /> <br /> JLabel label = new JLabel("My table:");<br /> JTable table = new JTable(data, columnNames);<br /> <br /> JScrollPane tableScrollPane = new JScrollPane(table);<br /> <br /> int numberOfRowsToDisplay = 3;<br /> <br /> //Fetch the border "padding"<br /> Insets insets = tableScrollPane.getBorder().getBorderInsets(table);<br /> <br /> //Compute the total height of the table<br /> int preferredTableHeight = insets.bottom + insets.top<br /> + (int) table.getTableHeader().getPreferredSize().getHeight() +<br /> numberOfRowsToDisplay * table.getRowHeight();<br /> <br /> layout.setVerticalGroup(layout.createSequentialGroup()<br /> .addComponent(label)<br /> .addComponent(tableScrollPane, DEFAULT_SIZE, preferredTableHeight, DEFAULT_SIZE)<br /> );<br /> <br /> layout.setHorizontalGroup(layout.createParallelGroup()<br /> .addComponent(label)<br /> .addComponent(tableScrollPane)<br /> );<br /><br /> getContentPane().setLayout(layout);<br /> pack();<br /> }<br />}</span></span>Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-71617651657396563892015-09-15T12:06:00.002+02:002015-09-15T12:09:03.205+02:00How Microsoft SmartScreen works and how it stores data in NTFS streams<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><br />
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves>false</w:TrackMoves>
<w:TrackFormatting/>
<w:HyphenationZone>21</w:HyphenationZone>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>SV</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false"
DefSemiHidden="false" DefQFormat="false" DefPriority="99"
LatentStyleCount="371">
<w:LsdException Locked="false" Priority="0" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 9"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footnote text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="header"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footer"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index heading"/>
<w:LsdException Locked="false" Priority="35" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="table of figures"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="envelope address"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="envelope return"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footnote reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="line number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="page number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="endnote reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="endnote text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="table of authorities"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="macro"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="toa heading"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 5"/>
<w:LsdException Locked="false" Priority="10" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Closing"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Signature"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="true"
UnhideWhenUsed="true" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Message Header"/>
<w:LsdException Locked="false" Priority="11" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Salutation"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Date"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text First Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text First Indent 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Note Heading"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Block Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Hyperlink"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="FollowedHyperlink"/>
<w:LsdException Locked="false" Priority="22" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Document Map"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Plain Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="E-mail Signature"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Top of Form"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Bottom of Form"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal (Web)"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Acronym"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Address"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Cite"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Code"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Definition"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Keyboard"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Preformatted"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Sample"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Typewriter"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Variable"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal Table"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation subject"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="No List"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Contemporary"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Elegant"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Professional"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Subtle 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Subtle 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Balloon Text"/>
<w:LsdException Locked="false" Priority="39" Name="Table Grid"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Theme"/>
<w:LsdException Locked="false" SemiHidden="true" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" SemiHidden="true" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" QFormat="true"
Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" QFormat="true"
Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" QFormat="true"
Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" QFormat="true"
Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" QFormat="true"
Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" QFormat="true"
Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" SemiHidden="true"
UnhideWhenUsed="true" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="TOC Heading"/>
<w:LsdException Locked="false" Priority="41" Name="Plain Table 1"/>
<w:LsdException Locked="false" Priority="42" Name="Plain Table 2"/>
<w:LsdException Locked="false" Priority="43" Name="Plain Table 3"/>
<w:LsdException Locked="false" Priority="44" Name="Plain Table 4"/>
<w:LsdException Locked="false" Priority="45" Name="Plain Table 5"/>
<w:LsdException Locked="false" Priority="40" Name="Grid Table Light"/>
<w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark"/>
<w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful"/>
<w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 1"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 1"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 1"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 1"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 1"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 2"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 2"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 2"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 2"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 2"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 3"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 3"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 3"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 3"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 3"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 4"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 4"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 4"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 4"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 4"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 5"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 5"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 5"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 5"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 5"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 6"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 6"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 6"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 6"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 6"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="46" Name="List Table 1 Light"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark"/>
<w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful"/>
<w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 1"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 1"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 1"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 1"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 1"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 2"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 2"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 2"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 2"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 2"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 3"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 3"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 3"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 3"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 3"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 4"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 4"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 4"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 4"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 4"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 5"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 5"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 5"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 5"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 5"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 6"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 6"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 6"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 6"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 6"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 6"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:8.0pt;
mso-para-margin-left:0cm;
line-height:107%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-fareast-language:EN-US;}
</style>
<![endif]-->
<br />
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Windows 10
(and 8) has a feature called Microsoft SmartScreen. It is split in two parts:
one purely for the web and one for files downloaded for the web. I’ll try to
explain how SmartScreen for downloaded files work. But first we need to know how
streams works</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="https://en.wikipedia.org/wiki/NTFS#Alternate_data_streams_.28ADS.29"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">NTFS Alternate data streams (ADS)</span></b></a></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">ADS or just
”streams” is a feature in Microsoft NTFS file system feature that allows for ”hidden”
data in a file. You can access the hidden data by using the colon separator.</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Copy
ftp.exe from C:\Windows\System32 to c:\temp\. I used ftp.exe because it is an
unsigned executable that you probably can find on your hard drive. Use Windows
PowerShell for these commands. Create an alternative stream by using notepad:</span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New",Courier,monospace;"><span lang="EN-US" style="mso-ansi-language: EN-US;">PS
C:\temp> notepad ftp.exe:LennartStream </span></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Answer yes
in Notepad. Enter the content ”Hello World!”, save and close the file/stream.
We can now open the file/stream by the same Notepad command again. No actual new
file was created on the hard drive. It just created a new stream. You can
list the streams by using Windows Sysinternals Streams program or just use
PowerShell:</span></div>
<span style="font-family: "Courier New",Courier,monospace;"> PS C:\temp> Get-Item ftp.exe -Stream *<br /><br /><br /> FileName: C:\temp\ftp.exe<br /><br />Stream Length<br />------ ------<br />:$DATA 55808<br />LennartStream.txt 12<br /></span><br />
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">As you can
see my ”LennartStream” is there and it takes 12 bytes (the ”Hello World!”
string). The main program for ftp takes 55808 bytes.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="mso-ansi-language: EN-US;">Microsoft SmartScreen</span></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">SmartScreen
(<a href="https://en.wikipedia.org/wiki/Microsoft_SmartScreen">https://en.wikipedia.org/wiki/Microsoft_SmartScreen</a>) provides some protection for
executing downloaded files from the internet. When a file is downloaded in the web browser
(for example Firefox), a stream called “Zone.Identifier” is created. If the
Zone is “dangerous” a warning dialog may be presented to the user when the file
is run. In Windows 10 the settings for SmartScreen is in Control Panel\System
and Security\Security and Maintenance.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Use notepad
to edit the Zone.Identifier stream:</span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New",Courier,monospace;"><span lang="EN-US" style="mso-ansi-language: EN-US;">PS
C:\temp> notepad ftp.exe:Zone.Identifier</span></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Create a
new stream and enter this content:</span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New",Courier,monospace;"><span lang="EN-US" style="mso-ansi-language: EN-US;">[ZoneTransfer]</span></span></div>
<span style="font-family: "Courier New",Courier,monospace;">
</span><br />
<div class="MsoNormal">
<span style="font-family: "Courier New",Courier,monospace;"><span lang="EN-US" style="mso-ansi-language: EN-US;">ZoneId=3</span></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Now double click
on ftp.exe to run it. You will now get a dialog like this:</span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">“Windows
protected your PC. Windows SmartScreen prevented an unrecognized app from
starting. Running this app might put your PC at risk”</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj49M2s_pgYXFa-iDb20gdkJNU1OhtT3DI87gbllVnRwSF22uEgPtUnH-umv2edlyanOe-RsG1964yXbpsu4FJ7uKsrAEIwuTgz4lqWDMLXZPGQNJv2l6i1alvpbbNU1mJYdW3WNCy2MaJY/s1600/SmartScreen1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="123" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj49M2s_pgYXFa-iDb20gdkJNU1OhtT3DI87gbllVnRwSF22uEgPtUnH-umv2edlyanOe-RsG1964yXbpsu4FJ7uKsrAEIwuTgz4lqWDMLXZPGQNJv2l6i1alvpbbNU1mJYdW3WNCy2MaJY/s400/SmartScreen1.png" width="400" /></a></div>
<div class="MsoNormal">
<span style="mso-fareast-language: SV; mso-no-proof: yes;"><br /></span><span lang="EN-US" style="mso-ansi-language: EN-US;"></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Press “More
info”:</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimxfUM6edytrfO4rEY4t4_mvswGlpQU5aJrYr0MUr3_b50axTXhi72IyvRscJ7f_8kc5-dR6AosPyeSMoL7CLl2qJV1Ox1jGishm1npMKcmkxuUyYKW8smUkzxMsBuweKOz5OuNOq_5Ik1/s1600/SmartScreen2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="125" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimxfUM6edytrfO4rEY4t4_mvswGlpQU5aJrYr0MUr3_b50axTXhi72IyvRscJ7f_8kc5-dR6AosPyeSMoL7CLl2qJV1Ox1jGishm1npMKcmkxuUyYKW8smUkzxMsBuweKOz5OuNOq_5Ik1/s400/SmartScreen2.png" width="400" /></a></div>
<div class="MsoNormal">
<span style="mso-fareast-language: SV; mso-no-proof: yes;"><br /></span><span lang="EN-US" style="mso-ansi-language: EN-US;"></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Choose “Run
anyway” and then just close the ftp program. View the Zone.Identifier stream
again:</span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New",Courier,monospace;"><span lang="EN-US" style="mso-ansi-language: EN-US;">PS
C:\temp> notepad ftp.exe:Zone.Identifier</span></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">The content
has now changed to:</span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New",Courier,monospace;"><span lang="EN-US" style="mso-ansi-language: EN-US;">[ZoneTransfer]</span></span></div>
<span style="font-family: "Courier New",Courier,monospace;">
</span><br />
<div class="MsoNormal">
<span style="font-family: "Courier New",Courier,monospace;"><span lang="EN-US" style="mso-ansi-language: EN-US;">AppZoneId=4</span></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">As you can
see SmartScreen has updated the stream data with respect to your answer in the
dialog. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Please note
that if the file is signed with a certificate and Microsoft can verify it (with
some magical “reputation” system I don’t know the details on) the dialog may
not be shown and the stream will not be changed.</span></div>
Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-47290034028972853422014-04-23T16:27:00.000+02:002014-04-23T16:27:34.325+02:00What to do when you get "Comparison method violates its general contract!"Java 7 switched to a new sort algorithm - called ComparableTimSort. The old algorithm would silently ignore when you violate the Comparator/Comparable contract. The new one throws an exception "Comparison method violates its general contract!"<br />
<br />
The contract is in the interface <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Comparator.html#compare%28T,%20T%29">Comparable</a>. The most common is to break the transitive contract. That is: If A < B and B < C, than A should be less than C. <a href="http://stackoverflow.com/questions/8327514/comparison-method-violates-its-general-contract">Stackoverflow.com</a> has several posts on the issue.<br />
<br />
I have made a small program that detects what elements that causes this issue. It only works for small lists but has helped me to debug compareTo()/compare() methods.<br />
<br />
<pre><span style="font-size: x-small;">package se.lesc.blog;
import java.util.Comparator;
public class TransitivityTester {
public static void transitivityTester(Object list[]) {
transitivityTester(list, null);
}
/** Check that a lists compareTo() method is correct with respect to transitivity */
public static void transitivityTester(Object list[], Comparator<Object> comparator) {
//Cache all possible comparison (for speed)
byte[][] compareTable = new byte[list.length][];
for (int x = 0; x < list.length; x++) {
byte[] column = new byte[list.length];
compareTable[x] = column;
for (int y = 0; y < list.length; y++) {
int result;
if (comparator != null) {
result = comparator.compare(list[x], list[y]);
} else {
@SuppressWarnings("unchecked")
Comparable<Object> comparableX = (Comparable<Object>)list[x];
result = comparableX.compareTo(list[y]);
}
byte normalizedResult = normalize(result);
column[y] = normalizedResult;
}
}
//Expensive O(n^3) iteration
for (int a = 0; a < list.length; a++) {
for (int b = 0; b < list.length; b++) {
for (int c = 0; c < list.length; c++) {
if (compareTable[a][b] < 0 && compareTable[b][c] < 0) {
if (! (compareTable[a][c] < 0)) {
transitiveError("A < B && B < C but not A < C", a, b, c);
}
} else if (compareTable[a][b] > 0 && compareTable[b][c] > 0) {
if (! (compareTable[a][c] > 0)) {
transitiveError("A > B && B > C but not A > C", a, b, c);
}
} else if (compareTable[a][b] == 0 && compareTable[b][c] == 0) {
if (! (compareTable[a][c] == 0)) {
transitiveError("A == B && B == C but not A == C", a, b, c);
}
}
}
}
}
}
private static void transitiveError(String transitiveRule, int a, int b, int c) {
String errorMessage =
transitiveRule +
" (A = " + a + ", B= " + b + ", C = " + c + ") " +
"Comparison method violates its general contract!";
throw new IllegalArgumentException(errorMessage);
}
private static byte normalize(int result) {
byte normalizedResult;
if (result > 0) {
normalizedResult = 1;
} else if (result < 0) {
normalizedResult = -1;
} else {
normalizedResult = 0;
}
return normalizedResult;
}
}</span></pre>
<br />
Here is some test code for the above class:<br />
<pre><span style="font-size: x-small;">package se.lesc.blog;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
public class TransitivityTesterTest {
private List<Integer> list;
@Before
public void setUp() {
list = new ArrayList<Integer>();
list.add(1);
list.add(2);
list.add(3);
}
@Test
public void testNormalIntegerListShouldWork() {
TransitivityTester.transitivityTester(list.toArray(new Integer[0]));
}
@Test
public void testCrazyOneIsAlwaysMoreComparator() {
TransitivityTester.transitivityTester(list.toArray(new Integer[0]), new CrazyOneIsAlwaysMoreComparator());
}
@Test
public void testCrazyAllIsOneComparator() {
TransitivityTester.transitivityTester(list.toArray(new Integer[0]), new CrazyAllIsOneComparator());
}
public static class CrazyOneIsAlwaysMoreComparator implements Comparator<Object> {
@Override
public int compare(Object o1, Object o2) {
Integer i1 = (Integer) o1;
Integer i2 = (Integer) o2;
if (i1.intValue() == 1) {
return 1;
} else {
return i1.compareTo(i2);
}
}
}
public static class CrazyAllIsOneComparator implements Comparator<Object> {
@Override
public int compare(Object o1, Object o2) {
Integer i1 = (Integer) o1;
Integer i2 = (Integer) o2;
if (i1.intValue() == 1 || i2.intValue() == 1) {
return 0;
} else {
return i1.compareTo(i2);
}
}
}
}</span>
</pre>
<br />Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-34822268958385100452014-01-15T08:39:00.000+01:002014-01-15T08:39:04.885+01:00More Btrace debuggingIn the post <a href="http://blog.lesc.se/2009/06/btrace-debugging-tool-with-bugs.html">http://blog.lesc.se/2009/06/btrace-debugging-tool-with-bugs.html</a> I wrote about how it is possible to debug a running Java application. Here is some more magic.<br />
<br />
Let say you have this simple program:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">import javax.swing.JFrame;<br /><br />public class SimpleApp {<br /> public static void main(String args[]) {<br /> JFrame frame = new JFrame("Simple application");<br /> frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<br /> frame.setSize(200, 100);<br /> frame.setVisible(true);<br /> }<br />}</span></span><br />
<br />
And this Btrace script:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">import com.sun.btrace.annotations.*;<br />import static com.sun.btrace.BTraceUtils.*;<br />import java.awt.EventQueue;<br />import java.awt.AWTEvent;<br />import java.awt.event.MouseEvent;<br />import java.lang.reflect.Field;<br /><br />@BTrace <br />public class SimpleAppMouseTracer {<br /> @OnMethod(<br /> clazz="java.awt.EventQueue",<br /> method="dispatchEvent"<br /> )<br /> public static void onevent(@Self EventQueue queue, AWTEvent event) {<br /> if (event instanceof MouseEvent) {<br /> MouseEvent mouseEvent = (MouseEvent) event;<br /> Field idField = field("java.awt.AWTEvent", "id");<br /> Field xField = field("java.awt.event.MouseEvent", "x");<br /> Field yField = field("java.awt.event.MouseEvent", "y");<br /> if (getInt(idField, mouseEvent) == MouseEvent.MOUSE_CLICKED) {<br /> println(<br /> strcat("x = ", strcat(str(getInt(xField, mouseEvent)),<br /> strcat(", y = ", str(getInt(yField, mouseEvent))))));<br /> }<br /> }<br /> }<br />}</span></span><br />
<br />
I have installed the Btrace into Java VisualVM (I downloaded and installed all the visualvm plugins from <a href="https://kenai.com/projects/btrace/downloads">https://kenai.com/projects/btrace/downloads</a>). <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLv_RuHxbj9dItUJYRHLAHL1nQtaBneJt6xN6H-JHyZrz652y81cTcPAE1Ou34NeaSbXE0QpTSE-rA7zosmbqVynklpXtr-cRL3vlNC0xhQ0elnnWiFA3kppPi0AxOcxcezU_9xFXpPS4i/s1600/btrace_mouseeventtracker.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="341" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLv_RuHxbj9dItUJYRHLAHL1nQtaBneJt6xN6H-JHyZrz652y81cTcPAE1Ou34NeaSbXE0QpTSE-rA7zosmbqVynklpXtr-cRL3vlNC0xhQ0elnnWiFA3kppPi0AxOcxcezU_9xFXpPS4i/s400/btrace_mouseeventtracker.png" width="400" /> </a> </div>
<br />
<br />
Each time I click with the mouse inside the Window I get a printout with the mouse coordinates.<br />
<br />
The Btrace code is Java, but with many restrictions. That is why the String creation code gets a bit large; because build in Btrace functions must be used. The same goes for accessing variables inside the MouseEvent object. <br />
<br />Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-70876042259380645212013-08-08T08:03:00.000+02:002013-08-08T08:04:16.993+02:00A Java program that triggers the java.lang.OutOfMemoryError: GC overhead limit exceededI wanted to test how the -XX:+HeapDumpOnOutOfMemoryError JVM option worked when a JVM goes out of memory, but because of GC overheadlimit. This is my try:<br />
<br />
<pre>import java.util.ArrayList;
import java.util.Random;
import java.util.Timer;
import java.util.TimerTask;
public class OutOfMemoryProvoker {
private static final int MEMORY_BLOCK_MAX_SIZE = 1000000;
private static final int REMOVE_BLOCK_FACTOR = 20000;
public static void main(String[] args) throws Exception {
final ArrayList<byte[]> list = new ArrayList<byte[]>();
Random random = new Random(0);
Timer timer = new Timer("reportTimer");
timer.schedule(new TimerTask() {
@Override
public void run() {
report(list);
}
}, 5000, 5000);
while (true) {
int memSize = random.nextInt(MEMORY_BLOCK_MAX_SIZE) + 1;
byte[] memBlock = new byte[memSize];
list.add(memBlock);
int removeBlockIndex = random.nextInt(REMOVE_BLOCK_FACTOR);
if (list.size() > removeBlockIndex) {
list.remove(removeBlockIndex);
}
}
}
private static void report(ArrayList<byte[]> list) {
System.out.println(list.size());
}
}</pre>
<br />
This works very nice. You have to modify the MEMORY_BLOCK_MAX_SIZE and REMOVE_BLOCK_FACTOR to match your memory settings. I used a 8 GB heap for my numbers.<br />
<br />
Nice things to note:<br />
<ol>
<li>Java GC really dislikes different sizes of memory block. This is why I randomize the memory block sizes to provoke as much GC work as possible</li>
<li>The REMOVE_BLOCK_FACTOR controls the chance that a memory block is dereferenced and eligible for GC. It simply removes an item from the list (if the list is big enough). This has the nice characteristic the the chance that a block is removed is higher the more the list is filled.</li>
</ol>
Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-43590098521899180072013-01-29T20:59:00.001+01:002013-01-29T20:59:35.874+01:00Office/Word 2003 in Windows 8So the Windows 8 Upgrade Assistant tells me that I cannot use Office 2003:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNyDdqNMpRMTsblN4I9YbzvAAJwzFyS7RbLZS88ijoi8u8vaOxKb_HM7nfYYme9jiXo_XbU0CwNFzkAY66FwQHm2Bjfmm628uG0Ud4c82mI8qUXe-h4McOorCWuAmdemGBOBBwrFLkZdaM/s1600/ms_update_windows8_office_2003.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="152" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNyDdqNMpRMTsblN4I9YbzvAAJwzFyS7RbLZS88ijoi8u8vaOxKb_HM7nfYYme9jiXo_XbU0CwNFzkAY66FwQHm2Bjfmm628uG0Ud4c82mI8qUXe-h4McOorCWuAmdemGBOBBwrFLkZdaM/s320/ms_update_windows8_office_2003.png" width="320" /></a></div>
Well I upgraded my Windows 7 to Windows 8 (that is I did NOT perform a clean install). And how does for example Word 2003 work:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1Tj_j7D-vX-PuPdExd5NxiuAIICNeK8sogPLUu89RzDWom3piOuv46CGHPnEWGmofEu2TNKllM1ZNXU8dAkq5zHoTzNuLtb5tDiIWhvmiJJiDUSbzQID8oHXqnH9EgseZQ8dTlCaHq5Tn/s1600/word_2003_in_windows8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="166" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1Tj_j7D-vX-PuPdExd5NxiuAIICNeK8sogPLUu89RzDWom3piOuv46CGHPnEWGmofEu2TNKllM1ZNXU8dAkq5zHoTzNuLtb5tDiIWhvmiJJiDUSbzQID8oHXqnH9EgseZQ8dTlCaHq5Tn/s320/word_2003_in_windows8.png" width="320" /></a></div>
Well it turns out that it works just fine! I haven't tried every feature, but everything I have tried appears to work. That includes Excel 2003 and Visio 2003.Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com2tag:blogger.com,1999:blog-7809482881133712399.post-29857675560288486662013-01-17T12:04:00.001+01:002013-01-17T13:02:11.878+01:00The Eclipse foreach templateThere are many "hidden" features in Eclipse that are really good. Today I discovered the foreach template.<br />
<br />
It works like this: place your cursor just above a array or Iterable (List) declaration. Press Ctrl + Space and press Enter. Eclipse will now create a for loop that you can use. It will use the Iterable variable that is closest.<br />
<br />
Before: <br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoecKd-j9p0G5uZavSYA2GJpVsz-ZYw9KH4-uGTxuShbuI5XXDV3UzqmZ97f7tlkQgs55pqdkllHLa43HcZg_b_glAKAZMSm8kYiUhOM1WUDQSnVJVTXUgZV46Y2wbmUdjTyjPc_X5z-Ca/s1600/foreach_before.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="244" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoecKd-j9p0G5uZavSYA2GJpVsz-ZYw9KH4-uGTxuShbuI5XXDV3UzqmZ97f7tlkQgs55pqdkllHLa43HcZg_b_glAKAZMSm8kYiUhOM1WUDQSnVJVTXUgZV46Y2wbmUdjTyjPc_X5z-Ca/s640/foreach_before.gif" width="640" /></a><br />
After: <br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLC3dtkRxmnm3UKZ5HvnEVCnyvqMmfqRheCuH5HVGwDEE3_cwlu7j4oWR6ZeOrZ4Z1gneGzw8NcMrUjHXpHagvcMsIBstd9B8AUEuiy1JCHl_y1RxEl9y0hw_4hSgvyryOm6jFK66EwRnr/s1600/foreach_after.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLC3dtkRxmnm3UKZ5HvnEVCnyvqMmfqRheCuH5HVGwDEE3_cwlu7j4oWR6ZeOrZ4Z1gneGzw8NcMrUjHXpHagvcMsIBstd9B8AUEuiy1JCHl_y1RxEl9y0hw_4hSgvyryOm6jFK66EwRnr/s1600/foreach_after.gif" /></a>
Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-21178995543504087892012-06-27T10:01:00.000+02:002012-06-27T10:01:23.288+02:00The ++ operator is not thread safe<a href="http://findbugs.sourceforge.net/">Findbugs</a> is great tools for analyzing java code. It can find potential bugs. One of the warnings is the <a href="http://findbugs.sourceforge.net/bugDescriptions.html#VO_VOLATILE_INCREMENT">VO: An increment to a volatile field isn't atomic (VO_VOLATILE_INCREMENT)</a>. It means that the ++ operator is not an atomic operation and thus not thread safe. To demonstrate this looks at this code:<br />
<br />
<pre>public class PlusPlusOperatorThreadSaftey {
@Test
public void testThreadSaftey() throws InterruptedException {
class IntegerHolder {
private volatile int value = 0;
private void increase() {
value++;
}
private int getValue() {
return value;
}
}
final IntegerHolder integerHolder = new IntegerHolder();
final int numberOfIncreasePerThread = 50;
final int numberOfThreads = 100;
ExecutorService threadPool = Executors.newFixedThreadPool(numberOfThreads);
for (int i = 0; i < numberOfThreads; i++) {
threadPool.submit(new Runnable() {
public void run() {
for (int i = 0; i < numberOfIncreasePerThread; i++) {
integerHolder.increase();
}
}
});
}
threadPool.shutdown();
threadPool.awaitTermination(10, TimeUnit.SECONDS);
assertEquals(integerHolder.getValue(), numberOfIncreasePerThread *
numberOfThreads);
}
}</pre>
When running this code on my dual core CPU sometimes the test case passes, and sometimes I get:<br />
<code>java.lang.AssertionError: expected:<4998> but was:<5000></code>. Thus, the ++ operator is not atomic and updates can be lost.<br />
<br />
To fix this you could add a synchronized block, but a better approach is to use an <a href="http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/atomic/AtomicInteger.html">AtomicInteger</a> like this:
<br />
<pre>class IntegerHolder {
private AtomicInteger value = new AtomicInteger(0);
private void increase() {
value.incrementAndGet();
}
private int getValue() {
return value.get();
}
}</pre>Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-70307606961619181922012-06-11T08:18:00.002+02:002012-06-11T08:18:43.704+02:00Create named "screen"s to continue work laterThe Unix command <a href="http://www.manpagez.com/man/1/screen/">screen</a> is a great command that lets you manage your login sessions. If you for some reasons shares an account with several people or have many different contexts it is useful to crate a named screen session:<br />
<br />
<pre>lennart@pingvinen:~$ screen -S myScreen</pre>
<br />
To list all the screens use:<br />
<pre>lennart@pingvinen:~$ screen -list
There are screens on:
14825.myScreen (2012-06-11 08.15.28) (Attached)
14692.pts-0.pingvinen (2012-06-11 08.13.25) (Detached)
2 Sockets in /var/run/screen/S-lennart.</pre>
Note that one of the screens are named (the myScreen) and one is unnamed and gets a default name.<br />
<br />
To attach to a named screen:<br />
<pre>lennart@pingvinen:~$ screen -r myScreen</pre>
Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com1tag:blogger.com,1999:blog-7809482881133712399.post-12124350274625038762012-04-16T12:46:00.000+02:002012-04-16T12:46:04.451+02:00Increase of Linux IO scheduler queue size might lower performanceThe blog post <a href="http://yoshinorimatsunobu.blogspot.se/2009/04/linux-io-scheduler-queue-size-and.html">Linux I/O scheduler queue size and MyISAM performance</a> explains a good way to increase performance when using Mysql and the Myisam database table engine. I have tried this an can confirm that it will increase performance for this typical application.<br />
<br />
I have unfortunately discovered that it may not always increase the overall performance if you have other IO intensive operations besides an Mysql database running on your server. I have a system that runs both Mysql with Myisam and also a custom written database application that uses a lot (like 10000) small files to save data.<br />
<br />
The system handles a stream of "messages". I measure performance by looking at graphs of how many messages are buffered (0 to 100000) and how many messages that has been discarded because the buffer is full.<br />
<br />
For nr_requests = 128<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXUjsRYM0VJk3gv3H92ZD4vz-b4iTKnfuI42r8sD9upEaYv34weq86JP0Y_QRSeb-HlgsgzBpdcsXX8a_TPCseofCj7yoajqe95daFWLXYtunOCQzSE_F6f5vL_ZX_eFoKqK0GTnhT3JNi/s1600/nr_requests_128.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="174" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXUjsRYM0VJk3gv3H92ZD4vz-b4iTKnfuI42r8sD9upEaYv34weq86JP0Y_QRSeb-HlgsgzBpdcsXX8a_TPCseofCj7yoajqe95daFWLXYtunOCQzSE_F6f5vL_ZX_eFoKqK0GTnhT3JNi/s640/nr_requests_128.png" width="640" /></a></div>
<br />
<br />
For nr_requests = 10000<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKuvQZalkdz0pqWiNXq4Pq3t1WlpGUjwEbuZNawdLYOhsbUqEaqBSB-jgoSDbqS-NjaSrhPBrgE-OJOBbPMyualuhoNTwVh4cTzRJqZVLygPoL5-GSNhy53YEaEFP4rHMBfKMSCrFyqO25/s1600/nr_requests_10000.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="173" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKuvQZalkdz0pqWiNXq4Pq3t1WlpGUjwEbuZNawdLYOhsbUqEaqBSB-jgoSDbqS-NjaSrhPBrgE-OJOBbPMyualuhoNTwVh4cTzRJqZVLygPoL5-GSNhy53YEaEFP4rHMBfKMSCrFyqO25/s640/nr_requests_10000.png" width="640" /></a></div>
<br />
As seen from the graphs the configuration with default nr_requests (128) performs better. My advice is thus to benchmark if your specific application benefits an increased queue size.Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-52852076169305106432012-04-09T19:00:00.000+02:002012-04-09T19:00:38.205+02:00A free ssh client for Ipad<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
There are a bunch of ssh clients in Apple App Store that costs money. If your looking for a free one for Ipad the number is reduced: a search for the "ssh" and Price = "Free" yields 9 hits. Out of these 9 only 2 is and actual ssh client: zatelnet and Rove Mobile Admin Client.<br />
<br />
Out of curiosity I tried <a href="http://itunes.apple.com/us/app/rove-mobile-admin-client/id339820302?mt=8">Rove Mobile Admin Client</a>. It's main purpose is actually not to be an ssh client, but to be a remote management tool for their commercial server software. But that doesn't matter, since the ssh client part of the app is free to use standalone. I could successfully connect to my home Linux computer:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBehyphenhyphenuTZur7yWF34fLdqikxXQHBCYNWNrSxDA5FETGf02L5qFMA4q2-cbImpCGNb1SiQmnmClpu5NSzElUeEGh3BKl0kXC3HlMOfAqfDtjFkkqfFd1GwR8Mw7VMYY52eDpNRqlmNfp3ERV/s1600/IMAGE_ADC0C411-425F-4DB7-B950-8152DA80947C.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBehyphenhyphenuTZur7yWF34fLdqikxXQHBCYNWNrSxDA5FETGf02L5qFMA4q2-cbImpCGNb1SiQmnmClpu5NSzElUeEGh3BKl0kXC3HlMOfAqfDtjFkkqfFd1GwR8Mw7VMYY52eDpNRqlmNfp3ERV/s400/IMAGE_ADC0C411-425F-4DB7-B950-8152DA80947C.PNG" width="400" /></a></div>
<br />
Don't expect miracles out of this app, since it is free it is probably a lot worse than some "real" non-free ssh clients. But you can do basic things.<br />
<br />
<b>Pros:</b><br />
<ol>
<li>Can use private key for authentication</li>
<li>Can edit files in nano (requires rather good terminal emulation and the abilities to send Ctrl sequences).</li>
<li>Does maintain connection when you switch to another app</li>
</ol>
<b> Cons:</b><br />
<ol>
<li>Does not support UTF-8 (since Ubuntu uses this as default it can be a bit frustrating)</li>
<li>Does not support select, copy and paste in the terminal emulation.</li>
<li>Very slow (the time for a key press to "echo" is in the magnitude of 1 s).</li>
<li>Can only have one open connection at a time</li>
</ol>
<br />
A side note: the app also includes an RDP client, but forget about using it, it is painfully slow.<br />
<br />
<br />
<br />Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-2942690681770956482012-03-27T16:30:00.001+02:002012-03-27T16:30:59.384+02:00Me against the world: Singleton?I just looked at <a href="http://www.reddit.com/r/java/comments/qpb8p/java_ee_revisits_the_design_patterns_singleton/">http://www.reddit.com/r/java/comments/qpb8p/java_ee_revisits_the_design_patterns_singleton/</a>. I find it rather interesting that the comments against Singleton have low scores and comments in favor have high scores.<br />
<br />
This leads me to think: is it me against the world? Well at least my kind of programmer - that thinks that Singleton is a code smell - is in minority? Just to boost "my" side of argumentation let me be clear:<br />
<br />
<b>Don't us Singleton(s)!</b><br />
<br />
I have personally had firsthand experience of inheriting a code base where Singletons was used extensively. It's a total nightmare! For me two areas stand out:<br />
<ul>
<li>Writing test code for Singleton is much harder. You always have to watch out if one part of the code makes a side effect that makes your test case either false positive or false negative.</li>
<li>Converting a single threaded system into a multi threaded system just does not work with Singleton. You basically have to remove everything for it to work well and to avoid unnecessary synchronizations. </li>
</ul>
<br />Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-79081203431724695462012-03-27T13:56:00.000+02:002012-03-27T14:20:28.057+02:00Easy java decompilation<br />
<a href="http://java.decompiler.free.fr/">Java Decompiler</a> is a nice decompiler for Java. Lets try it! Here is my source code:
<br />
<pre>package se.lesc.blog;
/** This is class that shows how decompiled classes may look like */
public class DecompileExample {
public static void main(String[] args) {
String output = "";
//Lets print out 10 Hello world
for (int i = 0; i < 10; i++) {
output += "Hello World\n";
}
System.out.println(output);
}
}</pre>
When opening DecompileExample.class in Java Decompiler it looks like this;<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEeyGIWRw1n063BzYH3xsGVI6aqboqL0lS6A90A7z6WmoBxAO1uMQ6lo278z3SPX8m8nN6nyP4duJIHxVZmCFgGMhryVJiNDYx1rbQMNWqzqMi-WRDi_ZUB2bywCQ4t8R_xW9JFA0NY5uX/s1600/java_decompiler.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEeyGIWRw1n063BzYH3xsGVI6aqboqL0lS6A90A7z6WmoBxAO1uMQ6lo278z3SPX8m8nN6nyP4duJIHxVZmCFgGMhryVJiNDYx1rbQMNWqzqMi-WRDi_ZUB2bywCQ4t8R_xW9JFA0NY5uX/s1600/java_decompiler.png" /></a></div>
<br />
As you can see it is very easy to browse related class files in the navigation pane to the right.When saving the source code to a file it will look like this:<br />
<pre>/* */ package se.lesc.blog;
/* */
/* */ import java.io.PrintStream;
/* */
/* */ public class DecompileExample
/* */ {
/* */ public static void main(String[] args)
/* */ {
/* 8 */ String output = "";
/* */
/* 10 */ for (int i = 0; i < 10; i++) {
/* 11 */ output = output + "Hello World\n";
/* */ }
/* 13 */ System.out.println(output);
/* */ }
/* */ }</pre>
<br />
Things to note: <br />
<ol>
<li>The original line numbers has been added as a comment. </li>
<li>Every original comment has been removed (it is removed in the compilation phase).</li>
<li>The string operator <code>+=</code> has been replaced by <code>= output +</code>.</li>
</ol>Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com1tag:blogger.com,1999:blog-7809482881133712399.post-37795397381154924352012-02-24T08:17:00.002+01:002012-02-24T08:17:35.193+01:00Set up a VNC Server on LinuxI would like to reblog this: <a href="http://www.walkernews.net/2007/07/05/how-to-setup-linux-vnc-server/">How To Setup Linux VNC Server In 3 Minutes</a>. It is a good guide on how to set up a VNC Server in Linux (via command line only).<br />
<br />
While I'm on the topic I'll make a ranking of how good different programs/technologies (I have tried) to remotely login and get a graphical interface:<br />
<br />
<ol>
<li>Microsoft RDP. This protocol is probably the best. It can handle high latency rather good. It will adapt to screen size and copy commands always work. The big disadvantage is the high price (about one Windows license per concurrent RDP session).</li>
<li><a href="http://www.graphon.com/">Go Global</a>. It is also very fast, but also comes at a price. One drawback is that is not so common.</li>
<li>VNC. This protocol is rather okay on handle latency. One disadvantage is that the screen size is fixed during startup.</li>
<li>X11. The worst protocol to handle latency. This can totally destroy a user experience! The big advantage is that it is free and always works.</li>
</ol>
And there is bunch more I never tried...Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-44274891343925553902012-02-09T21:00:00.000+01:002012-02-09T21:00:06.019+01:00How to extract data from a Java heap dumpI will show how to extract data from the memory of a running Java application. Lets assume that this is the class with interesting data:<br />
<pre>package se.lesc.blog.heap_extract;
import java.util.*;
/** Class that contain data to extract */
public class ArrayDataContainer {
List<byte[]> arrays = new ArrayList<byte[]>();
public String toString() {
String result = "";
for (int i = 0; i < arrays.size(); i++) {
result += "Array " + i + ": " + new String(arrays.get(i)) + "n";
}
return result;
}
}</pre>
<br />
An example main class that starts a Java process and populates the class with some data:<br />
<pre> public static void main(String[] args) throws Exception {
ArrayDataContainer arrayDataContainer = new ArrayDataContainer();
for (int i = 0; i < 20; i++) {
String dataString = "This is my data " + i;
arrayDataContainer.arrays.add(dataString.getBytes());
}
System.out.println(arrayDataContainer.toString());
Thread.sleep(1000*300);
}</pre>
<br />
<br />
Use your favorite tool to take a heap dump (<a href="http://blog.lesc.se/2012/02/how-to-take-java-heap-dump-from-command.html">for example jmap</a>).<br />
<br />
Open Java Visual VM (typically found in C:\Program Files\Java\jdk1.6.0_24\bin\jvisualvm.exe). It has an Object Query Language (OQL) feature that is very useful in this case. Go to File -> Load... Select Heap Dumps in the file open dialog and open the heap dump. Click on the "OQL Console" button.<br />
<br />
Entry this query and press the execute button:<br />
<pre>map(heap.objects("se.lesc.blog.heap_extract.ArrayDataContainer"),
function (it, index, array, result) {
var res = '';
for each (var element in it.arrays.elementData) {
res += '<p/>';
for each (var i in element) {
res += i + ', ';
}
}
return res;
})</pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrAZ_aEzEUM7UxxYJjJRtmVr3jdQXWUtqoDaT8Xr0xlvGVAVeGYcVqunaZUkVW6Ith90v8yIDWDtfXjfzyMBlgntVdxnUS8zx1yoOB9w6Gdq-IPrXr5DMIsyFZj_EmT09GAkQm1BGGFr-p/s1600/java_visualvm_oql.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="301" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrAZ_aEzEUM7UxxYJjJRtmVr3jdQXWUtqoDaT8Xr0xlvGVAVeGYcVqunaZUkVW6Ith90v8yIDWDtfXjfzyMBlgntVdxnUS8zx1yoOB9w6Gdq-IPrXr5DMIsyFZj_EmT09GAkQm1BGGFr-p/s400/java_visualvm_oql.png" width="400" /></a></div>
<br />
Copy the data from the Query Results and save it to a text file. Use this program to parse the file and recreate the List of byte[]:
<br />
<pre>package se.lesc.blog.heap_extract;
import java.io.*;
import java.util.*;
public class ArrayDataImporter {
public static List<byte[]> importArrayList(InputStream in) throws Exception {
List<byte[]> arrays = new ArrayList<byte[]>();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in));
String line;
while ((line = bufferedReader.readLine()) != null) {
line = line.trim();
if (line.isEmpty()) {
continue;
}
List<Byte> array = new ArrayList<Byte>();
String[] dataPoints = line.split(",");
for (String dataPointString : dataPoints) {
dataPointString = dataPointString.trim();
int dataPoint = Integer.parseInt(dataPointString);
array.add((byte) dataPoint);
}
byte[] byteArray = new byte[array.size()];
for (int i = 0; i < array.size(); i++) {
byteArray[i] = array.get(i);
}
arrays.add(byteArray);
}
return arrays;
}
public static void main(String[] args) throws Exception {
ArrayDataContainer arrayDataContainer = new ArrayDataContainer();
arrayDataContainer.arrays =
ArrayDataImporter.importArrayList(
ArrayDataImporter.class.getResourceAsStream("query_results.txt"));
System.out.println(arrayDataContainer);
}
}</pre>
<br />
Things to note:<br />
<ol>
<li>The OQL help can be found at <a href="http://visualvm.java.net/oqlhelp.html">http://visualvm.java.net/oqlhelp.html</a>.</li>
<li>The OQL is mostly Javascript, so most of the "normal" Javascript functions will work.</li>
<li>The heap.objects method targets every instance of a class (there was only 1 instance in this application).</li>
<li>The it.arrays.elementData needs explaining. "it" is the iterator from the Javascript map method. "arrays" is the name of the attribute inside in my class ArrayDataContainer. "elementData" is the attribute inside ArrayList.</li>
<li>The result of the query is rendered as a HTML page (thus explaining the <p/> in the middle of the query.</li>
</ol>Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-65542819278864253412012-02-09T09:47:00.000+01:002012-02-09T09:47:48.797+01:00Mysql 5.1/5.5 and UnicodeI noticed that Mysql 5.1. and 5.5 has a difference with respect to the support for Unicode characters. Mysql 5.1 only supports the Basic Multilingual Plane (BMP), that is code points between 0 and 65535 (U+0000 to U+FFFF). Characters whose code points are greater than 65535 (U+FFFF) are called supplementary characters and support for these are included in Mysql 5.5. Read more at <a href="http://dev.mysql.com/doc/refman/5.5/en/charset-unicode.html">http://dev.mysql.com/doc/refman/5.5/en/charset-unicode.html</a>.<br />
<br />
Java String support both Basic Multilingual Plane and supplementary characters so this may cause some problems if a String is send directly into Mysql. Typically you will see this error message:<br />
<pre>java.sql.SQLException: Incorrect string value: '\xC2\x9F' for column 'APN' at row 1</pre>
<br />
<br />
A little warning: even in Mysql 5.5 the "utf8" "charset" does NOT support supplementary characters. Use <a href="http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html">utf8mb4</a> instead.Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-57590945211047176752012-02-07T08:50:00.003+01:002012-02-07T08:53:05.844+01:00How to take a Java heap dump from command lineA heap dump is a great way to analyze a Java program in search of memory leaks. I mostly use <a href="http://www.eclipse.org/mat/">Eclipse Memory analyzer</a> for such an analysis. It is possible to acquire a heap dump from inside Eclipse Memory analyzer. But it may not always be possible to run a GUI in a foreign environment.<br />
<br />
Use jps to find out the process id
<pre>C:\>jps
11448 MyLeakingApplication
12084 Jps</pre>
<br />
Use jmap to acquire the dump
<pre>C:\>jmap -dump:format=b,file=c:\Temp\mymemorydump.hprof 11448
Dumping heap to C:\Temp\mymemorydump.hprof ...
Heap dump file created</pre>Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com1tag:blogger.com,1999:blog-7809482881133712399.post-30549864679330690202012-01-14T17:40:00.003+01:002012-01-14T17:40:59.133+01:00Implemented choosable renderer for java quick search popupI have now implemented so it is possible to choose (or implement one's own) renderer. I made a nice yellow renderer default:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://wiki.java-quick-search-popup.googlecode.com/git-history/91ffc6ea3cb0725d108d51b2f325b723a43af12e/example_application_screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://wiki.java-quick-search-popup.googlecode.com/git-history/91ffc6ea3cb0725d108d51b2f325b723a43af12e/example_application_screenshot.png" width="289" /></a></div>
I have made a web start version available. Try it out at <a href="http://code.google.com/p/java-quick-search-popup/">http://code.google.com/p/java-quick-search-popup/</a>.Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-16589457006844506152012-01-08T13:27:00.001+01:002012-01-08T13:27:24.420+01:00Created an open source projectI have for a while wanted to create an open source project, but has not had any good ideas. But yesterday I finally did it. I created <a href="http://code.google.com/p/java-quick-search-popup/">http://code.google.com/p/java-quick-search-popup/</a>. It is a small Java Swing component project. <br />
<br />Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-27963186863801886322011-11-24T13:20:00.000+01:002011-11-24T13:20:32.119+01:00How to change file premissions in Git on WindowsGit manages file permissions for each file in the repository. It may be appropriate to have the executable bit set for shell/bash files to make them easier to execute in Linux systems.<br />
<br />
Windows own file permissions does not map to the Git file permissions so it may be a bit hard to change file permissions when you are on Windows. This is how you do it:<br />
<br />
Lets assume the file script.sh needs to have the executable bit set. Use the command git ls-tree to inspect the file permissions:<br />
<code>C:\views\myproject>git ls-tree HEAD<br />
100644 blob 55c0287d4ef21f15b97eb1f107451b88b479bffe script.sh</code><br />
<br />
As you can see the file has 644 permission (ignoring the 100). We would like to change it to 755:<br />
<code>C:\views\myproject>git update-index --chmod=+x script.sh<br />
<br />
C:\views\myproject>git status<br />
# On branch master<br />
# Changes to be committed:<br />
# (use "git reset HEAD <file>..." to unstage)<br />
#<br />
# modified: script.sh<br />
#</code><br />
<br />
The file is now staged. Note that the file contents is not changed, only the meta data. We must commit the file so save the change:<br />
<code>C:\views\myproject>git commit -m "Changing file permissions"<br />
[master 77b171e] Changing file permissions<br />
0 files changed, 0 insertions(+), 0 deletions(-)<br />
mode change 100644 => 100755 script.sh</code><br />
<br />
Running git ls-tree again to see the change:<br />
<code>C:\views\myproject>git ls-tree HEAD<br />
100755 blob 55c0287d4ef21f15b97eb1f107451b88b479bffe script.sh</code>Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com7tag:blogger.com,1999:blog-7809482881133712399.post-81953415242985040902011-07-05T11:18:00.003+02:002011-07-05T11:21:05.724+02:00Steam gives away Team Fortress 2The popular multi player first person shooter game <a href="http://store.steampowered.com/app/440/">Team Fortress 2</a> is now free to play on Steam. I took the "bait" and installed Steam just to play this free game (and the game is really fun). So how can Steam money on this? Well there are two things that they can make money from:<br />
<br />
<b>1. In-game purchases</b><br />
Many free 2 play games have an in-game store. In Team Fortress 2 there is a store where you can buy visual appearances (like hats) and also weapons. I was "suckered" in to buy some kind of instrument (called <a href="http://wiki.teamfortress.com/wiki/Wrangler">Wrangler</a>) the engineer class in the game can use. For that I spent 0,39€:<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIRbugkHne0BTqWNHH83VanO4y91zlYzhTTuoRdVXdLnyBiSNYGzQmVybG9NBkwPm36Y5YtiID6J_WLhZOn_8YVGG9W0aVE4m13Ia9Ri6Lm6xoaPZxHLq5ojov7hdE3IokhDDH2b3ENnEq/s1600/250px-RED_Wrangler.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIRbugkHne0BTqWNHH83VanO4y91zlYzhTTuoRdVXdLnyBiSNYGzQmVybG9NBkwPm36Y5YtiID6J_WLhZOn_8YVGG9W0aVE4m13Ia9Ri6Lm6xoaPZxHLq5ojov7hdE3IokhDDH2b3ENnEq/s320/250px-RED_Wrangler.png" width="250" /></a></div><br />
<br />
<b>2. Buy other games in Steam</b><br />
The other thing that they can make money on is other games, that cost money. Since the user already has installed Steam the effort to buy something is lower. And since I could only transfer a minimum of 5 € to my virtual "Steam Wallet" I had some over. So I bought a game call <a href="http://trine-thegame.com/">Trine</a> for 1,99€. Once I have bought one game (although cheep) there is a high probably that I will buy more games in the future.Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com0tag:blogger.com,1999:blog-7809482881133712399.post-92093837264241519702011-06-24T13:58:00.002+02:002012-11-12T16:04:15.325+01:00Switch to UTF-8 charset in Mysql on UbuntuWhen installing Mysql on Ubuntu the default character set is probably latin-1. Since Ubuntu uses UTF-8 for most other things this may be little strange. But it is easy to change.<br />
<br />
The Mysql configuration file <code>/etc/mysql/my.cnf</code> has a magic line:<br />
<pre>!includedir /etc/mysql/conf.d/</pre>
<br />
This will make it include settings on the subdirectory <code>conf.d</code>. It's not recommended to change the <code>my.cnf</code> file directly since it will cause problems when upgrading Ubuntu/Mysql to a new version.<br />
<br />
Create a new file: <code>/etc/mysql/conf.d/utf8_charset.cnf</code> with the following contents:<br />
<pre>[mysqld]
default-character-set=utf8
[client]
default-character-set=utf8</pre>
<br />
Restart mysql and you will have UTF-8 as character set:<br />
<pre>$ mysql -u root -p -e "show variables like '%character%'"
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+ </pre>
<br />
Update 2012-11-12: This is valid for Mysql 5.1. For Mysql 5.5 see comment below by Martijn.Lennarthttp://www.blogger.com/profile/16520189296294313338noreply@blogger.com6