Search Results

Search found 2130 results on 86 pages for 'swap'.

Page 51/86 | < Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >

  • My Android phone isn't being detected by Ubuntu

    - by Lara
    This is what I've got from terminal, looks like it can see the phone as a USB device just fine but isn't showing up under fdisk so I can't mount it. It automounts just fine in my VMWare Windows. And Internet tethering works fine while under Linux (haven't tried under Windows). Here's lsusb: Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 019: ID 04d9:1135 Holtek Semiconductor, Inc. Bus 001 Device 003: ID 05ca:18c0 Ricoh Co., Ltd Bus 001 Device 004: ID 0489:e00f Foxconn / Hon Hai Foxconn T77H114 BCM2070 [Single-Chip Bluetooth 2.1 + EDR Adapter] Bus 003 Device 010: ID 04e8:6860 Samsung Electronics Co., Ltd Bus 002 Device 012: ID 046d:c315 Logitech, Inc. Classic New Touch Keyboard And here's sudo fdisk -l: Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0001ff06 Device Boot Start End Blocks Id System /dev/sda1 2048 681845797 340921875 7 HPFS/NTFS/exFAT /dev/sda2 * 681846784 845686783 81920000 83 Linux /dev/sda3 845686784 968566783 61440000 7 HPFS/NTFS/exFAT /dev/sda4 968568830 972475081 1953126 5 Extended /dev/sda5 968568832 972475081 1953125 82 Linux swap / Solaris Disk /dev/mapper/cryptswap1: 2000 MB, 2000000000 bytes 255 heads, 63 sectors/track, 243 cylinders, total 3906250 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xbe4c2ec7 Disk /dev/mapper/cryptswap1 doesn't contain a valid partition table

    Read the article

  • Windows 7 disappeared in list of Grub while loading

    - by Riyad A.
    Installed Ubuntu 12.04 alongside the Windows 7 two weeks ago. Initially haven't any issues with that. day ago installed updates on Ubuntu and after restarting the system found the absence of Win7 in Grub list. Before the HDD has been partitioned on two volumes Disk C and Work Disk(don't remember the name). When doing the fdisk -l: Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0xa93031e0 Device Boot Start End Blocks Id System /dev/sda1 * 2048 408833842 204415897+ 7 HPFS/NTFS/exFAT /dev/sda2 488386560 976773119 244193280 7 HPFS/NTFS/exFAT /dev/sda3 408834046 488386559 39776257 5 Extended Partition 3 does not start on physical sector boundary. /dev/sda5 408834048 484421631 37793792 83 Linux /dev/sda6 484423680 488386559 1981440 82 Linux swap / Solaris Partition table entries are not in disk order Disk /dev/mmcblk0: 3965 MB, 3965190144 bytes 49 heads, 48 sectors/track, 3292 cylinders, total 7744512 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/mmcblk0p1 8192 7744511 3868160 b W95 FAT32 When sudo mount /dev/sda ~/1 -o offset [488386560*512] - opens and mounts WORK disk. Need help: how to See and mount disk C. how to see and adjust the Grub to appear both systems in Grub menu when loading?

    Read the article

  • best way to enlarge system partition

    - by yuvi
    I have a problem - I need to enlarge my system partition. I mean - when I initially installed Ubuntu, I split the partition so I have 15GB for system and the rest (around 400) pointed at /home/. This is very useful if anything goes wrong someday and I want to format and completely re-install Ubuntu without losing any of my actual data. The problem is, 15GB isn't enough, so it seems. I already moved /var/ and /opt/ folder to /home/, adding symlinks at root, but I'm still at 86% usage and I'm having performance issues (mostly when booting or running a VM). I can use Ubuntu on a flash drive and externally enlarge the partition, but I'm really afraid with going forward with that plan. Also, despite what I said before, I'd like to avoid re-installing the system if at all possible. Any advice, suggestions or ideas on how to best approach this? Any warnings I should heed? Thanks in advance! update Here's the gparted screenshot - as you can see, there's windows on dual boot (sda1-5 are all related to the windows system), then I have a linux swap, 14GB (so uh... not even 15) of system and 435 of for /home.

    Read the article

  • Why does 'top' say my machine is only 50% idle?

    - by Chris Moore
    What's going on here? I'm running nothing on the system, iotop and iftop show the network and hard drive are both idle, and top (sorted by %CPU) shows nothing running. So why is the system only 50% idle? What's the other 50% waiting for? How can I find out? top - 12:01:05 up 3 days, 15:03, 1 user, load average: 6.00, 6.01, 6.05 Tasks: 179 total, 1 running, 178 sleeping, 0 stopped, 0 zombie Cpu(s): 0.7%us, 0.0%sy, 0.0%ni, 49.7%id, 49.7%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 2053996k total, 1992600k used, 61396k free, 81680k buffers Swap: 4092924k total, 10740k used, 4082184k free, 1338636k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1042 deb 20 0 21468 1412 1000 R 1 0.1 0:00.03 top 1 root 20 0 24188 1952 1152 S 0 0.1 0:01.44 init 2 root 20 0 0 0 0 S 0 0.0 0:00.05 kthreadd Update: dmesg shows the printer driver misbehaving: [28858.561847] cnijnetprn[1503]: segfault at 29 ip 00007f56cf3480f7 sp 00007fffb964ec30 error 4 in libcnnet.so.1.2.0[7f56cf345000+9000] [68851.187802] cnijnetprn[9180]: segfault at 29 ip 00007ffe7636a0f7 sp 00007fff9a8b1990 error 4 in libcnnet.so.1.2.0[7ffe76367000+9000] [155412.107826] cnijnetprn[19966]: segfault at 29 ip 00007fc31de770f7 sp 00007fffc03aa8e0 error 4 in libcnnet.so.1.2.0[7fc31de74000+9000] and also some issue with cp: [248041.172067] INFO: task cp:27488 blocked for more than 120 seconds. [248041.172071] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [248041.172075] cp D ffffffff81805120 0 27488 27345 0x00000004 [248041.172080] ffff880078d57a38 0000000000000046 ffff880078d579d8 ffffffff81032a79 [248041.172085] ffff880078d57fd8 ffff880078d57fd8 ffff880078d57fd8 0000000000012a40 [248041.172090] ffff88007b818000 ffff880069acc560 ffff880078d57a18 ffff88007f8532c0 [248041.172095] Call Trace: [248041.172104] [<ffffffff81032a79>] ? default_spin_lock_flags+0x9/0x10 [248041.172109] [<ffffffff8110a360>] ? __lock_page+0x70/0x70 [248041.172114] [<ffffffff815f0ecf>] schedule+0x3f/0x60 I did try copying something to the USB stick that's plugged into the router and mounted onto this computer using mount.cifs. That almost always causes everything to lock up, so I'm guessing that's the problem. I'll reboot and stop using mount.cifs.

    Read the article

  • Why don't %MEM values add up to mem in top?

    - by ben
    I'm currently debugging performance issues with my VPS and for that I'm trying to understand which of the processes eat the most memory. Reading top, here's what I get: Mem: 366544k total, 321396k used, 45148k free, 380k buffers Swap: 1048572k total, 592388k used, 456184k free, 7756k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 12339 ruby 20 0 844m 74m 2440 S 0 20.8 0:24.84 ruby 12363 ruby 20 0 844m 73m 1576 S 0 20.6 0:00.26 ruby 21117 ruby 20 0 171m 33m 1792 S 0 9.3 2:03.98 ruby 11846 ruby 20 0 858m 21m 1820 S 0 6.0 0:09.15 ruby 21277 ruby 20 0 219m 11m 1648 S 0 3.2 2:00.98 ruby 792 root 20 0 266m 10m 1024 S 0 3.0 1:40.06 ruby 532 mysql 20 0 234m 4760 1040 S 0 1.3 0:41.58 mysqld 793 root 20 0 250m 4616 984 S 0 1.3 1:20.55 ruby 586 root 20 0 156m 4532 848 S 0 1.2 6:17.10 god 12315 ruby 20 0 175m 2412 1900 S 0 0.7 0:07.55 ruby 3844 root 20 0 44036 2132 1028 S 0 0.6 1:08.22 ruby 10939 ruby 20 0 179m 1884 1724 S 0 0.5 0:08.33 ruby 4660 ruby 20 0 229m 1592 1440 S 0 0.4 2:55.46 ruby 3879 nobody 20 0 37428 964 520 S 0 0.3 0:01.99 nginx As you can see my memory is about 90% used (which is my issue) but when you add up the %MEM values, it goes to about 50-60% only. Same thing, RES doesn't add up to ~350mb. Why? Am I misunderstanding their meaning? Thanks

    Read the article

  • Model View Control Issue: Null Pointer Initialization Question

    - by David Dimalanta
    Good morning again. This is David. Please, I need an urgent help regarding control model view where I making a code that uniquely separating into groups: An Activity Java Class to Display the Interface A View and Function Java Class for Drawing Cards and Display it on the Activity Class The problem is that the result returns a Null Pointer Exception. I have initialize for the ID for Text View and Image View. Under this class "draw_deck.java". Please help me. Here's my code for draw_deck.java: package com.bodapps.inbetween.model; import android.content.Context; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.bodapps.inbetween.R; public class draw_deck extends View { public TextView count_label; public ImageView draw_card; private int count; public draw_deck(Context context) { super(context); // TODO Auto-generated constructor stub //I have initialized two widgets for ID. I still don't get it why I got forced closed by Null Pointer Exception thing. draw_card = (ImageView) findViewById(R.id.IV_Draw_Card); count_label = (TextView) findViewById(R.id.Text_View_Count_Card); } public void draw(int s, int c, String strSuit, String strValue, Pile pile, Context context) { //super(context); //Just printing the card drawn from pile int suit, value = 1; draw_card = (ImageView) findViewById(R.id.IV_Draw_Card); count_label = (TextView) findViewById(R.id.Text_View_Count_Card); Card card; if(!pile.isEmpty()) //Setting it to IF statement displays the card one by one. { card = pile.drawFromPile(); //Need to check first if card is null. if (card != null) { //draws an extra if (card != null) { //Get suit of card to print out. suit = card.getSuit(); switch (suit) { case CardInfo.DIAMOND: strSuit = "DIAMOND"; s=0; break; case CardInfo.HEART: strSuit = "HEART"; s=1; break; case CardInfo.SPADE: strSuit = "SPADE"; s=2; break; case CardInfo.CLUB: strSuit = "CLUB"; s=3; break; } //Get value of card to print out. value = card.getValue(); switch (value) { case CardInfo.ACE: strValue = "ACE"; c=0; break; case CardInfo.TWO: c=1; break; case CardInfo.THREE: strValue = "THREE"; c=2; break; case CardInfo.FOUR: strValue = "FOUR"; c=3; break; case CardInfo.FIVE: strValue = "FIVE"; c=4; break; case CardInfo.SIX: strValue = "SIX"; c=4; break; case CardInfo.SEVEN: strValue = "SEVEN"; c=4; break; case CardInfo.EIGHT: strValue = "EIGHT"; c=4; break; case CardInfo.NINE: strValue = "NINE"; c=4; break; case CardInfo.TEN: strValue = "TEN"; c=4; break; case CardInfo.JACK: strValue = "JACK"; c=4; break; case CardInfo.QUEEN: strValue = "QUEEN"; c=4; break; case CardInfo.KING: strValue = "KING"; c=4; break; } } } }// //Below two lines of code, this is where issued the Null Pointer Exception. draw_card.setImageResource(deck[s][c]); count_label.setText(new StringBuilder(strValue).append(" of ").append(strSuit).append(String.valueOf(" " + count++)).toString()); } //Choice of Suits in a Deck public Integer[][] deck = { //Array Group 1 is [0][0] (No. of Cards: 4 - DIAMOND) { R.drawable.card_dummy_1, R.drawable.card_dummy_2, R.drawable.card_dummy_4, R.drawable.card_dummy_5, R.drawable.card_dummy_3 }, //Array Group 2 is [1][0] (No. of Cards: 4 - HEART) { R.drawable.card_dummy_1, R.drawable.card_dummy_2, R.drawable.card_dummy_4, R.drawable.card_dummy_5, R.drawable.card_dummy_3 }, //Array Group 3 is [2][0] (No. of Cards: 4 - SPADE) { R.drawable.card_dummy_1, R.drawable.card_dummy_2, R.drawable.card_dummy_4, R.drawable.card_dummy_5, R.drawable.card_dummy_3 }, //Array Group 4 is [3][0] (No. of Cards: 4 - CLUB) { R.drawable.card_dummy_1, R.drawable.card_dummy_2, R.drawable.card_dummy_4, R.drawable.card_dummy_5, R.drawable.card_dummy_3 }, }; } And this one of the activity class, Player_Mode_2.java: package com.bodapps.inbetween; import java.util.Random; import android.app.Activity; import android.app.Dialog; import android.content.Context; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import com.bodapps.inbetween.model.Card; import com.bodapps.inbetween.model.Pile; import com.bodapps.inbetween.model.draw_deck; /* * * Public class for Two-Player mode. * */ public class Player_Mode_2 extends Activity { //Image Views private ImageView draw_card; private ImageView player_1; private ImageView player_2; private ImageView icon; //Buttons private Button set_deck; //Edit Texts private EditText enter_no_of_decks; //text Views private TextView count_label; //Integer Data Types private int no_of_cards, count; private int card_multiplier; //Contexts final Context context = this; //Pile Model public Pile pile; //Card Model public Card card; //create View @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.play_2_player_mode); //-----[ Search for Views ]----- //Initialize for Image View draw_card = (ImageView) findViewById(R.id.IV_Draw_Card); player_1 = (ImageView) findViewById(R.id.IV_Player_1_Card); player_2 = (ImageView) findViewById(R.id.IV_Player_2_Card); //Initialize for Text view or Label count_label = (TextView) findViewById(R.id.Text_View_Count_Card); //-----[ Adding Values ]----- //Integer Values count = 0; no_of_cards = 0; //-----[ Adding Dialog ]----- //Initializing Dialog final Dialog deck_dialog = new Dialog(context); deck_dialog.setContentView(R.layout.dialog); deck_dialog.setTitle("Deck Dialog"); //-----[ Initializing Views for Dialog's Contents ]----- //Initialize for Edit Text enter_no_of_decks = (EditText) deck_dialog.findViewById(R.id.Edit_Text_Set_Number_of_Decks); //Initialize for Button set_deck = (Button) deck_dialog.findViewById(R.id.Button_Deck); //-----[ Setting onClickListener() ]----- //Set Event Listener for Image view draw_card.setOnClickListener(new Draw_Card_Model()); //Set Event Listener for Setting the Deck set_deck.setOnClickListener(new OnClickListener() { public void onClick(View v) { if(card_multiplier <= 8) { //Use "Integer.parseInt()" method to instantly convert from String to int value. card_multiplier = Integer.parseInt(enter_no_of_decks.getText().toString()); //Shuffling cards... pile = new Pile(card_multiplier); //Multiply no. of decks //Dismiss or close the dialog. deck_dialog.dismiss(); } else { Toast.makeText(getApplicationContext(), "Please choose a number from 1 to 8.", Toast.LENGTH_SHORT).show(); } } }); //Show dialog. deck_dialog.show(); } //Shuffling the Array public void Shuffle_Cards(Integer[][] Shuffle_Deck) { Random random = new Random(); for(int i = Shuffle_Deck[no_of_cards].length - 1; i >=0; i--) { int Index = random.nextInt(i + 1); //Simple Swapping Integer swap = Shuffle_Deck[card_multiplier-1][Index]; Shuffle_Deck[card_multiplier-1][Index] = Shuffle_Deck[card_multiplier-1][i]; Shuffle_Deck[card_multiplier-1][i] = swap; } } //Private Class for Random Card Draw private class Draw_Card_Model implements OnClickListener { public void onClick(View v) { //Just printing the card drawn from pile int suit = 0, value = 0; String strSuit = "", strValue = ""; draw_deck draw = new draw_deck(context); //This line is where issued the Null Pointer Exception. if (count == card_multiplier*52) { // A message shows up when all cards are draw out. Toast.makeText(getApplicationContext(), "All cards have been used up.", Toast.LENGTH_SHORT).show(); draw_card.setEnabled(false); } else { draw.draw(suit, value, strSuit, strValue, pile, context); count_label.setText(count); //This is where I got force closed error, although "int count" have initialized the number. This was supposed to accept in the setText() method. count++; } } } } Take note that the issues on Null Pointer Exception is the Image View and the Edit Text. I got to test it. Thanks. If you have any info about my question, let me know it frankly.

    Read the article

  • Lost files after installing Ubuntu

    - by Joshua Rosato
    I installed Ubuntu on my laptop over windows, I had 2 partitions on one hard disk. It seems like my second partition is gone with all my files. How can I recover the old files? They weren't on the same partition as Windows. I read that the partition has probably just not been mounted so ran sudo fdisk -l to find all the partitions and then ran sudo mount, however I can't tell from the results of sudo mount what is not mounted and I am also unsure how to mount it once I find the unmounted partition. sudo fdisk -l - Results Disk /dev/sda: 250.1 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0002c6dc Device Boot Start End Blocks Id System /dev/sda1 * 2048 486322175 243160064 83 Linux /dev/sda2 486324222 488396799 1036289 5 Extended /dev/sda5 486324224 488396799 1036288 82 Linux swap / Solaris sudo mount - Results /dev/sda1 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/cgroup type tmpfs (rw) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) udev on /dev type devtmpfs (rw,mode=0755) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) none on /run/shm type tmpfs (rw,nosuid,nodev) none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755) none on /sys/fs/pstore type pstore (rw) systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd) gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=joshy1)

    Read the article

  • Modernising settings, packages

    - by Sam Brightman
    The update manager (possibly combined with the janitor) does a reasonable job of bringing packages up to date with a new release, removing ones that are replaced by different projects etc. However, I'm left with the lingering feeling that quite a few settings are lingering from old releases. For example, some packages may be left around that I installed myself whereas now the functionality is provided by default. Another example is that my user doesn't get the new theme, and the panel bar is a mess. I can compare against an inactive user on the same system: everything seems tidier. There are also things like the explosion of System Preferences, user groups (inactive user, more recently created, is in groups that the older, active user isn't). In other areas (e.g. default font) I do seem to get given the new defaults. Another example is Spotlight-equivalent search. I remember Beagle and Tracker, I remember removing tracker when it used all system RAM and swap for 2 entire release cycles, but I don't know what I'm "supposed" to be using now. Is there even a default indexing-search installed and exposed? aptitude install ubuntu-desktop doesn't do anything, so the basics are in place package-wise. Is there any way to update my settings to the modern "Ubuntu way" without reinstalling from scratch? Can I do so selectively i.e. show the differences? Most of the time package management on Linux is an absolute joy compared to the alternatives, but if the desktop gets messed up after only a release or two, we're back to reinstalling just like Windows.

    Read the article

  • Two new profile in new visual studio 2010.

    - by Jalpesh P. Vadgama
    Visual studio 2010 is a great tool and i have become fan of visual studio 2010. I have found two new code profile in visual studio 2010. Web Development Profile Web Development Code Optimized Profile. Web Development profile will hide the top bar which contains the client object and and event dropdowns. So it will have more spaces. Another one web development code optimized which will hide all the things except main windows. It will hide Toolbox,CSS properties and all other things so you will have more spaces to play with your html. So as a web developer you can use this two great new profile as per your convenience when you only want to play with your html then use webdevelopement code  optimized profile and another interesting thing is that you don’t have to reset your settings you can also just do with Tools->Settings menu like below. This will swap different profile like below. Hope this will help you.. Technorati Tags: Visual Studio 2010,ASP.NET 4.0

    Read the article

  • unknown filsystem with grub rescue caption cannot boot

    - by Dom
    I just recently partitioned my hard drive and I got this error when booting Ubuntu on that drive. unknown filesystem. With the grub rescue terminal. I did some research and tried to download super grub disk but I cant seem to fix it with that. I have two hard disks. One with Windows Vista on it and the other with Ubuntu which is the one I partitioned. There was 100GB reserved for all the Ubuntu partitions that I needed and the rest was split into two partitions, one for backup folders for my Windows machine and the other for music production which is the one that I created. The space used to created that was shrunk from my backup partition so I didn't mess with any of the Ubuntu partitions. As of now there are a total of 5 partitions. I also downloaded Rescatux which is another Super Grub Disk for Grub 2 not knowing which grub I had. It still didn't work. In Super Grub Disk I tried to swap the hard disk because that was what was said to do in order to fix the grub, that didn't work it said it was unsuccessful. I even tried to unplug the Windows hard disk and run Super Grub Disk and that wasn't successful either. Is there another way I can fix this? Please any help would be greatly appreciated. I would like to have a nice step by step response.

    Read the article

  • GPTsync mismatch problem

    - by user86762
    I have a hybrid disk. After trying to copy some files from another disk to this one, I lost my OSX and Ubuntu boot capability. Ran gptsync and got: Current GPT partition table: # Start LBA End LBA Type 1 34 1987 BIOS Boot Partition 2 1988 1029662719 Basic Data 3 1029662720 2108995583 Basic Data 4 2108995584 2109405183 EFI System (FAT) 5 2109405184 2517004287 Mac OS X HFS+ 6 2517266432 2667417599 Mac OS X HFS+ 7 2667417600 3900229631 Basic Data 8 3900230504 3907029118 Linux Swap Current MBR partition table: # A Start LBA End LBA Type 1 1 3907029167 ee EFI Protective Status: MBR table must be updated. Proposed new MBR partition table: # A Start LBA End LBA Type 1 1 33 ee EFI Protective 2 34 1987 da Non-FS data 3 1988 1029662719 83 Linux 4 * 1029662720 2108995583 07 NTFS/HPFS May I update the MBR as printed above? [y/N] Clearly the MBR table is damaged or mismatched. But it does not reflect the correct GPT table partitions at all. How do I get the MBR repaired to match the GPT table (up to the 4 part limit of course)? The question is simply - Do I blindly say Yes to gptsync's suggestion? It looks sort of ok but not exactly so...Advice please on interpreting the above output to get my disk usable would be greatly appreciated. Thank You!

    Read the article

  • HP Notebook Pavilion g6-2101sl freeze

    - by StErMi
    I just bought this notebook and I've already installed in a new partition Ubuntu 12.04 LTS with 6gb of swap memory. UPDATE2: This is the laptop configuration: http://h10025.www1.hp.com/ewfrf/wc/document?cc=it&lc=it&dlc=it&tmp_geoLoc=true&docname=c03397517 Sometimes (without any special conditions) Ubuntu freezes. My mouse is blocked, the UI is blocked, ALT+F1 to kill something or to restart is blocked, I can't really do anything... I've also tried and it freezes with: Ubuntu 3D Ubuntu 2D Gnome Shell and it freezes both with low and high load. I can only press on power button (physically) and restart my laptop (and this is not the correct way to do things). I'm using this laptop for work, so I need a stable OS without this freeze. Someone knows how to solve this problem? UPDATE: /var/log/messages is empty /var/log/kernel.log - http://paste.ubuntu.com/1220182/ /var/log/Xorg.0.log - http://paste.ubuntu.com/1220186/ I just installed propetary driver from ATI, it crash anyway. This morning I started laptop, I enabled wireless, opened dropbox and chrome - freeze. When it freeze I cannot: Do ctrl+alt+f1 to get console access AltF2 + r to reload session Alt+Print + RESUB to restart I totally freezed.

    Read the article

  • Why is my wireless significantly slower on Ubuntu 12.04, as compared to windows 7?

    - by user89266
    I'm dual booting 12.04, and Win7. Just a tiny bit of background, I'm starting to get more and more interested in programming and 3d modelling, so I'd like to learn more about ubuntu as a result of those interests. Still a complete newb though! Anyway, When downloading on windows, I get 1.5mb/s easy. Now I swap over to Ubuntu, and it hasn't topped 150 kb/s since I installed it some 6 months ago. I'd downloaded most of my programs on windows, so I never really noticed it, but as I'm committing to ubuntu more, it's starting to hinder me. I'm with Shaw, on their Highspeed 20, which gives me 20 mbps down, and 6mbps up. Speedtest.com shows me varying figures somewhat close to what shaw says they give on both windows and ubuntu, which is to be expected, given that it is shaw afterall... So, I don't know what you guys need to know, and I know even less about how to get it to you. Whatever information you guys need, tell me how to get it, how to get it up here, and i'll get it on here! I thought it might be that I'm using a proprietary driver, when an open sourced one would work better? But I really have no clue. Any help would be very much appreciated. Thanks guys!

    Read the article

  • Unknown filesystem with GRUB rescue caption cannot boot

    - by Dom
    I just recently partitioned my hard drive and I got this error when booting Ubuntu on that drive. unknown filesystem followed by the GRUB rescue terminal. I did some research and tried to download super grub disk but I cant seem to fix it with that. I have two hard disks. One with Windows Vista on it and the other with Ubuntu which is the one I partitioned. There was 100 GB reserved for all the Ubuntu partitions that I needed and the rest was split into two partitions, one for backup folders for my Windows machine and the other for music production which is the one that I created. The space used to created that was shrunk from my backup partition so I didn't mess with any of the Ubuntu partitions. As of now there are a total of 5 partitions. I also downloaded Rescatux which is another Super GRUB Disk for GRUB 2 not knowing which grub I had. It still didn't work. In Super Grub Disk I tried to swap the hard disk because that was what was said to do in order to fix the grub, that didn't work it said it was unsuccessful. I even tried to unplug the Windows hard disk and run Super GRUB Disk and that wasn't successful either. Is there another way I can fix this? Please any help would be greatly appreciated. I would like to have a nice step by step response.

    Read the article

  • How do I prevent my filesystems from being mounted read-only after suspending?

    - by Chas. Owens
    I have Ubuntu 12.04 installed on an SDHC card (only one ext2 partition, no swap). When I suspend using pm-suspend, my root filesystem is mounted read-only. I am currently "fixing" this with the following file: /etc/pm/sleep.d/99_make_disk_rw: #!/bin/sh mount -o remount,rw / But the disk is marked as needing an fsck on reboot. How can I prevent the filesystem from being mounted read-only or whatever is going wrong here. Update: It looks like it is getting mounted read-only because an error occurred. I have changed the mount options for / in /etc/fstab to noatime,nodiratime,errors=continue and it no longer mounts the SDHC card as read-only after it resumes. So the problem is happening when it suspends, not when it resumes as I had thought. I checked /sys/bus/usb/devices/1-4/power/persist and it is set to 1. So the SDHC card shouldn't appear disconnected to the OS (or more accurately it should recover from the disconnection without error). Here seems to be the relevant section of the syslog Sep 10 10:34:23 iubit kernel: [ 748.246226] sd 4:0:0:0: [sdb] Media Changed Sep 10 10:34:23 iubit kernel: [ 748.246234] sd 4:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE Sep 10 10:34:23 iubit kernel: [ 748.246243] sd 4:0:0:0: [sdb] Sense Key : Unit Attention [current] Sep 10 10:34:23 iubit kernel: [ 748.246253] Info fld=0x0 Sep 10 10:34:23 iubit kernel: [ 748.246258] sd 4:0:0:0: [sdb] Add. Sense: Not ready to ready change, medium may have changed Sep 10 10:34:23 iubit kernel: [ 748.246271] sd 4:0:0:0: [sdb] CDB: Read(10): 28 00 00 5d 3e f0 00 00 08 00 Sep 10 10:34:23 iubit kernel: [ 748.246291] end_request: I/O error, dev sdb, sector 6110960 Sep 10 10:34:23 iubit kernel: [ 748.247027] EXT2-fs (sdb1): error: ext2_fsync: detected IO error when writing metadata buffers Sep 10 10:34:23 iubit anacron[6954]: Anacron 2.3 started on 2012-09-10 Sep 10 10:34:23 iubit anacron[6954]: Normal exit (0 jobs run) Sep 10 10:34:24 iubit laptop-mode: Laptop mode Sep 10 10:34:24 iubit laptop-mode: enabled, not active Sep 10 10:34:24 iubit kernel: [ 749.055376] sd 4:0:0:0: [sdb] No Caching mode page present Sep 10 10:34:24 iubit kernel: [ 749.055387] sd 4:0:0:0: [sdb] Assuming drive cache: write through Sep 10 10:34:25 iubit anacron[7555]: Anacron 2.3 started on 2012-09-10 Sep 10 10:34:25 iubit anacron[7555]: Normal exit (0 jobs run) Sep 10 10:34:31 iubit kernel: [ 756.090861] EXT2-fs (sdb1): previous I/O error to superblock detected

    Read the article

  • Internal hard drive, can't format

    - by user113923
    I cannot format anymore the hard drive of my laptop. Here is how I proceed: I am starting my computer with a USB live drive (Ubuntu 10.04 LTS - the Lucid Lynx). Then I start disk utility and try to format the hard drive - I choosed to format the Master boot record but I get the following error: Error creating partition table: helper exited with exit code 1: Error calling fsync(2) on /dev/sda: Input/output error If I try to delete partitions I get the following error Error erasing: helper exited with exit code 1: In part_del_partition: device_file=/dev/sda, offset=32256 Entering MS-DOS parser (offset=0, size=30005821440) MSDOS_MAGIC found looking at part 0 (offset 32256, size 4096157184, type 0x83) new part entry looking at part 1 (offset 10618836480, size 8414461440, type 0x83) new part entry looking at part 2 (offset 19033297920, size 1077511680, type 0x82) new part entry looking at part 3 (offset 20110809600, size 9895011840, type 0x07) new part entry Exiting MS-DOS parser MSDOS partition table detected got it got disk got partition - part-type=0 Error: Input/output error during write on /dev/sda ped_disk_commit_to_dev() failed If I try to install ubuntu frrom the usb on the hard drive and choose erase and use the entire disk I get the error message Input/output error during write on /dev/sda For side infos I have at the moment 4 partitions on my hard drive: /dev/sda1 (ext2) /dev/sda2 (ext2) /dev/sda3 (swap) /dev/sda1 (ntfs) + /dev/sda (unlocated Space) My ultimate goal is to reinstall ubuntu and have only 2 partitions... I would really appreciate any help here! Thanks JB

    Read the article

  • Oracle Solaris Remote Lab (OSRL) Fact Sheet

    - by user13333379
    The Oracle Solaris Remote Lab allows independent software vendors (ISVs) to test and qualify their applications in a self service Solaris cloud. ISVs who are Oracle Partner Network Gold members with a specialization in the Solaris knowledge zone can apply for free access in OPN. The lab offers the following features to it's users: Lifetime of project: 45 days (extensions granted on demand)  Up to 5 virtual machines in a private network  Virtual Machine technology: Solaris zones  Resources per VM processor support: SPARC or x86  OS version: OracleSolaris 11.0 4GB physical memory  4GB swap space  10GB local filesystem storage  10GB network filesystem (NFS) mounted on all virtual machines Networking configuration The only external network routes are to Partner's other Virtual Machines  No network routing to the Internet  The SMB (CIFS) sharing protocol is not available between Virtual Machines  Device Access  Applications that assume the existence of /devices will not run in a Virtual Machine  Applications that use eeprom to modify SPARC eeprom setting will not run in a Virtual Machine The following utilities do not work properly in Virtual Machines:  add_drv, disks, prtconf, prtdiag, rem_dev Access technology: Secure Global Desktop, file up and download root access within VM Available VM templates (both processor architectures) Oracle Database 11g Release 2 (11.2.0.3) for Solaris with Oracle Enterprise Manager 11g Weblogic 12c  SAMP: Apache http server, PHP, MySQL, phpadmin on all templates and images: Oracle Solaris Studio 12.3 for application development  More resources: Online application for Oracle Solaris remote Lab Developer Webinar about the Oracle Solaris Remote Lab Everything an Oracle Solaris Developer needs...

    Read the article

  • Oracle Solaris Remote Lab (OSRL) Fact Sheet

    - by user13333379
    The Oracle Solaris Remote Lab allows independent software vendors (ISVs) to test and qualify their applications in a self service Solaris cloud. ISVs who are Oracle Partner Network Gold members with a specialization in the Solaris knowledge zone can apply for free access in OPN. The lab offers the following features to it's users: Lifetime of project: 45 days (extensions granted on demand)  Up to 5 virtual machines in a private network  Virtual Machine technology: Solaris zones  Resources per VM processor support: SPARC or x86  OS version: OracleSolaris 11.0 4GB physical memory  4GB swap space  10GB local filesystem storage  10GB network filesystem (NFS) mounted on all virtual machines Networking configuration The only external network routes are to Partner's other Virtual Machines  No network routing to the Internet  The SMB (CIFS) sharing protocol is not available between Virtual Machines  Device Access  Applications that assume the existence of /devices will not run in a Virtual Machine  Applications that use eeprom to modify SPARC eeprom setting will not run in a Virtual Machine The following utilities do not work properly in Virtual Machines:  add_drv, disks, prtconf, prtdiag, rem_dev Access technology: Secure Global Desktop, file up and download root access within VM Available VM templates (both processor architectures) Oracle Database 11g Release 2 (11.2.0.3) for Solaris with Oracle Enterprise Manager 11g Weblogic 12c  SAMP: Apache http server, PHP, MySQL, phpadmin on all templates and images: Oracle Solaris Studio 12.3 for application development  More resources: Online application for Oracle Solaris remote Lab Developer Webinar about the Oracle Solaris Remote Lab Everything an Oracle Solaris Developer needs...

    Read the article

  • Dualboot harddisk encryption

    - by amfcosta
    I have a system with both Ubuntu 11.10 and Windows 7 and I want to encrypt the whole harddisk or at least some of my partitions. My partition table is something like this (the ones marked with * are the ones that need to be encrypted): Windows boot reserved partition *Windows system partition (ntfs) *Windows data partition (ntfs) Ubuntu root partition (ext4) *Ubuntu home partition (ext4) Ubuntu swap As I said I don't need to encrypt the whole disk. What is the best way to accomplish this? Maybe something (TrueCrypt?) where I enter the password before the system boots so that it decrypts the whole hdd? Or maybe individual encryption using Windows-only encryption (for Windows partitions) and Ubuntu home encryption (well, for Ubuntu home partition)? By the way, I almost always use Ubuntu, so it would be nice if I could continue to boot Ubuntu by default but have an option to boot Windows too (like in grub). EDIT: I was thinking of doing this: encrypting ubuntu home with eCryptfs (I think this is used to encrypt home when selected during installation). Encrypting Windows partitions with TrueCrypt. Still having Grub as a bootloader, when I choose ubuntu everything goes as normal (home is decrypted when login in). When I choose windows the TrueCrypt password prompt shows and windows boots.

    Read the article

  • Cannot mount USB drive -- FSTAB error

    - by user107646
    Recently, one of my desktops seems to have developed a problem with the fstab and mounting USB drives. The specific error I receive is... Unable to mount TRAVELDRIVE Error mounting: mount exited with exit code 1: helper failed with: Unprivileged user can not mount NTFS block devices using the external FUSE library. Either mount the volume as root, or rebuild NTFS-3G with integrated FUSE support and make it setuid root. Please see more information at http://tuxera.com/community/ntfs-3g-faq/#unprivileged The contents of my fstab are... /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc nodev,noexec,nosuid 0 0 #Entry for /dev/sdc1 : UUID=7e3431cd-522f-4e35-b286-4300fa702d4a / ext4 errors=remount-ro 0 1 #Entry for /dev/sda1 : UUID=60684D08684CDE82 /media/Archive ntfs-3g defaults,locale=en_US.UTF-8 0 0 #Entry for /dev/sdc5 : UUID=cd166221-4b1d-40f7-b9de-785208990587 none swap sw 0 0 /dev/sdd1 /media/sdd1 ntfs nls=iso8859-1,ro,users,umask=000,user 0 0 /dev/sdd5 /media/PS3 (fat32) vfat users,user 0 0 /dev/sdd5 /media/sdd5 vfat uid=m3talhead,users,user 0 0 I'm guessing its a problem with the duplicate /dev/sdd5 entries (?), but being the *nix noob I am, I'm not certain. What am I missing? Any assist is greatly appreciated!

    Read the article

  • Dual Boot, Dual Hard Drives!

    - by Mars
    I'm posting this question after reading most of similar ones. My situation is different here in the fact that I'm installing on SSD and not partitioning my HDD, and that I can actually boot! I'm just looking to improve the convenience of having easier way to choose. 1- I have a Dell Inspiron 15R SE. It has HDD (1TB) and SSD (32GB). I managed to do whatever things I did in distant past to set the SSD free (I don't really care how fast my system boots). Now I wanted to install Linux on the SSD and leave the HDD untouched. It's way too precious for me to mess with it. So, I repartitioned the SSD to: 30GB for /root, 1GB for /swap, and 100MB for /boot. I installed Linux on the root and the GRUB on boot (of the SSD). Now GRUB immediately boots into linux and doesn't allow me to boot to Windows. BUT! If I enable UEFI Boot manager and choose "Windows Boot Manager" after hitting F12, I can boot into Windows 8 normally. I'd say that's pretty ok, except, I'd prefer to have the option to boot into which one or at the very least, default to boot to Windows. 2- I'm concerned that if I now delete the SSD partition, that the boot will break and I won't be able to boot anything! Does this seem like a valid concern? I made that choice of having linux on SSD because I'm going to be training on it, so I expect multiple resets from time to time.

    Read the article

  • Accessing second hard drive

    - by Jonathan
    Hi, So I recently installed Ubuntu 10.10 64-bit on my computer. I installed it on my 60gb SSD hard drive, and in the installation it never acknowledged the existence of my second hard drive. The hard drive that I keep all my files on, and which I want to make my home folder if I can, is a Western Digital Caviar Black 1TB SATA 6Gb/s 64MB cache (WD1002FAEX). I've read the following: https://help.ubuntu.com/community/Mount but honestly cannot work out how to access the hard drive from my Ubuntu installation. I did have Windows 7 64-bit prior to installing Ubuntu. I have backed up all the files on the hard drive, but if I could just access them straight off that would be super cool. Does anyone know how I can use the second hard drive? Thank you for your help EDIT: The following directories are currently in my /dev/ folder: ati/, block/, bsg/, bus/, char/, cpu/, isk/, input/, mapper/, net/, pktcdvd/, pts/, shm/, snd/, and usb/ EDIT: Result from sudo fdisk -l Disk /dev/sda: 60.0 GB, 60022480896 bytes 255 heads, 63 sectors/track, 7297 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000d2dfd Device Boot Start End Blocks Id System /dev/sda1 * 1 6994 56174592 83 Linux /dev/sda2 6994 7298 2438145 5 Extended /dev/sda5 6994 7298 2438144 82 Linux swap / Solaris

    Read the article

  • Cannot Restore GRUB (Ubuntu 11.04 + Win 7)

    - by Benny
    I'm trying to fix GRUB on my PC, but I'm running into serious issues doing so. Any help would be greatly appreciated as I'm completely crippled right now. Here is the sequence of events for this PC: Installed Windows 7 Split full disk into two partitions (one for win7 and one for multimedia) Long time passed Split one of the partitions into two again Installed Ubuntu 11.04 on new partition A little time passed Windows 7 acting up, reinstall Ubuntu GRUB gone Tried restoring GRUB by mounting and grub-install from live USB Tried switching to a live CD instead of USB (thinking it might be the drive) Now I don't see GRUB and I'm getting "input/output" errors An example i/o error: ubuntu@ubuntu:~$ sudo fdisk -l Disk /dev/sda: 750.2 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xbe86aff6 Device Boot Start End Blocks Id System /dev/sda1 * 1 48727 391393280 7 HPFS/NTFS /dev/sda2 48727 77063 227612647+ 7 HPFS/NTFS /dev/sda3 77063 91202 113566721 5 Extended /dev/sda5 77063 90622 108908544 83 Linux /dev/sda6 90622 91202 4657152 82 Linux swap / Solaris ubuntu@ubuntu:~$ sudo mount /dev/sda5 /mnt ubuntu@ubuntu:~$ sudo grub-install --root-directory=/mnt /dev/sda mkdir: cannot create directory `/mnt/boot': Input/output error ubuntu@ubuntu:~$ cd /mnt ubuntu@ubuntu:/mnt$ ls ls: cannot access etc: Input/output error

    Read the article

  • Ubuntu Desktop does not load

    - by Niklas
    If I login on my Ubuntu 14.04, I get the following desktop: This weird behavior appeared after I executed sudo apt-get update && sudo apt-get upgrade and restarted my computer. Don't know why though. To my Ubuntu I have tried the following (nothing seems to work so far) Fix any broken packages: sudo apt-get update sudo apt-get autoclean sudo apt-get clean sudo apt-get autoremove Locate any broken packages and reinstall them: sudo apt-get install debsums sudo apt-get clean sudo debsums_init sudo debsums -cs sudo apt-get install --reinstall $(sudo dpkg -S $(sudo debsums -c) | cut -d : -f 1 | sort -u) Removing some compiz files: rm -r ~/.cache/compizconfig-1 rm -r ~/.compiz Purging of NVIDIA and installing NVIDIA-prime: sudo apt-get install --reinstall ubuntu-desktop sudo apt-get install unity sudo apt-get purge nvidia* bumblebee* sudo apt-get install nvidia-prime sudo shutdown -r now Compizconfig Settings Manager: sudo apt-get install compizconfig-settings-manager export DISPLAY=:0 ccsm // Back to UI and enablement of Unity Plugin Unity replace, which stopped at a while and did nothing afterwards unity --replace Some dconf reset dconf reset -f /org/compiz/ unity --reset-icons &disown Actually dconf did not work and I got this error: error: Cannot autolaunch D-Bus without X11 $DISPLAY Can anybody help me on that? This is my hardware (hope it helps in any way): Intel® Core™ i7-3770 ASUS GTX660TI-DC2-OG-2GD5 (NVIDIA driver is/was installed) ASUS P8Z77-V LX Corsair DIMM 8 GB DDR3-1600 Kit Samsung 830series 2,5" 256 GB (Windows is installed here) Seagate ST31000524AS 1 TB (3/4 are reserved for files; 1/4 is for Ubuntu (16GB swap included))

    Read the article

  • Model View Control Issue: Null Pointer Initialization Question [closed]

    - by David Dimalanta
    Good morning again. This is David. Please, I need an urgent help regarding control model view where I making a code that uniquely separating into groups: An Activity Java Class to Display the Interface A View and Function Java Class for Drawing Cards and Display it on the Activity Class The problem is that the result returns a Null Pointer Exception. I have initialize for the ID for Text View and Image View. Under this class "draw_deck.java". Please help me. Here's my code for draw_deck.java: package com.bodapps.inbetween.model; import android.content.Context; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.bodapps.inbetween.R; public class draw_deck extends View { public TextView count_label; public ImageView draw_card; private int count; public draw_deck(Context context) { super(context); // TODO Auto-generated constructor stub //I have initialized two widgets for ID. I still don't get it why I got forced closed by Null Pointer Exception thing. draw_card = (ImageView) findViewById(R.id.IV_Draw_Card); count_label = (TextView) findViewById(R.id.Text_View_Count_Card); } public void draw(int s, int c, String strSuit, String strValue, Pile pile, Context context) { //super(context); //Just printing the card drawn from pile int suit, value = 1; draw_card = (ImageView) findViewById(R.id.IV_Draw_Card); count_label = (TextView) findViewById(R.id.Text_View_Count_Card); Card card; if(!pile.isEmpty()) //Setting it to IF statement displays the card one by one. { card = pile.drawFromPile(); //Need to check first if card is null. if (card != null) { //draws an extra if (card != null) { //Get suit of card to print out. suit = card.getSuit(); switch (suit) { case CardInfo.DIAMOND: strSuit = "DIAMOND"; s=0; break; case CardInfo.HEART: strSuit = "HEART"; s=1; break; case CardInfo.SPADE: strSuit = "SPADE"; s=2; break; case CardInfo.CLUB: strSuit = "CLUB"; s=3; break; } //Get value of card to print out. value = card.getValue(); switch (value) { case CardInfo.ACE: strValue = "ACE"; c=0; break; case CardInfo.TWO: c=1; break; case CardInfo.THREE: strValue = "THREE"; c=2; break; case CardInfo.FOUR: strValue = "FOUR"; c=3; break; case CardInfo.FIVE: strValue = "FIVE"; c=4; break; case CardInfo.SIX: strValue = "SIX"; c=4; break; case CardInfo.SEVEN: strValue = "SEVEN"; c=4; break; case CardInfo.EIGHT: strValue = "EIGHT"; c=4; break; case CardInfo.NINE: strValue = "NINE"; c=4; break; case CardInfo.TEN: strValue = "TEN"; c=4; break; case CardInfo.JACK: strValue = "JACK"; c=4; break; case CardInfo.QUEEN: strValue = "QUEEN"; c=4; break; case CardInfo.KING: strValue = "KING"; c=4; break; } } } }// //Below two lines of code, this is where issued the Null Pointer Exception. draw_card.setImageResource(deck[s][c]); count_label.setText(new StringBuilder(strValue).append(" of ").append(strSuit).append(String.valueOf(" " + count++)).toString()); } //Choice of Suits in a Deck public Integer[][] deck = { //Array Group 1 is [0][0] (No. of Cards: 4 - DIAMOND) { R.drawable.card_dummy_1, R.drawable.card_dummy_2, R.drawable.card_dummy_4, R.drawable.card_dummy_5, R.drawable.card_dummy_3 }, //Array Group 2 is [1][0] (No. of Cards: 4 - HEART) { R.drawable.card_dummy_1, R.drawable.card_dummy_2, R.drawable.card_dummy_4, R.drawable.card_dummy_5, R.drawable.card_dummy_3 }, //Array Group 3 is [2][0] (No. of Cards: 4 - SPADE) { R.drawable.card_dummy_1, R.drawable.card_dummy_2, R.drawable.card_dummy_4, R.drawable.card_dummy_5, R.drawable.card_dummy_3 }, //Array Group 4 is [3][0] (No. of Cards: 4 - CLUB) { R.drawable.card_dummy_1, R.drawable.card_dummy_2, R.drawable.card_dummy_4, R.drawable.card_dummy_5, R.drawable.card_dummy_3 }, }; } And this one of the activity class, Player_Mode_2.java: package com.bodapps.inbetween; import java.util.Random; import android.app.Activity; import android.app.Dialog; import android.content.Context; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import com.bodapps.inbetween.model.Card; import com.bodapps.inbetween.model.Pile; import com.bodapps.inbetween.model.draw_deck; /* * * Public class for Two-Player mode. * */ public class Player_Mode_2 extends Activity { //Image Views private ImageView draw_card; private ImageView player_1; private ImageView player_2; private ImageView icon; //Buttons private Button set_deck; //Edit Texts private EditText enter_no_of_decks; //text Views private TextView count_label; //Integer Data Types private int no_of_cards, count; private int card_multiplier; //Contexts final Context context = this; //Pile Model public Pile pile; //Card Model public Card card; //create View @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.play_2_player_mode); //-----[ Search for Views ]----- //Initialize for Image View draw_card = (ImageView) findViewById(R.id.IV_Draw_Card); player_1 = (ImageView) findViewById(R.id.IV_Player_1_Card); player_2 = (ImageView) findViewById(R.id.IV_Player_2_Card); //Initialize for Text view or Label count_label = (TextView) findViewById(R.id.Text_View_Count_Card); //-----[ Adding Values ]----- //Integer Values count = 0; no_of_cards = 0; //-----[ Adding Dialog ]----- //Initializing Dialog final Dialog deck_dialog = new Dialog(context); deck_dialog.setContentView(R.layout.dialog); deck_dialog.setTitle("Deck Dialog"); //-----[ Initializing Views for Dialog's Contents ]----- //Initialize for Edit Text enter_no_of_decks = (EditText) deck_dialog.findViewById(R.id.Edit_Text_Set_Number_of_Decks); //Initialize for Button set_deck = (Button) deck_dialog.findViewById(R.id.Button_Deck); //-----[ Setting onClickListener() ]----- //Set Event Listener for Image view draw_card.setOnClickListener(new Draw_Card_Model()); //Set Event Listener for Setting the Deck set_deck.setOnClickListener(new OnClickListener() { public void onClick(View v) { if(card_multiplier <= 8) { //Use "Integer.parseInt()" method to instantly convert from String to int value. card_multiplier = Integer.parseInt(enter_no_of_decks.getText().toString()); //Shuffling cards... pile = new Pile(card_multiplier); //Multiply no. of decks //Dismiss or close the dialog. deck_dialog.dismiss(); } else { Toast.makeText(getApplicationContext(), "Please choose a number from 1 to 8.", Toast.LENGTH_SHORT).show(); } } }); //Show dialog. deck_dialog.show(); } //Shuffling the Array public void Shuffle_Cards(Integer[][] Shuffle_Deck) { Random random = new Random(); for(int i = Shuffle_Deck[no_of_cards].length - 1; i >=0; i--) { int Index = random.nextInt(i + 1); //Simple Swapping Integer swap = Shuffle_Deck[card_multiplier-1][Index]; Shuffle_Deck[card_multiplier-1][Index] = Shuffle_Deck[card_multiplier-1][i]; Shuffle_Deck[card_multiplier-1][i] = swap; } } //Private Class for Random Card Draw private class Draw_Card_Model implements OnClickListener { public void onClick(View v) { //Just printing the card drawn from pile int suit = 0, value = 0; String strSuit = "", strValue = ""; draw_deck draw = new draw_deck(context); //This line is where issued the Null Pointer Exception. if (count == card_multiplier*52) { // A message shows up when all cards are draw out. Toast.makeText(getApplicationContext(), "All cards have been used up.", Toast.LENGTH_SHORT).show(); draw_card.setEnabled(false); } else { draw.draw(suit, value, strSuit, strValue, pile, context); count_label.setText(count); //This is where I got force closed error, although "int count" have initialized the number. This was supposed to accept in the setText() method. count++; } } } } Take note that the issues on Null Pointer Exception is the Image View and the Edit Text. I got to test it. Thanks. If you have any info about my question, let me know it frankly.

    Read the article

< Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >