Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Matjaz xyz

@Matjaz xyz
About
Posts
112
Topics
35
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • I NEED HELP URGENTLY!
    M Matjaz xyz

    public static void IzbrisZivali(ArrayListSeznam) throws ConcurrentModificationException // brisanje zivali
    , IOException
    // IzbrisZivali je ime funkcije, (Arraylist - dinamicna tabela, Zivali - nase zivali, Seznam - uporabljala bom tole za iskanje mojega vnosa)
    {

    	BufferedReader vhod=new BufferedReader(new InputStreamReader(System.in)) ; // odpiranje bralnika
    	{
    		System.out.println("Vnesi točno ime živali, ki bi jo radi izbrisali: ");
    		String IzbrisZivali=vhod.readLine(); // preberemo ime
    		int v=0; // spremenljivka nam pomaga, ce se ne najde te zivali v nasem seznamu
    		
    		for(Zivali Element: Seznam) //za vsak element iz seznama
    
    			if(IzbrisZivali.equals(Element.getIme())) // ce je ime iskane zivali isto kot ime trenutne zivali v nasem seznamu...
    			{
    				
    				Seznam.remove(Element); // jo odstranimo iz nasega seznama zivali
    				System.out.println("Žival " + IzbrisZivali + " je bila izbrisana");
    				v++;
    				
    			}
    		
    		if(v==0) // ce ne najdemo zivali, to sporocimo
    		{
    			System.out.println();
    			System.out.println("Na seznamu ni živali z imenom " + IzbrisZivali);
    			System.out.println();
    		}
    	}
    }
    

    How can i fix that? What should be changed. Please solve me this problem as im sitting here and staring at my computer for 2 hours! Please! The problem is ConcurrentModificationException

    Regards, Matjaž

    Java help question

  • Adding text to an existing file or create it if not existant
    M Matjaz xyz

    Hi. I'm new at Java... also helping my girlfriend to do her work (sigh:P).... Anyway... im stuck a bit at adding text to an existing file... Is there any simple way editing this? try { PrintWriter inFile= new PrintWriter(new FileWriter("Text.txt")); PrintWriter inFile1= new PrintWriter(new FileWriter("Text1.txt")); for (SOMETHING Element:Something) { izhod.println(Element.inFile()); izhod1.println(Element.inFile1()); } inFile.close(); inFile1.close(); } catch(Exception e) { System.out.println("Error."); } Or must i rewrite everything and use buffered reader? If thats so, can you show me what to do :) Thanks in advance!

    Regards, Matjaž

    Java help java question

  • How to remove CLI Header or how to disable dissasembling of my app
    M Matjaz xyz

    Ok. Thanks. I went over the documentation u gave me and will try to work something out. Thanks for your help! :)

    Regards, Matjaž

    C# csharp tutorial question lounge

  • How to remove CLI Header or how to disable dissasembling of my app
    M Matjaz xyz

    Hi. I want to know on how to remove the cli header. I actualy dont know what this is... but i tried to dissasemble a random app. (.exe) with .NET Reflector and it said that it cannot be disass. because it does not contain a CLI Header. If i try to dissasemble my .NET applications (just to create a new project and build it and then try to disassemble it) - it disassembles. Anyway on how to prevent on making this possible? Thank you in advance!

    Regards, Matjaž

    C# csharp tutorial question lounge

  • Running application on a network mapped drive
    M Matjaz xyz

    hehehe:) true:) well... thanks anyway:)

    Regards, Matjaž

    C# question delphi sysadmin security announcement

  • Running application on a network mapped drive
    M Matjaz xyz

    Thanks for your answer! So that means there's no way to get applications running by adding some extra code? Only localy with administrator account and change some settings?

    Regards, Matjaž

    C# question delphi sysadmin security announcement

  • Running application on a network mapped drive
    M Matjaz xyz

    Hi. If i try to run my applications on a mapped drive i get a security warning in the top left corner of the applications window. And apllication doesn't work as it gives me an information window : "Application attempted to perform an operation not allowed by the security policy. ... Request for the permission of type 'System.Security.Permissions.FileIOPPermission, mscorlib, version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' How can i make my applications work in such an envirioment? I've seen normal delphi apps work :) Thanks in advance!

    Regards, Matjaž

    C# question delphi sysadmin security announcement

  • How to show current status of the proccess
    M Matjaz xyz

    I've been always wondering on how to show where my applications is currently located in the proccess it is doing. A good example would be - file moving (big files or something). I would make a "for" loop and go through files located in the selected directory and then move them to some other... but how could i show which file is currently being moved? If i put this inside the "for" - label1.text = file[i]; - it wouldnt show nothing. (as it is too fast to show). So can you please give me a hint on how to do that? This is not a top priority question. Just my curiosity, so dont judge me on asking how to do it. Thanks :) Have a nice day ;)

    Regards, Matjaž

    C# tutorial question

  • Any idea why this error appears (SEH Exception)
    M Matjaz xyz

    Yes Giorgi, thank you for your information on security about SQL injections. I just needed an anwser which was more than funny. The SQL Connection string was wrong. And its my bad that i forgot to mention that this error occurs only on computers which have low-access accounts in our domain. Now i've fixed this and it works. HopingToCode was right. I should check the connection string. Which i did today. Thank you both for your time.

    Regards, Matjaž

    C# php help question

  • Any idea why this error appears (SEH Exception)
    M Matjaz xyz

    I get http://www.postimage.org/image.php?v=Pq1N1qmr[^] <- this error on one of the computers. Dont know why. this is the code:

    try
    {
    label12.ForeColor = Color.Black;
    string dbConnComm = "INSERT INTO Vnosi ([Dostava],[Skatla],[Barkoda],[Oznaka],[Skener],[Operater],[Datum],[PosnetkiV3],[PosnetkiM3],[Opombe]) VALUES ("
    + cmbDostava.Text + ", "
    + cmbSkatla.Text + ", '"
    + cmbBarkoda.Text + "', '"
    + cmbEnota.Text + "', '"
    + cmbSkener.Text + "', '"
    + cmbOperater.Text + "', '"
    + cmbDatum.Text + "', "
    + txtVA3.Text + ", "
    + txtMA3.Text + ", '"
    + txtOpombe.Text + "')";

                SqlConnection dbConn = new SqlConnection(sqlConnection);
                dbConn.Open();
    
                SqlCommand dbComm = new SqlCommand(dbConnComm, dbConn);
                dbComm.ExecuteNonQuery();
                dbConn.Close();
                label12.Text = "Uspešno vnešeno";
            }
            catch(Exception ex)
            {
                label12.ForeColor = Color.Red;
                label12.Text = "Napaka pri vnosu";
    
                MessageBox.Show("Napaka: " + ex.ToString());
            }
    

    PC has framework 2.0 and 1.1

    C# php help question

  • How to check if extensions follows up in a list?
    M Matjaz xyz

    Somehow it seems i didnt implent this correctly... or it doesnt work right (like you said, it could and could not work)... aah :/

    if (fbd1.ShowDialog() != DialogResult.Cancel)
    {
    if (checkBox1.Checked == true)
    DIRI.Items.AddRange(Directory.GetDirectories(fbd1.SelectedPath, "*.*", SearchOption.AllDirectories));
    else
    DIRI.Items.AddRange(Directory.GetDirectories(fbd1.SelectedPath, "*.*", SearchOption.TopDirectoryOnly));

                for (int i = 0; i < DIRI.Items.Count; i++)
                {
                    ArrayList DATOTEKE = new ArrayList();
                    DATOTEKE.AddRange(Directory.GetFiles(DIRI.Items\[i\].ToString().ToLower()));
    
                    ArrayList KONCNICE = new ArrayList();
    
                    for (int bo = 0; bo < DATOTEKE.Count; bo++)
                    {
                        KONCNICE.Add(Path.GetExtension(DATOTEKE\[i\].ToString()));
                    }
    
    
    
                    bool breakFor = false;
                    int togetherCount = 1;
                    for (int j = 1; j < KONCNICE.Count - 1; i++)
                    {
                        if (KONCNICE\[j\] == KONCNICE\[j - 1\])
                        {
                            togetherCount++;
                            continue;
                        }
                        else
                        {
                            int count = 0;
                            while (count < togetherCount)
                            {
                                if (!(KONCNICE\[j + 1\] == KONCNICE\[j + count\]))
                                {
                                    if (togetherCount > 1)
                                    {
                                        //if (listBox1.FindStringExact(DIRI.Items\[i\].ToString()) > 0)
                                            listBox1.Items.Add(DIRI.Items\[i\].ToString());
                                        breakFor = true;
                                        break;
                                    }
                                }
                                count++;
                            }
                            if (breakFor)
                            {
                                break;
                            }
                            else
                            {
                                j = j + togetherCount;
    
    C# help tutorial question

  • WIN directory to DOS directory question
    M Matjaz xyz

    Try this:

    Path.GetTempFileName();
    Path.GetTempPath();

    I think you'll manage implanting this one :)

    Regards, Matjaž

    C# question

  • How to check if extensions follows up in a list?
    M Matjaz xyz

    Hmm... it sure looks like it's in the right way. Thanks for taking the time. I'll try to implent something similar and report what happend. Thank you

    Regards, Matjaž

    C# help tutorial question

  • How to check if extensions follows up in a list?
    M Matjaz xyz

    I already thought of that - but it is definitly a no-go. Why? Well, maybe there are some files which dont have their tifs, but some tiffs dont have their jpgs - and the count may match.

    Regards, Matjaž

    C# help tutorial question

  • How to check if extensions follows up in a list?
    M Matjaz xyz

    Umm not duplicates :/ sorry... just... the follow up files. 1.jpg has his own tif, but with a different name. example... 3.tif, because there is another 2.jpg before.

    Regards, Matjaž

    C# help tutorial question

  • How to check if extensions follows up in a list?
    M Matjaz xyz

    It doesnt concern explorer. Basicly, the intention of this application would be to check if JPG files have their duplicate TIF files. If it would be just 1-1, then i could do it... but i cant figure this one out. And what i ment by an error was to put as an output - in which folder the files dont match.

    Regards, Matjaž

    C# help tutorial question

  • How to check if extensions follows up in a list?
    M Matjaz xyz

    Yes. That's right.

    Regards, Matjaž

    C# help tutorial question

  • How to check if extensions follows up in a list?
    M Matjaz xyz

    ummm not incrementing. let me rewrite... (ps: sorry for my bad english) i select a folder. get files from that folder to and arraylist. go with "for" loop through items in that arralist and check extensions (Path.GetExtension). Well... i would go like that. The filenames are incremental... (8 digits type - 00000001 etc) but i really dont have an idea how to put everything in the code. Was trying with this but... One of the ideas was to get extension. if its "tif" then increment int TIFS and if its an JPG, stop counting tifs and add +1 to jpg - then check if the Integer TIFS and JPGS match.. bah... i'm so lost.

    Regards, Matjaž

    C# help tutorial question

  • How to check if extensions follows up in a list?
    M Matjaz xyz

    I've been brainstorming with this for a long time... and havent figured it out yet. I'm just asking for a tip to point me in the right direction... because im going in circles. The problem i have is this: Example folder contains files .jpg and .tif. I want to check them if they follow up correctly. So... this is an example of an OK folder: Example Folder> -1.jpg -2.tif -3.jpg -4.tif -5.jpg -6.jpg -7.tif -8.tif -9.jpg -10.tif You can see, that the files go - 1-1 or 2-2 (maybe also 3-3) in extension. this is when an error would occcur: Example Folder> -1.jpg -2.tif -3.jpg -4.jpg -5.tif -6.jpg -7.tif -8.jpg the extensions dont follow up. the order of the next extension is not the same. Any idea? Please?

    Regards, Matjaž

    C# help tutorial question

  • Getting image compression/codec information?
    M Matjaz xyz

    Hi. I'm looking on how to get the information from an image. The information i need is its codec or compression. The reason why i need this is because, i have a large quantity of .TIF files. But some were not converted right and are color TIFs (IrFan View says : "Old JPEG (in TIFF)"). I need to get these files and convert them to the real .JPG. So, i want to get the codec information from a file and compare it to a string. I'd use the "for" sentence to go through the whole list of files. Summary (a scratch code):

    for(int i = 0; i<files.count;i++)>
    get codec from files[i]
    if codec == old jpeg
    then move the file to a folder

    Any idea on how to get this information? Thanks in advance!

    Regards, Matjaž

    C# tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups