Thursday

html two image on top of each other

here is source code example:
     
<html>
<head>
  <style type="text/css">
#wrapper {
  margin: 0 auto; background: url(bottom-image.jpg)  no-repeat;
}
#header {
  width:100.00%;
  background: url(top-image.jpg)  no-repeat; ;
  position: absolute;
  top: 100;
  right: 0;
  bottom: 0;
  left: 100;
}
#menu {
  color: #f1f1f1;
}
 </style>
</head>
<body>
<div id="wrapper">
  <div id="header">
    <div id="menu">
      menu will be here
    </div>
  </div>
</div>
</body>
</html>
    

Tuesday

tsql select from xml with xmlns

here is how to do that :
       
declare @document xml ='<TypedPollingResultSet0 xmlns="http://schemas.microsoft.com/Sql/2008/05/TypedPolling/ModifiedProductsGet"><TypedPollingResultSet0><id>2</id><ProductID>M10570</ProductID><OriginalCatalog> Master Recipes HE</OriginalCatalog><Status>0</Status><DateTimeCreated>2014-10-20T11:48:10.373Z</DateTimeCreated></TypedPollingResultSet0><TypedPollingResultSet0><id>1</id><ProductID>M9519</ProductID><OriginalCatalog> Master Recipes HE</OriginalCatalog><Status>0</Status><DateTimeCreated>2014-10-20T11:48:10.373Z</DateTimeCreated></TypedPollingResultSet0></TypedPollingResultSet0>'
;WITH XMLNAMESPACES(DEFAULT 'http://schemas.microsoft.com/Sql/2008/05/TypedPolling/ModifiedProductsGet')
Select T.N.value('id[1]', 'int') as id
from @document.nodes('/TypedPollingResultSet0/TypedPollingResultSet0') as T(N)

Monday

firefox imacros scheduled task

here is how to schedule firefox for running imacros on schedule:
  1. Open Windows' Task Scheduler program and create a new basic task.
  2. For the trigger, set it daily at a certain time of your choosing.
  3. For the Action, use "Start a program", browse for your firefox.exe file (example: "C:Program Files (x86)Mozilla Firefoxfirefox.exe") and then in the "Add arguments" box, enter "imacros://run/?m=test.js".  Replace "test.js" with whatever name you used for your iMacros script. 
  4. When you're done, have your task selected and click "Run" in the right sidebar.  It will run immediately and then repeat daily at your selected time.

test smtp server with powershell

Send-MailMessage -SMTPServer smtp.domain.com -To [email protected] -From [email protected] -Subject "This is a test email" -Body ...