rt = Regex.Replace(rt,"[\x01-\x1F]", "");
more...
def CheckKey(self,k3y):
return "select count (*) as cnt from %s where k3y='%s'" % (self.cfg.get('dbset','waTable') , k3y)
SELECT o.name AS TableName, c.name AS ColumName
FROM syscolumns c JOIN sysobjects o
ON c.id = o.id
WHERE c.name like '%account%'
ORDER BY o.name, c.name
abstract public class AbstractXMLObject
{
public string XML
{
get
{
XmlSerializer xmlSerializer = new XmlSerializer(this.GetType());
StringWriter stringWriter = new StringWriter();
xmlSerializer.Serialize(stringWriter,this);
return stringWriter.ToString();
}
set
{
XmlSerializer xmlSerializer = new XmlSerializer(this.GetType());
StringReader stringReader = new StringReader(value);
this = xmlSerializer.Deserialize(stringReader);
}
}
}
0.Create MultiThreadArgument class and add all parameters for thread starting
public class MultiThreadArgument {
public MerchantBase merchant;
public TransactionCollection transactionCollection;
public string email;
}
1.Thread starter in main thread class (thread class):
private void ThreadStarter(MerchantBase m, TransactionCollection c,string email){
if (c.Count > 0) {
Thread th = new Thread(new ParameterizedThreadStart(ThreadWorker));
// create class parameters :
MultiThreadArgument ma = new MultiThreadArgument();
ma.merchant = m;
ma.transactionCollection = c;
ma.email = email;
th.IsBackground = true;
th.Start(ma);
}
}
2.Thread worker in main class:
private void ThreadWorker(Object o) {
MultiThreadArgument ma = (MultiThreadArgument)o;
DateTime st = DateTime.Now;
string mid = ma.merchant.ID.ToString();
Logger.prn("*** Processing started for merchant #", mid , "transactions - ", ma.transactionCollection.Count.ToString());
ma.merchant.ProcessRequest(ma.transactionCollection, this);
.....
}
string[] newarr = new string[oldarr.Length + 1];
oldarr.CopyTo(newarr, 0);
newarr[newarr.Length-1] = "new element";
return newarr;
string file_extention;
string file_name;
file_name=Path.GetFileName(this.mffFileName);
file_extention = Path.GetExtension(this.mffFileName);
[ws][-]{ d | [d.]hh:mm[:ss[.ff]] }[ws]
| Item | Description |
|---|---|
| ws | optional white space |
| "-" | optional minus sign indicating a negative TimeSpan |
| d | days, ranging from 0 to 10675199 |
| hh | hours, ranging from 0 to 23 |
| mm | minutes, ranging from 0 to 59 |
| ss | optional seconds, ranging from 0 to 59 |
| ff | optional fractional seconds, consisting of 1 to 7 decimal digits |
The components of s must collectively specify a time interval greater than or equal to MinValue and less than or equal to MaxValue.
1 public static implicit operator bool(Result p){
2 return p.Status == enResultStatus.OK;
3 }
4
5 private const string of = "\nResult:\n\tstatus:{0}\n\tdesc:{1}\n\tMsg:{2}\n\tException:{3}\n\tval:{4}\n\tSuggested:{5}";
6 public static implicit operator string(Result p) {
7 return String.Format(of, p.Status , p.Description, p.UserFriendlyErrorMsg,p.ExeptionHappend,p.Value,p.SuggestedValue);
8 }
15 Result res;
16 if (res) {
17 Debug.WriteLine("Dump of result object :"+res )
18 }
// sorting class
public class InvoiceSorterbyDueDate : System.Collections.Generic.IComparer<BaseObject>
{
#region IComparer<Invoice> Members
public int Compare(BaseObject x, BaseObject y){
return ((Invoice)x).DueDate.CompareTo(((Invoice)y).DueDate);
}
#endregion
}
//call
IComparer<BaseObject> ins = new InvoiceSorterbyDueDate();
p.InvoiceCollectionToCheck.Sort(ins);
//
1 import timemore...
2 timestring = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time()))
var dbgwin;
dbgwin=window.open("", "Debug", "left=0,top=0,width=300,height=700,scrollbars=yes," +"status=yes,resizable=yes");
function log(msg){
dbgwin.document.write("<br>"+msg);
}
log('Started');
>tracerpt /?
Microsoft TraceRpt.Exe (5.1.2600.2180)
Microsoft Corporation. All rights reserved.
Tracerpt processes binary Event Trace Session log files or real-time streams from instrumented Event Trace providers and creates a report or
a text (CSV) file describing the events generated.
Usage:
tracerpt { <filename [filename ...]> | -rt <session_name [session_name ...]> } [options]
Parameters:
<filename [filename ...]> Event Trace log file to process.
Options:
-? Displays context sensitive help.
-o [filename] Text (CSV) output file. Default is dumpfile.csv.
-summary [filename] Summary report text file (CSV) file. Default is summary.txt.
-report [filename] Text output report file. Default is workload.txt.
-rt <session_name [session_name ...]> Real-time Event Trace Session data source.
-config <filename> Settings file containing command options.
-y Answer yes to all questions without prompting.
Examples:
tracerpt logfile1.etl logfile2.etl -o -report
tracerpt logfile.etl -o logdmp.csv -summary logdmp.txt -report logrpt.txt
tracerpt -rt EVENT_SESSION_1 EVENT_SESSION_2 -o logfile.csv
Private responseHash As NameValueCollection = New NameValueCollection()
responseHash = HttpUtility.ParseQueryString(ServerRersponse)
'than use it as usual
responseHash("MErrMsg")
var qsParm = new Array();
function qs() {
var query = window.location.search.substring(1);
var parms = query.split('&');
for (var i=0; i<parms.length; i++) {
var pos = parms[i].indexOf('=');
if (pos > 0) {
var key = parms[i].substring(0,pos);
var val = parms[i].substring(pos+1);
qsParm[key] = val;
}
}
}
<style type="text/css">
<!--
.Statement { color: #a0ffa0; }
.Comment { color: #507080; }
.StorageClass { color: #a0a0ff; background-color: #103040; }
.Type { color: #a0a0ff; }
.Conditional { color: #a0ffa0; background-color: #103040; }
.Constant { color: #00cdcd; background-color: #103040; }
.pre { font-family: monospace; color: #e0eee0; background-color: #103040; }
.code { font-family: monospace; color: #e0eee0; background-color: #103040; }
-->
</style>
//0.define delegate:
public delegate void ToolBarClick(string command);
//1. in control declare instance:
public ToolBarClick Click;
//and raiser:
protected void rpt_ToolBarAction_ItemCommand(object source, RepeaterCommandEventArgs e){
if (Click!=null){
Click(e.CommandArgument.ToString());
}
}
//2. On page add handler:
protected void Page_Load(object sender, EventArgs e)
{
ToolBar1.Click = new ToolBarClick(ToolBar_Click);
//and event function:
protected void ToolBar_Click(string s)
{
23 abstract public class AbstractXMLObject
24 {25 public string XML
26 {27 get
28 {29 XmlSerializer xmlSerializer = new XmlSerializer(this.GetType());
30 StringWriter stringWriter = new StringWriter();
31 xmlSerializer.Serialize(stringWriter, this);
32 return stringWriter.ToString();
33 }34 set
35 {36 XmlSerializer xmlSerializer = new XmlSerializer(this.GetType());
37 StringReader stringReader = new StringReader(value);
38 this = xmlSerializer.Deserialize(stringReader);
39 } 40 } 41 }24 string ready= (String.Format("{0}", str));
25 Stream s = new MemoryStream(ASCIIEncoding.Default.GetBytes(ready));
26 DataSet ds = new DataSet();
27 ds.ReadXml(s);to make ubuntu business casual - make it black remove background: gsettings set org.gnome.desktop.background picture-options ...