Tuesday, 24 February 2015

Switching fron Kubtuntu to Fedora


Background Info

 
Got fed up with Kubuntu, it was getting too slow, I have a core i3 3.something GHz and 8Gb of RAM but the latest Kubuntu 14.04 was annoying the hell out of me. I decided to take a switch over to Fedora 21. I burned a live image (1.2Gb) to a DVD and booted into live mode. First impressions of the Gnome de3sktop over KDE are that it runs quicker. Applications seem to load faster and the desktop looks smoother and less KDE/windowslike (not that that's a word). YouTube played straight away with some kind of HTML5 player however im about to install flash, audio on my PCI Maudio soundcard seemed to work after I went into the (terminal and type alsamixer F6 select sound card up arrow to turn volume up) alsamixer and turned up the volume, the sound is clear and arguably better then it was through Pulseaudio on Kubuntu. Graphics seem smooth and Fedora has picked up the Nvidia card out of the box, however I'm on the noveau driver

First thing I did was add the terminal and LibreOffice writer to the favourites and removed shotwell, rhythmbox and evolution. Next stage will be to install the flash player... no apt-get here.

Here's how I got flash... and some cosmetic stuff


su -c 'yum -y install http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm'

su 

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

yum -y install flash-plugin  
 
 
I then added add block edge and block facebook adds to firefox via their add on portal, restart firefox and we are running flash.

Into the software shopping bag thingy, god the software manager is better than muon on kde, remove evolution, remove rhythmbox, remove notes. Add clementine for music management, add thunderbird for mail add filezilla for FTP, install Gparted.

Add Thurderbird to favourites, open terminal go to edit then profile preferences preferences, untick system theme to enable green on black.

Install RPM fusion (all one command)


su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm'

Now install some codecs

yum install gstreamer gstreamer-ffmpeg gstreamer-plugins-bad gstreamer-plugins-bad-free gstreamer-plugins-bad-free-extras gstreamer-plugins bad-nonfree gstreamer-plugins-base gstreamer-plugins-good gstreamer-plugins-ugly install faad2 faac libdca wget compat-libstdc++-33 compat-libstdc++-296  xine-lib-extras-freeworld

Switch to the Nvidia Proprietary driver


first find what driver you have installed

lspci -k | grep -A 2 VGA

then get your relevant driver from here, http://rpmfusion.org/Howto/nVidia

for me I have the geforece GT 500 so here is my install command followed by an update

yum install akmod-nvidia-173xx "kernel-devel-uname-r == $(uname -r)"

yum update -y

Ok now check with the lspci command again after a reboot and you should be on the nvidia driver

that's about it for now, - was really easy, love this new fedora 21... its way faster than kubuntu

Wednesday, 21 January 2015

C# Windows Forms Program to read a CSV file

 using System;  
 using System.Collections.Generic;  
 using System.ComponentModel;  
 using System.Data;  
 using System.Drawing;  
 using System.Linq;  
 using System.Text;  
 using System.Threading.Tasks;  
 using System.Windows.Forms;  
 using System.IO;  
 using MichaelFerrie C# Windows Forms Application;  
   namespace WindowsFormsApplication1  
 {  
     public partial class Form1 : Form  
   {  
     static string csvFilePath = "path to csv here.csv";  
     private TweetAnalysis tweetAnalysis = new TweetAnalysis(csvFilePath);  
     public wsT.WebService1 x = new wsT.WebService1();  
     public Form1()  
     {  
       InitializeComponent();  
     }  
     private void Form1_Load(object sender, EventArgs e)  
     {  
     }  
     private void button1_Click(object sender, EventArgs e)  
     {  
       string input = textBox1.Text; // grab the input from textbox one and passinto the input string  
       tweetAnalysis.Expand(input); // pass the input to the tweetanalysis  
       string expansion = tweetAnalysis.Expand(input); // return the value for input from tweetanalysis  
       textBox2.Text = (expansion); // populate textbox 2 with the data  
       //for the final part of the windows form this code will append the date and time onto a csv file  
       //with the abbreviations using streamwriter  
       StreamWriter myOutputStream = new StreamWriter("output.txt", true);  
       string dateandt = DateTime.Now.ToString();  
       myOutputStream.Write(input + "," + expansion + "," + dateandt + Environment.NewLine); // advice taken from here http://www.blackwasp.co.uk/WriteTextFiles.aspx  
       myOutputStream.Close();         
     }  
   }  
 }