Search Results

Search found 36179 results on 1448 pages for 'generic list'.

Page 11/1448 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Dividing a list in specific number of sublists

    - by Surya
    I want to divide a list in "a specific number of" sublists. That is, for example if I have a list List(34, 11, 23, 1, 9, 83, 5) and the number of sublists expected is 3 then I want List(List(34, 11), List(23, 1), List(9, 83, 5)). How do I go about doing this? I tried grouped but it doesn't seem to be doing what I want. PS: This is not a homework question. Kindly give a direct solution instead of some vague suggestions.

    Read the article

  • Printing a list using reflection

    - by TFool
    public class Service{ String serviceName; //setter and getter } public class Version{ String VersionID; //setter and getter } public void test(Object list){ //it shd print the obtained list } List< Service list1; //Service is a Bean List< Version list2; //Version is a Bean test(list1); test(list2); Now the test method shd print the obtained list - (i.e) If the list is of type Service ,then serviceName should be printed using its getter. If the list type is Version versionID should be printed. Is it possible to achieve this without using Interface or abstract class?

    Read the article

  • Can't install or update Ubuntu after using parameter acpi_osi = Linux

    - by Lucas Leitão
    I recently had an issue with my acer 4736z notebook because I was having a blank screen after booting the OS, then someone told me to use the parameter GRUB_CMDLINE_LINUX_DEFAULT = "quiet splash acpi_osi = Linux" after quiet splash inside the grub. It worked for me, but since then I can't install a thing or update anything on Linux because it says Removing linux-image-extra-3.5.0-17-generic ... Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.5.0-17-generic /boot/vmlinuz-3.5.0-17-generic update-initramfs: Deleting /boot/initrd.img-3.5.0-17-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.5.0-17-generic /boot/vmlinuz-3.5.0-17-generic /usr/sbin/grub-mkconfig: 11: /etc/default/grub: GRUB_CMDLINE_LINUX_DEFAULT: not found run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127 Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-extra-3.5.0-17-generic.postrm line 328. dpkg: erro ao processar linux-image-extra-3.5.0-17-generic (--remove): sub-processo script post-removal instalado retornou estado de saída de erro 1 Removendo linux-image-3.5.0-17-generic ... Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.5.0-17-generic /boot/vmlinuz-3.5.0-17-generic update-initramfs: Deleting /boot/initrd.img-3.5.0-17-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.5.0-17-generic /boot/vmlinuz-3.5.0-17-generic /usr/sbin/grub-mkconfig: 11: /etc/default/grub: GRUB_CMDLINE_LINUX_DEFAULT: not found run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127 Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.5.0-17-generic.postrm line 328. dpkg: erro ao processar linux-image-3.5.0-17-generic (--remove): sub-processo script post-removal instalado retornou estado de saída de erro 1 Erros foram encontrados durante o processamento de: linux-image-extra-3.5.0-17-generic linux-image-3.5.0-17-generic E: Sub-process /usr/bin/dpkg returned an error code (1) I already tried to remove older kernels but it gives me the same message. Do you have a clue about what should I do?

    Read the article

  • Body of email breaks distribution list in exchange?

    - by widgisoft
    Hi, I have a very odd problem that I'm not sure is a programming issue or a server issue :-p. Basically I'm sending an email to an exchange distribution list that includes a PHP stack trace; during certain faults the trace includes really high level information such as the machine's environment variables (during file reads, etc.). I went through a copy of the email line by line until the email sent and it appears the line: [SUDO_COMMAND] => /etc/init.d/httpd restart is the culprit. Adding a string replacement in before the email is sent allows a successful send. What I don't understand is WHY these stream of characters are causing the issue ONLY on the distribution email. If I send the email to myself as well, i.e. "[email protected]; [email protected]", then I get the email fine. Re-ordering the list doesn't make a difference the group never gets the email. Because the individual gets the email and not the group I'm assuming the fault is with exchange and some rogue filtering - I've gone through it with the sysadmins and there's no filtering of any sort on that group... so maybe it's a bug? I can't find anyone else having recorded this specific fault so I figured I'd open it here. For now I'm just not using the distribution list but it'd be nice to eventually find the solution. Many thanks, Chris

    Read the article

  • How to "cast" from generic List<> to ArrayList

    - by Michael Freidgeim
    We are writing new code using generic List<> , e.g. List<MyClass>.   However we have legacy functions, that are expect ArrayList as a parameter. It is a second time, when I and my colleague asked, how to "cast" generic List<MyClass> to ArrayList. The answer is simple- just use ArrayList constructor with ICollection parameter. Note that it is not real cast, it  copies  references to ArrayList. var list=new List<MyClass>(); //Fill list items ArrayList al=new ArrayList(list);//"cast"-

    Read the article

  • First languages with generic programming support

    - by oluies
    Which was the first language with generic programming support, and what was the first major staticly typed language (widely used) with generics support. Generics implement the concept of parameterized types to allow for multiple types. The term generic means "pertaining to or appropriate to large groups of classes." I have seen the following mentions of "first": First-order parametric polymorphism is now a standard element of statically typed programming languages. Starting with System F [20,42] and functional programming lan- guages, the constructs have found their way into mainstream languages such as Java and C#. In these languages, first-order parametric polymorphism is usually called generics. From "Generics of a Higher Kind", Adriaan Moors, Frank Piessens, and Martin Odersky Generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983 From Wikipedia Generic Programming

    Read the article

  • First languages with generic programming support

    - by oluies
    Which was the first language with generic programming support, and what was the first major staticly typed language (widely used) with generics support. Generics implement the concept of parameterized types to allow for multiple types. The term generic means "pertaining to or appropriate to large groups of classes." I have seen the following mentions of "first": First-order parametric polymorphism is now a standard element of statically typed programming languages. Starting with System F [20,42] and functional programming lan- guages, the constructs have found their way into mainstream languages such as Java and C#. In these languages, first-order parametric polymorphism is usually called generics. From "Generics of a Higher Kind", Adriaan Moors, Frank Piessens, and Martin Odersky Generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983 From Wikipedia Generic Programming

    Read the article

  • Errors with linux-image-3.8.0-36-generic and GRUB

    - by user285239
    OS: Ubuntu 12.04 LTS Problem 1: When installing anything (or updating) it always ends with this error: Errors were encountered while processing: linux-image-3.8.0-36-generic linux-image-3.8.0-38-generic linux-image-generic-lts-raring linux-generic-lts-raring Problem 2: When installing or updating stuff it opens some grub files and halts execution until I close these grub files. See screenshot below. Grub files + terminal window (screenshot) Pastebin with terminal output while trying to install something I should mention that I don't known if these two errors are related, but it is a fact that every time I try to install something or run an update both of the above errors pop up. I couldn't find anything of interest in the logs I looked at (probably because I don't know what/where to look), but tell me if you need me to upload something. Edit 02 june. This is the output from lsb_release -a kasper@ubuntuRW:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release: 12.04 Codename: precise

    Read the article

  • Updating to linux-image-3.2.0-26-generic occupies all disk space

    - by user42228
    I just ran a normal update through the update manager that wanted to update me to linux-image-3.2.0-26-generic. The installation paused halfway with a message that the root was full. I checked the disk usage, and noticed that one of the newly installed files: /lib/modules/3.2.0-26-generic/modules.ccwmap took up 63GB(!). Compared to the previous version: /lib/modules/3.2.0-24-generic/modules.ccwmap that took up only 4KB it seems like something went awfully wrong! As mentioned the update was paused when i ran out of disk space. There is no option in the update dialog to cancel or perform rollback on the update. Is it asking for trouble to kill the update manager? Any ideas as to what went wrong, and what I can do to remedy it? It's only minimal how much space I can free on that partition (without deleting the above mentioned file). If it is any help, the update was paused after this: Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/dkms 3.2.0-26-generic /boot/vmlinuz-3.2.0-26-generic

    Read the article

  • Format all elements of a list

    - by Curious2learn
    I want to print a list of numbers, but I want to format each member of the list before it is printed. For example, theList=[1.343465432, 7.423334343, 6.967997797, 4.5522577] I want the following output printed given the above list as an input: [1.34, 7.42, 6.97, 4.55] For any one member of the list, I know I can format it by using, print "%.2f" % member Is there a command/function that can do this for the whole list. I can write one, but was wondering if one already exists. Thanks.

    Read the article

  • Combining List<>'s in .NET

    - by Maxim Z.
    I have a few List< objects that hold many objects of one specific type. My goal is to combine these List<'s into one List<. Of course, I could just loop through each List's contents and add them into one final List, but is there a more efficient way?

    Read the article

  • std::list or std::multimap

    - by Tamir
    Hey, I right now have a list of a struct that I made, I sort this list everytime I add a new object, using the std::list sort method. I want to know what would be faster, using a std::multimap for this or std::list, since I'm iterating the whole list every frame (I am making a game). I would like to hear your opinion, for what should I use for this incident.

    Read the article

  • How to slice a list of objects in association of the object attributes

    - by gizgok
    I have a list of fixtures.Each fixture has a home club and a away club attribute.I want to slice the list in association of its home club and away club.The sliced list should be of homeclub items and awayclub items. Easier way to implement this is to first slice a list of fixtures.Then make a new list of the corresponding Home Clubs and Away Clubs.I wanted to know if we can do this one step.

    Read the article

  • python how to find the median of a list

    - by user3450574
    I'm trying to write a function named median that takes a list as an input and returns the median value of the list. I'm working with Python 2.7.2 The list can be of any size and the numbers are not guaranteed to be in any particular order. If the list contains an even number of elements, the function should return the average of the middle two. This is the code I'm starting with: def median(list): print(median([7,12,3,1,6,9]))

    Read the article

  • Can grub handle same release (3.6) but new rc (rc5)?

    - by hhoyt
    can grub handle newer kerner rc ? I am running 3.6.0-rc4 ok, grub update definitely recognizes all required files for rc5, but edit of grub.cfg only shows rc4 after grub-update. D/N matter whether I generate kernel 3.6.0-rc5 or whether I install the .deb files. Generating grub.cfg ... using custom appearance settings Found background image: /usr/share/peppermint/wallpapers/Peppermint.jpg Found linux image: /boot/vmlinuz-3.6.0-030600rc5-generic Found linux image: /boot/vmlinuz-3.6.0-030600rc4-generic Found initrd image: /boot/initrd.img-3.6.0-030600rc4-generic Found linux image: /boot/vmlinuz-3.6.0-rc5 Found initrd image: /boot/initrd.img-3.6.0-rc5 Found linux image: /boot/vmlinuz-3.6.0-rc5.old Found initrd image: /boot/initrd.img-3.6.0-rc5 Found linux image: /boot/vmlinuz-3.5.3 Found initrd image: /boot/initrd.img-3.5.3 Found linux image: /boot/vmlinuz-3.5.3.old Found initrd image: /boot/initrd.img-3.5.3 Found linux image: /boot/vmlinuz-3.5.0-13-generic Found initrd image: /boot/initrd.img-3.5.0-13-generic Found Ubuntu 10.04.1 LTS (10.04) on /dev/sda1 Found Ubuntu 10.04.4 LTS (10.04) on /dev/sda10 Found Peppermint Two (2) on /dev/sda15 Found Ubuntu 10.10 (10.10) on /dev/sda16 Found Windows 7 (loader) on /dev/sda3 Found Ubuntu 11.04 (11.04) on /dev/sda5 Found Ubuntu 12.04.1 LTS (12.04) on /dev/sda6 Found Linux Mint 12 LXDE (12) on /dev/sda8 Found MS-DOS 5.x/6.x/Win3.1 on /dev/sdc1 If I press 'e' on boot startup of rc4 and manually change it to rc5 and ctrl-x, it comes up fine. I just cannot get grub.cfg to update such that rc4 is included. Thanks, Howard # 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="Windows 7 (loader) (on /dev/sda3)" 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='(hd1,msdos1)' search --no-floppy --fs-uuid --set=root 218e9f6f-c21e-4c50-90a5-5a40be639b66 if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=640x480 load_video insmod gfxterm insmod part_msdos insmod ext2 set root='(hd1,msdos1)' search --no-floppy --fs-uuid --set=root 218e9f6f-c21e-4c50-90a5-5a40be639b66 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 insmod part_msdos insmod ext2 set root='(hd1,msdos1)' search --no-floppy --fs-uuid --set=root 218e9f6f-c21e-4c50-90a5-5a40be639b66 insmod jpeg if background_image /usr/share/peppermint/wallpapers/Peppermint.jpg; then set color_normal=light-gray/black set color_highlight=magenta/black else set menu_color_normal=white/black set menu_color_highlight=black/light-gray fi END /etc/grub.d/05_debian_theme BEGIN /etc/grub.d/10_linux_proxy menuentry "Peppermint, with Linux 3.6.0-030600rc4-generic" --class peppermint --class gnu-linux --class gnu --class os { recordfail insmod gzio insmod part_msdos insmod ext2 set root='(hd1,msdos1)' search --no-floppy --fs-uuid --set=root 218e9f6f-c21e-4c50-90a5-5a40be639b66 linux /boot/vmlinuz-3.6.0-030600rc4-generic root=UUID=218e9f6f-c21e-4c50-90a5-5a40be639b66 ro initrd /boot/initrd.img-3.6.0-030600rc4-generic } END /etc/grub.d/10_linux_proxy BEGIN /etc/grub.d/30_os-prober_proxy menuentry "Peppermint, with Linux 3.6.0-030600rc4-generic (on /dev/sda15)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos15)' search --no-floppy --fs-uuid --set=root 21a3d91a-ae43-4f51-b8d6-7f3dc80967d7 linux /boot/vmlinuz-3.6.0-030600rc4-generic root=UUID=21a3d91a-ae43-4f51-b8d6-7f3dc80967d7 ro splash quiet splash vt.handoff=7 initrd /boot/initrd.img-3.6.0-030600rc4-generic } menuentry "Ubuntu, with Linux 3.0.0-24-generic (on /dev/sda10)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos10)' search --no-floppy --fs-uuid --set=root 6c9a0149-3045-4335-83fa-a2513ca3a250 linux /boot/vmlinuz-3.0.0-24-generic root=UUID=6c9a0149-3045-4335-83fa-a2513ca3a250 ro crashkernel=384M-2G:64M,2G-:128M splash initrd /boot/initrd.img-3.0.0-24-generic } menuentry "Ubuntu, with Linux 3.5.0-030500rc7-generic (on /dev/sda10)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos10)' search --no-floppy --fs-uuid --set=root 6c9a0149-3045-4335-83fa-a2513ca3a250 linux /boot/vmlinuz-3.5.0-030500rc7-generic root=UUID=6c9a0149-3045-4335-83fa-a2513ca3a250 ro crashkernel=384M-2G:64M,2G-:128M splash initrd /boot/initrd.img-3.5.0-030500rc7-generic } menuentry "Peppermint, with Linux 3.3.0-030300rc2-generic (on /dev/sda15)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos15)' search --no-floppy --fs-uuid --set=root 21a3d91a-ae43-4f51-b8d6-7f3dc80967d7 linux /boot/vmlinuz-3.3.0-030300rc2-generic root=UUID=21a3d91a-ae43-4f51-b8d6-7f3dc80967d7 ro splash quiet splash vt.handoff=7 initrd /boot/initrd.img-3.3.0-030300rc2-generic } menuentry "Ubuntu, with Linux 2.6.39-rc5-candela (on /dev/sda16)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos16)' search --no-floppy --fs-uuid --set=root 48fcb5ec-b51b-4afd-b0e5-a2aace66f6e1 linux /boot/vmlinuz-2.6.39-rc5-candela root=/dev/sda7 ro splash initrd /boot/initrd.img-2.6.39-rc5-candela } menuentry "Windows 7 (loader) (on /dev/sda3)" --class windows --class os { insmod part_msdos insmod ntfs set root='(hd0,msdos3)' search --no-floppy --fs-uuid --set=root EA3EFABB3EFA7FBD chainloader +1 } menuentry "Ubuntu, with Linux 2.6.38-13-generic (on /dev/sda5)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos5)' search --no-floppy --fs-uuid --set=root bcfe855e-a449-429d-b204-c667e129a4bd linux /boot/vmlinuz-2.6.38-13-generic root=UUID=bcfe855e-a449-429d-b204-c667e129a4bd ro quiet splash vt.handoff=7 initrd /boot/initrd.img-2.6.38-13-generic } menuentry "Ubuntu, with Linux 3.2.0-29-generic-pae (on /dev/sda6)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos6)' search --no-floppy --fs-uuid --set=root 369605ad-1a92-4b7d-abb5-ce75cbdfc9c1 linux /boot/vmlinuz-3.2.0-29-generic-pae root=UUID=369605ad-1a92-4b7d-abb5-ce75cbdfc9c1 ro quiet splash $vt_handoff initrd /boot/initrd.img-3.2.0-29-generic-pae } menuentry "Ubuntu, with Linux 3.2.0-23-generic-pae (on /dev/sda6)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos6)' search --no-floppy --fs-uuid --set=root 369605ad-1a92-4b7d-abb5-ce75cbdfc9c1 linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=369605ad-1a92-4b7d-abb5-ce75cbdfc9c1 ro quiet splash $vt_handoff initrd /boot/initrd.img-3.2.0-23-generic-pae } menuentry "Linux Mint 12 LXDE, 3.0.0-12-generic (/dev/sda8) (on /dev/sda8)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos8)' search --no-floppy --fs-uuid --set=root ccdc67ed-e81c-4f85-9b75-fe0c24c65bb8 linux /boot/vmlinuz-3.0.0-12-generic root=UUID=ccdc67ed-e81c-4f85-9b75-fe0c24c65bb8 ro quiet splash vt.handoff=7 initrd /boot/initrd.img-3.0.0-12-generic } menuentry "MS-DOS 5.x/6.x/Win3.1 (on /dev/sdc1)" --class windows --class os { insmod part_msdos insmod ntfs set root='(hd2,msdos1)' search --no-floppy --fs-uuid --set=root A8F0DE02F0DDD6A2 drivemap -s (hd0) ${root} 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

    Read the article

  • ATI propriatery drivers install latest 12.8, broke my kernel. Stuck on kernel 3.2.0-26

    - by user66987
    I messed up a bit. Hoping some here can help me. I tried to install the newest catalyst 12.8. Sadly, this broke my system. I was stuck in low graphics mode. I finally managed to restore the proprietary drivers, and get into ubuntu again. But now I am stuck on kernel 3.2.0.26. I had installed kernel 3.2.0-30, but the system no longer sees it. I have kernel 3.2.0-29 too, but the system cannot see that as well. In the grub menu. When I use sudo update-grub, they are both listed. Here are the output I get: Searching for GRUB installation directory ... found: /boot/grub Cannot determine root device. Assuming /dev/hda1 This error is probably caused by an invalid /etc/fstab Searching for default file ... found: /boot/grub/default Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst Searching for splash image ... none found, skipping ... Found kernel: /boot/vmlinuz-3.2.0-30-generic Found kernel: /boot/vmlinuz-3.2.0-29-generic Found kernel: /boot/vmlinuz-3.2.0-27-generic Found kernel: /boot/vmlinuz-3.2.0-26-generic Found GRUB 2: /boot/grub/core.img Found kernel: /boot/memtest86+.bin Updating /boot/grub/menu.lst ... done I have searched everywhere to find a solution to my problem, but can't find any solutions. If you need any log outputs to figure out the problem, please let me know which ones. Update: here is the output for 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='(hd2,msdos1)' search --no-floppy --fs-uuid --set=root 270c7c58-06d8-4e6b-b9bb-8d92f46adc0b if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=auto load_video insmod gfxterm insmod part_msdos insmod ext2 set root='(hd2,msdos1)' search --no-floppy --fs-uuid --set=root 270c7c58-06d8-4e6b-b9bb-8d92f46adc0b set locale_dir=($root)/boot/grub/locale set lang=nb_NO 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, med Linux 3.2.0-26-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail gfxmode $linux_gfx_mode insmod gzio insmod part_msdos insmod ext2 set root='(hd2,msdos1)' search --no-floppy --fs-uuid --set=root 270c7c58-06d8-4e6b-b9bb-8d92f46adc0b linux /boot/vmlinuz-3.2.0-26-generic root=UUID=270c7c58-06d8-4e6b-b9bb-8d92f46adc0b ro quiet splash $vt_handoff initrd /boot/initrd.img-3.2.0-26-generic } menuentry 'Ubuntu, med Linux 3.2.0-26-generic (gjenopprettelsesmodus)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod gzio insmod part_msdos insmod ext2 set root='(hd2,msdos1)' search --no-floppy --fs-uuid --set=root 270c7c58-06d8-4e6b-b9bb-8d92f46adc0b echo 'Laster Linux 3.2.0-26-generic ...' linux /boot/vmlinuz-3.2.0-26-generic root=UUID=270c7c58-06d8-4e6b-b9bb-8d92f46adc0b ro recovery nomodeset echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-3.2.0-26-generic } submenu "Previous Linux versions" { menuentry 'Ubuntu, med Linux 3.2.0-25-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail gfxmode $linux_gfx_mode insmod gzio insmod part_msdos insmod ext2 set root='(hd2,msdos1)' search --no-floppy --fs-uuid --set=root 270c7c58-06d8-4e6b-b9bb-8d92f46adc0b linux /boot/vmlinuz-3.2.0-25-generic root=UUID=270c7c58-06d8-4e6b-b9bb-8d92f46adc0b ro quiet splash $vt_handoff initrd /boot/initrd.img-3.2.0-25-generic } menuentry 'Ubuntu, med Linux 3.2.0-25-generic (gjenopprettelsesmodus)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod gzio insmod part_msdos insmod ext2 set root='(hd2,msdos1)' search --no-floppy --fs-uuid --set=root 270c7c58-06d8-4e6b-b9bb-8d92f46adc0b echo 'Laster Linux 3.2.0-25-generic ...' linux /boot/vmlinuz-3.2.0-25-generic root=UUID=270c7c58-06d8-4e6b-b9bb-8d92f46adc0b ro recovery nomodeset echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-3.2.0-25-generic } menuentry 'Ubuntu, med Linux 3.2.0-24-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail gfxmode $linux_gfx_mode insmod gzio insmod part_msdos insmod ext2 set root='(hd2,msdos1)' search --no-floppy --fs-uuid --set=root 270c7c58-06d8-4e6b-b9bb-8d92f46adc0b linux /boot/vmlinuz-3.2.0-24-generic root=UUID=270c7c58-06d8-4e6b-b9bb-8d92f46adc0b ro quiet splash $vt_handoff initrd /boot/initrd.img-3.2.0-24-generic } menuentry 'Ubuntu, med Linux 3.2.0-24-generic (gjenopprettelsesmodus)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod gzio insmod part_msdos insmod ext2 set root='(hd2,msdos1)' search --no-floppy --fs-uuid --set=root 270c7c58-06d8-4e6b-b9bb-8d92f46adc0b echo 'Laster Linux 3.2.0-24-generic ...' linux /boot/vmlinuz-3.2.0-24-generic root=UUID=270c7c58-06d8-4e6b-b9bb-8d92f46adc0b ro recovery nomodeset echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-3.2.0-24-generic } menuentry 'Ubuntu, med Linux 3.2.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail gfxmode $linux_gfx_mode insmod gzio insmod part_msdos insmod ext2 set root='(hd2,msdos1)' search --no-floppy --fs-uuid --set=root 270c7c58-06d8-4e6b-b9bb-8d92f46adc0b linux /boot/vmlinuz-3.2.0-23-generic root=UUID=270c7c58-06d8-4e6b-b9bb-8d92f46adc0b ro quiet splash $vt_handoff initrd /boot/initrd.img-3.2.0-23-generic } menuentry 'Ubuntu, med Linux 3.2.0-23-generic (gjenopprettelsesmodus)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod gzio insmod part_msdos insmod ext2 set root='(hd2,msdos1)' search --no-floppy --fs-uuid --set=root 270c7c58-06d8-4e6b-b9bb-8d92f46adc0b echo 'Laster Linux 3.2.0-23-generic ...' linux /boot/vmlinuz-3.2.0-23-generic root=UUID=270c7c58-06d8-4e6b-b9bb-8d92f46adc0b ro recovery nomodeset echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-3.2.0-23-generic } } ### 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='(hd2,msdos1)' search --no-floppy --fs-uuid --set=root 270c7c58-06d8-4e6b-b9bb-8d92f46adc0b linux16 /boot/memtest86+.bin } menuentry "Memory test (memtest86+, serial console 115200)" { insmod part_msdos insmod ext2 set root='(hd2,msdos1)' search --no-floppy --fs-uuid --set=root 270c7c58-06d8-4e6b-b9bb-8d92f46adc0b linux16 /boot/memtest86+.bin console=ttyS0,115200n8 } ### END /etc/grub.d/20_memtest86+ ### ### BEGIN /etc/grub.d/30_os-prober ### menuentry "Windows 7 (loader) (on /dev/sdb1)" --class windows --class os { insmod part_msdos insmod ntfs set root='(hd1,msdos1)' search --no-floppy --fs-uuid --set=root 448AF3CE8AF3BA8E chainloader +1 } ### END /etc/grub.d/30_os-prober ### ### 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 ### How can I set kernel 3.2.0.30 as the default kernel? According to this file, kernel 3.2.0-30 does not exist.

    Read the article

  • How to use a list of values in Excel as filter in a query

    - by Luca Zavarella
    It often happens that a customer provides us with a list of items for which to extract certain information. Imagine, for example, that our clients wish to have the header information of the sales orders only for certain orders. Most likely he will give us a list of items in a column in Excel, or, less probably, a simple text file with the identification code:     As long as the given values ??are at best a dozen, it costs us nothing to copy and paste those values ??in our SSMS and place them in a WHERE clause, using the IN operator, making sure to include the quotes in the case of alphanumeric elements (the database sample is AdventureWorks2008R2): SELECT * FROM Sales.SalesOrderHeader AS SOH WHERE SOH.SalesOrderNumber IN ( 'SO43667' ,'SO43709' ,'SO43726' ,'SO43746' ,'SO43782' ,'SO43796') Clearly, the need to add commas and quotes becomes an hassle when dealing with hundreds of items (which of course has happened to us!). It’d be comfortable to do a simple copy and paste, leaving the items as they are pasted, and make sure the query works fine. We can have this commodity via a User Defined Function, that returns items in a table. Simply we’ll provide the function with an input string parameter containing the pasted items. I give you directly the T-SQL code, where comments are there to clarify what was written: CREATE FUNCTION [dbo].[SplitCRLFList] (@List VARCHAR(MAX)) RETURNS @ParsedList TABLE ( --< Set the item length as your needs Item VARCHAR(255) ) AS BEGIN DECLARE --< Set the item length as your needs @Item VARCHAR(255) ,@Pos BIGINT --< Trim TABs due to indentations SET @List = REPLACE(@List, CHAR(9), '') --< Trim leading and trailing spaces, then add a CR\LF at the end of the list SET @List = LTRIM(RTRIM(@List)) + CHAR(13) + CHAR(10) --< Set the position at the first CR/LF in the list SET @Pos = CHARINDEX(CHAR(13) + CHAR(10), @List, 1) --< If exist other chars other than CR/LFs in the list then... IF REPLACE(@List, CHAR(13) + CHAR(10), '') <> '' BEGIN --< Loop while CR/LFs are over (not found = CHARINDEX returns 0) WHILE @Pos > 0 BEGIN --< Get the heading list chars from the first char to the first CR/LF and trim spaces SET @Item = LTRIM(RTRIM(LEFT(@List, @Pos - 1))) --< If the so calulated item is not empty... IF @Item <> '' BEGIN --< ...insert it in the @ParsedList temporary table INSERT INTO @ParsedList (Item) VALUES (@Item) --(CAST(@Item AS int)) --< Use the appropriate conversion if needed END --< Remove the first item from the list... SET @List = RIGHT(@List, LEN(@List) - @Pos - 1) --< ...and set the position to the next CR/LF SET @Pos = CHARINDEX(CHAR(13) + CHAR(10), @List, 1) --< Repeat this block while the upon loop condition is verified END END RETURN END At this point, having created the UDF, our query is transformed trivially in: SELECT * FROM Sales.SalesOrderHeader AS SOH WHERE SOH.SalesOrderNumber IN ( SELECT Item FROM SplitCRLFList('SO43667 SO43709 SO43726 SO43746 SO43782 SO43796') AS SCL) Convenient, isn’t it? You can find the script DBA_SplitCRLFList.sql here. Bye!!

    Read the article

  • How to store a linked list in a struct in C

    - by LuckySlevin
    typedef struct child_list {int count; char vo[100]; child_list*next;} child_list; typedef struct parent_list { char vo[100]; child_list * head; int count; parent_list * next; } parent_list; As you can see there are two structures. child_list is used to create a linked list. And this list will be stored in a linked list of parent list. My problem is to display the child list which in the parent_list. My desire to get while displaying the linked list of parent_list: This lists work with this logic. I already made append and other stuff. For example if i enter ab cd ab ja cd ab Word Count List ab 3 cd->ja cd 2 ab->ab ja 1 cd The problematic part is displaying child_list which is in the parent_list nodes(List column of output). I don't know my question is clear please ask for further info.

    Read the article

  • Approach For Syncing One SharePoint List With One or More SharePoint Lists

    - by plattnum
    What would be the best approach or strategy for configuring, customizing or developing in SharePoint a solution that allows me to keep one or more SharePoint lists in sync with a SharePoint list I have designated as a master or parent list. I would like to be able to create a master/parent list of some information that can be extended or used by different parts of the organization without them being able to CRUD any items on the actual columns of the master list. (I have seen some commercial web parts that offer column security on SharePoint lists and although that’s one way of potentially meeting my needs I would like to explore other options.) Scenario: I have a list called FOO: FOO Title Description I would like to create a new list BAR based off of FOO (BAR is managed by sub-organization that doesn't have access to FOO List): BAR FOO.Title (Read-Only) FOO.Description (Read-Only) NewColumn1 NewColumn2 Actions: Create- If a new item is entered in FOO I would like the new item added to BAR. Read - N/A Update - If the title or description is changed in FOO I would like it changed in BAR. Delete- No Deletes in the scenario. (Deletes are handled by the business with status column.) Templates with content extraction offer me this but it’s a one time shot at list creation. Just not sure what the best approach or strategy would be for this in MOSS 2007. Thanks!

    Read the article

  • Problem with inheritance and List<>

    - by Jagd
    I have an abstract class called Grouping. I have a subclass called GroupingNNA. public class GroupingNNA : Grouping { // blah blah blah } I have a List that contains items of type GroupingNNA, but is actually declared to contain items of type Grouping. List<Grouping> lstGroupings = new List<Grouping>(); lstGroupings.Add( new GroupingNNA { fName = "Joe" }); lstGroupings.Add( new GroupingNNA { fName = "Jane" }); The Problem: The following LINQ query blows up on me because of the fact that lstGroupings is declared as List< Grouping and fName is a property of GroupingNNA, not Grouping. var results = from g in lstGroupings where r.fName == "Jane" select r; Oh, and this is a compiler error, not a runtime error. Thanks in advance for any help on this one! More Info: Here is the actual method that won't compile. The OfType() fixed the LINQ query, but the compiler doesn't like the fact that I'm trying to return the anonymous type as a List< Grouping. private List<Grouping> ApplyFilterSens(List<Grouping> lstGroupings, string fSens) { // This works now! Thanks @Lasse var filtered = from r in lstGroupings.OfType<GroupingNNA>() where r.QASensitivity == fSens select r; if (filtered != null) { **// Compiler doesn't like this now** return filtered.ToList<Grouping>(); } else return new List<Grouping>(); }

    Read the article

  • .NET XmlSerializer fails with List<T>

    - by Redshirt
    I'm using a singleton class to save all my settings info. It's first utilized by calling Settings.ValidateSettings(@"C:\MyApp"). The problem I'm having is that 'List Contacts' is causing the xmlserializer to fail to write the settings file, or to load said settings. If I comment out the List<T> then I have no problems saving/loading the xml file. What am I doing wrong? // The actual settings to save public class MyAppSettings { public bool FirstLoad { get; set; } public string VehicleFolderName { get; set; } public string ContactFolderName { get; set; } public List<ContactInfo> Contacts { get { if (contacts == null) contacts = new List<ContactInfo>(); return contacts; } set { contacts = value; } } private List<ContactInfo> contacts; } // The class in which the settings are manipulated public static class Settings { public static string SettingPath; private static MyAppSettings instance; public static MyAppSettings Instance { get { if (instance == null) instance = new MyAppSettings(); return instance; } set { instance = value; } } public static void InitializeSettings(string path) { SettingPath = Path.GetFullPath(path + "\\MyApp.xml"); if (File.Exists(SettingPath)) { LoadSettings(); } else { Instance.FirstLoad = true; Instance.VehicleFolderName = "Cars"; Instance.ContactFolderName = "Contacts"; SaveSettingsFile(); } } // load the settings from the xml file private static void LoadSettings() { XmlSerializer ser = new XmlSerializer(typeof(MyAppSettings)); TextReader reader = new StreamReader(SettingPath); Instance = (MyAppSettings)ser.Deserialize(reader); reader.Close(); } // Save the settings to the xml file public static void SaveSettingsFile() { XmlSerializer ser = new XmlSerializer(typeof(MyAppSettings)); TextWriter writer = new StreamWriter(SettingPath); ser.Serialize(writer, Settings.Instance); writer.Close(); } public static bool ValidateSettings(string initialFolder) { try { Settings.InitializeSettings(initialFolder); } catch (Exception e) { return false; } // Do some validation logic here return true; } } // A utility class to contain each contact detail public class ContactInfo { public string ContactID; public string Name; public string PhoneNumber; public string Details; public bool Active; public int SortOrder; }

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >