iccaros

Linux Experts
  • Content Count

    1292
  • Joined

  • Last visited

Posts posted by iccaros

  1. Electronic components are most likely to break when voltage is applied (ie turning them on) This is the most stress a system takes.

    It is my advice ( am I have over 20 years electronics repair experience)

    is to leave them on.

    If you are worried about the power bill, use the power management and put the system into suspend. This does not power down the system, but place in to low power mode.

    I have LCD monitors that also have a true sleep mode so they do not use as much power

    for CRT monitors, I use the power management to have them go to sleep if they have it, and if not I turn them off as they are cheep now a days and they cost more to keep on then replacing them.

  2. in case anyone cares, I found some problems with the arrays

    here is the fixed version

    // Enigma.CS a dll to allow simple encryption in the vain of the emigma machine form WWII.
    // Copyright (C) 2006 William S. Huskey
    // inspired by Myke Predko’s Enigma page http://www.myke.com/enigma1.htm
    // This program is free software; you can redistribute it and/or
    // modify it under the terms of the GNU General Public License
    // as published by the Free Software Foundation; either version 2
    // of the License, or (at your option) any later version.
    //
    // This program is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    // GNU General Public License for more details.
    //
    // You should have received a copy of the GNU General Public License
    // along with this program; if not, write to the Free Software
    // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    using System;
    using System.Collections.Generic;
    using System.Text;

    namespace Enigma
    {
    public class Cenigma
    {

    //Set Encryption arrays that take place of the enigma machines wheels

    /// <summary>
    /// private enum WheelOne is used as a ?? char lookup table the switch between alpha upper and lower case charaters
    ///
    /// </summary>
    private string[] WheelOne =
    {
    "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q",
    "r", "s", "t", "u", ",", ".", "/", "<", ">", "?", "v", "w", "x", "y", "z", "1", "2",
    "3", "4", "5", "6", "7", "8", "9", "0", "'", "-", "=", "!", "@", "#", "$", "+", "%",
    "^", "&", "*", "(", ")", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L",
    "M", "N", "O", "P", "Q", "R", "\\", "S", "T", "U", "V", "W", "X", "Y", "Z","\"", "`",
    "~", " ", "|"
    };




    /// <summary>
    /// private enum WheelTwo is used as a 52 char lookup table the switch between alpha upper and lower case charaters
    ///
    /// </summary>
    private string [] WheelTwo =
    {
    "T", "U", "V", "W", "X", "Y", "Z", "\""," ", "|", "a", "b", "c", "d", "e", "f", "g",
    "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "\\", "*","(",
    ")", "A", "B", "C", "D", "E", "F", "G", "H", "`", "I", "J", "K", "L", "M", "N", "O",
    "P", "Q", "R", "S", ",", ".", "/", "<", ">", "?", "v", "w", "x", "y", "z", "1", "2",
    "3", "4", "5", "6", "7", "8", "9", "~", "0", "'", "-", "=", "!", "@", "#", "$", "%",
    "^", "&", "+"

    };

    /// <summary>
    ///
    /// </summary>
    private string [] WheelThree =
    {
    "3", "4", "5", "6", "7", "8", "9", "~", "0", "'", "-", "=", "!", "@", "#", "$", "%",
    "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "//", "*","(",
    "T", "U", "V", "W", "X", "Y", "Z", "\""," ", "|", "a", "b", "c", "d", "e", "f", "g",
    "P", "Q", "R", "S", ",", ".", "/", "<", ">", "?", "v", "w", "x", "y", "z", "1", "2",
    ")", "A", "B", "C", "D", "E", "F", "G", "H", "`", "I", "J", "K", "L", "M", "N", "O",
    "^", "&", "+"

    };

    private String redSideOut = "";

    public string RedSideOut {
    get {
    return redSideOut;
    }
    set {
    redSideOut = value;
    }
    }
    private String blackSideOut = "";

    public string BlackSideOut {
    get {
    return blackSideOut;
    }
    set {
    blackSideOut = value;
    }
    }
    private int wheelStartPosition;

    public int WheelStartPosition {
    get {
    return wheelStartPosition;
    }
    set {
    wheelStartPosition = value;
    }
    }
    private int wheelNext;

    public int WheelNext {
    get {
    return wheelNext;
    }
    set {
    wheelNext = value;
    }
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="WheelPosition"></param>
    /// <param name="WheelsUsed"></param>

    public Cenigma(int WheelPosition, int wHeelsNext)
    {
    WheelStartPosition = WheelPosition;
    WheelNext = wHeelsNext;

    BlackSideOut = "";

    }





    /// <summary>
    ///
    /// </summary>
    /// <param name="RedSideIn"></param>
    /// <param name="wheel"></param>
    /// <returns></returns>

    /// <summary>
    ///
    /// </summary>
    /// <param name="WheelPosition"></param>
    /// <param name="CharIn"></param>
    /// <returns></returns>
    private string Wheel3(int WheelPosition, char CharIn)
    {
    string find =Convert.ToString(CharIn);
    int ConvertInt = 0;
    int CharInString = 0;
    for (int x =0; x < WheelThree.Length; x++)
    {
    if (find == WheelThree[x])
    {
    CharInString = x;
    }
    }


    if (WheelPosition + CharInString > WheelThree.Length -1)
    ConvertInt = (WheelPosition + CharInString) - (WheelThree.Length -1);
    else if (WheelPosition + CharInString < 0)
    ConvertInt = (WheelPosition + CharInString) + (WheelThree.Length -1 );
    else
    ConvertInt = WheelPosition + CharInString;

    // WheelOne letter = (WheelOne)ConvertInt;
    return WheelThree[ConvertInt];
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="WheelPosition"></param>
    /// <param name="CharIn"></param>
    /// <returns></returns>
    private string Wheel2(int WheelPosition, char CharIn)
    {
    string find =Convert.ToString(CharIn);
    int ConvertInt = 0;
    int CharInString = 0;
    for (int x =0; x < WheelTwo.Length; x++)
    {
    if (find == WheelTwo[x])
    {
    CharInString = x;
    }
    }

    //ensure the pattern loops
    if (WheelPosition + CharInString > WheelTwo.Length -1)
    ConvertInt = (WheelPosition + CharInString) - (WheelTwo.Length);
    else if (WheelPosition + CharInString < 0)
    ConvertInt = (WheelPosition + CharInString) + (WheelTwo.Length);
    else
    ConvertInt = WheelPosition + CharInString;

    // WheelOne letter = (WheelOne)ConvertInt;
    return WheelTwo[ConvertInt];
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="WheelPosition"></param>
    /// <param name="CharIn"></param>
    /// <returns></returns>
    private string Wheel1(int WheelPosition, char CharIn)
    {
    string find =Convert.ToString(CharIn);
    int ConvertInt = 0;
    int CharInString = 0;
    for (int x =0; x < WheelOne.Length; x++)
    {
    if (find == WheelOne[x])
    {
    CharInString = x;
    }
    }

    //ensure the pattern loops
    if (WheelPosition + CharInString > WheelOne.Length - 1)
    ConvertInt = (WheelPosition + CharInString) - (WheelOne.Length );
    else if (WheelPosition + CharInString < 0)
    ConvertInt = (WheelPosition + CharInString) + (WheelOne.Length );
    else
    ConvertInt = WheelPosition + CharInString;

    // WheelOne letter = (WheelOne)ConvertInt;
    return WheelOne[ConvertInt];
    }

    public string encrypt(char RedSideIn, int WheelNumber)
    {
    if (WheelNumber == 1)
    BlackSideOut = Wheel1(WheelStartPosition, RedSideIn);
    else if (WheelNumber == 2)
    BlackSideOut = Wheel2(WheelStartPosition, RedSideIn);
    else if (WheelNumber == 3)
    BlackSideOut = Wheel3(WheelStartPosition, RedSideIn);

    return BlackSideOut;
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="BlackSideIn"></param>
    /// <param name="WheelNumber"></param>
    /// <returns></returns>
    public string deCrypt(char BlackSideIn, int WheelNumber)
    {
    if (WheelNumber == 1)
    RedSideOut = Wheel1(WheelStartPosition, BlackSideIn);
    else if (WheelNumber == 2)
    RedSideOut = Wheel2(WheelStartPosition, BlackSideIn);
    else if (WheelNumber == 3)
    RedSideOut = Wheel3(WheelStartPosition, BlackSideIn);

    return RedSideOut;
    }

    }

    }

  3. ok I have my encrypton class done for c#

    here it is

    to use it you pass a positive number as the offset to encrypt

    to decrypt you pass a negative version of the offset

    so say the offset is 25 for encryption

    it would be -25 to decrypt

    here you go.. pick at it and tell me what I can do better

    thanks

    // Enigma.CS a dll to allow simple encryption in the vain of the emigma machine form WWII.
    // Copyright (C) 2006 William S. Huskey
    //
    // This program is free software; you can redistribute it and/or
    // modify it under the terms of the GNU General Public License
    // as published by the Free Software Foundation; either version 2
    // of the License, or (at your option) any later version.
    //
    // This program is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    // GNU General Public License for more details.
    //
    // You should have received a copy of the GNU General Public License
    // along with this program; if not, write to the Free Software
    // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    using System;
    using System.Collections.Generic;
    using System.Text;

    namespace Enigma
    {
    public class Cenigma
    {

    //Set Encryption arrays that take place of the enigma machines wheels

    /// <summary>
    /// private enum WheelOne is used as a ?? char lookup table the switch between alpha upper and lower case charaters
    ///
    /// </summary>
    private string[] wheelOne =
    {
    "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u",",",".","/","<",">","?",
    "v", "w", "x", "y", "z", "1","2","3","4","5","6","7","8","9","0","'","-","=","!","@","#","$","+","%","^","&",
    "*","(",")", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R","=", "S",
    "T", "U", "V", "W", "X", "Y", "Z","\"","`","~"," ","|"
    };

    public string[] WheelOne {
    get {
    return wheelOne;
    }
    }

    /// <summary>
    /// private enum WheelTwo is used as a 52 char lookup table the switch between alpha upper and lower case charaters
    ///
    /// </summary>
    private string [] WheelTwo =
    {
    "T", "U", "V", "W", "X", "Y", "Z","\""," ","|",
    "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u","=",
    "*","(",")", "A", "B", "C", "D", "E", "F", "G", "H","`", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S",",",".","/","<",">","?",
    "v", "w", "x", "y", "z", "1","2","3","4","5","6","7","8","9","~","0","'","-","=","!","@","#","$","%","^","&","+"

    };

    /// <summary>
    ///
    /// </summary>
    private string [] WheelThree =
    {

    "v", "w", "x", "y", "z"," ", "1","2","3","4","5","6","7","8","9","0","'","-","=","!","@","#","$","%","^","&",
    "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u","=",
    "T", "U", "V", "W", "X", "Y", "Z","\"",",",".","/","<",">","?","+","~","`","|",
    "*","(",")", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S"
    };

    private String redSideOut = "";

    public string RedSideOut {
    get {
    return redSideOut;
    }
    set {
    redSideOut = value;
    }
    }
    private String blackSideOut = "";

    public string BlackSideOut {
    get {
    return blackSideOut;
    }
    set {
    blackSideOut = value;
    }
    }
    private int wheelStartPosition;

    public int WheelStartPosition {
    get {
    return wheelStartPosition;
    }
    set {
    wheelStartPosition = value;
    }
    }
    private int wheelNext;

    public int WheelNext {
    get {
    return wheelNext;
    }
    set {
    wheelNext = value;
    }
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="WheelPosition"></param>
    /// <param name="WheelsUsed"></param>

    public Cenigma(int WheelPosition, int wHeelsNext)
    {
    WheelStartPosition = WheelPosition;
    WheelNext = wHeelsNext;

    BlackSideOut = "";

    }





    /// <summary>
    ///
    /// </summary>
    /// <param name="RedSideIn"></param>
    /// <param name="wheel"></param>
    /// <returns></returns>

    /// <summary>
    ///
    /// </summary>
    /// <param name="WheelPosition"></param>
    /// <param name="CharIn"></param>
    /// <returns></returns>
    private string Wheel3(int WheelPosition, char CharIn)
    {
    string find =Convert.ToString(CharIn);
    int ConvertInt = 0;
    int CharInString = 0;
    for (int x =0; x < WheelThree.Length; x++)
    {
    if (find == WheelThree[x])
    {
    CharInString = x;
    }
    }


    if (WheelPosition + CharInString > WheelThree.Length -1)
    ConvertInt = (WheelPosition + CharInString) - (WheelThree.Length -1);
    else if (WheelPosition + CharInString < 0)
    ConvertInt = (WheelPosition + CharInString) + (WheelThree.Length -1 );
    else
    ConvertInt = WheelPosition + CharInString;

    // WheelOne letter = (WheelOne)ConvertInt;
    return WheelThree[ConvertInt];
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="WheelPosition"></param>
    /// <param name="CharIn"></param>
    /// <returns></returns>
    private string Wheel2(int WheelPosition, char CharIn)
    {
    string find =Convert.ToString(CharIn);
    int ConvertInt = 0;
    int CharInString = 0;
    for (int x =0; x < WheelTwo.Length; x++)
    {
    if (find == WheelTwo[x])
    {
    CharInString = x;
    }
    }

    //ensure the pattern loops
    if (WheelPosition + CharInString > WheelTwo.Length -1)
    ConvertInt = (WheelPosition + CharInString) - (WheelTwo.Length);
    else if (WheelPosition + CharInString < 0)
    ConvertInt = (WheelPosition + CharInString) + (WheelTwo.Length);
    else
    ConvertInt = WheelPosition + CharInString;

    // WheelOne letter = (WheelOne)ConvertInt;
    return WheelTwo[ConvertInt];
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="WheelPosition"></param>
    /// <param name="CharIn"></param>
    /// <returns></returns>
    private string Wheel1(int WheelPosition, char CharIn)
    {
    string find =Convert.ToString(CharIn);
    int ConvertInt = 0;
    int CharInString = 0;
    for (int x =0; x < WheelOne.Length; x++)
    {
    if (find == WheelOne[x])
    {
    CharInString = x;
    }
    }

    //ensure the pattern loops
    if (WheelPosition + CharInString > WheelOne.Length - 1)
    ConvertInt = (WheelPosition + CharInString) - (WheelOne.Length );
    else if (WheelPosition + CharInString < 0)
    ConvertInt = (WheelPosition + CharInString) + (WheelOne.Length );
    else
    ConvertInt = WheelPosition + CharInString;

    // WheelOne letter = (WheelOne)ConvertInt;
    return wheelOne[ConvertInt];
    }

    public string encrypt(char RedSideIn, int WheelNumber)
    {
    if (WheelNumber == 1)
    BlackSideOut = Wheel1(WheelStartPosition, RedSideIn);
    else if (WheelNumber == 2)
    BlackSideOut = Wheel2(WheelStartPosition, RedSideIn);
    else if (WheelNumber == 3)
    BlackSideOut = Wheel3(WheelStartPosition, RedSideIn);

    return BlackSideOut;
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="BlackSideIn"></param>
    /// <param name="WheelNumber"></param>
    /// <returns></returns>
    public string deCrypt(char BlackSideIn, int WheelNumber)
    {
    if (WheelNumber == 1)
    RedSideOut = Wheel1(WheelStartPosition, BlackSideIn);
    else if (WheelNumber == 2)
    RedSideOut = Wheel2(WheelStartPosition, BlackSideIn);
    else if (WheelNumber == 3)
    RedSideOut = Wheel3(WheelStartPosition, BlackSideIn);

    return RedSideOut;
    }

    }

    }

  4. ok I have my enum to hold Char for lookups but I also want to add other char like ~`@#$%^& and numbers. is there a way to do this..

    here is one of my enums

    private enum WheelOne : int

    {

    a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z,

    A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z,

    }

    I would like something like this, but works..

    private enum WheelOne : int

    {

    a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, 1, 2, 3, 4, 5, 6, 7, 8, 9

    A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, !, @, , #, $, %, ^, &, *, (, ), _, +, =, -, [, ], }, {, ', ;, ", :, /, ., ,, ?, >, <

    }

    I have tried wraping them in " " and ' '

  5. Thanks, the try was hiding the problem

    the connection string should look like this

    this.mySqlConnect = this.Driver +";SERVER=" + this.Server + ";DATABASE=" + this.DataBase + ";UID=" + this.UID + ";PASSWORD=" + this.PassWord + ";OPTION=" + this.Option + ";" ;

    I had it in my comments from my test program but when I created the class I missed carring over the SERVER= parts

    Thank you for pointing me in the right direction.. I don't feel as dumb as I did before..

  6. to add this is where this is called

    /*
    * Created by SharpDevelop.
    * User: huskeyw
    * Date: 11/7/2006
    * Time: 4:43 PM
    *
    * To change this template use Tools | Options | Coding | Edit Standard Headers.
    */
    // ADDUSER component of the of Time Keeper software
    // Copyright (C) 2006 William S. Huskey
    //
    // This program is free software; you can redistribute it and/or
    // modify it under the terms of the GNU General Public License
    // as published by the Free Software Foundation; either version 2
    // of the License, or (at your option) any later version.
    //
    // This program is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    // GNU General Public License for more details.
    //
    // You should have received a copy of the GNU General Public License
    // along with this program; if not, write to the Free Software
    // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


    using System;
    using System.Drawing;
    using System.Windows.Forms;



    namespace Time_Admin
    {
    /// <summary>
    /// Description of addUser.
    /// </summary>
    public partial class addUser
    {
    Employee employee;

    public addUser()
    {
    //
    // The InitializeComponent() call is required for Windows Forms designer support.
    //
    InitializeComponent();

    //
    // TODO: Add constructor code after the InitializeComponent() call.
    //
    }



    void ExitToolStripMenuItemClick(object sender, System.EventArgs e)
    {
    this.Close();
    }

    void Button1Click(object sender, System.EventArgs e)
    {

    //try
    // {


    this.employee = new Employee(tbFname.Text,tbLname.Text,Convert.ToInt32(tbEmpID.Text),
    Convert.ToInt32(tbEmptype.Text),tbCity.Text,tbStreet.Text,
    tbStreet2.Text,tbState.Text,Convert.ToInt32(tbZip.Text),tbPassword.Text);
    //lbPassword.Text = this.employee.Password(tbPassword.Text);
    MyConnect database = new MyConnect("localhost","timekeeper","timeadm","password","3");
    database.Insert("empID",employee.buildTable);


    // }
    // catch
    // {
    // MessageBox.Show("you need to enter at least\nLast Name \nEmployee number \nEmployee type \nZipCode");

    // }


    }
    }
    }

    here is the lines that call it

    MyConnect database = new MyConnect("localhost","timekeeper","timeadm","password","3");

    database.Insert("empID",employee.buildTable);

  7. I have this class

    /*
    * Created by SharpDevelop.
    * User: huskeyw
    * Date: 10/26/2006
    * Time: 6:53 PM
    *
    * To change this template use Tools | Options | Coding | Edit Standard Headers.
    */
    // DbConnect MySql connectionclass, this class builds all the connections and basic sql commands.
    // Copyright (C) 2006 William S. Huskey
    //
    // This program is free software; you can redistribute it and/or
    // modify it under the terms of the GNU General Public License
    // as published by the Free Software Foundation; either version 2
    // of the License, or (at your option) any later version.
    //
    // This program is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    // GNU General Public License for more details.
    //
    // You should have received a copy of the GNU General Public License
    // along with this program; if not, write to the Free Software
    // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


    using System;
    using System.Collections.Generic;
    using System.Data.Odbc;

    namespace Time_Admin
    {
    /// <summary>
    /// MYSQL connector through ODBC
    /// </summary>
    public class MyConnect
    {
    #region vairables
    private string server;

    public string Server {
    get {
    return server;
    }
    set {
    server = value;
    }
    }


    private string dataBase;

    public string DataBase {
    get {
    return dataBase;
    }
    set {
    dataBase = value;
    }
    }

    private string uID;

    public string UID {
    get {
    return uID;
    }
    set {
    uID = value;
    }
    }


    private string passWord;

    public string PassWord {
    get {
    return passWord;
    }
    set {
    passWord = value;
    }
    }

    private string option;

    public string Option {
    get {
    return option;
    }
    set {
    option = value;
    }
    }



    private string Driver = "DRIVER={MySQL ODBC 3.51 Driver};";

    public string mySqlConnect;

    public string MySqlConnect {
    get {
    return mySqlConnect;
    }
    set {
    mySqlConnect = value;
    }
    }

    private OdbcConnection MySqlConnection;
    public OdbcCommand MySqlCommand;
    public OdbcDataReader myDataReader;

    #endregion
    #region construtor
    //Construtor MyConnect
    //"SERVER=localhost;" +
    //"DATABASE=test;" +
    //"UID=root;" +
    //"PASSWORD=1ccaros12;" +
    //"OPTION=3";
    /// <summary>
    ///
    /// </summary>
    /// <param name="srv"></param>
    /// <param name="dataBase"></param>
    /// <param name="User"></param>
    /// <param name="passwd"></param>
    /// <param name="Opt"></param>
    public MyConnect (string srv , string dataBase , string User , string passwd, string Opt)
    {
    this.Server = srv;
    this.DataBase = dataBase;
    this.UID = User;
    this.PassWord = passwd;
    this.Option = Opt;
    this.MySqlConnect = this.Driver + this.Server + ";" +
    this.DataBase + ";" + this.UID + ";" + this.PassWord + ";" + this.Option + ";";
    try
    {
    this.MySqlConnection = new OdbcConnection(MySqlConnect);
    this.MySqlConnection.Open();
    this.MySqlCommand = new OdbcCommand("USE "+ this.DataBase, MySqlConnection);
    this.MySqlCommand.ExecuteNonQuery();


    }
    catch
    {

    }
    }
    #endregion

    #region methods
    public void Insert (string table, string[] Values)
    {
    string values = "";
    for (int x = 0; x < Values.Length; x++)
    {

    values += "'" + Values[x] + "',";
    }
    values = values.Substring(0, values.Length -1);

    this.MySqlCommand.Connection = MySqlConnection;
    this.MySqlCommand.CommandText = "INSERT INTO " + table + " VALUES("+values+")";
    this.MySqlCommand.ExecuteNonQuery();
    }

    public void Modify (string condetions,string table,string where)
    {

    MySqlCommand.CommandText = "SELECT " + condetions + " FROM " + table + " WHERE " + where;
    MySqlCommand.ExecuteNonQuery();

    }


    #endregion

    }
    }

    but when I call insert() it tells me that

    Exception System.NullReferenceException was thrown in debuggee:

    Object reference not set to an instance of an object.

    and points to this line

    this.MySqlCommand.Connection = MySqlConnection;

    thanks..

  8. you can dual boot any two OS, some are harder than others, if you install XP and then go and install Vista is should set its self up for dual boot. But as we just received the shipping version of VISTA it is impossible to say for sure that it will work this way.

    you should look into VMWare. you can get VMWARE server for free and with that run any x86 OS you need to under VMWARE..

  9. Dell computers used to come with linux, but it wasn't very popular.

    They still do, but their licenses with Microsoft restricts how they can advertise it, and requires them to put up the message saying , Dell recommends windows XP

    Right! If you do a bit of digging at Dell you can find some servers that hint about Linux, but, there isn't any direct hype about Linux. M$ has a lock on Dell. Perhaps as more people want Linux/Unix then Dell will provide it. This will take time. aaarrrggghhh :D

    http://www.dell.com/content/topics/global....;l=en&s=biz

    it's too bad they are only showing it offered on their Servers. Now if they would start mainstreaming it on their desktops more.

    I agree Hitest, we are seeing a nice trend for linux. I have talked to a number of people this past month that want me to move them over to linux. I'm starting to run out of time to them all, hehe. let's keep em rolling.

    the weird part is, if you are in Europe and Asia, they show Linux desktops.. only in the US & Canada do they show servers only.

  10. Dell computers used to come with linux, but it wasn't very popular.

    They still do, but their licenses with Microsoft restricts how they can advertise it, and requires them to put up the message saying , Dell recommends windows XP

    Right! If you do a bit of digging at Dell you can find some servers that hint about Linux, but, there isn't any direct hype about Linux. M$ has a lock on Dell. Perhaps as more people want Linux/Unix then Dell will provide it. This will take time. aaarrrggghhh :D

    http://www.dell.com/content/topics/global....;l=en&s=biz

  11. first I hate this language, but since I must take it..

    I need to evaluate if a Int is between 3 and 7 ( so it could = 4 or 5 or 6)

    this is what I tried

    If check < 7 & check > 3 Then

    I do not want to have to write individual if statements, that would be stupid

    in c# it would be

    if (check > 3 ) && (check < 7)

    {

    MessageBox()

    }

  12. I can not reproduce the same error on the site you listed but I did on some others, this what I did.

    I downloaded this

    http://www.adobe.com/go/fp9_update_b1_installer_linuxplugin

    its a gzip file so

    gunzip <filename>

    it will create a directory the same as the name of the file FLASH-something

    cd to that folder

    there is a read.me file and a .so file.

    copy the .so file to

    ~/.netscape/plugins

    and to

    ~/.mozilla/plugins

    then restart your firefox and see if it works..

  13. Before reading this post, realize that I am a FOSS zealot.

    I'd suggest straight up Wine. If you can get a recent enough version working properly, you'll easily be able to run WoW. I'm able to run Counter-Strike: Source with Wine 0.9.20 as well as a friend on Windows, so WoW shouldn't be too much different. In fact, I recall seeing some WoW screenshots. This'll save you the money on CrossOver or Cedega, and (I'm not sure how CrossOver is licensed) the proprietary-ness of Cedega. In case I'm not coming off strong enough on the FOSS thing, I recall hearing Cedega's been slipping as of late.

    Cross over is 100% FOSS, you are free to do what ever you want with the Wine part, they have an installer that come with support. as a matter of fact, Wine would get no development with out Cross Over Office. It that money that pays full time coders and support. Cross over roles everything back into the wine code tree

    Codega uses Wine as a library sine it is LGPL software, with its own proprietary direct X libaries and installer launcher

  14. for WoW Cedega is the best way I know (its based off an old version of WINE (Windows IS NOT Emulated))

    and they added direct X to OpenGL conversion.

    CrossOver is WINE (they head the project and Sales of CrossOver help pay the bills)

    they just added better Dircet X support, but I don't think its as mature, unless Google added a lot more than I thought to get Google Earth to work with Linux..

  15. one of my windows shares can only be mounted if I am the root user. I am pretty sure my fstab is correct. If you notice below, I am able to unmount it as regular user.

    shane@mainbox ~ $ mount podcasts
    cannot mount on /home/shane/podcasts: Operation not permitted
    smbmnt failed: 1
    shane@mainbox ~ $ su
    Password:
    mainbox shane # mount podcasts
    mainbox shane # exit
    exit
    shane@mainbox ~ $ umount podcasts
    shane@mainbox ~ $

    here is my line from my fstab

    //marsala/itunes   /home/shane/podcasts smbfs   noauto,credentials=/etc/credentials,users,defaults   0 0

    I also tried to do it with out the defualts option. I am getting the same error

    is this

    credentials=/etc/credentials

    to match widows accounts with the login process.

    and who owns that file, and can others read it.?<--- if root created it you may not be able to read it..

    plus I thought it should look more like this

    //winbox/share /mnt/share smbfs username=joe,password=bloggs,uid=500,gid=500 0 0