$ sudo nano /etc/default/bootlogd |
The text editor will open, and the following will be show:
# Run bootlogd at startup ? BOOTLOGD_ENABLE=No |
Change BOOTLOGD_ENABLE to yes
Now, everytime you restart, /var/log/boot will be created
$ sudo nano /etc/default/bootlogd |
# Run bootlogd at startup ? BOOTLOGD_ENABLE=No |
The SqlConnection Object is Handling the part of physical communication between the application and the SQL Server Database. An instance of the SqlConnection class in .NET Framework is supported the Data Provider for SQL Server Database. The SqlConnection instance takes Connection String as argument and pass the value to the Constructor statement. When the connection is established , SQL Commands may be executed, with the help of the Connection Object, to retrieve or manipulate data in the database. Once the Database activities over , Connection should be closed and release the database resources .
The Close() method in SqlConnection class is used to close the Database Connection. The Close method rolls back any pending transactions and releases the Connection from the SQL Server Database.
Imports System.Data.SqlClientThis My Stored Procedure
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim connetionString As String
Dim cnn As SqlConnection
connetionString = "Data Source=ServerName;Initial Catalog=DatabaseName;UserID=UserName;Password=Password"
cnn = New SqlConnection(connetionString)
Try
cnn.Open()
MsgBox("Connection Open ! ")
Dim cmd As New SqlCommand
cmd.Connection = cnn
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "search_itemcode"
cmd.Parameters.Add("@PRDocno", SqlDbType.VarChar).Value = CStr(TextBox1.Text)
Dim dr As SqlDataReader = cmd.ExecuteReader
''release resources
cnn.Close()
Catch ex As Exception
MsgBox("Can not open connection ! ")
End Try
End Sub
End Class
ALTER PROCEDURE [dbo].[Search_itemcode]
@PrDocno varchar(15)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @docno varchar(15),@itemcode varchar(15)
-- declare the cursor
DECLARE C CURSOR FOR
select docno,itemcode
from itemprsub
where DocNo = @PrDocno
OPEN C
FETCH C INTO @docno,@itemcode
-- start the main processing loop.
WHILE @@Fetch_Status = 0
BEGIN
EXEC input_last3buy @itemno = @itemcode,@PrDocno = @docno
EXEC input_last6sale @itemcodesale = @itemcode
FETCH C INTO @docno,@itemcode
END
CLOSE C
DEALLOCATE C
EXEC input_MonthName
RETURN
END
nano /tmp/siri.sh |
#!/bin/bash.o # # 64-bit version (if you're running 32-bit delete the "--disable-asm-opt.." # # This script will download all necessary dependencies (and curl) # both for audio handling and for python # Then it will proceed to fetch the SiriServer from # Github and install it, it will then proceed # and generate SSL-certs for both the server and client # Remeber to run Script as root as the installation will fail otherwise # Author of installation script johanberglind # I am not the author nor the creator of the server # mkdir serverfolder cd serverfolder echo "--------- SiriServer Installation Script --------" echo "If you don't have any of the dependencies installed the script will take a while to finish" read -p "Expect atleast 1-2 minutes, Press [ENTER] if you're ready to continue" clear if [ "$(which curl)" != "" ] then echo "Curl is already installed, proceeding" else echo "Downloading and installing Curl" sudo apt-get install curl fi read -p "Press [ENTER] to continue" # Checks for libogg package and if it's already installed scripts moves on to libspeex echo "Checking if Libogg is installed [10%--------]" clear if [ -f /usr/local/lib/libogg.a ] then echo "Libogg is already installed, proceeding to next step" else echo "Not installed, downloading libogg" curl http://downloads.xiph.org/releases/ogg/libogg-1.3.0.zip > libogg-1.3.0.zip unzip libogg-1.3.0.zip cd libogg-1.3.0 echo "Installing libogg" ./configure make sudo make install cd .. fi read -p "Press [ENTER] to continue" # Checks for libspeex and if it's already installed the scripts moves on to checking for flac echo "Checking if Libspeex is installed [-20%--------]" clear if [ -f /usr/local/lib/libspeex.a ] then echo "Libspeex is already installed, proceeding to next step" else echo "Not installed, downloading Libspeex" curl http://downloads.xiph.org/releases/speex/speex-1.2rc1.tar.gz > speex-1.2rc1.tar.gz clear echo "Download complete, unzipping" tar -xf speex-1.2rc1.tar.gz cd speex-1.2rc1 clear # Installing Speex.." echo "Installing Speex... [--30%------]" ./configure make sudo make install cd .. fi read -p "Press [ENTER] to continue" clear # Checks for FLAC and if it's already installed the scripts moves on clear echo "Checking for Flac… [----50%----]" if [ "$(which flac)" != "" ] then echo "FLAC is already installed, proceeding to next step" sudo apt-get install g++ else curl -L http://sourceforge.net/projects/flac/files/flac-src/flac-1.2.1-src/flac-1.2.1.tar.gz/download > flac-1.2.1.tar.gz clear echo "Download complete, unzipping" tar -xf flac-1.2.1.tar.gz clear echo "Installing Libflac.. [-----60%---]" cd flac-1.2.1 ./configure make sudo make install cd .. fi read -p "Press [ENTER] to continue" clear # Downloading and installing necessary python packages and easy_install if they're not already installed if [ "$(which easy_install)" != "" ] then echo "easy_install is installed, proceeding" else echo "Downloading and installing easy_install" sudo apt-get install python-setuptools clear fi clear echo "Installing Python-packages [------70%--]" sudo easy_install biplist sudo apt-get install python-m2crypto sudo easy_install jsonrpclib clear echo "Python installation complete" read -p "Press [ENTER] to continue" echo "Downloading SiriServer from Github... [---------80%-]" curl -L https://github.com/Eichhoernchen/SiriServer/tarball/master > siriserver.tar.gz clear echo "Unzipping" tar -xf siriserver.tar.gz cd Eich* cd gen_certs/ clear echo "Time to generate SSL-certs, what is the IP of the Siriserver (this computer)? [----------90%]" read IP ./gen_certs.sh $IP clear cd .. cp ca.pem ~/Desktop/ clear echo "Ok, now you need to transfer the ca.pem file to your iOS device" echo "I've copied the file to your desktop for easy access" echo "The easiest way is to mail it to yourself and open it on your iOS device" read -p "Press [ENTER] to continue to the next step when you've installed it" clear echo "(NON 4S ONLY) Go ahead and download Spire from Cydia" echo "That should take a while, but once you're done enter your IP in" echo "the settings page of Spire: $IP" read -p "Press [ENTER] to continue to the next step [100%]" clear echo "Starting Siriserver..." echo "Now go ahead and enable Siri in the general-tab in the Settings-app" echo "If everything went smooth, you should be up and running" echo "Try saying: Hello Siri" echo "Press CTRL+C to STOP" sudo python siriServer.py |
sudo chmod +x /tmp/siri.sh ./siri.sh |
INFO INFO __init__ Listening on port 443 |
sudo python siriServer.py |
INFO handle_accept Incoming connection from ('192.168.1.165', 50197) INFO read_next_object_from_unzipped Received a Ping (1) INFO read_next_object_from_unzipped Returning a Pong (1) INFO read_next_object_from_unzipped Received a Ping (2) INFO read_next_object_from_unzipped Returning a Pong (2) INFO read_next_object_from_unzipped Received a Ping (3) INFO read_next_object_from_unzipped Returning a Pong (3) |