Le Kevin dot com

photographic-poetic-musical horizon

SQL Data Provider VB.NET Class: This class is for simplifying and accelerating working with SQL, using this class is very simple; there is a sample below for this class, which I hope is useful. You can report bugs, opinions and suggestions to me. – Tags: .NET, ADO.NET, SQL, VB.NET, SQL Server, Documentation – http://www.developerfusion.com/code/5445/sql-data-provider-vbnet-class/

   Public Function FillDataset(ByVal cmdPara As String, ByVal cmdType As CommandType, Optional ByVal parameters() As OracleParameter = Nothing) As DataSet    
      Dim sqlda As OracleDataAdapter = Nothing
      Dim res As New DataSet
      Try
         cmd.Dispose()
         cmd = Nothing
         cmd = New OracleCommand(cmdPara, conn)
         cmd.CommandType = cmdType
         AssignParameters(parameters)
         sqlda = New OracleDataAdapter(cmd)
         sqlda.Fill(res)
         cmd.Parameters.Clear()
 
      Catch ex As Exception
         cmd.Parameters.Clear()
         OnCustomError(Me, New CustomHelpersErrorEventArgs(ErrorTypes.CustomExceptionTypes.ExecuteStoredProcedure, ex, "FillDataset()...", True))
      Finally
         If Not (sqlda Is Nothing) Then sqlda.Dispose()
      End Try
      Return res
   End Function
   Private Sub AssignParameters(ByVal cmdParameters() As OracleParameter)
      If (cmdParameters Is Nothing) Then Exit Sub
      For Each p As OracleParameter In cmdParameters
         cmd.Parameters.Add(p)
      Next
   End Sub
 
   Private Sub AssignParameters(ByVal parameterValues() As Object)
      If Not (cmd.Parameters.Count - 1 = parameterValues.Length) Then Throw New ApplicationException("Stored procedure's parameters and parameter values does not match.")
      Dim i As Integer
      For Each param As OracleParameter In cmd.Parameters
         If Not (param.Direction = ParameterDirection.Output) AndAlso Not (param.Direction = ParameterDirection.ReturnValue) Then
            param.Value = parameterValues(i)
            i += 1
         End If
      Next
   End Sub

Update AppSettings and custom configuration sections in App.config at runtime: Here is the sample App.config file used to illustrate how to add, edit or remove keys in AppSettings and custom configuration sections at runtime. – by Yi Zeng – Tags: app.config, appsettings, config, configuration, sections – http://yizeng.me/2013/08/31/update-appsettings-and-custom-configuration-sections-in-appconfig-at-runtime/

   Private Sub UpdateLastRun()
      Dim lastRun As String = Format(Now(), "MM/dd/yyyy hh:mm:ss tt") & ""
 
      Dim xmlDoc = New XmlDocument()
      xmlDoc.Load(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile)
      xmlDoc.SelectSingleNode("//FileMgrSettings/add[@key='poVerifyLastRun']").Attributes("value").Value = lastRun
      Try
         xmlDoc.Save(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile)
      Catch ex As Exception
         Throw New Exception(ex.Message().ToString())
      Finally
         oLogger.LogIt("Update lastrun timer to config: " & lastRun)
         ConfigurationManager.RefreshSection("FileMgrSettings")
      End Try
 
   End Sub

The JavaScript Task Runner: In one word: automation. The less work you have to do when performing repetitive tasks like minification, compilation, unit testing, linting, etc, the easier your job becomes. – http://gruntjs.com/

WinSCP .NET Assembly and COM Library: The WinSCP .NET assembly winscpnet.dll is a .NET wrapper around WinSCP’s scripting interface that allows your code to connect to a remote machine and manipulate remote files over SFTP, SFTP, WebDAV and SCP sessions from .NET languages, such as C#, VB. – Tags: sftp client,scp client,ftp client,windows,secure file transfer,ftp,freeware – http://winscp.net/eng/docs/library#csharp

C# Example

using System;
using WinSCP;
 
class Example
{
    public static int Main()
    {
        try
        {
            // Setup session options
            SessionOptions sessionOptions = new SessionOptions {
                Protocol = Protocol.Sftp,
                HostName = "example.com",
                UserName = "user",
                Password = "mypassword",
                .GiveUpSecurityAndAcceptAnySshHostKey = True     
            };
 
            using (Session session = new Session())
            {
                // Connect
                session.Open(sessionOptions);
 
                // Upload files
                TransferOptions transferOptions = new TransferOptions();
                transferOptions.TransferMode = TransferMode.Binary;
 
                TransferOperationResult transferResult;
                transferResult = session.PutFiles(@"d:\toupload\*", "/home/user/", false, transferOptions);
 
                // Throw on any error
                transferResult.Check();
 
                // Print results
                foreach (TransferEventArgs transfer in transferResult.Transfers)
                {
                    Console.WriteLine("Upload of {0} succeeded", transfer.FileName);
                }
            }
 
            return 0;
        }
        catch (Exception e)
        {
            Console.WriteLine("Error: {0}", e);
            return 1;
        }
    }
}

VB.NET Example

Imports System
Imports WinSCP
 
Friend Class Example
 
    Public Shared Function Main() As Integer
 
        Try
            ' Setup session options
            Dim mySessionOptions As New SessionOptions
            With mySessionOptions
                .Protocol = Protocol.Sftp
                .HostName = "example.com"
                .UserName = "user"
                .Password = "mypassword"
                .GiveUpSecurityAndAcceptAnySshHostKey = True     
            End With
 
            Using mySession As Session = New Session
                ' Connect
                mySession.Open(mySessionOptions)
 
                ' Upload files
                Dim myTransferOptions As New TransferOptions
                myTransferOptions.TransferMode = TransferMode.Binary
 
                Dim transferResult As TransferOperationResult
                transferResult = mySession.PutFiles("d:\toupload\*", "/home/user/", False, myTransferOptions)
 
                ' Throw on any error
                transferResult.Check()
 
                ' Print results
                For Each transfer In transferResult.Transfers
                    Console.WriteLine("Upload of {0} succeeded", transfer.FileName)
                Next
            End Using
 
            Return 0
        Catch e As Exception
            Console.WriteLine("Error: {0}", e)
            Return 1
        End Try
 
    End Function
 
End Class

Project Ara: hands-on with Google’s latest modular smartphone prototype: Right now, there’s a war to make the thinnest smartphone in the world. Google is a part of that with Android and with its Nexus devices. – by Josh Lowensohn – http://www.theverge.com/2015/1/14/7547529/google-project-ara-prototype-hands-ontf

AWS Key Management Service – Tags: – https://aws.amazon.com/kms

12 Ca Khuc That Hay vao Mua Vong – Mua Giang Sinh

play  
display
back
play
next
refresh
00.00   /   00:00
Playlist
      
  1. Mua Dong Thuong Nho

    Thanh Xuan

  2.   
  3. Hai Mua Noel

    Bang Tam

  4.   
  5. Ta Ao Dem Noel

    Dan Nguyen

  6.   
  7. Nguoi Tinh Mua Dong

    Tuong Khua

  8.   
  9. Mua Dong Nam Ay

    My Huyen

  10.   
  11. Me Tinh Yeu

    Hop CA Asia

  12.   
  13. Troi Chua Muon Sang

    Phuong Hong Que

  14.   
  15. Bong Nho Giao Duong

    Tuong Nguyen

  16.   
  17. Mua Sao Sang

    Ngoc Huyen

  18.   
  19. Loi Me Nhan Nhu

    Tam Doan

  20.   
  21. Mot Ngay Mua Dong

    Y Phung

  22.   
  23. Mua Dong Ve Chua Em

    Dang The Luan