Jump to content

cbox


ColinMc

Members+
  • Posts

    18
  • Joined

  • Last visited

Everything posted by ColinMc

  1. ColinMc

    Java help

    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.
  2. ColinMc

    Java help

    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.
  3. it still came out small when I built the program using that icon.
  4. 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
  5. 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.
  6. 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.
  7. 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?
  8. 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/UserFiles/Image/musicnote_icon_small.jpg
  9. 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.
  10. 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.
  11. 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.
  12. 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.
  13. 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?
  14. 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.
  15. 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.
  16. thanks I'm a noob lol I just want to make an awesome program lol.
  17. I forgot to mention I only know Visual Basic 2008 not C#. Sorry about that.
  18. 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.
  19. 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. http://img23.imageshack.us/img23/9711/deviantmanager.th.jpg
×
×
  • Create New...