Jump to content

  •  

  • iBotModz CBox


    ColinMc's Content

    There have been 20 items by ColinMc (Search limited from 05-May 23)


    Sort by                Order  

    #109088 Java help

    Posted by ColinMc on 04 November 2009 - 03:13 PM in Help Desk

    So you keep breaking the number down, to see if it will equal 0 or not? To check if prime?

    I think a long time ago when I learned VB, I needed a prime number check for my stat application, to make sure I could divide it or not.

    I re-install java today, and then check.


    never mind I got it my mistake was with the if statements for prime had to be prime == true, while I had prime = true. >: ( I'm mad because that was such a small error I couldn't find till today lol.



    #109084 Java help

    Posted by ColinMc on 04 November 2009 - 02:42 PM in Help Desk

    I'm in computer science 12 and I'm doing really well but I have a problem on one of my programs is that it's suppose to output the users number saying if it's prime or not prime and I can get prime to work but to display not prime I can't. I had it working before but it was bad coding so I'm fixing it up. My problem is there is a infinate loop and I can't figure it out if anyone can help that would be great.


    //Colin McQueen
    //Prime J7
    //November 01 09
    import java.io.*;//tells Java to use input
    class Prime
    {//begin class
    //Program tells the user if the user's number is a prime number or not
    public static void main(String [] args) throws IOException
    {//begins main method
    InputStreamReader inStream = new InputStreamReader(System.in);
    BufferedReader buffread = new BufferedReader (inStream);
    String inData;
    int input, remain,denominator;//declares integer variables
    boolean prime = true; //declares a boolean variable
    System.out.println("Enter a number:");
    inData = buffread.readLine();
    input = Integer.parseInt(inData);
    denominator = input - 1; //denominator is the users number subtract 1
    remain = 0;
    
    while (prime = true && denominator > 1)
    {//begins loop
    
    remain = (input % denominator); //remain is input mod denominator
    
    if (remain != 0)//remain does not equal 0
    {
    denominator = denominator - 1; //denominator is denominator - 1
    }
    
    else //when remain equals 0
    {
    prime = false; //denominator equals 0
    
    }
    
    }//ends loop
    
    
    if (prime = true)//prime equals true and remain doesn't equal 0 or input equals 2
    {
    System.out.println("Prime");//outputs the number as a Prime
    }
    else //remain equals 0 or denominator equals 1
    {
    System.out.println("Not Prime");//outputs the number not a Prime
    }
    
    }//end main method
    }//end class

    also some of the comments I have to fix because I didn't bother with them till I get the program 100% working.



    #97475 Need a Custom made Icon for my program

    Posted by ColinMc on 01 July 2009 - 06:51 AM in Graphics

    I attached preppy's icon, it only appears small. Actually build the program using the icon, it won't be small.


    it still came out small when I built the program using that icon. :(



    #97382 Need a Custom made Icon for my program

    Posted by ColinMc on 30 June 2009 - 03:32 PM in Graphics

    korupt data I like the first one out of the two but when I tried converting it to ico and then using it, it shrinks it and makes it small for some reason. I just changed the icon on one program but look at the icon I have on my music renamer I want it to be that size.
    http://i41.tinypic.com/2d0eumf.jpg



    #97368 Need a Custom made Icon for my program

    Posted by ColinMc on 30 June 2009 - 03:01 PM in Graphics

    I couldn't get it, it's too small I tried resizing anyone else got any icons that aren't like that photo but using that blue.



    #97350 Need a Custom made Icon for my program

    Posted by ColinMc on 30 June 2009 - 02:28 PM in Graphics

    it has that on the .psd. that is a .jpeg let me make it a .png.


    k



    #97324 Need a Custom made Icon for my program

    Posted by ColinMc on 30 June 2009 - 12:43 PM in Graphics

    here. if you choose me all i ask is for credit.


    I was going to use yours preppy but I don't want the white background showing If you can just make it the icon with a transparent background that would be great.



    #97290 Need a Custom made Icon for my program

    Posted by ColinMc on 30 June 2009 - 08:03 AM in Graphics

    sorry I want a custom made icon no one has and I want it to include a music note. The icon I posted I just wanted someone to use the blue in that icon for the custom one. Is that clear enough?



    #97287 Need a Custom made Icon for my program

    Posted by ColinMc on 30 June 2009 - 07:29 AM in Graphics

    I need a custom made icon for my Music Renamer. I want it to have a Music Note in it but you can just make some examples and I will pick one. I would like the icon to have the colour as a background this blue in this icon. If anyone can make me one at least today because I would like to release it that would be great. http://www.fisabc.ca..._icon_small.jpg



    #97017 Need help with my program

    Posted by ColinMc on 28 June 2009 - 05:12 PM in Help Desk

    I got everything working with my code not the one I posted lol but for the track # when I click auto rename and the track textbox only has 1 digit and I want it to have two like 01 - 09 and so on. I tried "0" + MusicFile etc.. but when it came to a 10 in the music files header for the track number it would be 010 which I didn't want I just wanted it to have 01 - 09 without the user manually adding the zero.



    #96646 Impossible to find on the Internet

    Posted by ColinMc on 26 June 2009 - 06:42 AM in Off-Topic

    Nothing is impossible to find on the internet.


    well try finding it you won't all you will find is the cds but the Tab books scanned for those two are hard I looked on torrent sites google nothing.



    #96609 Impossible to find on the Internet

    Posted by ColinMc on 25 June 2009 - 06:17 PM in Off-Topic

    If anyone can find me Iron Maiden - Dance of Death Guitar tab book scanned and Somewhere Back In Time Best of 1980 - 1989 guitar tab book scanned. I will seriously thank you and call you god of finding impossible stuff lol. But I looked everywhere and I couldn't find it and if you do find it as a torrent can you send it to me not a torrent but zipped or rar folder of it. Good luck if you decide to help me. Also if you do find it for me and you have an account on BlueShadowz I will give you points on that site.



    #96265 Need help with my program

    Posted by ColinMc on 24 June 2009 - 07:20 AM in Help Desk

    Code Snippet
    class MusicID3Tag
    
        {
    
            public byte[] TAGID = new byte[3];      //  3
    
            public byte[] Title = new byte[30];     //  30
    
            public byte[] Artist = new byte[30];    //  30  
    
            public byte[] Album = new byte[30];     //  30  
    
            public byte[] Year = new byte[4];       //  4  
    
            public byte[] Comment = new byte[30];   //  30  
    
            public byte[] Genre = new byte[1];      //  1 
    
        }
    
    
    Code Snippet
    string filePath = @"C:\Documents and Settings\All Users\Documents\My Music\Sample Music\041105.mp3";
    
                using (FileStream fs = File.OpenRead(filePath))
    
                {
    
                    if (fs.Length >= 128)
    
                    {
    
                        MusicID3Tag tag = new MusicID3Tag();
    
                        fs.Seek(-128, SeekOrigin.End);
    
                        fs.Read(tag.TAGID, 0, tag.TAGID.Length);
    
                        fs.Read(tag.Title, 0, tag.Title.Length);
    
                        fs.Read(tag.Artist, 0, tag.Artist.Length);
    
                        fs.Read(tag.Album, 0, tag.Album.Length);
    
                        fs.Read(tag.Year, 0, tag.Year.Length);
    
                        fs.Read(tag.Comment, 0, tag.Comment.Length);
    
                        fs.Read(tag.Genre, 0, tag.Genre.Length);
    
                        string theTAGID = Encoding.Default.GetString(tag.TAGID);
    
                        if (theTAGID.Equals("TAG"))
    
                        {
    
                            string Title = Encoding.Default.GetString(tag.Title);
    
                            string Artist = Encoding.Default.GetString(tag.Artist);
    
                            string Album = Encoding.Default.GetString(tag.Album);
    
                            string Year = Encoding.Default.GetString(tag.Year);
    
                            string Comment = Encoding.Default.GetString(tag.Comment);
    
                            string Genre = Encoding.Default.GetString(tag.Genre);
    
     
    
                            Console.WriteLine(Title);
    
                            Console.WriteLine(Artist);
    
                            Console.WriteLine(Album);
    
                            Console.WriteLine(Year);
    
                            Console.WriteLine(Comment);
    
                            Console.WriteLine(Genre);
    
                            Console.WriteLine();
    
                        }
    
                    }
    
                }
    
    I used this code instead that I found got it working for auto rename except when I click auto rename button and in the textboxs 3 out of the 4 show Artist,Album, and Song show but I added track to that same way of code and it doesn't show up or if I put it for byte one which I found was it's byte 1 or 0 it takes the first char of Album.



    #96183 Need help with my program

    Posted by ColinMc on 23 June 2009 - 05:37 PM in Help Desk

    I didn't write that, just in case that comes back to bite me.

    Got it off google.


    ok I'm still working on this but I just started using C# today and I already made everything except for the auto rename button IBotPeaches can you link me to where you got that if you remember?



    #86259 Need help with my program

    Posted by ColinMc on 03 May 2009 - 01:46 PM in Help Desk

    I couldn't' find anything for vb.net for reading ID3 tags or setting them. Sorry.


    thanks for your help anyways I appreciate it.

    I tried putting the C# code in a convertor to visual basic but it said it was missing } at line 2 column 1. or something like that.



    #86203 Need help with my program

    Posted by ColinMc on 03 May 2009 - 11:32 AM in Help Desk

    I honestly don't know what you want, but since you said that you are a newbie at programming, how about you go here and look at Visual Basic section and try to learn about it from there.

    I really don't understand your question.


    my question is I want to make a file renamer where I click a button to open the file dialog choose the file and it renames it by the info in the properties like artist, year, album, comment that section but in this order Artist - Album - Track # - Song.format

    I'm using Visual basic 2008 not C# just to make that clear.



    #85893 Need help with my program

    Posted by ColinMc on 02 May 2009 - 07:32 AM in Help Desk

    I'll try and look for a vb of it.


    thanks I'm a noob lol I just want to make an awesome program lol.



    #85864 Need help with my program

    Posted by ColinMc on 02 May 2009 - 05:46 AM in Help Desk

    I forgot to mention I only know Visual Basic 2008 not C#. Sorry about that.



    #85673 Need help with my program

    Posted by ColinMc on 01 May 2009 - 04:25 PM in Help Desk

    So you want to auto-populate the tags from online? I have no clue.


    Or you want to sort them based on those tags? I can do that.


    I sorta don't know what you mean but like the tags for like artist,album,track number, and song I want to press a button to open the music file which I got and another file that will take those tags from the music file itself not online just from the music file and rename the file with those tags and in the order in my earlier post. Thank you for replying I've been waiting for a response.



    #85477 Need help with my program

    Posted by ColinMc on 01 May 2009 - 10:12 AM in Help Desk

    I have one section of my program for renaming music files I got one part with text boxs for renaming artist, song, track #, album and it works but I want to do a auto rename where when the person opens the file and if they click a button called auto rename it will look in the music file\'s properties and find artist etc.

    Ordering them too like Artist - Album - Track # - Song.format

    Here's a photo of the renaming section there\'s a lot of bugs I guess I found but since I\'m not pro I will find someone who is willing to fix them for me.
    Posted Image