select * from mytable where
CONVERT(varchar(8), mydatefield, 112)=CONVERT(varchar(8), GETDATE(), 112)
more...
| Switch to Inbox. | CTRL+SHIFT+I |
| Switch to Outbox. | CTRL+SHIFT+O |
| Choose the account from which to send a message. | CTRL+TAB (with focus on the To box) and then TAB to the Accounts button |
| Check names. | CTRL+K |
| Send. | ALT+S |
| Reply to a message. | CTRL+R |
| Reply all to a message. | CTRL+SHIFT+R |
| Forward a message. | CTRL+F |
| Mark a message as not junk. | CTRL+ ALT+J |
| Display blocked external content (in a message). | CTRL+SHIFT+I |
| Post to a folder. | CTRL+ SHIFT+S |
| Apply Normal style. | CTRL+SHIFT+N |
| Check for new messages. | CTRL+M or F9 |
| Go to the previous message. | UP ARROW |
| Go to the next message. | DOWN ARROW |
| Create a new message (when in Mail). | CTRL+N |
| Create a new message (from any Outlook view). | CTRL+SHIFT+M |
| Open a received message. | CTRL+O |
| Open the Address Book. | CTRL+SHIFT+B |
| Convert an HTML or RTF message to plain text. | CTRL+SHIFT+O |
| Add a Quick Flag to an unopened message. | INSERT |
| Display the Flag for Follow Up dialog box. | CTRL+SHIFT+G |
| Mark as read. | CTRL+Q |
| Mark as unread. | CTRL+U |
| Show the menu to download pictures, change automatic download settings, or add a sender to the Safe Senders List. | CTRL+SHIFT+W |
| Find or replace. | F4 |
| Find next. | SHIFT+F4 |
| Send. | CTRL+ENTER |
| Print. | CTRL+P |
| Forward. | CTRL+F |
| Forward as attachment. | CTRL+ALT+F |
| Show the properties for the selected item. | ALT+ENTER |
| Mark for Download. | CTRL+ALT+M |
| Clear Mark for Download. | CTRL+ALT+U |
| Display Send/Receive progress. | CTRL+B (when a Send/Receive is in progress) |
<add key="ConnectionString" value="server=sql-server1\qa,1362;database=db1;user id=u1;password=MyPassword;Trusted_Connection=no"/>
public delegate void UnSafeProcedure();
public class BasePage : System.Web.UI.Page
{
public CAssertions assert= new CAssertions(); // my own assertor, produce AssertionException
public void RunSafe(UnSafeProcedure s)
{
try
{
s();
}
catch (Exception e1)
{
if (e1.GetType().FullName == "AssertionException")
{
ShowMessage(e1.Message);
}
else
{
ShowMessage("Unhandled Exception");
Debug.Write(e1.ToString());
}
}
}
// will be overwrited on actual page:
public virtual void ShowMessage(string s) { Debug.Write(s); }
}
public partial class NewEft : BasePage {
protected void SubmitButtonClick(object sender, EventArgs e) {
RunSafe(Submit);
}
private void Submit() {
AUtyl butyl = new AUtyl();
assert.IsTrue(butyl.CheckRoutingNumberByRouting(txtRoutingNumber.Text), "Routing Number is invalid");
}
public override void ShowMessage (string s ) { lblMessage.Text = s; }
}
public enum enmode
{
fee , scheduledpayment , adjustment , new1 , del , cancel , freeze
}
public enmode Mode
{
get { return (enmode) Enum.Parse(typeof (enmode), Request["m"].ToLower()); }
}
function openPopUpInCenter() {
var w1 = 400;
var h1 = 450;
var left = (screen.width / 2) - (w1 / 2);
var top = (screen.height / 2) - (h1 / 2);
window.open('AddPopup.aspx', 'add', 'top=' + top + ',left=' + left + ',width=' + w1 + ',height=' + h1 + ',location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no');
}
string clientScript = @"<script language='javascript'>
window.opener.location.reload();
window.close();
</script>";
this.Page.ClientScript.RegisterStartupScript(clientScript.GetType(),"_reload",clientScript);
<script language='javascript'>
window.opener.location.reload();
window.close();
</script>
string clientScript = @"<script language='javascript'>
alert("hello");
</script>";
this.Page.ClientScript.RegisterStartupScript(clientScript.GetType(),"hello",clientScript);
<br />
<style type="text/css">.nobrtable br { display: none }</style>
<div class="nobrtable">
| Issuer | Identifier | Card Number Length |
| Diner's Club/Carte Blanche | 300xxx-305xxx, 36xxxx, 38xxxx | 14 |
| American Express | 34xxxx, 37xxxx | 15 |
| VISA | 4xxxxx | 13, 16 |
| MasterCard | 51xxxx-55xxxx | 16 |
| Discover | 6011xx | 16 |
| first digit | Issuer Category |
| 0 | ISO/TC 68 and other industry assignments |
| 1 | Airlines |
| 2 | Airlines and other industry assignments |
| 3 | Travel and entertainment |
| 4 | Banking and financial |
| 5 | Banking and financial |
| 6 | Merchandizing and banking |
| 7 | Petroleum |
| 8 | Telecommunications and other industry assignments |
| 9 | National assignment |
<html>
<head>
<link rel="stylesheet" href="./styles/smoothness/jquery-ui-1.7.2.custom.css" type="text/css" media="screen" />
<script type="text/javascript" src="./scripts/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="./scripts/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript">
$(function() {
$(' .diag').click(function(e) {
e.preventDefault();
var $this = $(this);
var horizontalPadding = 30;
var verticalPadding = 30;
$('<iframe id="externalSite" class="externalSite" src="' + this.href + '" />').dialog({
title: ($this.attr('title')) ? $this.attr('title') : 'External Site',
autoOpen: true,
width: 800,
height: 500,
modal: true,
resizable: true,
autoResize: true,
overlay: {
opacity: 0.5,
background: "black"
}
}).width(800 - horizontalPadding).height(500 - verticalPadding);
});
});
</script>
</head>
<body>
<ul>
<li><a href="http://www.google.com" class ='diag' title="Google Dialog">Google</a></li>
</ul>
</body>
</html>
protected override void OnPreRender(EventArgs e)
{
ddBerechnung.Attributes.Add("onChange", "ShowHidePercentField(this)");
}
function ShowHidePercentField(cb){
var selIdx = cb.selectedIndex;
var newSel = cb.options[selIdx].text;
var textBox=document.getElementById('<%=txtBerechnung.ClientID%>');
var Runden= document.getElementById('<%=ddRunden.ClientID%>');
var RundenSpan= document.getElementById('RundenSpan');
if (trim(newSel)=='identisch'){ ///
textBox.style.display="none";
Runden.style.display="none";
RundenSpan.style.display="none";
}else{
textBox.style.display="";
Runden.style.display="";
RundenSpan.style.display="";
}
}
///.... at the end of control
<script language='javascript'>
var elem=document.getElementById('<%=ddBerechnung.ClientID%>')
ShowHidePercentField(elem);
</script>
select CEILING(50/100.0) , CEILING(50/100)
----
1,0
<asp:PlaceHolder ID="DynamicPlaceHolder" runat="server"></asp:PlaceHolder>
protected override void OnPreRender(EventArgs e)
{
HtmlTable mainHtmlTable = new HtmlTable();
HtmlTableRow helpTableRow = AddLabelRow(mainHtmlTableRow.Cells.Count, "Hello World",true);
mainHtmlTable.Rows.Add(helpTableRow);
DynamicPlaceHolder.Controls.Add(mainHtmlTable);
}
public HtmlTableRow AddLabelRow(int cellCount, string text,bool applySkin)
{
HtmlTableRow helpTableRow = new HtmlTableRow();
HtmlTableCell helpTableCell = new HtmlTableCell();
//helpTableCell.Attributes.Add("style", "border: solid 2px; border-color: Blue;");
helpTableCell.ColSpan = cellCount;
Label helpLabel = new Label();
if (applySkin) helpLabel.SkinID = "labelBoldSkin";
helpLabel.Text = "<br>"+text;
helpTableCell.Controls.Add(helpLabel);
helpTableRow.Cells.Add(helpTableCell);
return helpTableRow;
}
helpLabel.Attributes.Add("style", "font-weight:bold");
helpTableRow.Attributes.Add("style", "color:red;");
public static class DateTimeExtensions
{
public static DateTime StartOfWeek(this DateTime dt, DayOfWeek startOfWeek)
{
int diff = dt.DayOfWeek - startOfWeek;
if (diff < 0)
{
diff += 7;
}
return dt.AddDays(-1 * diff).Date;
}
}
dateFrom.Value = DateTime.Now.StartOfWeek(DayOfWeek.Sunday);
public DataTable CopyData(DataTable indata, Hashtable fields)
{
DataTable ret = new DataTable();
foreach (string k in fields.Keys)
{
ret.Columns.Add((string)fields[k], indata.Columns[k].DataType);
}
foreach (DataRow row in indata.Rows)
{
DataRow dr = ret.NewRow();
foreach (string k in fields.Keys)
{
dr[(string)fields[k]] = String.Format("{0}", row[k]);
}
ret.Rows.Add(dr);
}
return ret;
}
Hashtable fieldsMap= new Hashtable()
{
{"[Measures].[Week]","Week"},
{"[Measures].[Month]","Month"},
{"[Measures].[Quarter]","Quarter"},
{"[Measures].[Year]","Year"},
};
// call copy data procedure
DataTable result = CopyData(OriginaldataTable, fieldsMap);
DataTable table = new DataTable("MyTable");
Type str = System.Type.GetType("System.String");
table.Columns.Add("Checbox", System.Type.GetType("System.Boolean"));
table.Columns.Add("String1", str);
table.Columns.Add("String2",str);
table.Columns.Add("Decimal", 0.0.GetType());
private DataTable CreateTable()
{
DataTable table = new DataTable("Report");
Type str = System.Type.GetType("System.String");
table.Columns.Add("chk1", System.Type.GetType("System.Boolean"));
table.Columns.Add("From", str);
table.Columns.Add("To",str);
table.Columns.Add("Hours", 0.0.GetType());
table.Columns.Add("Desc", str);
return table;
}
// below is procedure for filling table with data
private void ProcessReport()
{
xreport = XDocument.Load(ReportFile.Text);
var header = (from head in xreport.Elements("Journal").Elements("Header")
select head).First();
Rate.Text= header.Attribute("Rate").Value;
var entries = from entri in xreport.Elements("Journal").Elements("Entry")
select entri;
DataTable dataTable = CreateTable();
foreach (var element in entries)
{
DataRow dr = dataTable.NewRow();
dr["From"] = element.Attribute("StartTimeStamp").Value;
dr["To"] = element.Attribute("EndTimeStamp").Value;
dataTable.Rows.Add(dr);
}
Grid.DataSource = dataTable;
}
public static string ReadFile(string f){
System.IO.StreamReader file = new System.IO.StreamReader(f);
string testxmldata = file.ReadToEnd(); file.Close();
return testxmldata;
}
public void WriteIntoFile(string path,string m) {
if (!File.Exists(path)) {
// Create a file to write to.
using (StreamWriter sw = File.CreateText(path)) {
sw.WriteLine(m);
}
}
else {
// This text is always added, making the file longer over time
// if it is not deleted.
using (StreamWriter sw = File.AppendText(path)) {
sw.WriteLine(m);
}
}
}
SqlCommand sqlCmd = new SqlCommand(sqlStatment, dbConn);
sqlCmd.Parameters.AddWithValue("@Name", name);
sqlCmd.Parameters.AddWithValue("@Surname", surname);
foreach (SqlParameter Parameter in sqlCmd.Parameters)
{
if (Parameter.Value == null)
{
Parameter.Value = DBNull.Value;
}
}
class MediaPlayer
{
System.Media.SoundPlayer soundPlayer;
public MediaPlayer(byte[] buffer)
{
MemoryStream memoryStream = new MemoryStream(buffer, true);
soundPlayer = new System.Media.SoundPlayer(memoryStream);
}
public void Play() {soundPlayer.Play();}
public void Play(byte[] buffer)
{
soundPlayer.Stream.Seek(0, SeekOrigin.Begin);
soundPlayer.Stream.Write(buffer, 0, buffer.Length);
soundPlayer.Play();
}
}
private void PlayMyFile()
{
string file1 = @"c:\sample.wav";
List<byte> soundBytes = new List<byte>(File.ReadAllBytes(file1));
//create media player loading the first half of the sound file
MediaPlayer mPlayer = new MediaPlayer(soundBytes.ToArray());
//begin playing the file
mPlayer.Play();
}
using System;
using System.Collections;
using System.Collections.Generic;
namespace Business.Web.Models {
public class DtoMapper {
// this is generic method replacing non-generic metod
// InvoiceDto_OLD provided in source below
public List<T2> Transform<T1,T2>(List<T1> i, Func<T1,T2> del)
{
List<T2> ret = new List<T2>();
foreach (T1 val in i) {
ret.Add(del(val));
}
return ret;
}
// generic method can be called as follows:
public List<InvoiceDto> InvoiceDto(List<Invoice> i) {
return Transform<Invoice,InvoiceDto> (i.ToList(),l=>new InvoiceDto(l));
}
// this is sample of old non-generic method
public List<InvoiceDto> InvoiceDto_OLD(List<Invoice> i) {
List<InvoiceDto> ret = new List<InvoiceDto>();
foreach (Invoice invoice in i) {
ret.Add(new InvoiceDto(invoice) );
}
return ret;
}
}
}
package com.test2;
import android.app.Activity;
import android.os.Bundle;
public class MainActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
@Override
protected void onStart() {
// TODO Auto-generated method stub
super.onStart();
android.webkit.WebView wv =
(android.webkit.WebView)this.findViewById(R.id.WebView01);
wv.loadUrl("http://sourcefield.blogspot.com");
}
}
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
SetKeyDelay, 75, 75
;Exits AutoHotKey application.
$^CapsLock::
ExitApp
return
;Pauses AutoHotKey Script.
F6::Pause, Toggle, 1
$x::
Loop {
MouseClick
sleep 10
}
[TestFixture]
public class test
{
[Test]
public void XPathTest()
XmlDocument doc = new XmlDocument();
doc.Load(@"c:\LinqObjects.xsd");
foreach (XmlNode node in doc.DocumentElement.ChildNodes)
{
ProcesNode(node, doc.DocumentElement.Name);
}
}
private void ProcesNode(XmlNode node, string parentPath)
{
if (!node.HasChildNodes || ((node.ChildNodes.Count == 1) && (node.FirstChild is System.Xml.XmlText)))
{
if (node.Name == "Parameter")
{
//System.Diagnostics.Debug.WriteLine(parentPath + "/" + node.Name);
}
}
else
{
foreach (XmlNode child in node.ChildNodes)
{
ProcesNode(child, parentPath + "/" + node.Name);
}
}
}
}
private void testRunToolStripMenuItem_Click(object sender, EventArgs e)
{
List<string> ls = new List<string>();
RunPowershellScript(@"c:\Program Files\Microsoft Transporter Tools\PassCh.ps1",ls);
//log("script complete");
}
private static void RunPowershellScript(string scriptFile, List<string> parameters)
{
// Validate parameters
if (string.IsNullOrEmpty(scriptFile)) { throw new ArgumentNullException("scriptFile"); }
if (parameters == null) { throw new ArgumentNullException("parameters"); }
RunspaceConfiguration runspaceConfiguration = RunspaceConfiguration.Create();
PSSnapInException ex;
runspaceConfiguration.AddPSSnapIn("Microsoft.Exchange.Transporter",out ex);
using (Runspace runspace = RunspaceFactory.CreateRunspace(runspaceConfiguration))
{
runspace.Open();
RunspaceInvoke scriptInvoker = new RunspaceInvoke(runspace);
scriptInvoker.Invoke("Set-ExecutionPolicy Unrestricted");
Pipeline pipeline = runspace.CreatePipeline();
Command scriptCommand = new Command(scriptFile);
Collection<CommandParameter> commandParameters = new Collection<CommandParameter>();
foreach (string scriptParameter in parameters)
{
CommandParameter commandParm = new CommandParameter(null, scriptParameter);
commandParameters.Add(commandParm);
scriptCommand.Parameters.Add(commandParm);
}
pipeline.Commands.Add(scriptCommand);
Collection<PSObject> psObjects;
psObjects = pipeline.Invoke();
}
}
Sub AssignCategoryAndMoveBasedOnSubject(Item As Outlook.MailItem)
If InStr(1, Item.Subject, "error") > 0 Then
Item.Categories = "Error"
Item.Subject = "Error:" + Item.Subject
Item.Save
Set myNameSpace = GetNamespace("MAPI")
Set myInBox = myNameSpace.GetDefaultFolder(olFolderInbox)
Set mydestFolder = FindOrCreateFolder(myInBox, "Text")
Item.Move mydestFolder
End If
End Sub
Function FindOrCreateFolder(inputFolder As Variant, folderName As String) As Outlook.MAPIFolder
Dim curFolder As Outlook.MAPIFolder
For Each curFolder In inputFolder.Folders
If folderName = curFolder.Name Then
Set FindOrCreateFolder = curFolder
Exit Function
End If
Next curFolder
Set FindOrCreateFolder = inputFolder.Folders.Add(folderName)
End Function
'Access SQL server from oputlook
Sub AccessSQLServer(Item As Outlook.MailItem)
Set con = CreateObject("ADODB.Connection")
con.Open "driver={SQL Server};Uid=sa;server=myserv;pwd=mypass;database=mydb;"
Set rs = CreateObject("ADODB.Recordset")
rs.ActiveConnection = con
rs.Open "SELECT * FROM MyTable"
Do While Not rs.EOF
MsgBox rs("id")
rs.MoveNext
Loop
End Sub
/// <summary>
/// Emails addresses creating.
/// </summary>
/// <param name="incom">The incoming array</param>
/// <returns></returns>
private EmailAddressType[] EmailAddressCreate(string[] incom) {
if (incom == null) return null;
EmailAddressType[] ret = new EmailAddressType[incom.Length];
EmailAddressType[] rt;
int i = 0;
foreach (string s in incom) {
if (!string.IsNullOrEmpty(s))
{
ret[i] = new EmailAddressType();
ret[i].EmailAddress = s;
i++;
}
}
// change size of array
if (i < incom.Length)
{
rt = new EmailAddressType[incom.Length];
Array.Copy(rt, ret, i);
}else
{
rt=ret;
}
return rt;
}
<form id="form1" runat="server">
Please upload file:<br />
<asp:Literal ID="lit_Status" runat="server" /><br />
<b>Name:</b>
<asp:TextBox ID="FileName" runat="server" />
<br />
<b>File:</b>
<asp:FileUpload ID="FileToUpload" runat="server" />
<br />
<asp:Button ID="btn_Upload" runat="server" Text="Upload" onclick="btn_Upload_Click" />
</form>
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Data.SqlClient;
using System.Configuration;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btn_Upload_Click(object sender, EventArgs e)
{
if (FileToUpload.PostedFile == null || String.IsNullOrEmpty(FileToUpload.PostedFile.FileName) || FileToUpload.PostedFile.InputStream == null)
{
lit_Status.Text = "
Error - unable to upload file. Please try again.
";
}
else
{
using (SqlConnection Conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
{
try
{
const string SQL = "INSERT INTO [BinaryTable] ([FileName], [DateTimeUploaded], [MIME], [BinaryData]) VALUES (@FileName, @DateTimeUploaded, @MIME, @BinaryData)";
SqlCommand cmd = new SqlCommand(SQL, Conn);
cmd.Parameters.AddWithValue("@FileName", FileName.Text.Trim());
cmd.Parameters.AddWithValue("@MIME", FileToUpload.PostedFile.ContentType);
byte[] imageBytes = new byte[FileToUpload.PostedFile.InputStream.Length + 1];
FileToUpload.PostedFile.InputStream.Read(imageBytes, 0, imageBytes.Length);
cmd.Parameters.AddWithValue("@BinaryData", imageBytes);
cmd.Parameters.AddWithValue("@DateTimeUploaded", DateTime.Now);
Conn.Open();
cmd.ExecuteNonQuery();
lit_Status.Text = "
File successfully uploaded - thank you.
";
Conn.Close();
}
catch
{
Conn.Close();
}
}
}
}
}
CREATE TABLE [cmp].[tblCMPEmailAttachements](
[AttachmentID] [int] IDENTITY(1,1) NOT NULL,
[EmailID] [int] NOT NULL,
[FileName] [nvarchar](50) NULL,
[CreatedDate] [datetime] NULL,
[FileBody] [varbinary](max) NULL
) ON [PRIMARY]
Declare @attID int
Insert into cmp.tblCMPEmailAttachements (EmailID,FileName,CreatedDate) values (1,'1.gif',GETDATE())
SET @attID = SCOPE_IDENTITY();
update cmp.tblCMPEmailAttachements set
[FileBody] = (SELECT * FROM OPENROWSET(BULK 'C:\1.gif', SINGLE_BLOB)AS [FileBody] ) WHERE AttachmentID=@attID
da< - Delete the HTML tag the cursor is currently inside of the whole tag, regardless of just where the cursor is.
ci" -Change the content of a doublequote-delimited string.
da[ - Delete the [] region around your cursor
vi' - Visual select everything inside '' string
ya( - Yank all text from ( to )
See :help text-objects.
:e! - Reopen the current file, getting rid of any unsaved changes
gg=G - AMAZING If you're coding, gg will bring you to the top of the file, and =G will auto indent (=) everything to the bottom of the file (G)
gq - reset the entire selection to be wrapped correctly.
=% - Indents the block between two braces/#ifdefs
== - Indents current line
d% - delete till parrent - cursor can be not on opening tag
ft - move to the next occurrence of t and
tt - to move to the char before t
Macros are stored in registers, these are the same registers that can be used
for copy paste. So say you record a macro to register q you can paste it into a
document with "qp, edit it, then select it and cut it back into the register
with "qd.
0 - реклама. Для вас ничего не поменяется.
I - LC. Для вас ничего не меняется, кроме возможности продления H-1 за пределы 6 лет.
II - I-140 - Аналогично но начинаете указывать им намерения в анкете ну и по прежнему можете продлевать H-1. Если 140 аппрувлена но категория EB-3 (бакалавр) то продлевать можете сразу на 3 года за пределы 6-ти лет
III - I-485 (+ AP + EAD) - получаете нормальный документ для выезда (AP) и нормальный документ для внутренних нужд (EAD). Жена и дети получают возможность работать и иметь SSN.
III + 6 месяцев - можно менять работу.
ГК - не нужно больше суетиться и дети могут получать федеральную помошь на учебу и федеральные кредиты на учебу.
Если категория визы EB-2 или EB-1 то стадии II и III файлятся (все еще?) одновременно. Если EB-3 то между ними будет года 3 ожидания (все у того же работодателя и на визе).
Все правильно кроме, пожалуй, последнего. Время между непредсказуемо в случае Еб-3 - сейчас срок 7 лет исходя из бюллетеня, данные УСЦИС неполные и противоречивые, бэклог они посчитать не могут.
Дело в том, что начиная с 2006 года примерно поток EB-3 резко иссяк. И движение по оным годам будет очень нелинейным. Хотя... полный срок плавал от 2 до 5-ти лет, исходя из этого - срок по EB-3 вряд ли уедет за больше 6 - 7 лет (причем этот срок считается с подачи LC а не с подачи I-140, то есть если сейчас начнут, то и срок начнет отсчитываться), и вряд ли станет меньше 2 - 3 лет (сразу толпы набегут)...
The changelist remembers the position of every change that can be undone.
You can move back and forwards through the changelist using the commands:
g;
g,
You can view the contents of the changelist by running the command:
:changes
Vim also maintains a jumplist,
remembering each position to which the cursor jumped, rather than scrolled.
You can move backwards and forwards through the jumplist with the commands:
ctrl-O
ctrl-I
You can view the contents of the jumplist by issuing the command:
:jumps
you can follow the keyword under the cursor with the command (ctags required):
ctrl-]
see also:
* :help changelist
* :help :changes
* :help jumplist
* :help :jumps
* :help jump-motions
mplayer.exe -cache 1024 -speed 1.66 %1
SET /P ANSWER=Do you want to delete %1 file (Y/N)?
echo You chose: %ANSWER%
if /i {%ANSWER%}=={y} (goto :yes)
if /i {%ANSWER%}=={yes} (goto :yes)
goto :no
:yes
rm -f %1
exit /b 0
:no
echo file wasn't deleted
exit /b 1
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="EventUserControl.ascx.cs" Inherits="EventUserControl" %>
Page title:
<asp:TextBox runat="server" ID="txtPageTitle" />
<asp:Button runat="server" ID="btnUpdatePageTitle" OnClick="btnUpdatePageTitle_Click" Text="Update" />
public partial class EventUserControl : System.Web.UI.UserControl
{
private string pageTitle;
public event EventHandler PageTitleUpdated;
protected void btnUpdatePageTitle_Click(object sender, EventArgs e)
{
this.pageTitle = txtPageTitle.Text;
if(PageTitleUpdated != null)
PageTitleUpdated(this, EventArgs.Empty);
}
public string PageTitle
{
get { return pageTitle; }
}
}
<%@ Register TagPrefix="My" TagName="EventUserControl" Src="~/EventUserControl.ascx" %>
<My:EventUserControl runat="server" ID="MyEventUserControl" OnPageTitleUpdated="MyEventUserControl_PageTitleUpdated" />
protected void MyEventUserControl_PageTitleUpdated(object sender, EventArgs e)
{
this.Title = MyEventUserControl.PageTitle;
}
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Web.Script.Services
Imports WebControlLibrary
Imports Ubill.Business
Imports System.ComponentModel
<System.Web.Services.WebService(Namespace:="http://tempuri.org/")> _
<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<ToolboxItem(False)> <System.Web.Script.Services.ScriptService()> _
Public Class AtlasHub
Inherits System.Web.Services.WebService
<WebMethod(True)> _
Public Function AdvanceCustomerDelete(ByVal CustomerID As String) As String
Return cachefactory.AdvanceCustomerDelete(CustomerID)
End Function
End Class
<asp:ScriptManager runat="server" ID="scriptManagerId">
<Scripts>
<asp:ScriptReference Path="~/common/AtlasHub.js" />
</Scripts>
<Services>
<asp:ServiceReference Path="~/common/AtlasHub.asmx " />
</Services>
</asp:ScriptManager>
// Business functions
// // -------------------------------------------
function AdvanceCustomerDelete( customerID , onSuccessAdvanceCustomerDelete){
YouBillWeb.AtlasHub.AdvanceCustomerDelete(customerID,onSuccessAdvanceCustomerDelete,onTimeOut,onFailed);
}
// Maintenance functions
// -------------------------------------------
// This is the callback function invoked if the Web service
// succeeded.
// It accepts the result object, the user context, and the
// calling method name as parameters.
function OnSucceededWithContext(result, userContext, methodName)
{
var output;
// Page element to display feedback.
var RsltElem = document.getElementById("ResultId");
var readResult;
if (userContext == "XmlDocument")
{
if (document.all)
readResult =
result.documentElement.firstChild.text;
else
// Firefox
readResult =
result.documentElement.firstChild.textContent;
RsltElem.innerHTML = "XmlDocument content: " + readResult;
}
}
// This is the callback function invoked if the Web service
// succeeded.
// It accepts the result object as a parameter.
function onSuccess(result, eventArgs)
{
// Page element to display feedback.
var RsltElem = document.getElementById("ResultId");
RsltElem.innerHTML = result;
}
function OnSucceeded(result, eventArgs)
{
// Page element to display feedback.
var RsltElem = document.getElementById("ResultId");
RsltElem.innerHTML = result;
}
// This is the callback function invoked if the Web service
// failed.
// It accepts the error object as a parameter.
function onFailed(error)
{
// Display the error.
var RsltElem = document.getElementById("ResultId");
RsltElem.innerHTML =
"Service Error: " + error.get_message();
}
function onTimeOut(error)
{
// Display the error.
var RsltElem = document.getElementById("ResultId");
RsltElem.innerHTML =
"Service Error: " + error.get_message();
}
if (typeof(Sys) !== "undefined") Sys.Application.notifyScriptLoaded();
import urllib
import time
import sys
import string
f = urllib.urlopen('http://my-user-name:-mypass@dynupdate.no-ip.com/nic/update?hostname=myhost.no-ip.org')
sug = f.read()
f.close()
print sug
to make ubuntu business casual - make it black remove background: gsettings set org.gnome.desktop.background picture-options ...