Arch compared to Vector

I'm quite newbie for Linux, but not afraid for commandline. It's the way to learn how things works, isn't it? Is that good enough to try Arch? I'll see.
I've had it with Windows and like to get a working, good performing and stable desktop with basic SOHO apps installed and VMware to experiment with other distros and oses without multibooting.
So I need a no nonsense, light weighted OS on top wich is compatible with al my hardware, and is capable to run VMware and.. eh... there was some very good performing whats-it-called program to run any other Linux.  So I can use windows in a virtual machine as long as I need it.
Arch and Vector are both famous for speed.
So...how is Arch compared to Vector on speed, compatibilty, stabilty?
And since my computer is 24 hours a day online, security isn't unimportant.
So.... are they... usable for my goal? If not.. does anyone have a better idea?

I find Arch faster than Vector.  Vector is actually made for slower machines, while Arch is designed for PIII or AMD-K7 and up.
Vector is more oriented towards the newcomer, more graphic configuration tools and the like, while Arch is aimed towards people more used to editing text configuration files.
Security, well, both enable you to use iptables, which is how I usually secure a machine.   There are various other firewall implementations out there, which should work on either distribution.
Vector makes it a ~bit~ (in my opinion, and this could just be because I haven't used it that much and didn't do that much research) harder to get under the hood, so to speak, and edit the various configuration files.
Both are nice distributions, with different target audiences.  I think you'll learn more about Linux using Arch, but that could be my opinion. Vector is based on Slackware, which is sort of the classic vanilla Linux.
On a 686 (PIII or K7 and up) I think you'll find Arch to be faster.

Similar Messages

  • Performance issues comparing two vectors

    I need some advice on what is the fastest way to compare two vectors. My question is all about performance;
    I have two vectors one(Vect A) of which has more than 20000 string values and the other Vector B would hold typically around 200 strings.I compare them both to find out if Vector B has values in Vector A and remove those.
    I iterate thro each element in a loop from the smaller to the bigger vector comparing element by element.But it takes a long time.
    Is there any quick way to do this comparison and can I use contains/compare methods instead of iterating thro the vectors.will it speeden up things
    Arn

    first of all, you should probably examine your collection choice and make sure that java.util.Vector is your best option (assumming you can change the class). Do not use a Hashtable as the previous poster suggested- it doesn't sound like you have a key/value type relationship in your elements, making a Map implementation superflous. Will there be duplicate elements in either Collection? If you will not have duplicate elements, you should probably use a Set collection instead of a List. Does your collection have to be thread-safe? If not, one of the unsynchronized collections should give you better performance (e.g. ArrayList should be quicker then Vector). For the best possible performance, you could use an ordered collection and write your own comparator, so that it does not iterate beyond what ever element assurres that there is no match (i.e. if the first element is "fred" in an ordered collection, you know there will be no match for "adam"). Sun has some good tutorials on the java.util.Collection package that will help you understand the benefit of each implemenation...
    although, and I suppose this is neither here nor there, I wouldn't use java objects to sort through 20K string items- sounds like storing them in a database might be superior. Take care.

  • Comparing two vectors of objects

    Hi,
    This is just a small example of what I am trying to do.
    Trying to just compare the objects of type FileInfo in the vectors, do I have to create a compareTo function or something to define what is equal when comparing the objects? Where would I create this and how would I implement it?
              Vector v1 = new Vector();
              Vector v2 = new Vector();
              v1.addElement(new FileInfo("blah", "name"));
              v1.addElement(new FileInfo("blah", "name"));
              System.out.println(v1.equals(v2));
    // Returns falseThanks

    Only way I have thought of is change the vector to an
    array and use Sort(Object, Compator)
    Seems the easiest way. It is wierd [weird] how Vectors don't
    have any functions that allow you to compare things.Vector DOES compare things. But, it uses "equals" on those objects. If you didn't write an "equals" method for FileInfo, it will only compare the REFERENCES of FileInfo objects, not the data within those objects. I assume you want to have your "equals" methods compare the two "blah"s and the two "name"s (using String.equals). Give it a shot. If your "equals" doesn't work, then post it and tell us what "doesn't work" about it.

  • How do i compare each vector value to find  a match with curent value

    My select statement contain more that one value .So I strore it in vector .But currently it does not compare each value .So I dont know wrong .How to search entire vector and find the matching one.
    Below are the coding I used :
    <%String sql_query3 = "SELECT DISTINCT (ir_tran_typ) "+
                                              "  FROM intrcd ";
                               System.out.println("trans type"+sql_query3 );           
                                try{
                                    rset = db.execSQL(sql_query3);
                                catch(SQLException e) {
                                    System.err.println("Error in query - intrcd - transaction_main.jsp " +e +" sql " +sql_query3);
                                while(rset.next()){
                                    tran_cde = rset.getString("ir_tran_typ");
                                            tran_typ.addElement(rset.getString("ir_tran_typ"));
                                            System.out.println("trans type 34 "+tran_typ );%>
                                            <% }%>
                                          alert(obj.value);
                                  <%for(int i=0 ;i<tran_typ.size();i++){
                                     System.out.println("trans type 222  "+ tran_typ.size());
                                       tran_cde =tran_typ.elementAt(index).toString();%>
                                       <%System.out.println("trans type before "+ tran_cde);%> 
                                        eval(document.all.tran_cde.option
                                      if(D == <%=tran_cde%> ){
                                       <%System.out.println("trans type D"+ tran_cde);%>     
                                       <%String sql_query2 = "SELECT ir_rea_cde,ir_rea_desc"+
                                              "  FROM intrcd"+
                                              " WHERE ir_tran_typ = 'D' " +
                                                        " ORDER BY ir_rea_cde ";
                               System.out.println("query"+ sql_query2);           
                                try{
                                    rset = db.execSQL(sql_query2);
                                catch(SQLException e) {
                                    System.err.println("Error in query - emmast2 - transaction_main.jsp " +e +" sql " +sql_query2);
                                        index = 1;
                                while(rset.next()){
                                        rea_cde = rset.getString("ir_rea_cde");
                                        rea_desc =  rset.getString("ir_rea_desc");
                                       tran_typ.removeAllElements();
                                       }%>
                                  if( R == obj.value){
                                       alert(R)
                                      if(R== <%=tran_cde%> ){
                                       <%System.out.println("trans type R"+ tran_cde);%>     
                                       <% sql_query2 = "SELECT ir_rea_cde,ir_rea_desc"+
                                              "  FROM intrcd"+
                                              " WHERE ir_tran_typ = 'R' " +
                                                        " ORDER BY ir_rea_cde ";
                               System.out.println("query 2"+ sql_query2 );           
                                try{
                                    rset = db.execSQL(sql_query2);
                                catch(SQLException e) {
                                    System.err.println("Error in query - intrcd - transaction_main.jsp " +e +" sql " +sql_query2);
                                        index = 1;
                                while(rset.next()){
                                        rea_cde = rset.getString("ir_rea_cde");
                                        rea_desc =  rset.getString("ir_rea_desc");
                                       }%>
              <%}%>
                }

    Dude, your code is a MESS! Learn to use spacing and nicer indentation...
    My select statement contain more that one value .So I strore it in
    vector .But currently it does not compare each value .So I dont know
    wrong .How to search entire vector and find the matching one.What???? Can you please try and explain yourself again? What is it you are trying to do/achieve?

  • Comparing two Vectors

    I have a vector which initially reads a file line by line and is displayed by an applet. The file has 'N' constant lines & is dynamic . When the applet gets refreshed, the file is read into an another Vector. Now how do i compare the two vectors i.e in case there is any change in the new Vector the new 'n' lines should be appended to the old vector by replacing the 'n' lines.
    Thanks

    If I understand your question correctly, you have an input file of fixed length (for argument's sake, we will say 5 lines) as in:
    line #1
    line #2
    line #3
    line #4
    line #5You read these lines into a Vector (we'll call it Vector A). Some time passes, and you look at the file again, and it's contents are:
    line #3
    line #4
    line #5
    line #6
    line #7Now you read these lines into Vector B. This is the part I get confused about. If you are just planning on detecting change(i.e., remove 1 & 2, add 6 & 7), why not just overwrite Vector A with Vector B?
    If you need to know specifically which lines are new, you could write simple methods:
    * This method will return a Vector containing the lines no longer in
    * the file.
    * @param vecOld the Old Vector
    * @param vecNew the New Vector
    * @return a Vector containing entries in Old not found in New
    public Vector findRemovals(Vector vecOld, Vector vecNew) {
      Vector vecReturn = new Vector();
      for (int i = 0; i < vecOld.size(); i++) {
        if (!vecNew.contains(vecOld.get(i))) {
          vecReturn.add(vecOld.get(i));
      return vecReturn;
    * This method will return a Vector containing the new lines in
    * the file.
    * @param vecOld the Old Vector
    * @param vecNew the New Vector
    * @return a Vector containing entries in New not found in Old
    public Vector findAdditions(Vector vecOld, Vector vecNew) {
      Vector vecReturn = new Vector();
      for (int i = 0; i < vecNew.size(); i++) {
        if (!vecOld.contains(vecNew.get(i))) {
          vecReturn.add(vecNew.get(i));
      return vecReturn;
    }I hope this helps. If not, could you post a clearer description of your problem?

  • Comparing two vectors using index of

    Hi
    I have two vectors .Vector 1 holds around 100 strings.Vector 2 holds 10000 strings.I need to compare iterate through the vector to see if the there any strings matching and pull them out.How do I use the index of method to compare the two
    Thanks
    Arnold

    Hi
    I have two vectors .Vector 1 holds around 100
    strings.Vector 2 holds 10000 strings.I need to compare
    iterate through the vector to see if the there any
    strings matching and pull them out.How do I use the
    index of method to compare the two
    Thanks
    ArnoldInstead of using a vector why don't you use a array, this would allow you to sort using a Comparator, also I would try and get away from a Vector, they are syncronized and can be very slow, try using a ArrayList if you must use a Collection.
    If you do use a array, sort it then when you are searching it just cut the 10000 size array in half, this gives you only 5000 and then do the same until you have chunked it down to a min amount, If I am not mistaken this is how db with large bitmap indecs work.
    HTH

  • Efficient compare among vector elements

    Hi guys,
    I've a basic question, I've solved it with lots of nester for and I'm sure it's not the best way to do it, so I hope you can help me.
    I've a vector of object User, so Vector<User> and user object has a property age.
    What I want is simply:
    1) iterating this vector and make comparing of age field for each user with each user (for example, 3 user, user1 - user2, user2 -user3,user3-user1).
    2) User older for each compare must be entered in a new vector.
    So starting from a vector of n element I should have a new vector with dimension equal to n*(n-1)/2.
    Could someone help me to find most efficient code? (please show some code example)
    Thanks,
    Regards

    new_to_java123 wrote:
    What I want is simply:
    1) iterating this vector and make comparing of age field for each user with each user (for example, 3 user, user1 - user2, user2 -user3,user3-user1).
    2) User older for each compare must be entered in a new vector.
    So starting from a vector of n element I should have a new vector with dimension equal to n*(n-1)/2.Well what you want is simply a very inefficient way to solve the problem. As you describe it you will use an algorithm of complexity O(n**2), while it can be done in O(n)!
    What you should do:
    1) Parse the vector once and determine the minAge and maxAge
    2) Create an array[min-age, max-age] which contains a list of users for each index. As this is not directly supported in Java, use an ArrayList of size (maxAge - minAge ++1) and populate it with an empty List for each index 0 .. maxAge - minAge. Each entry with index i in that ArrayList is a List of persons whose age is (i ++ minAge).
    3) Now iterate over the original Vector and append each user to the List of persons of his age (in code: ageList.get(user.getAge() - minAge()).add(user); )
    Voilá. Only two scans of the original Vector and you have a structure that holds
    1) List of the users of a given age (ageList.get(age - minAge()).
    2) All users older than the given age can be found by iterating the lists with greater index as (age - minAge()).
    And of course the memory requirements are much lower also!
    It needs to store only maxAge - minAge + 1 plus the outer ageList. if you store null instead of an empty list if no user has a specific age this can be further reduced at the cost of havein to do more null checks.

  • How does Arch compare to FreeBSD?

    Hi all,
    I'm very happy with Arch Linux, but I'm also interested in FreeBSD. I read a lot about FreeBSD (vs. Linux) in general and here's a summary: FreeBSD is faster, more coherent and easier to maintain. Linux supports more hardware and multimedia stuff and is for n00bs(just a common rant, don't pay attention to this).
    FreeBSD advocats are proud of the performance, but doesn't Arch and some other distro's offer equal or even better performance, especially with linux 2.6? And I'm also wondering what they mean with 'more coherent'. After some investigation, the only evidence for this are some vague statements that Linux is just a loosely assembled piece of software and that there's a distinct difference between the base system and third party apps(/usr/local/). I don't really see an advantage in having base and rest separated. Nor do I fully understand what they mean with loosely assembled. What really shocked me was that FreeBSD people don't seem to know Linux can also be easy to maintain. E.g. pacman, portage, abs, dpkg/apt, yum, apt-rpm,etc.
    Please don't take this as a flame or rant or anything like that. It's written from a Linux-user point of view, because, well, I am one. Don't get me wrong, I'm really interested in trying FreeBSD, but I'm just having a critical look at it. If I do someting, I want to do it for a reason. So what are your opinions about FreeBSD? Have I overlooked something or don't you agree with me at all? I'd love to hear your opinions. Sorry for my bad English.

    About the coherency : very simple put
    - Linux is just the kernel, the rest comes from GNU and other third parties. The distros assemble that.
    - *BSD is the whole OS, including kernel and everything in /usr (but not /usr/local )
    A little more detailed : FreeBSD prvides next to the kernel also the C-library, all the programs like "ls" "cp" etc. and, more importantly, if there are kernel functions that require user land tools, they are automaticallly in the OS. However, there are programs in the core OS that are not written by the *BSD teams - most prominently gcc.
    And to demonstrate that further : all the extra packages that are available for the BSD's usually get installed into /usr/local - like KDE and Gnome - to demonstrate that these packages are not part of the core OS. But they are so easily installed, though.
    In general I rather compare one of the BSD's with a specific Linux distro - not with Linux in general - especially since then you actually compare whole OS's.
    Apart from the coherency : if you feel comfortable with Arch you will feel comfortable with the BSD's. The simple configuration and boot process are very similar. In fact, AL was inspired by the BSDs (if I interpret the various documentations correclty :-) ). Also, I think the percentage of BSD users (former or current) in the Arch community is very high. I myself use FreeBSD and OpenBSD quite a bit - and if it wasn't for AL, a linux kernel may be booted very rarely at home ;-)

  • Conky font differences under Arch compared to Ubuntu [SOLVED]

    I'm using the same basic .conkyrc when I'm booted into Arch as I do when I'm booted Ubuntu.  For some reason, the one under Ubuntu looks different font-wise.  In the screenshot below, Arch has the light blue background while Ubuntu has the slate colored one.  Anyone know what might be causing this?
    Here is the first part of the ~/.conkyrc
    background no
    own_window yes
    own_window_type override
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    out_to_console no
    # X font when Xft is disabled, you can pick one with program xfontsel
    #font 7x12
    #font 6x10
    #font 7x13
    #font 8x13
    #font 7x12
    #font *mintsmild.se*
    #font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
    #font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1
    # Use Xft?
    use_xft yes
    # Xft font when Xft is enabled
    xftfont Bitstream Vera Sans Mono:size=8
    #own_window_transparent no
    #own_window_colour hotpink
    # Text alpha when using Xft
    xftalpha 0.8
    on_bottom yes
    # Update interval in seconds
    update_interval 2
    # Create own window instead of using desktop (required in nautilus)
    #own_window no
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    # Minimum size of text area
    #minimum_size 250 5
    maximum_width 258
    # Draw shades?
    draw_shades no
    # Draw outlines?
    draw_outline no
    # Draw borders around text
    draw_borders no
    # Stippled borders?
    stippled_borders 10
    # border margins
    border_margin 4
    # border width
    border_width 1
    # Default colors and also border colors
    default_color white
    default_shade_color white
    default_outline_color white
    # Text alignment, other possible values are commented
    #alignment top_left
    #minimum_size 10 10
    #alignment top_right
    alignment bottom_left
    #alignment bottom_right
    # Gap between borders of screen and text
    gap_x 12
    gap_y 37
    # Add spaces to keep things from moving about? This only affects certain objects.
    use_spacer no
    # Subtract file system buffers from used memory?
    no_buffers yes
    # set to yes if you want all text to be in uppercase
    uppercase no
    EDIT: the solution to this problem is described in post #12.
    Last edited by graysky (2009-04-25 14:32:59)

    Ashren wrote:Please check the output of "xdpyinfo | grep dots" it usually should be 96x96 dpi. My bet is that your dpi is wrong. If you're in KDE/Gnome you set the dpi in the DE. If you're using something else one solution is to add "xrandr --screen 0 --dpi 96x96" to your .xinitrc.
    Here is the output:
    $ xdpyinfo | grep dots
    resolution: 90x88 dots per inch
    I'm using Gnome but can't seem to locate a section to change my dpi.  I'm using the nvidia driver (8800GS) but didn't see an area under nvidia-settings to change it either.  I tried that xrandr line you proposed, upon restarting gdm, the setting didn't take:
    $ xdpyinfo | grep dots
    resolution: 90x88 dots per inch
    Here is my ~/.xinitrc
    #!/bin/sh
    # ~/.xinitrc
    # Executed by startx (run your window manager from here)
    exec gnome-session
    xrandr --screen 0 --dpi 96x96
    Thanks!
    Last edited by graysky (2009-04-23 18:37:22)

  • Slow download speeds on arch compared to windows (Belkin N300 USB)

    I've been using the Belkin N300 F7D2101 USB wireless adapter on windows, always at a consistent 2-3 MBp/s. Ever since switching to Arch I've gotten a less consistent 350-450 KBp/s.
    The adapter is using the r8712u driver, and has a rtl8192su chipset.
    [mittens@mitten ~]$ lsusb
    Bus 004 Device 002: ID 8087:8000 Intel Corp.
    Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 002: ID 8087:8008 Intel Corp.
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 003: ID 04d9:0183 Holtek Semiconductor, Inc.
    Bus 001 Device 002: ID 050d:845a Belkin Components F7D2101 802.11n Surf & Share Wireless Adapter v1000 [Realtek RTL8192SU]
    Bus 001 Device 004: ID 1af3:0001
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    [mittens@mitten ~]$ iwconfig wlp0s20u2
    wlp0s20u2 IEEE 802.11bgn ESSID:[ssid] Nickname:"rtl_wifi"
    Mode:Managed Frequency:2.412 GHz Access Point: [access point]
    Bit Rate:72 Mb/s Sensitivity:0/0
    Retry:off RTS thr:off Fragment thr:off
    Power Management:off
    Link Quality=84/100 Signal level=69/100 Noise level=0/100
    Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
    Tx excessive retries:0 Invalid misc:0 Missed beacon:0
    Any ideas?
    Last edited by mittens2001 (2014-10-18 07:02:10)

    pigiron wrote:
    The only suggestion I can give is to simply wait for a while.
    The r8712u driver is in the "staging" portion of the kernel tree. This is where drivers that are "outside of the kernel" are first sent to get them into shape for inclusion in the main Linux source code tree.
    Realtek (the maker of that wireless chip) is somewhat Linux friendly, and they typically create a Linux driver, but they have an annoying habit of using very little of the current Linux wireless/network infrastructure in that driver. They also don't assign any human resources if/when the driver is brought into the "staging" area. This forces the volunteer Linux driver developers to rewrite almost the entire Realtek driver for mainline inclusion. And they do this without signing a NDA agreement nor even being offered a free device for testing/development. So that's some tough work, and therefore takes time.
    According to the current "TODO" list for the r8712u, it still needs integration to the mac80211 and lib80211 Linux wireless layers. So it still has a ways to go. Therefore what you're running now is basically the driver created by Realtek with only somewhat minor modifications.
    According to here the RTL8192SU driver is going to replace the r8712u driver, would it be a better idea to just install this and see if it's usable?

  • Odd compile errors using a struct in a vector

    I am following Accelerated C++ by Koenig and Moo to learn C++, using Eclipse as my IDE and the MinGW tool chain. Chapter 4 teaches about the struct concept using a pretty simple multi-file example program which emulates reading in a series of student grades and outputs the averages. The struct it defines is called Student_info. Here is Student_info.h:
    #ifndef STUDENT_INFO_H_GUARD
    #define STUDENT_INFO_H_GUARD
    #include <iostream>
    #include <string>
    #include <vector>
    struct Student_info {
    std::string name;
    double midterm, final;
    std::vector<double> homework;
    bool compare(const Student_info&, const Student_info&);
    std::istream& read(std::istream&, Student_info);
    std::istream& read_hw(std::istream&, std::vector<double>&);
    #endif /* STUDENT_INFO_H_GUARD */
    There are no errors associated with compare, read or read_hw.
    The problem I am having is that even though the simple variable declaration below seems to work,
    #include "Student_info.h"
    int main() {
    vector<Student_info> students;
    Student_info record;
    string::size_type maxlen = 0;
    in the sense that the Eclipse code editor signals via i) its color coding that it has found the data type; ii) when I mouseover, it shows me the underlying Student_info definition in the hover box; and iii) the code associated with the variable "record" doesn't generate errors.
    However, when I try to use the students vector within main(), I get 'could not be resolved' errors on the property names or 'invalid arguments' for functions which try to pass the variables. For example,
    for(vector<Student_info>::size_type i=0; i!=students.size(); ++i) {
    cout << students[i].name
    << string(maxlen+1 - students[i].name.size(), ' ');
    produces a "Method 'size' could not be resolved" error and a "Field 'name' could be resolved" error.
    It's very odd to me, as I said, because mouseover of the vector students declaration at the beginning of main() produces a hover box with the correct struct definition, indicating the include file is being found and contains the intended definition with the 'name' property defined as a string.
    I've been trying to solve this for a couple of days and have searched the web and this site, as well as going over all the code many times. The code seems to be exactly what is in the book and it's not too difficult to figure out what it is supposed to be doing. I haven't been able to find a similar error description here or elsewhere by Googling. These errors prevent the project from compiling and so I can't precede. I'm hoping someone can describe what might possibly cause such a thing.
    Here's a shortened version of the file with main in it:
    #include <algorithm>
    #include <iomanip>
    #include <ios>
    #include <iostream>
    #include <string>
    #include <vector>
    #include <stdexcept>
    #include "Student_info.h"
    //say what standard library names we use
    using std::cin; using std::setprecision;
    using std::cout; using std::sort;
    using std::domain_error; using std::streamsize;
    using std::endl; using std::string;
    using std::max; using std::vector;
    int main() { // begin main
    vector<Student_info> students;
    Student_info record;
    string::size_type maxlen = 0;
    //read and store all the records, and find the length
    // of the longest name
    while(read(cin, record)) {
    maxlen = max(maxlen, record.name.size());
    students.push_back(record);
    //alphabetize the records
    sort(students.begin(), students.end(), compare);
    for(vector<Student_info>::size_type i=0; i!=students.size(); ++i) {
    // write the name, padded on the right to maxlen+1 chars
    cout << students[i].name
    << string(maxlen+1 - students[i].name.size(), ' ');
    //compute and write the grade
    cout << endl;
    return 0;
    } // end main
    Here are the 'read' functions, which are in a separate file from main and don't seem to be producing any errors:
    #include "Student_info.h"
    using std::istream; using std::vector;
    istream& read_hw(istream& in, vector<double>& hw) {
    if (in) {
    // get rid of previous contents
    hw.clear();
    // read homework grades
    double x;
    while (in >> x)
    hw.push_back(x);
    // clear the stream so that input will work for the
    // next student
    in.clear();
    return in;
    istream& read(istream& is, Student_info s) {
    // read and store the student's name and midterm and final exam
    is >> s.name >> s.midterm >> s.final;
    read_hw(is, s.homework);
    return is;
    bool compare(const Student_info& x, const Student_info& y) {
    return x.name < y.name;
    }

    Do you mind to try:
    for(unsigned i=0; i < students.size(); ++i)
    instead of :
    for(vector<Student_info>::size_type i=0; i!=students.size(); ++i)

  • I need help an urgent help in vectors

    I am comparing the elements of one vector with everyother element of another vector.If a match is found I need to remove the element from the second vector and should obtain the remaining elements of the second vector.Could u please help in this!
    ie)
    Vector v1=new Vector();
    Vector v2=new Vector();
    v1.addElement("apple");
    v1.addElement("grapes");
    v1.addElement("mango");
    v1.addElement("orange");
    v1.addElement("pineapple");
    v1.addElement("banana");
    v2.addElement("cherry");
    v2.addElement("berry");
    v2.addElement("papaya");
    v2.addElement("mango")
    v2.addElement("apple");
    here in this example , if i compare the vectors (v1,v2), the elements in v2(mango and apple) are contained in v1 also.so i need to remove the elements from vector v2 which are common and need to fetch the remaining elements in the v2 vector.so the resulting v2 vector should contain only 'cherry','berry','papaya',and i need to display the content of v2 vector after the removal of similar elements .could u please help me how to do this!!!!!.

    Much easier way, use Vector.removeAll(Collection c).
    As class Vector is an instance of interface Collection, you can pass in a vector.
    i.e.
    import java.util.*;
    public class tester
         public static void main(String[] args)
              tester.refineList();
         public static void refineList()
              Vector v1=new Vector();
              Vector v2=new Vector();
              v1.addElement("apple");
              v1.addElement("grapes");
              v1.addElement("mango");
              v1.addElement("orange");
              v1.addElement("pineapple");
              v1.addElement("banana");
              v2.addElement("cherry");
              v2.addElement("berry");
              v2.addElement("papaya");
              v2.addElement("mango");
              v2.addElement("apple");
              v2.removeAll(v1);
              for(int a = 0; a < v2.size(); a++)
                   System.out.println(v2.elementAt(a).toString());
    }Hope this helps
    D

  • Slower download speeds from Arch

    Hello,
    I am getting slower download speeds from Arch Linux than from my other distros. I have googled and applied  the following "fixes" but they don't improve the download speed.
    1. I shut off ipv6:
    # /etc/modprobe.conf
    alias net-pf-10 off
    alias ipv6 off
    2. I shut off ipv6 in firefox.
    3. Here's my /etc/rc.conf:
    DAEMONS=(syslog-ng iptables dhcpcd network netfs portmap ntp crond alsa gpm kdm cpufreq)
    lo="lo 127.0.0.1"
    eth0="dhcp"
    INTERFACES=(lo eth0)
    4. Here's Arch compared with Zenwalk:
    Arch vs Zenwalk download and upload speeds by
    http://www.speakeasy.net/speedtest/
    Arch           17719 kbs down   2049 kbs up
    Zenwalk      21537 kbs down   2779 kbs up
    5. Ping tests are equal:
    Arch: 64 bytes from 64.233.167.99: icmp_seq=1 ttl=242 time=41.2 ms
    Zenwalk: 64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=34
    ttl=242 time=40.5 ms
    6. I also tried a different browser, and tried stopping iptables.
    Can anyone help?
    macroron

    timtux wrote:Then i would encourage you to try a different NIC. It's probelity
    some driver issue as no one else has noticed this problem.
    Thank You,
    I was just about to ask about kernel modules/drivers. forcedeth is the nic driver, I think. But i have no idea how to correct something that's compiled in. I will stay with what I have for now. until I learn somemore. I like Arch Linux and plan to stay with it.
    macroron
    MODULES=(powernow-k8 forcedeth slhc ac97_bus snd-mixer-oss snd-pcm-oss snd-seq-oss snd-seq-device snd-seq-midi-event snd-seq snd-page-alloc snd-pcm snd-rawmidi snd-timer snd snd-mpu401-uart snd-mpu401 snd-ac97-codec snd-intel8x0 soundcore)
    # lsmod
    Module                  Size  Used by
    nvidia               7239028  24
    agpgart                27352  1 nvidia
    cpufreq_ondemand        6796  1
    ipt_LOG                 6272  1
    xt_tcpudp               3328  1
    xt_state                2432  1
    iptable_filter          2688  1
    iptable_mangle          2560  0
    iptable_nat             6404  0
    nf_nat                 15532  1 iptable_nat
    nf_conntrack_ipv4      14092  3 iptable_nat
    nf_conntrack           51720  4 xt_state,iptable_nat,nf_nat,nf_conntrack_ipv4
    nfnetlink               5272  3 nf_nat,nf_conntrack_ipv4,nf_conntrack
    ip_tables              10452  3 iptable_filter,iptable_mangle,iptable_nat
    x_tables               12036  5 ipt_LOG,xt_tcpudp,xt_state,iptable_nat,ip_tables
    analog                 10272  0
    ppdev                   7556  0
    lp                      9220  0
    ns558                   4224  0
    gameport               11784  3 analog,ns558
    ppp_generic            23572  0
    psmouse                34952  0
    serio_raw               5636  0
    parport_pc             35172  1
    parport                31176  3 ppdev,lp,parport_pc
    rtc_sysfs               3840  0
    rtc_proc                3844  0
    rtc_dev                 6664  0
    rtc_cmos                7188  0
    rtc_core                7684  4 rtc_sysfs,rtc_proc,rtc_dev,rtc_cmos
    rtc_lib                 3456  2 rtc_sysfs,rtc_core
    k8temp                  4736  0
    pcspkr                  2944  0
    usbhid                 36128  0
    hid                    24448  1 usbhid
    ff_memless              5256  1 usbhid
    sg                     26524  0
    i2c_nforce2             5120  0
    i2c_core               17536  2 nvidia,i2c_nforce2
    tsdev                   6464  0
    evdev                   8192  0
    thermal                11528  0
    fan                     3972  0
    button                  6288  0
    battery                 8452  0
    ac                      4100  0
    snd_intel8x0           28700  2
    snd_ac97_codec         95780  1 snd_intel8x0
    snd_mpu401              6760  0
    snd_mpu401_uart         7040  1 snd_mpu401
    snd_rawmidi            19104  1 snd_mpu401_uart
    snd_seq_oss            29056  0
    snd_seq_midi_event      6528  1 snd_seq_oss
    snd_seq                46544  4 snd_seq_oss,snd_seq_midi_event
    snd_seq_device          6796  3 snd_rawmidi,snd_seq_oss,snd_seq
    snd_pcm_oss            38688  0
    snd_pcm                69124  4 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
    snd_timer              19076  3 snd_seq,snd_pcm
    snd_page_alloc          7816  2 snd_intel8x0,snd_pcm
    snd_mixer_oss          14592  1 snd_pcm_oss
    snd                    44516  14 snd_intel8x0,snd_ac97_codec,snd_mpu401,snd_mpu401_uart,snd_rawmidi,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_pcm,snd_timer,snd_mixer_oss
    soundcore               6368  1 snd
    ac97_bus                2432  1 snd_ac97_codec
    slhc                    5760  1 ppp_generic
    forcedeth              42888  0
    powernow_k8            12948  0
    freq_table              3984  2 cpufreq_ondemand,powernow_k8
    processor              24532  2 thermal,powernow_k8
    ext3                  119176  1
    jbd                    54312  1 ext3
    mbcache                 6916  1 ext3
    sd_mod                 17796  3
    sr_mod                 14372  0
    cdrom                  34464  1 sr_mod
    ehci_hcd               30732  0
    ohci_hcd               19588  0
    usbcore               111240  4 usbhid,ehci_hcd,ohci_hcd
    sata_nv                15748  2
    ata_generic             5636  0
    pata_amd               10380  0
    libata                103060  3 sata_nv,ata_generic,

  • Arch vs other distributions

    We keep having threads coming up where people are asking how Arch compares to Distro X. I think this is the kind of question that can have a canned response.  I've created a wiki page comparing distros. I populated it with some very very generic content. I dashed this off in a few minutes, as I'm pretty busy. I'd appreciate it if some people with experience with other distros (I haven't used anything but Arch in a year and a half so I don't know much about the advancements of anything else...) and having a little time could flesh it out a lot.
    http://wiki.archlinux.org/index.php/Arc … er_Distros
    thanks,
    Dusty

    That's a fine idea, squire. It strikes me however that this could get overwhelmed. For example, Arch vs Fedora is rather like Arch vs Suse and will be almost the same as Arch vs Mandrake, etc. I think that subsequent contributors should gather similar classes of distros together when comparing to Arch.
    Just my 2p.

  • Boot failure with AMD core unlock *solved*

    Before you criticize me for buying a triple core instead of a quad core, I want you to know that my situation seems to only conflict with Arch.
    I have an AMD Athlon II x3.  If I unlock the 4th core, Linux live CDs boot up just fine, Windows XP boots fine, Windows 7 boots fine, and as long as any OS completely boots up it runs flawlessly for hours with constant load.  However, Arch will fail to boot IMMEDIATELY after unlocking cores. IIRC, the Arch setup CD also fails to boot.  I have a small feeling that GRUB has something to do with it, but whenever I attempt to install GRUB2 I'm never able to boot again.
    As another note, I can't seem to get IOMMU to work with Arch.  With Debian based distros it works immediately, but I can't find anything on how to enable it with Arch.  I get this impression that there's a lot of missing Kernel entries in Arch which are causing these CPU problems, and possibly others.
    Last edited by schmidtbag (2011-09-27 16:16:30)

    schmidtbag wrote:
    R00KIE wrote:Not much of an idea then, get /proc/config.gz from the distros that work and the one from arch, compare them and see if you can spot what might be causing the problem. No other ideas here.
    debian doesn't have that file, did you mistake it for something different?
    I know some distros don't have it but I wasn't aware debian is one of them (I use arch everyday and I try to manage a few centos boxes and that's all), that is an option can be enabled/disabled when building the kernel and it can be quite useful when trying to figure out why something doesn't work (such as seeing which drivers were built and which option was selected when there are multiple choices), however I guess it might have security implications since anyone can find out which options were selected when building the running kernel and some combinations may have yet uncovered/unpublished/undisclosed security exploits.

Maybe you are looking for