Jump to content

Emeryth

Active Members
  • Posts

    109
  • Joined

  • Last visited

Posts posted by Emeryth

  1. You are obviously missing a power source, just grab two AA batteries, or a lithium battery (the flat round ones), and you've got 3 Volts, enough for any LED.

    Even though connecting a 1.8 V diode to a 3 V voltage source won't blow up, it's not very healthy for the diode, that's why resistors are used to limit the current going through it. Use this site http://led.linear1.org/1led.wiz to calculate the required resistance, 1k Ohm is too much.

    Just remember that LEDs only work one way, the longer leg (anode) should be connected to +.

    As for connecting it all together, just connect everything in series.

    Check out http://www.instructables.com/ for lots of interesting electronics projects for noobs and pros alike.

    lol, 2 1/8" breadboard xD

  2. Imagine a person who doesn't sell any drugs but tells everyone where to get them when asked.

    Would you have nothing against such a person?

    Now imagine a person who knows everyone in town, and will tell you where to find anyone.

    If that person told someone where to find Joe (who happens to be a drug dealer) not knowing that he deals illegal stuff, would you consider that person to be just like the first one?

    [for the sake of this analogy we assume drugs are bad]

  3. Sparda, I believe the problem here is to connect two PCs in different cities ("a pc in bern and my pc in geneve ").

    The easiest way to make a VPN is using Hamachi, it's a free program with zero configuration needed, unfortunately it's kind of slow and potentially insecure (if you are paranoid) because the connection is managed by their servers.

  4. Oh that's the joy of Java. The pollFirst() method was introduced in 1.6 :P

    For compatibility you can replace it with:

    Comparable cmp1 = (Comparable) tmp1.first();
    Comparable cmp2 = (Comparable) tmp2.first();
    tmp1.remove(tmp1.first());
    tmp2.remove(tmp2.first());

  5. Here is my solution in Java.

    The returned power set is sorted and can contain any type of objects (of course all of the objects must be of the same type) as long as they implement the Comparable interface (e.g. all basic data types).

    As an example, the program creates a power set of command line parameters.

    import java.util.Collections;
    import java.util.Comparator;
    import java.util.Set;
    import java.util.TreeSet;
    
    public class Main {
    
        public static TreeSet makePowerSet(Comparable[] elements) {
            TreeSet powerSet = new TreeSet(new Comparator<Set>() {
    
                public int compare(Set o1, Set o2) {
                    TreeSet tmp1 = new TreeSet(o1);
                    TreeSet tmp2 = new TreeSet(o2);
                    if (o1 == Collections.EMPTY_SET) {
                        return -1;
                    }
                    if (tmp1.size() < tmp2.size()) {
                        return -1;
                    }
                    if (tmp1.size() > tmp2.size()) {
                        return 1;
                    }
                    while (tmp1.size() > 0 && tmp2.size() > 0) {
                        Comparable cmp1 = (Comparable) tmp1.pollFirst();
                        Comparable cmp2 = (Comparable) tmp2.pollFirst();
                        if (cmp1.compareTo(cmp2) < 0) {
                            return -1;
                        }
                        if (cmp1.compareTo(cmp2) > 0) {
                            return 1;
                        }
                    }
                    return 0;
                }
            });
            powerSet.add(Collections.EMPTY_SET);
            for (int i = 0; i < elements.length; i++) {
                Object o = elements[i];
                for (int k = 0; k < elements.length; k++) {
                    TreeSet set = new TreeSet();
                        set.add(o);
                    for (int j = k; j < elements.length; j++) {
                        Object p = elements[j];
                            set.add(p);
                        TreeSet copy = new TreeSet(set);
                        powerSet.add(copy);
                    }
                }
            }
            return powerSet;
        }
    
        public static void main(String[] args) {
            TreeSet powerSet = makePowerSet(args);
            System.out.println(powerSet);
        }
    }

  6. GRUB can't boot an .iso file, but it is possible to boot multiple linux liveCDs without partitioning the device.

    You just have to copy all the files from an iso to an alredy bootable pendrive and then edit the [pendrive]/boot/syslinux/syslinux.conf file to boot the appropriate kernel and rootfs.

  7. You can always try out GRUB without installing it by simply booting any linux live cd or making a GRUB floppy/usb drive.

    As for your main problem, the Vista bootloader should automatically find the XP installation and ask you which system you want to boot every time.

    It surprises me that the vista autorepair function didn't help you, I have successfully used it to repair many complicated boot problems (like fixing the boot records on partitions with both Vista and XP and without destroying the MBR which had GRUB installed).

  8. Start with wikipedia. Read up on MBR, partitions, the booting process. Read the grub manual.

    And the best way to learn is by multibooting and/or BREAKING things e.g. install linux, then windows, and then try to repair it (so that both systems are bootable).

  9. I have the Wind u100 [it's the same hardware] and unfortunately not everything in BT3 works out of the box, you'll have to hack it a bit after installation.

    You need drivers for the wifi card, the touchpad doesn't always work, and there are some problems with graphics.

  10. You should try booting the vista DVD (if you have it), believe it or not, the auto repair function deals very well with partition problems and it doesn't touch the MBR, so your linux installation is safe.

×
×
  • Create New...