Search Results

Search found 45845 results on 1834 pages for 'static void main'.

Page 6/1834 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Call a non static methode in a static SQLiteDatabase class

    - by Fevos
    i want to display a msg to the user (msg box or Toast) when exception happend in a static SQLite Database class that i use. the proplem is that i cant call a non static methode in a static class , how can i handle this. this is the class private static SQLiteDatabase getDatabase(Context aContext) { and i want to add something like this in the class when exception happen but context genertae the problem of reference to non static in static class. Context context = getApplicationContext(); CharSequence text = "Hello toast!"; int duration = Toast.LENGTH_SHORT; Toast toast = Toast.makeText(context, text, duration); toast.show();

    Read the article

  • Issues with static IP (Ubuntu Server 10.04)

    - by letseatfood
    I am following this tutorial for setting up a testing server for my web development projects. When I attempt setting up a static IP address (using the configuration below), I receive the error "ping: unknown host www.google.com" when I attempt using ping. auto eth0 iface eth0 inet static address 192.168.0.100 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1 Ping works fine when the configuration is: auto eth0 iface eth0 inet static I am a novice to server setup and administration.

    Read the article

  • Nginx: Serve static files out of a given directory - one level too deep

    - by Joe J
    I'm pretty new to nginx configs. I'm having some difficulty with a pretty basic problem. I'd like to host some static files at /doc (index.html, some images, etc). The files are located in a directory called /sites/mysite/proj/doc/. The problem is, is that with the nginx config below, nginx tries to look for a directory called "/sites/mysite/proj/doc/doc". Perhaps this can be fixed by setting the root to /sites/mysite/proj/, but I don't want to potentially expose other (non-static) assets in the proj/ directory. And for various reasons, I can't really move the doc/ directory from where it is. I think there is a way to use a Rewrite rule to solve this situation, but I don't really understand all the parts, so having some difficulty formulating the rule. rewrite ^/doc/(.*)$ /$1 permanent; I've also included a working example of hosting files out of a /sites/mysite/htdocs/static/ directory. > vim locations.conf location /static { root /sites/mysite/htdocs/; access_log off; autoindex on; } location /doc { root /sites/mysite/proj/doc/; access_log on; autoindex on; } 2011/11/19 23:49:00 [error] 2314#0: *42 open() "/sites/mysite/proj/doc/doc" failed (2: No such file or directory), client: 100.100.100.100, server: , request: "GET /doc HTTP/1.1", host: "myhost.com" Does anyone have any ideas how I might go about serving this static content? Any help is much appreciated. Thanks, Joe

    Read the article

  • VMWare Hypervisor vSphere 5 - VM static ip from VLAN NAT

    - by Ian Livingstone
    I have a VMWare vSphere 5 Hypervisor server that has a static ip address assigned to it by VLAN that is configured to perform NAT. The static IP is assigned to the bare metal server via the NIC's mac address. I want to setup a guest machine to also have a static ip address, how can I go about having this setup? I have assigned a IP for the guest's MAC Address but it doesn't seem to be working as when I ping the ip address it does not respond. The guest is running ubuntu 10.04 server edition. I am trying to assign it a static public ip address. Any help would be greatly appreciated.

    Read the article

  • Java - Could not find the main class?

    - by asmo
    I'm having a hard-time with a Java error. I'm getting this when double-clicking on my compiled project Jar file in order to run it: Could not find the main class: testPackage.testFrame. Program will exit. However, my main class is cleary defined in the project properties. Furthermore, everything works fine when I run the project directly from NetBeans. I'm using the ip2c.jar third-party library to determine countries from IP addresses. If I comment the class that is using the ip2c.jar file, I don't get the error. How can a third-party library be preventing the JVM from finding my main class?

    Read the article

  • PHP - static DB class vs DB singleton object

    - by Marco Demaio
    I don't want to create a discussion about singleton better than static or better than global, etc. I read dozens of questions about it on SO, but I couldn't come up with an answer to this SPECIFIC question, so I hope someone could now illuminate me buy answering this question with one (or more) real simple EXAMPLES, and not theoretical discussions. In my app I have the typical DB class needed to perform tasks on DB without having to write everywhere in code mysql_connect/mysql_select_db/mysql... (moreover in future I might decide to use another type of DB engine in place of mySQL so obviously I need a class of abstration). I could write the class either as a static class: class DB { private static $connection = FALSE; //connection to be opened //DB connection values private static $server = NULL; private static $usr = NULL; private static $psw = NULL; private static $name = NULL; public static function init($db_server, $db_usr, $db_psw, $db_name) { //simply stores connections values, withour opening connection } public static function query($query_string) { //performs query over alerady opened connection, if not open, it opens connection 1st } ... } or as a Singletonm class: class DBSingleton { private $inst = NULL; private $connection = FALSE; //connection to be opened //DB connection values private $server = NULL; private $usr = NULL; private $psw = NULL; private $name = NULL; public static function getInstance($db_server, $db_usr, $db_psw, $db_name) { //simply stores connections values, withour opening connection if($inst === NULL) $this->inst = new DBSingleton(); return $this->inst; } private __construct()... public function query($query_string) { //performs query over already opened connection, if connection is not open, it opens connection 1st } ... } Then after in my app if I wanto to query the DB i could do //Performing query using static DB object DB:init(HOST, USR, PSW, DB_NAME); DB::query("SELECT..."); //Performing query using DB singleton $temp = DBSingleton::getInstance(HOST, USR, PSW, DB_NAME); $temp->query("SELECT..."); My simple brain sees Singleton has got the only advantage to avoid declaring as 'static' each method of the class. I'm sure some of you could give me an EXAMPLE of real advantage of singleton in this specific case. Thanks in advance.

    Read the article

  • java unload static fields

    - by Alina Danila
    I have a java class that uses complex static fields which need special operations as close() so that they are safely cleaned by GC. For the initialization of static fields I use the static block. But I don't now how to unload the static field safely, so that I can call the close() method before the field is cleaned up by GC. Is there any way to unload a static field, similar to the static initialization block?

    Read the article

  • Accessing non-static combbox property in the static method.

    - by Harikrishna
    I have one combobox on the window form and I have one method which is declared with static like private static DataTable ParseTable(HtmlNode table) Now I want to use combobox in that method for using combobox property but I can not access any property of combobox or combobox itself.If I made the combobox declaration as static then it can be accessed in that static method.But any alternative way to access combbox property in that static method because I don't want to make combobox declaration as static.

    Read the article

  • Control Reference Static Method Performance

    - by dotnetguts
    I have just asked which one is better? Static Vs Non-Static? http://stackoverflow.com/questions/3016717/static-vs-non-static-method-performance-c I would like to take this discussion one step ahead. Consider If i pass reference of Panel control as parameter to Public static method, will static method still rules in performance?

    Read the article

  • Static member object of a class in the same class

    - by Luv
    Suppose we have a class as class Egg { static Egg e; int i; Egg(int ii):i(ii) {} Egg(const Egg &); //Prevents copy-constructor to be called public: static Egg* instance() {return &e} }; Egg Egg::e(47); This code guarantees that we cannot create any object, but could use only the static object. But how could we declare static object of the same class in the class. And also one thing more since e is a static object, and static objects can call only static member functions, so how could the constructor been called here for static object e, also its constructors are private.

    Read the article

  • sudo apt-get update problem

    - by Jeon
    I have a problem with sudo apt-get update that I can't seem to fix and It's causing problems with alot of installations I want to do. I run Ubuntu 12.04. Ign http://ftp.availo.se precise InRelease Ign http://ftp.availo.se precise-updates InRelease Ign http://ftp.availo.se precise-backports InRelease Ign http://ftp.availo.se precise-security InRelease Get:1 http://repository.spotify.com stable InRelease [2,979 B] Ign http://ppa.launchpad.net precise InRelease Ign http://extras.ubuntu.com precise InRelease Ign http://archive.canonical.com precise InRelease Ign http://ppa.launchpad.net precise InRelease Ign http://ppa.launchpad.net precise InRelease Ign http://repository.spotify.com stable InRelease Ign http://ftp.availo.se precise Release.gpg Ign http://ftp.availo.se precise-updates Release.gpg Ign http://ftp.availo.se precise-backports Release.gpg Ign http://repository.spotify.com stable/non-free amd64 Packages/DiffIndex Hit http://ppa.launchpad.net precise Release.gpg Hit http://ppa.launchpad.net precise Release.gpg Hit http://archive.canonical.com precise Release.gpg Hit http://extras.ubuntu.com precise Release.gpg Ign http://ftp.availo.se precise-security Release.gpg Ign http://repository.spotify.com stable/non-free i386 Packages/DiffIndex Ign http://repository.spotify.com stable/non-free TranslationIndex Hit http://ppa.launchpad.net precise Release.gpg Hit http://archive.canonical.com precise Release Hit http://extras.ubuntu.com precise Release Ign http://ftp.availo.se precise Release Ign http://ftp.availo.se precise-updates Release Hit http://ppa.launchpad.net precise Release Hit http://archive.canonical.com precise/partner amd64 Packages Hit http://extras.ubuntu.com precise/main Sources Ign http://ftp.availo.se precise-backports Release Ign http://ftp.availo.se precise-security Release Hit http://ppa.launchpad.net precise Release Hit http://archive.canonical.com precise/partner i386 Packages Ign http://archive.canonical.com precise/partner TranslationIndex Hit http://ppa.launchpad.net precise Release Hit http://extras.ubuntu.com precise/main amd64 Packages Hit http://extras.ubuntu.com precise/main i386 Packages Ign http://ftp.availo.se precise/main TranslationIndex Ign http://ftp.availo.se precise/multiverse TranslationIndex Ign http://ftp.availo.se precise/restricted TranslationIndex Hit http://ppa.launchpad.net precise/main Sources Hit http://ppa.launchpad.net precise/main amd64 Packages Hit http://ppa.launchpad.net precise/main i386 Packages Ign http://ppa.launchpad.net precise/main TranslationIndex Ign http://extras.ubuntu.com precise/main TranslationIndex Ign http://ftp.availo.se precise/universe TranslationIndex Hit http://ppa.launchpad.net precise/main Sources Hit http://ppa.launchpad.net precise/main amd64 Packages Hit http://ppa.launchpad.net precise/main i386 Packages Ign http://ppa.launchpad.net precise/main TranslationIndex Hit http://ppa.launchpad.net precise/main Sources Hit http://ppa.launchpad.net precise/main amd64 Packages Hit http://ppa.launchpad.net precise/main i386 Packages Ign http://ppa.launchpad.net precise/main TranslationIndex Ign http://ftp.availo.se precise-updates/main TranslationIndex Ign http://ftp.availo.se precise-updates/multiverse TranslationIndex Ign http://ftp.availo.se precise-updates/restricted TranslationIndex Ign http://ftp.availo.se precise-updates/universe TranslationIndex Hit http://repository.spotify.com stable/non-free amd64 Packages Ign http://ftp.availo.se precise-backports/main TranslationIndex Ign http://ftp.availo.se precise-backports/multiverse TranslationIndex Ign http://ftp.availo.se precise-backports/restricted TranslationIndex Ign http://ftp.availo.se precise-backports/universe TranslationIndex Hit http://repository.spotify.com stable/non-free i386 Packages Ign http://archive.canonical.com precise/partner Translation-en_US Ign http://ftp.availo.se precise-security/main TranslationIndex Ign http://ftp.availo.se precise-security/multiverse TranslationIndex Ign http://ftp.availo.se precise-security/restricted TranslationIndex Ign http://ftp.availo.se precise-security/universe TranslationIndex Ign http://repository.spotify.com stable/non-free Translation-en_US Ign http://archive.canonical.com precise/partner Translation-en Ign http://repository.spotify.com stable/non-free Translation-en Ign http://extras.ubuntu.com precise/main Translation-en_US Ign http://extras.ubuntu.com precise/main Translation-en Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Err http://ftp.availo.se precise/main Sources 404 Not Found Err http://ftp.availo.se precise/restricted Sources 404 Not Found Err http://ftp.availo.se precise/universe Sources 404 Not Found Err http://ftp.availo.se precise/multiverse Sources 404 Not Found Err http://ftp.availo.se precise/main amd64 Packages 404 Not Found Err http://ftp.availo.se precise/restricted amd64 Packages 404 Not Found Err http://ftp.availo.se precise/universe amd64 Packages 404 Not Found Err http://ftp.availo.se precise/multiverse amd64 Packages 404 Not Found Err http://ftp.availo.se precise/main i386 Packages 404 Not Found Err http://ftp.availo.se precise/restricted i386 Packages 404 Not Found Err http://ftp.availo.se precise/universe i386 Packages 404 Not Found Err http://ftp.availo.se precise/multiverse i386 Packages 404 Not Found Err http://ftp.availo.se precise-updates/main Sources 404 Not Found Err http://ftp.availo.se precise-updates/restricted Sources 404 Not Found Err http://ftp.availo.se precise-updates/universe Sources 404 Not Found Err http://ftp.availo.se precise-updates/multiverse Sources 404 Not Found Err http://ftp.availo.se precise-updates/main amd64 Packages 404 Not Found Err http://ftp.availo.se precise-updates/restricted amd64 Packages 404 Not Found Err http://ftp.availo.se precise-updates/universe amd64 Packages 404 Not Found Err http://ftp.availo.se precise-updates/multiverse amd64 Packages 404 Not Found Err http://ftp.availo.se precise-updates/main i386 Packages 404 Not Found Err http://ftp.availo.se precise-updates/restricted i386 Packages 404 Not Found Err http://ftp.availo.se precise-updates/universe i386 Packages 404 Not Found Err http://ftp.availo.se precise-updates/multiverse i386 Packages 404 Not Found Err http://ftp.availo.se precise-backports/main Sources 404 Not Found Err http://ftp.availo.se precise-backports/restricted Sources 404 Not Found Err http://ftp.availo.se precise-backports/universe Sources 404 Not Found Err http://ftp.availo.se precise-backports/multiverse Sources 404 Not Found Err http://ftp.availo.se precise-backports/main amd64 Packages 404 Not Found Err http://ftp.availo.se precise-backports/restricted amd64 Packages 404 Not Found Err http://ftp.availo.se precise-backports/universe amd64 Packages 404 Not Found Err http://ftp.availo.se precise-backports/multiverse amd64 Packages 404 Not Found Err http://ftp.availo.se precise-backports/main i386 Packages 404 Not Found Err http://ftp.availo.se precise-backports/restricted i386 Packages 404 Not Found Err http://ftp.availo.se precise-backports/universe i386 Packages 404 Not Found Err http://ftp.availo.se precise-backports/multiverse i386 Packages 404 Not Found Err http://ftp.availo.se precise-security/main Sources 404 Not Found Err http://ftp.availo.se precise-security/restricted Sources 404 Not Found Err http://ftp.availo.se precise-security/universe Sources 404 Not Found Err http://ftp.availo.se precise-security/multiverse Sources 404 Not Found Err http://ftp.availo.se precise-security/main amd64 Packages 404 Not Found Err http://ftp.availo.se precise-security/restricted amd64 Packages 404 Not Found Err http://ftp.availo.se precise-security/universe amd64 Packages 404 Not Found Err http://ftp.availo.se precise-security/multiverse amd64 Packages 404 Not Found Err http://ftp.availo.se precise-security/main i386 Packages 404 Not Found Err http://ftp.availo.se precise-security/restricted i386 Packages 404 Not Found Err http://ftp.availo.se precise-security/universe i386 Packages 404 Not Found Err http://ftp.availo.se precise-security/multiverse i386 Packages 404 Not Found Ign http://ftp.availo.se precise/main Translation-en_US Ign http://ftp.availo.se precise/main Translation-en Ign http://ftp.availo.se precise/multiverse Translation-en_US Ign http://ftp.availo.se precise/multiverse Translation-en Ign http://ftp.availo.se precise/restricted Translation-en_US Ign http://ftp.availo.se precise/restricted Translation-en Ign http://ftp.availo.se precise/universe Translation-en_US Ign http://ftp.availo.se precise/universe Translation-en Ign http://ftp.availo.se precise-updates/main Translation-en_US Ign http://ftp.availo.se precise-updates/main Translation-en Ign http://ftp.availo.se precise-updates/multiverse Translation-en_US Ign http://ftp.availo.se precise-updates/multiverse Translation-en Ign http://ftp.availo.se precise-updates/restricted Translation-en_US Ign http://ftp.availo.se precise-updates/restricted Translation-en Ign http://ftp.availo.se precise-updates/universe Translation-en_US Ign http://ftp.availo.se precise-updates/universe Translation-en Ign http://ftp.availo.se precise-backports/main Translation-en_US Ign http://ftp.availo.se precise-backports/main Translation-en Ign http://ftp.availo.se precise-backports/multiverse Translation-en_US Ign http://ftp.availo.se precise-backports/multiverse Translation-en Ign http://ftp.availo.se precise-backports/restricted Translation-en_US Ign http://ftp.availo.se precise-backports/restricted Translation-en Ign http://ftp.availo.se precise-backports/universe Translation-en_US Ign http://ftp.availo.se precise-backports/universe Translation-en Ign http://ftp.availo.se precise-security/main Translation-en_US Ign http://ftp.availo.se precise-security/main Translation-en Ign http://ftp.availo.se precise-security/multiverse Translation-en_US Ign http://ftp.availo.se precise-security/multiverse Translation-en Ign http://ftp.availo.se precise-security/restricted Translation-en_US Ign http://ftp.availo.se precise-security/restricted Translation-en Ign http://ftp.availo.se precise-security/universe Translation-en_US Ign http://ftp.availo.se precise-security/universe Translation-en Fetched 2,979 B in 9s (328 B/s) W: GPG error: http://repository.spotify.com stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 082CCEDF94558F59 W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise/main/source/Sources 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise/restricted/source/Sources 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise/universe/source/Sources 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise/multiverse/source/Sources 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise/main/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise/restricted/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise/universe/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise/multiverse/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise/main/binary-i386/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise/restricted/binary-i386/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise/universe/binary-i386/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise/multiverse/binary-i386/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-updates/main/source/Sources 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-updates/restricted/source/Sources 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-updates/universe/source/Sources 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-updates/multiverse/source/Sources 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-updates/main/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-updates/restricted/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-updates/universe/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-updates/multiverse/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-updates/main/binary-i386/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-updates/restricted/binary-i386/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-updates/universe/binary-i386/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-updates/multiverse/binary-i386/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-backports/main/source/Sources 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-backports/restricted/source/Sources 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-backports/universe/source/Sources 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-backports/multiverse/source/Sources 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-backports/main/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-backports/restricted/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-backports/universe/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-backports/multiverse/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-backports/main/binary-i386/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-backports/restricted/binary-i386/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-backports/universe/binary-i386/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-backports/multiverse/binary-i386/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-security/main/source/Sources 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-security/restricted/source/Sources 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-security/universe/source/Sources 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-security/multiverse/source/Sources 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-security/main/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-security/restricted/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-security/universe/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-security/multiverse/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-security/main/binary-i386/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-security/restricted/binary-i386/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-security/universe/binary-i386/Packages 404 Not Found W: Failed to fetch http://ftp.availo.se/ubuntu/dists/precise-security/multiverse/binary-i386/Packages 404 Not Found E: Some index files failed to download. They have been ignored, or old ones used instead. I would appreciate a fix to this. Thank you for the help.

    Read the article

  • main vs initialize in Ruby

    - by Dave
    Okay, so I've looked through a couple of my ruby books and done some googling to no avail. What is the difference between main and initialize in Ruby? I've seen code that uses class Blahblah def main some logic here end #more methods... end and then calls it using Blahblah.new. Isn't new reserved only for initialize? if not, then what's the difference between the two?

    Read the article

  • Java Beginner question about String[] args in the main method

    - by happysoul
    So I just tried excluding String[] args from the main method It compiled alright ! But JVM is showing an exception Why did it compile when String[] args HAS to be included every time ? What is going on here ? Why won't it show a compilation error ? typing this made me think that may be compiler did not see it as THE main method ..is that so ?

    Read the article

  • static readonly field initializer vs static constructor initialization

    - by stackoverflowuser
    Below are 2 different ways to initialize static readonly fields. Is there a difference between the 2 approaches? If yes, when should one be preferred over the other? class A { private static readonly string connectionString = WebConfigurationManager.ConnectionStrings["SomeConnection"].ConnectionString; } class B { private static readonly string connectionString; static B() { connectionString = WebConfigurationManager.ConnectionStrings["SomeConnection"].ConnectionString; } } Thanks.

    Read the article

  • static thread function access non-static class member in C++

    - by user397390
    Class Test{ int value; static void* thread_func(void* args){ value++; } void newthread(){ pthread_create(&thread_func,...); } } I'm trying to create a thread in Class Test. Therefore compiler forces me to make thread_func static. However I cannot access the non-static member "value" anymore. It says: invalid use of member 'Class::value' in static member function Is there a way around it?

    Read the article

  • Iterate through main function in C?

    - by Mohit Deshpande
    Here is my main function: int main(int argc, char **argv) { LoadFile(); Node *temp; char *key; switch (GetUserInput()) { case 1: temp = malloc(sizeof(Node)); printf("\nEnter the key of the new node: "); scanf("%s", temp->key); printf("\nEnter the value of the new node: "); scanf("%s", temp->value); AddNode(temp); free(temp); break; case 2: key = malloc(sizeof(char *)); printf("Enter the key of the node you want to delete: "); scanf("%s", key); DeleteNode(key); free(key); break; case 3: PrintAll(); break; case 4: SaveFile(); break; case 5: return 0; break; default: printf("\nWrong choice!\n"); break; } return 0; } The only problem with it is that after any case statement breaks, the program just exits out. I understand why, but I don't know how to fix it. I want the program to repeat itself each time even after the case statements. Would I just say: main(argc, argv); before every break statement?

    Read the article

  • Static IPv6 address in Windows unused for outgoing connections

    - by Luc
    I'm running a Windows server and trying to get it to use a static IPv6 address for outgoing connections to other IPv6 hosts (such as Gmail). I need this because Gmail requires a ptr record, and I can't set one for random addresses. The static address is configured on the host, but it also has a temporary privacy address as well as a random address from the router it seems. By default Windows uses the privacy address; it seems this is the expected behavior (and it makes perfect sense for people/users that did not set a static address, but I did!). I've tried disabling the privacy address with: netsh int ipv6 set privacy disabled This indeed gets rid of the privacy address, but I still have the random address that the router assigned. To disable this, it was said I needed to disable "router discovery" using this command: net interface ipv6 set interface 14 routerdiscovery=disabled Upon doing this, all IPv6 connectivity is lost. If I do this while pinging Gmail, it will report "Destination host unreachable" as soon as I enter the command. In the static IPv6 configuration, I did configure the default gateway and prefix length, so I don't see why it's unable to connect. Probably has something to do with the lack of ARP in IPv6 and somehow being unable to resolve the router's MAC, but I wouldn't know how to fix this. Finally I've tried disabling the DHCPv6 lease with these commands: netsh interface ipv6 set interface "IDMZ Team" managedaddress=disabled netsh interface ipv6 set interface "IDMZ Team" otherstateful=disabled Which was to no avail; the host continues to obtain and use the router-assigned IPv6 address. The router is a FritzBox 7340, which shows me all the IPv4 and IPv6 addresses that the host (identified by MAC) utilizes, but I'm unable to change the assigned address. Maybe this could be done over the telnet interface of the router somehow, but again, I wouldn't know how to do this even if it's the way to go. In short, any of the following would probably solve my problem: Change Windows' source address selection behavior. Have Windows not get an address from the router and not generate a privacy address; Have the router hand out a static address and make Windows use that as source address. Recover connectivity after disabling router discovery on Windows. Alternatively I might use some (batch, perl, ...) script to throw away all IPv6 addresses except the desired one, but this feels rather hacky. If it's the only way (or less hacky than another hacky solution), it might be an option though. Thanks!

    Read the article

  • Swap static public IPs without creating DNS conflicts?

    - by Jakobud
    Our ISP is Comcast and we have 5 static public IPs from them that we use for various services, including customers connecting to our network, VPN, web, DNS, etc... We need more IP addresses from Comcast. Unfortunately, Comcast is telling us that they can't just simply give us 5 more addresses. They only give static IP addresses in blocks of 1, 5 or 13. In order for us to get more static IPs, they have to take away our current 5 static IPs and give us 13 new ones. How do we make this transition without causing all sorts of DNS chaos? We run public DNS servers, so we can make the DNS changes ourselves, but it will take some time obviously for those DNS changes to propagate throughout the internet. Are there any easy ways to make this transition? Like create some type of fallback DNS entry or something? Surely there must be some sort of procedure for this kind of thing. The Comcast support guy was useless.

    Read the article

  • 12.04: Apt-Get Update: failure to fetch; can't connect to any sources

    - by weberc2
    I realize there are dozens of "apt-get update: failure to fetch" questions (I read through all I could find), but my present circumstance is unique to 12.04 and it affects all sources; not just launchpad. Additionally, I've tried several different servers in Europe and the U.S. as well as the "main server" (wherever that is) and they all yield the same result: I can't connect to any software sources. Additionally, I'm fairly certain the problem stems from the upgrade from 11.10-12.04 I performed this morning, as updates worked immediately before. Updates from the Update Manager worked fine and I could download some things (mutter) from the Software Center without incident, which makes me think I can connect to some subset of the Ubuntu servers (however, several other Ubuntu servers--like extras--and some canonical servers are listed as 'unable to connect'). Here is the output from sudo apt-get update: sudo apt-get update Ign http://ftp.u-picardie.fr precise InRelease Ign http://archive.canonical.com precise InRelease Ign http://ftp.u-picardie.fr precise-updates InRelease Ign http://ftp.u-picardie.fr precise-backports InRelease Err http://ftp.u-picardie.fr precise-security InRelease Err http://ftp.u-picardie.fr precise Release.gpg Unable to connect to ftp.u-picardie.fr:http: Err http://ftp.u-picardie.fr precise-updates Release.gpg Unable to connect to ftp.u-picardie.fr:http: Err http://ftp.u-picardie.fr precise-backports Release.gpg Unable to connect to ftp.u-picardie.fr:http: Err http://ftp.u-picardie.fr precise-security Release.gpg Unable to connect to ftp.u-picardie.fr:http: Hit http://archive.canonical.com precise Release.gpg Hit http://archive.canonical.com precise Release Hit http://archive.canonical.com precise/partner i386 Packages Ign http://archive.canonical.com precise/partner TranslationIndex Ign http://dl.google.com stable InRelease Ign http://dl.google.com stable InRelease Err http://archive.canonical.com precise/partner Translation-en_US Unable to connect to archive.canonical.com:http: [IP: 91.189.92.150 80] Err http://archive.canonical.com precise/partner Translation-en Unable to connect to archive.canonical.com:http: [IP: 91.189.92.150 80] Ign http://extras.ubuntu.com precise InRelease Get:1 http://dl.google.com stable Release.gpg [198 B] Err http://extras.ubuntu.com precise Release.gpg Could not connect to extras.ubuntu.com:80 (91.189.88.33). - connect (111: Connection refused) Ign http://ppa.launchpad.net precise InRelease Err http://ppa.launchpad.net precise InRelease Err http://ppa.launchpad.net precise InRelease Err http://ppa.launchpad.net precise InRelease Err http://ppa.launchpad.net precise InRelease Err http://ppa.launchpad.net precise InRelease Err http://ppa.launchpad.net precise InRelease Err http://ppa.launchpad.net precise InRelease Err http://ppa.launchpad.net precise InRelease Get:2 http://dl.google.com stable Release.gpg [198 B] Err http://ppa.launchpad.net precise Release.gpg Unable to connect to ppa.launchpad.net:http: Err http://ppa.launchpad.net precise Release.gpg Unable to connect to ppa.launchpad.net:http: Err http://ppa.launchpad.net precise Release.gpg Unable to connect to ppa.launchpad.net:http: Err http://ppa.launchpad.net precise Release.gpg Unable to connect to ppa.launchpad.net:http: Err http://ppa.launchpad.net precise Release.gpg Unable to connect to ppa.launchpad.net:http: Err http://ppa.launchpad.net precise Release.gpg Unable to connect to ppa.launchpad.net:http: Err http://ppa.launchpad.net precise Release.gpg Unable to connect to ppa.launchpad.net:http: Err http://ppa.launchpad.net precise Release.gpg Unable to connect to ppa.launchpad.net:http: Err http://ppa.launchpad.net precise Release.gpg Unable to connect to ppa.launchpad.net:http: Get:3 http://dl.google.com stable Release [1,347 B] Get:4 http://dl.google.com stable Release [1,347 B] Get:5 http://dl.google.com stable/main i386 Packages [1,268 B] Ign http://dl.google.com stable/main TranslationIndex Get:6 http://dl.google.com stable/main i386 Packages [769 B] Ign http://dl.google.com stable/main TranslationIndex Ign http://dl.google.com stable/main Translation-en_US Ign http://dl.google.com stable/main Translation-en Ign http://dl.google.com stable/main Translation-en_US Ign http://dl.google.com stable/main Translation-en Fetched 5,127 B in 7s (673 B/s) Reading package lists... Done W: Failed to fetch http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/dists/precise-security/InRelease W: Failed to fetch http://ppa.launchpad.net/elementary-os/stable/ubuntu/dists/precise/InRelease W: Failed to fetch http://ppa.launchpad.net/elementaryart/elementary-dev/ubuntu/dists/precise/InRelease W: Failed to fetch http://ppa.launchpad.net/midori/ppa/ubuntu/dists/precise/InRelease W: Failed to fetch http://ppa.launchpad.net/nemequ/sqlheavy/ubuntu/dists/precise/InRelease W: Failed to fetch http://ppa.launchpad.net/ricotz/docky/ubuntu/dists/precise/InRelease W: Failed to fetch http://ppa.launchpad.net/sgringwe/beatbox/ubuntu/dists/precise/InRelease W: Failed to fetch http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu/dists/precise/InRelease W: Failed to fetch http://ppa.launchpad.net/yorba/ppa/ubuntu/dists/precise/InRelease W: Failed to fetch http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/dists/precise/Release.gpg Unable to connect to ftp.u-picardie.fr:http: W: Failed to fetch http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/dists/precise-updates/Release.gpg Unable to connect to ftp.u-picardie.fr:http: W: Failed to fetch http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/dists/precise-backports/Release.gpg Unable to connect to ftp.u-picardie.fr:http: W: Failed to fetch http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/dists/precise-security/Release.gpg Unable to connect to ftp.u-picardie.fr:http: W: Failed to fetch http://archive.canonical.com/ubuntu/dists/precise/partner/i18n/Translation-en_US Unable to connect to archive.canonical.com:http: [IP: 91.189.92.150 80] W: Failed to fetch http://archive.canonical.com/ubuntu/dists/precise/partner/i18n/Translation-en Unable to connect to archive.canonical.com:http: [IP: 91.189.92.150 80] W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/Release.gpg Could not connect to extras.ubuntu.com:80 (91.189.88.33). - connect (111: Connection refused) W: Failed to fetch http://ppa.launchpad.net/caffeine-developers/ppa/ubuntu/dists/precise/Release.gpg Unable to connect to ppa.launchpad.net:http: W: Failed to fetch http://ppa.launchpad.net/elementary-os/stable/ubuntu/dists/precise/Release.gpg Unable to connect to ppa.launchpad.net:http: W: Failed to fetch http://ppa.launchpad.net/elementaryart/elementary-dev/ubuntu/dists/precise/Release.gpg Unable to connect to ppa.launchpad.net:http: W: Failed to fetch http://ppa.launchpad.net/midori/ppa/ubuntu/dists/precise/Release.gpg Unable to connect to ppa.launchpad.net:http: W: Failed to fetch http://ppa.launchpad.net/nemequ/sqlheavy/ubuntu/dists/precise/Release.gpg Unable to connect to ppa.launchpad.net:http: W: Failed to fetch http://ppa.launchpad.net/ricotz/docky/ubuntu/dists/precise/Release.gpg Unable to connect to ppa.launchpad.net:http: W: Failed to fetch http://ppa.launchpad.net/sgringwe/beatbox/ubuntu/dists/precise/Release.gpg Unable to connect to ppa.launchpad.net:http: W: Failed to fetch http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu/dists/precise/Release.gpg Unable to connect to ppa.launchpad.net:http: W: Failed to fetch http://ppa.launchpad.net/yorba/ppa/ubuntu/dists/precise/Release.gpg Unable to connect to ppa.launchpad.net:http: W: Some index files failed to download. They have been ignored, or old ones used instead. W: Duplicate sources.list entry http://ppa.launchpad.net/nemequ/sqlheavy/ubuntu/ precise/main i386 Packages (/var/lib/apt/lists/ppa.launchpad.net_nemequ_sqlheavy_ubuntu_dists_precise_main_binary-i386_Packages) W: Duplicate sources.list entry http://ppa.launchpad.net/sgringwe/beatbox/ubuntu/ precise/main i386 Packages (/var/lib/apt/lists/ppa.launchpad.net_sgringwe_beatbox_ubuntu_dists_precise_main_binary-i386_Packages) Contents of /etc/apt/sources.list: # deb cdrom:[Ubuntu 11.10 _Oneiric Ocelot_ - Release i386 (20111012)]/ oneiric main restricted deb-src http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/ precise main restricted #Added by software-properties # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/ precise main restricted deb-src http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/ precise multiverse universe #Added by software-properties ## Major bug fix updates produced after the final release of the ## distribution. deb http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/ precise-updates main restricted deb-src http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/ precise-updates restricted main multiverse universe #Added by software-properties ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/ precise universe deb http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/ precise-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/ precise multiverse deb http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/ precise-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/ precise-backports main restricted universe multiverse deb-src http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/ precise-backports main restricted universe multiverse #Added by software-properties deb http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/ precise-security main restricted deb-src http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/ precise-security restricted main multiverse universe #Added by software-properties deb http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/ precise-security universe deb http://ftp.u-picardie.fr/mirror/ubuntu/ubuntu/ precise-security multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb http://archive.canonical.com/ubuntu oneiric partner # deb-src http://archive.canonical.com/ubuntu oneiric partner ## This software is not part of Ubuntu, but is offered by third-party ## developers who want to ship their latest software. deb http://extras.ubuntu.com/ubuntu precise main deb-src http://extras.ubuntu.com/ubuntu precise main Testing Alternate sources.list file These are the steps I followed to produce the following output: Please backup your sources.list: sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup and then replace the contents of /etc/apt/sources.list with the below lines and run apt-get update: deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse deb http://security.ubuntu.com/ubuntu precise-security main restricted universe multiverse deb http://archive.canonical.com/ubuntu precise partner deb http://extras.ubuntu.com/ubuntu precise main Output: someone@someone-UBook:~$ sudo apt-get update Ign http://archive.canonical.com precise InRelease Hit http://archive.canonical.com precise Release.gpg Hit http://archive.canonical.com precise Release Ign http://archive.ubuntu.com precise InRelease Ign http://extras.ubuntu.com precise InRelease Ign http://archive.ubuntu.com precise-updates InRelease Hit http://archive.canonical.com precise/partner i386 Packages Hit http://extras.ubuntu.com precise Release.gpg Ign http://archive.ubuntu.com precise-backports InRelease Ign http://archive.canonical.com precise/partner TranslationIndex Err http://archive.canonical.com precise/partner Translation-en_US Unable to connect to archive.canonical.com:http: [IP: 91.189.92.150 80] Err http://archive.canonical.com precise/partner Translation-en Unable to connect to archive.canonical.com:http: [IP: 91.189.92.150 80] Hit http://extras.ubuntu.com precise Release Get:1 http://archive.ubuntu.com precise Release.gpg [198 B] Ign http://dl.google.com stable InRelease Err http://dl.google.com stable InRelease Err http://dl.google.com stable Release.gpg Unable to connect to dl.google.com:http: [IP: 173.194.34.38 80] Err http://dl.google.com stable Release.gpg Unable to connect to dl.google.com:http: [IP: 173.194.34.38 80] Get:2 http://archive.ubuntu.com precise-updates Release.gpg [198 B] Hit http://extras.ubuntu.com precise/main i386 Packages Get:3 http://archive.ubuntu.com precise-backports Release.gpg [198 B] Ign http://security.ubuntu.com precise-security InRelease Ign http://extras.ubuntu.com precise/main TranslationIndex Err http://extras.ubuntu.com precise/main Translation-en_US Unable to connect to extras.ubuntu.com:http: Err http://extras.ubuntu.com precise/main Translation-en Unable to connect to extras.ubuntu.com:http: Get:4 http://security.ubuntu.com precise-security Release.gpg [198 B] Get:5 http://archive.ubuntu.com precise Release [49.6 kB] Get:6 http://security.ubuntu.com precise-security Release [49.6 kB] Get:7 http://archive.ubuntu.com precise-updates Release [49.6 kB] Get:8 http://archive.ubuntu.com precise-backports Release [49.6 kB] Get:9 http://security.ubuntu.com precise-security/main i386 Packages [32.9 kB] Get:10 http://archive.ubuntu.com precise/main i386 Packages [1,274 kB] Get:11 http://security.ubuntu.com precise-security/restricted i386 Packages [14 B] Get:12 http://security.ubuntu.com precise-security/universe i386 Packages [8,594 B] Get:13 http://security.ubuntu.com precise-security/multiverse i386 Packages [1,393 B] Get:14 http://security.ubuntu.com precise-security/main TranslationIndex [73 B] Get:15 http://security.ubuntu.com precise-security/multiverse TranslationIndex [71 B] Get:16 http://security.ubuntu.com precise-security/restricted TranslationIndex [70 B] Get:17 http://security.ubuntu.com precise-security/universe TranslationIndex [72 B] Get:18 http://security.ubuntu.com precise-security/main Translation-en [13.6 kB] Get:19 http://security.ubuntu.com precise-security/multiverse Translation-en [587 B] Get:20 http://security.ubuntu.com precise-security/restricted Translation-en [14 B] Get:21 http://security.ubuntu.com precise-security/universe Translation-en [6,261 B] Get:22 http://archive.ubuntu.com precise/restricted i386 Packages [8,431 B] Get:23 http://archive.ubuntu.com precise/universe i386 Packages [4,796 kB] Ign http://ppa.launchpad.net precise InRelease Ign http://ppa.launchpad.net precise InRelease Ign http://ppa.launchpad.net precise InRelease Ign http://ppa.launchpad.net precise InRelease Ign http://ppa.launchpad.net precise InRelease Ign http://ppa.launchpad.net precise InRelease Ign http://ppa.launchpad.net precise InRelease Ign http://ppa.launchpad.net precise InRelease Ign http://ppa.launchpad.net precise InRelease Ign http://ppa.launchpad.net precise InRelease Ign http://ppa.launchpad.net precise InRelease Get:24 http://ppa.launchpad.net precise Release.gpg [316 B] Get:25 http://ppa.launchpad.net precise Release.gpg [316 B] Get:26 http://ppa.launchpad.net precise Release.gpg [316 B] Ign http://ppa.launchpad.net precise Release.gpg Get:27 http://ppa.launchpad.net precise Release.gpg [316 B] Hit http://ppa.launchpad.net precise Release.gpg Get:28 http://ppa.launchpad.net precise Release.gpg [316 B] Get:29 http://ppa.launchpad.net precise Release.gpg [316 B] Hit http://ppa.launchpad.net precise Release.gpg Get:30 http://ppa.launchpad.net precise Release.gpg [316 B] Hit http://ppa.launchpad.net precise Release.gpg Get:31 http://ppa.launchpad.net precise Release [11.9 kB] Get:32 http://ppa.launchpad.net precise Release [11.9 kB] Get:33 http://archive.ubuntu.com precise/multiverse i386 Packages [121 kB] Get:34 http://ppa.launchpad.net precise Release [11.9 kB] Ign http://ppa.launchpad.net precise Release Get:35 http://ppa.launchpad.net precise Release [11.9 kB] Hit http://archive.ubuntu.com precise/main TranslationIndex Hit http://archive.ubuntu.com precise/multiverse TranslationIndex Hit http://ppa.launchpad.net precise Release Hit http://archive.ubuntu.com precise/restricted TranslationIndex Get:36 http://ppa.launchpad.net precise Release [11.9 kB] Hit http://archive.ubuntu.com precise/universe TranslationIndex Get:37 http://ppa.launchpad.net precise Release [11.9 kB] Get:38 http://archive.ubuntu.com precise-updates/main i386 Packages [96.5 kB] Hit http://ppa.launchpad.net precise Release Get:39 http://ppa.launchpad.net precise Release [11.9 kB] Get:40 http://archive.ubuntu.com precise-updates/restricted i386 Packages [770 B] Hit http://ppa.launchpad.net precise Release Get:41 http://archive.ubuntu.com precise-updates/universe i386 Packages [27.7 kB] Get:42 http://ppa.launchpad.net precise/main Sources [524 B] Get:43 http://archive.ubuntu.com precise-updates/multiverse i386 Packages [1,393 B] Get:44 http://ppa.launchpad.net precise/main i386 Packages [507 B] Hit http://archive.ubuntu.com precise-updates/main TranslationIndex Ign http://ppa.launchpad.net precise/main TranslationIndex Hit http://archive.ubuntu.com precise-updates/multiverse TranslationIndex Hit http://archive.ubuntu.com precise-updates/restricted TranslationIndex Get:45 http://ppa.launchpad.net precise/main Sources [932 B] Hit http://archive.ubuntu.com precise-updates/universe TranslationIndex Get:46 http://ppa.launchpad.net precise/main i386 Packages [1,017 B] Get:47 http://archive.ubuntu.com precise-backports/main i386 Packages [559 B] Ign http://ppa.launchpad.net precise/main TranslationIndex Get:48 http://archive.ubuntu.com precise-backports/restricted i386 Packages [14 B] Get:49 http://archive.ubuntu.com precise-backports/universe i386 Packages [1,391 B] Get:50 http://ppa.launchpad.net precise/main Sources [1,402 B] Get:51 http://archive.ubuntu.com precise-backports/multiverse i386 Packages [14 B] Hit http://archive.ubuntu.com precise-backports/main TranslationIndex Get:52 http://ppa.launchpad.net precise/main i386 Packages [1,605 B] Hit http://archive.ubuntu.com precise-backports/multiverse TranslationIndex Ign http://ppa.launchpad.net precise/main TranslationIndex Hit http://archive.ubuntu.com precise-backports/restricted TranslationIndex Hit http://archive.ubuntu.com precise-backports/universe TranslationIndex Hit http://archive.ubuntu.com precise/main Translation-en Ign http://ppa.launchpad.net precise/main TranslationIndex Hit http://archive.ubuntu.com precise/multiverse Translation-en Get:53 http://ppa.launchpad.net precise/main Sources [931 B] Hit http://archive.ubuntu.com precise/restricted Translation-en Get:54 http://ppa.launchpad.net precise/main i386 Packages [1,079 B] Hit http://archive.ubuntu.com precise/universe Translation-en Ign http://ppa.launchpad.net precise/main TranslationIndex Hit http://archive.ubuntu.com precise-updates/main Translation-en Hit http://ppa.launchpad.net precise/main Sources Hit http://archive.ubuntu.com precise-updates/multiverse Translation-en Hit http://ppa.launchpad.net precise/main i386 Packages Hit http://archive.ubuntu.com precise-updates/restricted Translation-en Ign http://ppa.launchpad.net precise/main TranslationIndex Hit http://archive.ubuntu.com precise-updates/universe Translation-en Get:55 http://ppa.launchpad.net precise/main Sources [3,611 B] Hit http://archive.ubuntu.com precise-backports/main Translation-en Get:56 http://ppa.launchpad.net precise/main i386 Packages [2,468 B] Hit http://archive.ubuntu.com precise-backports/multiverse Translation-en Ign http://ppa.launchpad.net precise/main TranslationIndex Hit http://archive.ubuntu.com precise-backports/restricted Translation-en Hit http://archive.ubuntu.com precise-backports/universe Translation-en Get:57 http://ppa.launchpad.net precise/main Sources [1,524 B] Get:58 http://ppa.launchpad.net precise/main i386 Packages [2,719 B] Ign http://ppa.launchpad.net precise/main TranslationIndex Hit http://ppa.launchpad.net precise/main Sources Hit http://ppa.launchpad.net precise/main i386 Packages Ign http://ppa.launchpad.net precise/main TranslationIndex Get:59 http://ppa.launchpad.net precise/main Sources [1,052 B] Get:60 http://ppa.launchpad.net precise/main i386 Packages [1,388 B] Ign http://ppa.launchpad.net precise/main TranslationIndex Get:61 http://ppa.launchpad.net precise/main Sources [1,185 B] Get:62 http://ppa.launchpad.net precise/main i386 Packages [1,698 B] Ign http://ppa.launchpad.net precise/main TranslationIndex Err http://ppa.launchpad.net precise/main Sources 404 Not Found Err http://ppa.launchpad.net precise/main i386 Packages 404 Not Found Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Ign http://ppa.launchpad.net precise/main Translation-en_US Ign http://ppa.launchpad.net precise/main Translation-en Fetched 6,699 kB in 15s (445 kB/s) Reading package lists... Done W: Failed to fetch http://dl.google.com/linux/talkplugin/deb/dists/stable/InRelease W: Failed to fetch http://archive.canonical.com/ubuntu/dists/precise/partner/i18n/Translation-en_US Unable to connect to archive.canonical.com:http: [IP: 91.189.92.150 80] W: Failed to fetch http://archive.canonical.com/ubuntu/dists/precise/partner/i18n/Translation-en Unable to connect to archive.canonical.com:http: [IP: 91.189.92.150 80] W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/sta

    Read the article

  • Ubuntu 8.04 server is not retaining a static IP address

    - by James Pierce
    I recently setup a linux box running Ubuntu 8.04 (to match another server with 8.04). I need to insure that this box has a static IP address and I changed /etc/network/interfaces to set up the static IP address and when I run sudo /etc/init.d/networking restart it works fine for a while, but always reverts back to 10.0.1.24 after being idle for a while. I also tried stopping/removing the dhcp client, but that didn't help. sudo /etc/init.d/dhcp stop sudo apt-get remove dhcp3-client Here is my /etc/init.d/networking: # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 10.0.1.4 netmask 255.255.255.0 broadcast 10.0.1.255 gateway 10.0.1.1 Any thoughts? Thanks.

    Read the article

  • Static linking in Qt --> link errors in VS 2008

    - by ChruS
    Today I dediced to make static linking in Qt. I used Qt4 with Visual Studio and static C runtime article. The 3rd step took quite a long time. When it was finished I opened my project in VS 2008, made Build->Clean Solution and try to Release. Unfortunately I got link errors: warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library error LNK2019: unresolved external symbol "private: static struct QString::Data QString::shared_null" (?shared_null@QString@@0UData@1@A) referenced in function "public: __thiscall QString::QString(void)" (??0QString@@QAE@XZ) error LNK2019: unresolved external symbol "private: static struct QByteArray::Data QByteArray::shared_null" (?shared_null@QByteArray@@0UData@1@A) referenced in function "public: __thiscall QByteArray::QByteArray(void)" (??0QByteArray@@QAE@XZ) error LNK2001: unresolved external symbol "private: static struct QByteArray::Data QByteArray::shared_null" (?shared_null@QByteArray@@0UData@1@A) error LNK2001: unresolved external symbol "public: static struct QMetaObject const QDialog::staticMetaObject" (?staticMetaObject@QDialog@@2UQMetaObject@@B) error LNK2001: unresolved external symbol "public: static struct QMetaObject const QDialog::staticMetaObject" (?staticMetaObject@QDialog@@2UQMetaObject@@B) error LNK2001: unresolved external symbol "public: static struct QMetaObject const QDialog::staticMetaObject" (?staticMetaObject@QDialog@@2UQMetaObject@@B) error LNK2019: unresolved external symbol "public: static enum QSysInfo::WinVersion const QSysInfo::WindowsVersion" (?WindowsVersion@QSysInfo@@2W4WinVersion@1@B) referenced in function _WinMain@16 What i did wrong? Help to fix this pls.

    Read the article

  • Static route in conflict with a default route

    - by Ossan Sokiv
    Hi guys, I have a default route configured. 192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.1 I'd like to add a static route to pass traffic destined for 192.168.1.51 via a load balancer's redundant virtual interface at 192.168.1.2. ip route add 192.168.1.51 mask 255.255.255.255 via 192.168.1.2 When I try to add the static route I get this error. Error: either "to" is duplicate or "default" is garbage." It doesn't want to add the static route because it's in conflict with the default route. Is there a way around this? Regards Ossan

    Read the article

  • Problem Assigning Static IP to CentOS Server

    - by nategood
    We have a sandbox server running CentOS that we run inside our office. Our ISP has assigned us a block of 5 static IPs. We now want to assign it a static IP. DEVICE=eth0 BOOTPROTO=none # have also tried "static" here HWADDR=00:13:72:*:*:* ONBOOT=yes TYPE=Ethernet NETMASK=255.255.255.0 IPADDR=173.*.*.161 GATEWAY=10.1.10.1 /etc/resolv.cnf is also set with the appropriate name servers from our ISP. When I ifdown eth0 then ifup eth0 I get... SIOCADDRT: Network is unreachable When I switch to DCHP, the machine has an IP assigned and there are no connection problems. Any ideas?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >