quinta-feira, 19 de setembro de 2013
ITILV3 - Day 39
ITIL Service Lifecycle
The ITIL Service Lifecycle is a public framework and standard that defines the five stages that service goes through during its life -
Service Strategy,
Service Design,
Service Transition,
Service Operation,
and Continual Service Improvement.
All five stages of the ITIL Service Lifecycle are focused on the value the IT services deliver.
Value is the heart of the service concept. A service should always deliver Value to customers.
terça-feira, 17 de setembro de 2013
Retrieving data using LINQ, creating and populating object at the same time
Hi!
I found this way of create and populate object and, at the same time, retrieve data using LINQ.
public CustomerModel find(string id)
{
DataClasses1DataContext lObjDC = new DataClasses1DataContext();
var varCustomerModel = lObjDC.Customers.Where(x => x.CustomerID == id).Select(p => new CustomerModel(p.CustomerID, p.CompanyName)).Single();
return varCustomerModel;
}
I found this way of create and populate object and, at the same time, retrieve data using LINQ.
public CustomerModel find(string id)
{
DataClasses1DataContext lObjDC = new DataClasses1DataContext();
var varCustomerModel = lObjDC.Customers.Where(x => x.CustomerID == id).Select(p => new CustomerModel(p.CustomerID, p.CompanyName)).Single();
return varCustomerModel;
}
Insert using LINQ
This is a method from a project I'm currently working at.
public bool insert(string id, string companyName)
{
DataClasses1DataContext lObjDC = new DataClasses1DataContext();
int lCount = lObjDC.Customers.Where(x => x.CustomerID == id).Count();
//If customer doesn't exist.
if (lCount == 0)
{
Customer lObjCTM = new Customer();
lObjCTM.CustomerID = id;
lObjCTM.CompanyName = companyName;
lObjDC.Customers.InsertOnSubmit(lObjCTM);
lObjDC.SubmitChanges();
return true;
}
return false;
}
PS: I should have written an exist method instead of using Count() inside the insert method.
Update using LINQ
Hi!
This is a method from a project I'm currently working at.
public void update(string id, string companyName)
{
DataClasses1DataContext lObjDC = new DataClasses1DataContext();
var lObjCustomer = lObjDC.Customers.Where(x => x.CustomerID == id).Single();
lObjCustomer.CompanyName = companyName;
lObjCustomer.CustomerID = id;
lObjDC.SubmitChanges();
}
This is a method from a project I'm currently working at.
public void update(string id, string companyName)
{
DataClasses1DataContext lObjDC = new DataClasses1DataContext();
var lObjCustomer = lObjDC.Customers.Where(x => x.CustomerID == id).Single();
lObjCustomer.CompanyName = companyName;
lObjCustomer.CustomerID = id;
lObjDC.SubmitChanges();
}
terça-feira, 3 de setembro de 2013
FTP DOS
If you are using windows as an OS you probably have the ftp (file transfer protocol) available for you to use.
How to access it via DOS?
Very simple.
1 - Go to the start window and type cmd
2 - At the DOS prompt type ftp
3 - Open [the ip address of the other computer you want to access]
4 - Type the user
5 - Type the password
6 - You're logged in.
The commands
! delete literal prompt send
? debug ls put status
append dir mdelete pwd trace
ascii disconnect mdir quit type
bell get mget quote user
binary glob mkdir recv verbose
bye hash mls remotehelp
cd help mput rename
close lcd open rmdir
How to access it via DOS?
Very simple.
1 - Go to the start window and type cmd
2 - At the DOS prompt type ftp
3 - Open [the ip address of the other computer you want to access]
4 - Type the user
5 - Type the password
6 - You're logged in.
The commands
! delete literal prompt send
? debug ls put status
append dir mdelete pwd trace
ascii disconnect mdir quit type
bell get mget quote user
binary glob mkdir recv verbose
bye hash mls remotehelp
cd help mput rename
close lcd open rmdir
segunda-feira, 2 de setembro de 2013
ITILV3 - Day 38
IT Service Continuity Management (ITSCM)
IT Service Continuity strategy is based on:
1. Risk assessment
2. Business continuity strategy
3. Business Impact Analysis
ITSCM analyzes and controls the risks that could affect IT Services
A risk is a possibility that something bad might happen as a result of something else happening.
Example: If I build a an oceanfront house, there is a risk that a hurricane could destroy it.
Risk Management ensures that:
1 - Operations continue after a major event. (An earthquake?)
2 - Assets (information, facilities and building) are protected.
3 - Workplace is safe for emplyees and customers.
Some times it seems to me that ITIL says, over and over again, the same thing, only changing the order of the words.
quinta-feira, 29 de agosto de 2013
Format of dates ISO 8601 translated to C#
Formatos ISO 8601 (inclui Atom)
yyyy-MM-ddTHH:mm:ss.SSSZ
yyyy-MM-ddTHH:mm:ss.SSS
yyyy-MM-ddTHH:mm:ssZ
yyyy-MM-ddTHH:mm:ss
yyyy-MM-ddTHH:mmZ
yyyy-MM-ddTHH:mm
yyyy-MM-dd
yyyy-MM
yyyy
Translate to C#
yyyy-MM-ddTHH:mm:ss.fffz
yyyy-MM-ddTHH:mm:ss.fff
yyyy-MM-ddTHH:mm:ssz
yyyy-MM-ddTHH:mm:ss
yyyy-MM-ddTHH:mmz
yyyy-MM-ddTHH:mm
yyyy-MM-dd
yyyy-MM
yyyy
yyyy
The year shown in 4 digits. For example: 2008.
MM
The month shown in 2 digits. For example, appear as of April 04. If the month is not given, the default is the first month of the year (01).
dd
The day, shown in 2 digits. For example, appear as new day 09. If the day is not given, the default is the first day of the month (01).
T
Designates the beginning of the time component of the representation date / time. If the time is not given, it defaults to 00:00:00.000.
HH
The time shown in 2 digits. For example, 1 pm appear to 13. If the time is not provided, the default is 00.
mm
The minutes, shown in 2 digits. For example, 15. If the minute is not provided, the default is 00.
ss
The second, shown in 2 digits. For example, 49. If seconds are not provided, the default is 00.
SSS (for C# fff)
Milliseconds, shown in 3 digits. For example, 555. If milliseconds are not provided, the default is 000.
Z (for C# z)
The assignment for the time zone Zulu, which is the allocation and military aviation for GMT (Greenwich Mean Time).
With ISO 8601, the time zone can also be expressed as moving to plus (+) or minus (-) from time Coordinated Universal Time (UTC) or GMT. For example: 2008-04-13T17 :25:55.123-08: 00. If the time zone is not provided, the default is the time zone in which the JVM is running MashupHub.
yyyy-MM-ddTHH:mm:ss.SSSZ
yyyy-MM-ddTHH:mm:ss.SSS
yyyy-MM-ddTHH:mm:ssZ
yyyy-MM-ddTHH:mm:ss
yyyy-MM-ddTHH:mmZ
yyyy-MM-ddTHH:mm
yyyy-MM-dd
yyyy-MM
yyyy
Translate to C#
yyyy-MM-ddTHH:mm:ss.fffz
yyyy-MM-ddTHH:mm:ss.fff
yyyy-MM-ddTHH:mm:ssz
yyyy-MM-ddTHH:mm:ss
yyyy-MM-ddTHH:mmz
yyyy-MM-ddTHH:mm
yyyy-MM-dd
yyyy-MM
yyyy
yyyy
The year shown in 4 digits. For example: 2008.
MM
The month shown in 2 digits. For example, appear as of April 04. If the month is not given, the default is the first month of the year (01).
dd
The day, shown in 2 digits. For example, appear as new day 09. If the day is not given, the default is the first day of the month (01).
T
Designates the beginning of the time component of the representation date / time. If the time is not given, it defaults to 00:00:00.000.
HH
The time shown in 2 digits. For example, 1 pm appear to 13. If the time is not provided, the default is 00.
mm
The minutes, shown in 2 digits. For example, 15. If the minute is not provided, the default is 00.
ss
The second, shown in 2 digits. For example, 49. If seconds are not provided, the default is 00.
SSS (for C# fff)
Milliseconds, shown in 3 digits. For example, 555. If milliseconds are not provided, the default is 000.
Z (for C# z)
The assignment for the time zone Zulu, which is the allocation and military aviation for GMT (Greenwich Mean Time).
With ISO 8601, the time zone can also be expressed as moving to plus (+) or minus (-) from time Coordinated Universal Time (UTC) or GMT. For example: 2008-04-13T17 :25:55.123-08: 00. If the time zone is not provided, the default is the time zone in which the JVM is running MashupHub.
Assinar:
Postagens (Atom)