Search Results

Search found 6357 results on 255 pages for 'generic relations'.

Page 35/255 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • Overriding inherited generic methods

    - by jess
    I have this code in base class protected virtual bool HasAnyStuff<TObject>(TObject obj) where TObject:class { return false; } In child class I am overriding protected override bool HasAnyStuff<Customer>(Customer obj) { //some stuff if Customer.sth etc return false; } I am getting this error '''Type parameter declaration must be an identifier not a type''' What is it I am doing wrong here?

    Read the article

  • Comparing the values of two generic Numbers

    - by PartlyCloudy
    I want to compare to variables, both of type T extends Number. Now I want to know which of the two variables is greater than the other or equal. Unfortunately I don't know the exact type yet, I only know that it will be a subtype of java.lang.Number. How can I do that? Thanks!

    Read the article

  • C# Possible to have a generic return type?

    - by JL
    Here is a typical function that returns either true/false; private static bool hasValue() { return true; } Now on an error, I would like to return my own custom error object with definition: public class Failure { public string failureDateTime { get; set; } public string failureReason { get; set; } } I would have expected to be able to throw this custom object for example... private static bool hasValue() { throw new Failure(); } This is not possible, and I don't want to derive Failure from System.IO.Exception because of the inability to serialize an exception in C#. What is the best practice / or ideal solution to this problem. Should I just work with private static object? Or is there a cleaner way to return a custom object or bypass the typical return type on an error (not using System.IO.Exception)? Not entirely wild about object either, because then I need to cast the result and validate it by more boolean logic.

    Read the article

  • Generic collection class?

    - by Mark
    Is there anyway I can do this? class TSOC<TCollection, TValue> : ICollection<TValue>, INotifyCollectionChanged where TCollection : ICollection { private TCollection<TValue> collection; } It doesn't like my definition of collection. I'd prefer the definition to look like TSOC<TCollection> where the user can pass in List<int> or something, but then I need to pull out the "int" to know what interface to implement.

    Read the article

  • C# determining generic type

    - by Chris Klepeis
    I have several templated objects that all implement the same interface: I.E. MyObject<datatype1> obj1; MyObject<datatype2> obj2; MyObject<datatype3> obj3; I want to store these objects in a List... I think I would do that like this: private List<MyObject<object>> _myList; I then want to create a function that takes 1 parameter, being a datatype, to see if an object using that datatype exists in my list.... sorta clueless how to go about this. In Pseudo code it would be: public bool Exist(DataType T) { return (does _myList contain a MyObject<T>?); }

    Read the article

  • Generic DRM (Distributed resource management) wrapper

    - by Pavel Bernshtam
    I need to write a software, which launches DRM jobs in a customer environment and monitors those jobs status. It should work with various customer environments and DRMs - like LSF, Sun Grid and others. Can you recommend some 3rd party library, which hides DRM differences from me and has API like "launch job", "get list of jobs", "get job status" etc. ? Both Java and native libraries are good for me.

    Read the article

  • How to create a generic Android XML layout for all activities

    - by zabawaba
    I have an application that needs the same items [5 buttons acting as tabs] in every screen. Is it possible to create a "base XML layout" that has these 5 buttons and then have all the other XML files extend from the bas layout in some way so that I don't have to have multiple buttons that will ultimately have the same functionality. Is there a better approach to this problem that can be supported by API 9

    Read the article

  • How Can I Accept a Generic Class and Use Its Properties / Methods

    - by Blake Blackwell
    I want to create a class that could hold any of a number of same type of classes. For example lets says I have a base class like follows: public class BaseClass { public string MyBaseString { get; set; } } And then I have a few derived classes like this: public class DerivedClass : BaseClass { public MyDerivedClassString { get; set; } } public class DerivedClass2 : BaseClass { public MyDerivedClass2String { get; set; } } Now I would like a class that accepts one of these implementations and does stuff with it. Here is the only thing I can think of, but there must be a better way: public class ClassA { public object MyClass { get; set; } public ClassA (object myClass) { MyClass = myClass; if (object is BaseClass) { //do something } else if (object is DerivedClass) { //do something specific to derived class } else if (object is DerivedClass2) { //do something specific to derived class 2 } } } I'm not sure really what I'm looking for here. Any ideas would be great!

    Read the article

  • Passing a generic class to a java function?

    - by rodo
    Is it possible to use Generics when passing a class to a java function? I was hoping to do something like this: public static class DoStuff { public <T extends Class<List>> void doStuffToList(T className) { System.out.println(className); } public void test() { doStuffToList(List.class); // compiles doStuffToList(ArrayList.class); // compiler error (undesired behaviour) doStuffToList(Integer.class); // compiler error (desired behaviour) } } Ideally the List.class and ArrayList.class lines would work fine, but the Integer.class line would cause a compile error. I could use Class as my type instead of T extends Class<List> but then I won't catch the Integer.class case above.

    Read the article

  • implict type cast in generic method

    - by bitbonk
    why do I get a compiler error in the following code stating: Cannot implicty convert type SpecialNode to T even though T must derive from NodeBase as I defined in the where clause and even though SpecialNode actually derived from NodeBase? public static T GetNode<T>() where T : NodeBase { if (typeof(T) == typeof(SpecialNode)) { return ThisStaticClass.MySpecialNode; // <-- compiler error } if (typeof(T) == typeof(OtherSpecialNode)) { return ThisStaticClass.MyOtherSpecialNode; // <-- compiler error } ... return default(T); }

    Read the article

  • Dispatching generic tasks in WCF or .Net Remoting

    - by Eric
    Hello all, I've been researching for a couple days on and off, and have yet to figure out the best way to achieve the following goal. I would like to define either an interface or abstract class in C# which has an associated Run method, similar to the Java runnable interface. The goal would be to have a shared queue which contains a list of these objects. Then individual clients would be able to derive their own concrete runnable classes and add them to the queue hosted by the server. Clients would also be able to pop these runnable objects off the queue and execute them arbitrarily. This seems like it should be feasible in a VM based language without needing to place any of the concrete implementations in a shared assembly, but I have thus far had no luck finding a working example of such a system. Does anyone know how this might be achieved?

    Read the article

  • How online-game clients are able to exchange data through internet so fast?

    - by Kirzilla
    Hello, Let's imagine really simple game... We have a labirinth and two players trying to find out exit in real time through internet. On every move game client should send player's coordinates to server and accept current coordinates of another client. How is it possible to make this exchange so fast (as all modern games do). Ok, we can use memcache or similar technology to reduce data mining operations on server side. We can also use fastest webserver etc., but we still will have problems with timings. So, the questions are... What protocol game clients are usually using for exchanging information with server? What server technologies are coming to solve this problem? What algorithms are applied for fighting with delays during game etc. PS: Sorry for my English and I hope that my question is clear. Thank you.

    Read the article

  • Linq based generic alternate to Predicate<T>?

    - by Eric
    I have an interface called ICatalog as shown below where each ICatalog has a name and a method that will return items based on a Predicate<Item> function. public interface ICatalog { string Name { get; } IEnumerable<IFamily> GetItems(Predicate<Item> predicate); } A specific implementation of a catalog may be linked to catalogs in various format such as XML, or a SQL database. With an XML catalog I end up deserializing the entire XML file into memory, so testing each item with the predicate function does does not add a whole lot more overhead as it's already in memory. Yet with the SQL implementation I'd rather not retrieve the entire contents of the database into memory, and then filter the items with the predicate function. Instead I'd want to find a way to somehow pass the predicate to the SQL server, or somehow convert it to a SQL query. This seems like a problem that can be solved with Linq, but I'm pretty new to it. Should my interface return IQueryable instead?

    Read the article

  • C# Generic Collection help

    - by dcmovva
    I have a requirement to implement some kind of dictionary object. Something like MyDict<K,V1, V2). For example if I have a Question as Key(k) then Correct answer is V1 . V2 is user selected answer. Is there a collection that would satisfy this requirement in C#. If I have to design my own type, what interfaces should I implement. ICollection and Ilist ?

    Read the article

  • How to inherit from a generic parameter?

    - by Bob
    I'm basically wanting to do this: class UILockable<T> : T where T : UIWidget { } However, this doesn't work. I've seen people recommend that you do this: class UILockable<T> where T : UIWidget { private T _base; } This would require me to override each function UILockable would need and forward it to T. This is impossible since T may derive from UIWidget and have unique abstract/virtual methods of its own. Is there no way to simply inherit from T?

    Read the article

  • Generic usercontrol possible?

    - by Sam
    Since .Net 4 does support generics in XAML, I'd like to create a UserControl using generics, like: public class MyComboBox<T> { } I can declare the UserControl quite well, but how would I use it in a XAML file? Or can't this be done in XAML?

    Read the article

  • can I get .class from generic type argument?

    - by Mike S
    I have the following class: public abstract class MyClass<T extends Object> { protected T createNewFromData(Reader reader){ GSON.fromJSON(reader,T.class); // T.class isn't allowed :( } } How do I pass a Class<T instance into there? Is there some wierd and wacky work around? Is there a way to get a Class<T reference other than from a pre-instantiated Object of type T? It won't let me do this either: T t = new T(); Class<T> klass = t.class; ANSWER BELOW Thanks to the accepted answer, here is the solution: Type type = new TypeToken<T>(){}.getType(); return gson.fromJson(reader, type);

    Read the article

  • C# Generic new() constructor problem

    - by LB
    I'm trying to create a new object of type T via its constructor when adding to the list. I'm getting a compile error: The correct error message is: 'T': cannot provide arguments when creating an instance of a variable But it does! Any ideas? public static string GetAllItems<T>(...) where T : new() { ... List<T> tabListItems = new List<T>(); foreach (ListItem listItem in listCollection) { tabListItems.Add(new T(listItem)); // error here. } ... }

    Read the article

  • Errors Code: /var/cache/apt/archives/linux-image-3.8.0-19-generic_3.8.0-19.30~precise1_amd64.deb

    - by user286682
    $ sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages will be upgraded: linux-image-3.8.0-19-generic 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 6 not fully installed or removed. Need to get 0 B/47.8 MB of archives. After this operation, 142 MB of additional disk space will be used. Do you want to continue [Y/n]? y (Reading database ... 164064 files and directories currently installed.) Preparing to replace linux-image-3.8.0-19-generic 3.8.0-19.29 (using .../linux-image-3.8.0-19-generic_3.8.0-19.30~precise1_amd64.deb) ... Done. Unpacking replacement linux-image-3.8.0-19-generic ... dpkg: error processing /var/cache/apt/archives/linux-image-3.8.0-19-generic_3.8.0-19.30~precise1_amd64.deb (--unpack): trying to overwrite '/lib/modules/3.8.0-19-generic/kernel/arch/x86/kvm/kvm-intel.ko', which is also in package linux-image-extra-3.8.0-19-generic 3.8.0-19.29 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.8.0-19-generic /boot/vmlinuz-3.8.0-19-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.8.0-19-generic /boot/vmlinuz-3.8.0-19-generic Errors were encountered while processing: /var/cache/apt/archives/linux-image-3.8.0-19-generic_3.8.0-19.30~precise1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) How can I get this update to work?

    Read the article

  • Ubuntu 12.04 + Raid0 + Windows 7 not loading

    - by Douglas
    please someone help me.... (Sorry for my english) Hi, I have a Pc with 2 Hd (1Tb each) on Raid0. I had a Windows 7 64bits working for several months. When I installed the Windows I let a 100Gb partition empty to install Ubuntu someday. I was using Linux on a Virtualbox, but this week I tried to install Ubuntu 12.04 in this 100Gb partition. I used the Ubuntu alternate cd, because the 'normal' cd was giving me trouble with the Raid0. The grub installation always reported a error. After a lot of work I found that I nedded to install grub on partition /dev/mapper/isw_chjbfeec_DougRaid1 (see Bootinfo below). The Windows installation created a 100Mb boot partition, so I needed to install grub in this partition. Now I have the Ubuntu working 100% ok. The problem is, the Windows is not booting! The windows option is present on the grub menu, but when I choose the windows option there is a black screen and after that the grub is reloaded. My Bootinfo is: Boot Info Script 0.61 [1 April 2012] ============================= Boot Info Summary: =============================== => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of the same hard drive for core.img. core.img is at this location and looks in partition 1 for /boot/grub. => Grub2 (v1.99) is installed in the MBR of /dev/mapper/isw_chjbfeec_DougRaid and looks at sector 1 of the same hard drive for core.img. core.img is at this location and looks in partition 1 for /boot/grub. sda1: __________________________________________________________________________ File system: Boot sector type: Unknown Boot sector info: Mounting failed: mount: unknown filesystem type '' sda2: __________________________________________________________________________ File system: Boot sector type: Unknown Boot sector info: Mounting failed: mount: unknown filesystem type '' mount: unknown filesystem type '' sda3: __________________________________________________________________________ File system: Extended Partition Boot sector type: Unknown Boot sector info: isw_chjbfeec_DougRaid1: ________________________________________________________ File system: ntfs Boot sector type: Grub2 (v1.99) Boot sector info: Grub2 (v1.99) is installed in the boot sector of isw_chjbfeec_DougRaid1 and looks at sector 3841862992 of the same hard drive for core.img. core.img is at this location and looks for (,msdos5)/boot/grub on this drive. No errors found in the Boot Parameter Block. Operating System: Boot files: /grldr /bootmgr /Boot/BCD /grldr isw_chjbfeec_DougRaid2: ________________________________________________________ File system: ntfs Boot sector type: Windows Vista/7: NTFS Boot sector info: No errors found in the Boot Parameter Block. Operating System: Windows 7 Boot files: /Windows/System32/winload.exe isw_chjbfeec_DougRaid3: ________________________________________________________ File system: Extended Partition Boot sector type: - Boot sector info: isw_chjbfeec_DougRaid5: ________________________________________________________ File system: ext4 Boot sector type: - Boot sector info: Operating System: Ubuntu 12.04 LTS Boot files: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img isw_chjbfeec_DougRaid6: ________________________________________________________ File system: swap Boot sector type: - Boot sector info: ============================ Drive/Partition Info: ============================= Drive: sda _____________________________________________________________________ Partition Boot Start Sector End Sector # of Sectors Id System /dev/sda1 * 2,048 206,847 204,800 7 NTFS / exFAT / HPFS /dev/sda2 206,848 3,686,402,047 3,686,195,200 7 NTFS / exFAT / HPFS /dev/sda3 3,686,402,558 3,907,039,743 220,637,186 5 Extended Invalid MBR Signature found. EBR refers to a location outside the hard drive. /dev/sda2 ends after the last sector of /dev/sda /dev/sda3 ends after the last sector of /dev/sda Drive: isw_chjbfeec_DougRaid _____________________________________________________________________ Disk /dev/mapper/isw_chjbfeec_DougRaid: 2000.4 GB, 2000404348928 bytes 255 heads, 63 sectors/track, 243201 cylinders, total 3907039744 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes Partition Boot Start Sector End Sector # of Sectors Id System /dev/mapper/isw_chjbfeec_DougRaid1 * 2,048 206,847 204,800 7 NTFS / exFAT / HPFS /dev/mapper/isw_chjbfeec_DougRaid2 206,848 3,686,402,047 3,686,195,200 7 NTFS / exFAT / HPFS /dev/mapper/isw_chjbfeec_DougRaid3 3,686,402,558 3,907,039,743 220,637,186 5 Extended /dev/mapper/isw_chjbfeec_DougRaid5 3,686,402,560 3,881,876,479 195,473,920 83 Linux /dev/mapper/isw_chjbfeec_DougRaid6 3,881,876,992 3,907,039,743 25,162,752 82 Linux swap / Solaris "blkid" output: ________________________________________________________________ Device UUID TYPE LABEL /dev/mapper/isw_chjbfeec_DougRaid1 C89C73D19C73B910 ntfs Reservado pelo Sistema /dev/mapper/isw_chjbfeec_DougRaid2 6830883A3088116C ntfs /dev/mapper/isw_chjbfeec_DougRaid5 bbab868a-ea53-4be3-ba7d-2737fe6cb24c ext4 /dev/mapper/isw_chjbfeec_DougRaid6 7a830a3c-88fb-4cba-80dc-f32e08abfd5b swap /dev/sda isw_raid_member /dev/sdb isw_raid_member /dev/sr0 iso9660 Windows7x86x64SK ========================= "ls -R /dev/mapper/" output: ========================= /dev/mapper: control isw_chjbfeec_DougRaid isw_chjbfeec_DougRaid1 isw_chjbfeec_DougRaid2 isw_chjbfeec_DougRaid3 isw_chjbfeec_DougRaid5 isw_chjbfeec_DougRaid6 ================================ Mount points: ================================= Device Mount_Point Type Options /dev/mapper/isw_chjbfeec_DougRaid5 / ext4 (rw,errors=remount-ro) /dev/sr0 /media/Windows7x86x64SK iso9660 (ro,nosuid,nodev,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks) ================= isw_chjbfeec_DougRaid1/grldr embedded menu: ================== -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ================== isw_chjbfeec_DougRaid5/boot/grub/grub.cfg: ================== -------------------------------------------------------------------------------- # # DO NOT EDIT THIS FILE # # It is automatically generated by grub-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # ### BEGIN /etc/grub.d/00_header ### if [ -s $prefix/grubenv ]; then set have_grubenv=true load_env fi set default="0" if [ "${prev_saved_entry}" ]; then set saved_entry="${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault { if [ -z "${boot_once}" ]; then saved_entry="${chosen}" save_env saved_entry fi } function recordfail { set recordfail=1 if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi } function load_video { insmod vbe insmod vga insmod video_bochs insmod video_cirrus } insmod part_msdos insmod ext2 set root='(/dev/mapper/isw_chjbfeec_DougRaid3,msdos1)' search --no-floppy --fs-uuid --set=root bbab868a-ea53-4be3-ba7d-2737fe6cb24c if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=auto load_video insmod gfxterm insmod part_msdos insmod ext2 set root='(/dev/mapper/isw_chjbfeec_DougRaid3,msdos1)' search --no-floppy --fs-uuid --set=root bbab868a-ea53-4be3-ba7d-2737fe6cb24c set locale_dir=($root)/boot/grub/locale set lang=en_US insmod gettext fi terminal_output gfxterm if [ "${recordfail}" = 1 ]; then set timeout=-1 else set timeout=10 fi ### END /etc/grub.d/00_header ### ### BEGIN /etc/grub.d/05_debian_theme ### set menu_color_normal=white/black set menu_color_highlight=black/light-gray if background_color 44,0,30; then clear fi ### END /etc/grub.d/05_debian_theme ### ### BEGIN /etc/grub.d/10_linux ### function gfxmode { set gfxpayload="$1" if [ "$1" = "keep" ]; then set vt_handoff=vt.handoff=7 else set vt_handoff= fi } if [ ${recordfail} != 1 ]; then if [ -e ${prefix}/gfxblacklist.txt ]; then if hwmatch ${prefix}/gfxblacklist.txt 3; then if [ ${match} = 0 ]; then set linux_gfx_mode=keep else set linux_gfx_mode=text fi else set linux_gfx_mode=text fi else set linux_gfx_mode=keep fi else set linux_gfx_mode=text fi export linux_gfx_mode if [ "$linux_gfx_mode" != "text" ]; then load_video; fi menuentry 'Ubuntu, with Linux 3.2.0-24-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os { recordfail gfxmode $linux_gfx_mode insmod gzio insmod part_msdos insmod ext2 set root='(/dev/mapper/isw_chjbfeec_DougRaid3,msdos1)' search --no-floppy --fs-uuid --set=root bbab868a-ea53-4be3-ba7d-2737fe6cb24c linux /boot/vmlinuz-3.2.0-24-generic-pae root=UUID=bbab868a-ea53-4be3-ba7d-2737fe6cb24c ro quiet splash $vt_handoff initrd /boot/initrd.img-3.2.0-24-generic-pae } menuentry 'Ubuntu, with Linux 3.2.0-24-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod gzio insmod part_msdos insmod ext2 set root='(/dev/mapper/isw_chjbfeec_DougRaid3,msdos1)' search --no-floppy --fs-uuid --set=root bbab868a-ea53-4be3-ba7d-2737fe6cb24c echo 'Loading Linux 3.2.0-24-generic-pae ...' linux /boot/vmlinuz-3.2.0-24-generic-pae root=UUID=bbab868a-ea53-4be3-ba7d-2737fe6cb24c ro recovery nomodeset echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-3.2.0-24-generic-pae } submenu "Previous Linux versions" { menuentry 'Ubuntu, with Linux 3.2.0-23-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os { recordfail gfxmode $linux_gfx_mode insmod gzio insmod part_msdos insmod ext2 set root='(/dev/mapper/isw_chjbfeec_DougRaid3,msdos1)' search --no-floppy --fs-uuid --set=root bbab868a-ea53-4be3-ba7d-2737fe6cb24c linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=bbab868a-ea53-4be3-ba7d-2737fe6cb24c ro quiet splash $vt_handoff initrd /boot/initrd.img-3.2.0-23-generic-pae } menuentry 'Ubuntu, with Linux 3.2.0-23-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod gzio insmod part_msdos insmod ext2 set root='(/dev/mapper/isw_chjbfeec_DougRaid3,msdos1)' search --no-floppy --fs-uuid --set=root bbab868a-ea53-4be3-ba7d-2737fe6cb24c echo 'Loading Linux 3.2.0-23-generic-pae ...' linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=bbab868a-ea53-4be3-ba7d-2737fe6cb24c ro recovery nomodeset echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-3.2.0-23-generic-pae } } ### END /etc/grub.d/10_linux ### ### BEGIN /etc/grub.d/20_linux_xen ### ### END /etc/grub.d/20_linux_xen ### ### BEGIN /etc/grub.d/20_memtest86+ ### menuentry "Memory test (memtest86+)" { insmod part_msdos insmod ext2 set root='(/dev/mapper/isw_chjbfeec_DougRaid3,msdos1)' search --no-floppy --fs-uuid --set=root bbab868a-ea53-4be3-ba7d-2737fe6cb24c linux16 /boot/memtest86+.bin } menuentry "Memory test (memtest86+, serial console 115200)" { insmod part_msdos insmod ext2 set root='(/dev/mapper/isw_chjbfeec_DougRaid3,msdos1)' search --no-floppy --fs-uuid --set=root bbab868a-ea53-4be3-ba7d-2737fe6cb24c linux16 /boot/memtest86+.bin console=ttyS0,115200n8 } ### END /etc/grub.d/20_memtest86+ ### ### BEGIN /etc/grub.d/30_os-prober_proxy ### menuentry "Windows 7 (loader) (on /dev/mapper/isw_chjbfeec_DougRaid1)" --class windows --class os { insmod part_msdos insmod ntfs set root='(sda,msdos1)' search --no-floppy --fs-uuid --set=root C89C73D19C73B910 chainloader +1 } ### END /etc/grub.d/30_os-prober_proxy ### ### BEGIN /etc/grub.d/40_custom ### # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. ### END /etc/grub.d/40_custom ### ### BEGIN /etc/grub.d/41_custom ### if [ -f $prefix/custom.cfg ]; then source $prefix/custom.cfg; fi ### END /etc/grub.d/41_custom ### -------------------------------------------------------------------------------- ====================== isw_chjbfeec_DougRaid5/etc/fstab: ======================= -------------------------------------------------------------------------------- # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc nodev,noexec,nosuid 0 0 /dev/mapper/isw_chjbfeec_DougRaid5 / ext4 errors=remount-ro 0 1 /dev/mapper/isw_chjbfeec_DougRaid6 none swap sw 0 0 -------------------------------------------------------------------------------- ========== isw_chjbfeec_DougRaid5: Location of files loaded by Grub: =========== GiB - GB File Fragment(s) = boot/grub/core.img 1 = boot/grub/grub.cfg 1 = boot/initrd.img-3.2.0-23-generic-pae 2 = boot/initrd.img-3.2.0-24-generic-pae 2 = boot/vmlinuz-3.2.0-23-generic-pae 1 = boot/vmlinuz-3.2.0-24-generic-pae 1 = initrd.img 2 = initrd.img.old 2 = vmlinuz 1 = vmlinuz.old 1 ======================== Unknown MBRs/Boot Sectors/etc: ======================== Unknown BootLoader on sda1 Unknown BootLoader on sda2 Unknown BootLoader on sda3 =============================== StdErr Messages: =============================== xz: (stdin): Compressed data is corrupt xz: (stdin): Compressed data is corrupt hexdump: /dev/sda1: No such file or directory hexdump: /dev/sda1: No such file or directory hexdump: /dev/sda2: No such file or directory hexdump: /dev/sda2: No such file or directory hexdump: /dev/sda3: No such file or directory hexdump: /dev/sda3: No such file or directory xz: (stdin): Compressed data is corrupt awk: cmd. line:36: Math support is not compiled in awk: cmd. line:36: Math support is not compiled in awk: cmd. line:36: Math support is not compiled in awk: cmd. line:36: Math support is not compiled in awk: cmd. line:36: Math support is not compiled in awk: cmd. line:36: Math support is not compiled in awk: cmd. line:36: Math support is not compiled in awk: cmd. line:36: Math support is not compiled in awk: cmd. line:36: Math support is not compiled in awk: cmd. line:36: Math support is not compiled in How we can see the Windows part at grub is: menuentry "Windows 7 (loader) (on /dev/mapper/isw_chjbfeec_DougRaid1)" --class windows --class os { insmod part_msdos insmod ntfs set root='(sda,msdos1)' search --no-floppy --fs-uuid --set=root C89C73D19C73B910 chainloader +1 } I tried a lot of combinations at the line: set root='(sda,msdos1)' , but no success I tried to change uuid to the /dev/mapper/isw_chjbfeec_DougRaid2 uuid, but the grub reports a error. I dont know what to do now. I really need to boot my windows partition. Someone knows what to do? Thanks........

    Read the article

  • libc-bin errors when trying to install php

    - by jonney
    i am trying to update and install php into my ubuntu server 12.04 using the command below: apt-get upgrade php apt-get install php5-curl php5-gd php5-mysql php5-pgsql However i receive this error all the time: gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.2.0-34-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-34-generic.postinst line 1010. dpkg: error processing linux-image-3.2.0-34-generic (--configure): subprocess installed post-installation script returned error exit status 2 dpkg: dependency problems prevent configuration of linux-image-server: linux-image-server depends on linux-image-3.2.0-33-generic; however: Package linux-image-3.2.0-33-generic is not configured yet. dpkg: error processing linux-image-server (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-server: linux-server depends on linux-image-server (= 3.2.0.33.36); however: Package linux-image-server is not configured yet. dpkg: error processing linux-server (--configure): dependency problems - leaving unconfigured Setting up libpq5 (9.1.10-0ubuntu12.04) ... No apport report written because the error message indicates it's a follow-up error from a previous failure. No apport report written because MaxReports has already been reached Setting up php5-curl (5.3.10-1ubuntu3.8) ... Setting up php5-pgsql (5.3.10-1ubuntu3.8) ... Processing triggers for initramfs-tools ... update-initramfs: Generating /boot/initrd.img-3.2.0-32-generic gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.2.0-32-generic with 1. dpkg: error processing initramfs-tools (--configure): subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports has already been reached Processing triggers for libc-bin ... ldconfig deferred processing now taking place Errors were encountered while processing: linux-image-3.2.0-33-generic linux-image-3.2.0-34-generic linux-image-server linux-server initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1) Not sure whats wrong and why it cant process the linux-image files?

    Read the article

  • Can't update kernel to 2.6.35.27

    - by Uri Herrera
    When I try to update I get this message, I'm guessing I'm missing something here? Filesystem Type Size Used Avail Use% Mounted on /dev/sdb6 ext4 43G 7.7G 33G 20% / none devtmpfs 1.6G 349k 1.6G 1% /dev none tmpfs 1.6G 5.9M 1.6G 1% /dev/shm none tmpfs 1.6G 218k 1.6G 1% /var/run none tmpfs 1.6G 0 1.6G 0% /var/lock /dev/sdb2 fuseblk 258G 198G 60G 77% /media/Backup /dev/sda1 fuseblk 321G 175G 146G 55% /media/Media /dev/sdb1 ext4 96M 84M 6.7M 93% /boot /dev/sdb7 ext4 175G 81G 86G 49% /home Here's the output: Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: linux-image-2.6.35-22-generic 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 5 not fully installed or removed. After this operation, 107MB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 282211 files and directories currently installed.) Removing linux-image-2.6.35-22-generic ... Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 2.6.35-22-generic /boot/vmlinuz-2.6.35-22-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 2.6.35-22-generic /boot/vmlinuz-2.6.35-22-generic /etc/default/grub: 23: Syntax error: newline unexpected run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2 Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-2.6.35-22- generic.postrm line 328. dpkg: error processing linux-image-2.6.35-22-generic (--remove): subprocess installed post-removal script returned error exit status 1 Errors were encountered while processing: linux-image-2.6.35-22-generic E: Sub-process /usr/bin/dpkg returned an error code (1)

    Read the article

  • Error while reomving the new kernel 2.6.37

    - by Tarek
    Hi! I tried to install the new kernel but something went wrong and I'm trying to remove it now. The error massege is: mhd@Tarek-Laptop:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: linux-image-2.6.37-020637-generic 0 upgraded, 0 newly installed, 1 to remove and 9 not upgraded. 1 not fully installed or removed. After this operation, 111MB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 188780 files and directories currently installed.) Removing linux-image-2.6.37-020637-generic ... Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 2.6.37-020637-generic /boot/vmlinuz-2.6.37-020637-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 2.6.37-020637-generic /boot/vmlinuz-2.6.37-020637-generic /etc/default/grub: 33: Syntax error: EOF in backquote substitution run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2 Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-2.6.37-020637-generic.postrm line 328. dpkg: error processing linux-image-2.6.37-020637-generic (--remove): subprocess installed post-removal script returned error exit status 1 Errors were encountered while processing: linux-image-2.6.37-020637-generic E: Sub-process /usr/bin/dpkg returned an error code (1) The previous unsloved error is on this bug.

    Read the article

  • VB.NET, make a function with return type generic ?

    - by Quandary
    Currently I have written a function to deserialize XML as seen below. How do I change it so I don't have to replace the type every time I want to serialize another object type ? The current object type is cToolConfig. How do I make this function generic ? Public Shared Function DeserializeFromXML(ByRef strFileNameAndPath As String) As XMLhandler.XMLserialization.cToolConfig Dim deserializer As New System.Xml.Serialization.XmlSerializer(GetType(cToolConfig)) Dim srEncodingReader As IO.StreamReader = New IO.StreamReader(strFileNameAndPath, System.Text.Encoding.UTF8) Dim ThisFacility As cToolConfig ThisFacility = DirectCast(deserializer.Deserialize(srEncodingReader), cToolConfig) srEncodingReader.Close() srEncodingReader.Dispose() Return ThisFacility End Function Public Shared Function DeserializeFromXML1(ByRef strFileNameAndPath As String) As System.Collections.Generic.List(Of XMLhandler.XMLserialization.cToolConfig) Dim deserializer As New System.Xml.Serialization.XmlSerializer(GetType(System.Collections.Generic.List(Of cToolConfig))) Dim srEncodingReader As IO.StreamReader = New IO.StreamReader(strFileNameAndPath, System.Text.Encoding.UTF8) Dim FacilityList As System.Collections.Generic.List(Of cToolConfig) FacilityList = DirectCast(deserializer.Deserialize(srEncodingReader), System.Collections.Generic.List(Of cToolConfig)) srEncodingReader.Close() srEncodingReader.Dispose() Return FacilityList End Function

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >