xrdp_sec_incoming: error reading /etc/xrdp/rsakeys.ini file
Fix : run xrdp as root
xrdp_sec_incoming: error reading /etc/xrdp/rsakeys.ini file
Public Function VALIDATE_NUMBER(ByVal num As String)
'connection string oraconnstring = "Data Source=" & OracleDataSource & ";User ID=" & OracleUserID & ";Password=" & OraclePassword & ";"
'initialize command
Dim oraclecmd As New OracleCommand oraConnection.Open()
'Initiate the package command oraclecmd = oraConnection.CreateCommand oraclecmd.CommandType = CommandType.StoredProcedure oraclecmd.CommandText = "CUSTOM_PACKAGE.GET_NUM"
'create parameters that will be passed with command Dim dbNum As OracleParameter Dim dbPartNum As OracleParameter Dim dbCode As OracleParameter'serialnumber is sent to package dbNum = oraclecmd.Parameters.Add("I_STR_NUMBER", OracleDbType.Varchar2) dbNum.Value = serialnum dbNum.Direction = ParameterDirection.Input dbNum.Size = 25'value is modified by oracle package dbPartNum = oraclecmd.Parameters.Add("O_STR_PART_NUMBER", OracleDbType.Varchar2) dbPartNum.Value = DBNull.Value dbPartNum.Direction = ParameterDirection.InputOutput dbPartNum.Size = 25'value is modified by oracle package dbCode = oraclecmd.Parameters.Add("O_STR_HEAT_CODE", OracleDbType.Varchar2) dbCode.Value = DBNull.Value dbCode.Value = "default" dbCode.Direction = ParameterDirection.InputOutput dbCode.Size = 25oraclecmd.ExecuteNonQuery()'populate class numinfo.PartNumber = dbForgingPartNum.Value.ToString numinfo.Code = dbHeatCode.Value.ToString Return numinfo oraConnection.Dispose()
end function-------------if the package returns a boolean value, which vb.net/oracle adapter can't handle, then a solution is to create a wrapper around that package.oraclecmd = oraConnection.CreateCommand 'initiate return value Dim ReturnValue As OracleParameter = oraclecmd.Parameters.Add(":ReturnValue", OracleDbType.Varchar2) ReturnValue.Direction = ParameterDirection.Output ReturnValue.Size = 1 'Wrapper for the stored function (anonymous block) 'boolean datatype is not available outside of pl/sql oraclecmd.CommandType = CommandType.Text oraclecmd.CommandText = "declare tmp boolean; ReturnValue varchar2(1) ;begin tmp := FS.GETSN('" & value & "');if tmp = true then :ReturnValue := 'T'; else ReturnValue := 'F'; end if; end;" 'execute the anonymous block oraclecmd.ExecuteNonQuery() 'convert returnvalue into a string Dim a As String = oraclecmd.Parameters(":ReturnValue").Value.ToStringA will be T or F.
#/bin/bash
#this is the KML heading
echo '<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<name>youri</name>'
#pull the longitude and latitude from sqlite3
for i in $(sqlite3 consolidated.db 'select longitude,latitude from celllocation';)
do coordinate=$(echo $i | sed 's/|/,/g')
echo '<Placemark><name>'$coordinate'</name><Point><coordinates>'$coordinate',0</coordinates></Point></Placemark>'
done;
echo '</Document></kml>'
501: Not Implemented! no www-folder configured
http://localhost:8080/?action=stream works
<?php
//charset=utf-8 makes it so unicode output doesn't get gobbled up by browser
header("Content-type: text/html; charset=utf-8");
echo '<p>Youri\'s id3v2 script</p>';
//connect to mysql and select amarokdb
$link=mysql_connect("localhost", "username", "password") or die(mysql_error());
echo "Connected to MySQL<br />";
mysql_select_db("amarokdb") or die(mysql_error());
echo "Connected to Database<br />";
//this makes the mysql db play well with utf8
mysql_set_charset('utf8',$link);
//globally retrieve all variables in the url string
$variable = $_GET['what'];
$bitratevariable = $_GET['bitrate'];
$coversaction = $_GET['coversaction'];
$idofartist= $_GET['idofartist'];
$artistName= $_GET['artistName'];
//navigation
echo "<a href=?what=bg1cd>Look for albums that have a CD num set</a> <br />";
echo "<a href=?what=blt128>Look for tracks with bitrate lower than 128kbps</a> <br />";
echo "<a href=?what=covers&coversaction=lookup>Look up covers</a> <br />";
echo "<a href=?what=nulltracknum>Look for tracks with no tracknumber set</a>";
echo '<br/><br/>';
echo "Look up bitrates<br />";
echo "[<a href=?what=bitrate&bitrate=128>128</a>] ";
echo "[<a href=?what=bitrate&bitrate=160>160</a>] ";
echo "[<a href=?what=bitrate&bitrate=192>192</a>] ";
echo "[<a href=?what=bitrate&bitrate=256>256</a>] ";
echo "[<a href=?what=bitrate&bitrate=320>320</a>] ";
echo '<br/><br/>';
//return the artist's name when an artist iD is passed
function getArtist($artistnum)
{
$artist = mysql_query("SELECT * FROM `artists` where `id` = $artistnum");
while ($row = mysql_fetch_array($artist))
{
return $row{'name'};
}
}
//returns the album's name when an album id is passed
function getAlbum($albumnum)
{
$album = mysql_query("SELECT * FROM `albums` where `id` = $albumnum");
while ($row = mysql_fetch_array($album))
{
return $row{'name'};
}
}
//this lists all the artists in the database except for various artists
function listArtists()
{
//select UNIQUE artist ID's from a join table of artists and album (join by referencing artists id column with albums artist column
/*
artists albums
ID NAME NAME ARTIST
88 ARTIST ALBUM 88
*/
$result = mysql_query("select distinct artist from artists join albums on albums.artist=artists.id ORDER BY `artists`.`name`");
//walk through the result and pull artist id and artistname
while ($row = mysql_fetch_array($result))
{
//urlencode for spaces in artists and utf8 artists
$artistID = $row{'artist'};
$artistNameSQL=getArtist($artistID);
echo "<a href=?what=covers&coversaction=getArtistAlbums&idofartist=$artistID&artistName=",
urlencode($artistNameSQL),
">$artistNameSQL</a><br />";
}
}
//listallalbums belonging to artist ID when given an artist ID
//artistname is passed only for html output
function listAlbumsById($idofartist,$artistName)
{
$albums = mysql_query("SELECT * FROM `albums` where `artist` = $idofartist" );
echo "<strong>$artistName</strong><br />";
while ($row = mysql_fetch_array($albums))
{
$album = $row{'name'};
//amarok stores album covers by getting and md5sum hash of lowercased artist and album
//mb_strtolower works on unicode white strtolower doesn't
echo "<div style=\"display: inline-block\">";
echo "$album<br />";
echo "/home/youri/.kde4/share/apps/amarok/albumcovers/large/",md5(mb_strtolower("$artistName$album",'UTF-8')),"<br/>";
echo "<img width=500px src=./albumcovers/",md5(mb_strtolower("$artistName$album",'UTF-8')),"><br/>";
echo "</div>";
}
}
if ($variable=="bg1cd")
{
$result = mysql_query("SELECT * FROM `tracks` WHERE `discnumber` IS NOT NULL");
while ($row = mysql_fetch_array($result))
{
$artist = getArtist($row{'artist'});
$album = getAlbum($row{'album'});
echo "$artist - $album <br />";
}
}
elseif ($variable=="blt128")
{
$result = mysql_query("SELECT * FROM `tracks` WHERE `bitrate` < 128 ORDER BY `tracks`.`artist` ASC");
$num_rows = mysql_num_rows($result);
echo "$num_rows Tracks<br /><br />";
while ($row = mysql_fetch_array($result))
{
$artist = getArtist($row{'artist'});
$album = getAlbum($row{'album'});
$tracknumber = $row{'tracknumber'};
$title = $row{'title'};
$bitrate = $row{'bitrate'};
echo "$artist - $album - $tracknumber - $title [$bitrate]<br />";
}
}
elseif ($variable=="bitrate")
{
$result = mysql_query("SELECT * FROM `tracks` WHERE `bitrate` = $bitratevariable");
$num_rows = mysql_num_rows($result);
$totaltrax = mysql_query("SELECT * FROM `tracks`");
$num_rows_total = mysql_num_rows($totaltrax);
echo "$num_rows Tracks are $bitratevariable kbps ";
echo "out of a $num_rows_total total tracks<br />";
$percentage=($num_rows/$num_rows_total *100);
echo "Which equals: ";
echo number_format($percentage, 1)."%<br/>";
}
//if covers is called with lookup, list artists
//if covers is called with get artistalbums, then get artist's albums
elseif ($variable=="covers")
{
if ($coversaction == "lookup" )
{
listArtists();
}
elseif ($coversaction == "getArtistAlbums" )
{
listAlbumsById($idofartist,$artistName);
}
}
elseif ($variable=="nulltracknum")
{
$result = mysql_query("SELECT * FROM `tracks` where `tracknumber` is null");
while ($row = mysql_fetch_array($result))
{
$artist = getArtist($row{'artist'});
$album = getAlbum($row{'album'});
$title = $row{'title'};
}
}
?>
mount -t cgroup cgroup /cgroup -o cpu
chmod 0777 /cgroup
echo "/sbin/rm_cgroup" > /cgroup/release_agent
in /sbin/rm_cgroup
#!/bin/sh
rmdir /cgroup/$1
then chmod +x /sbin/rm_cgroup and sudo mkdir /cgroup