Search Results

Search found 55281 results on 2212 pages for 'j set'.

Page 14/2212 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Map, Set use cases in a general web app

    - by user2541902
    I am currently working on my own Java web app (to be shown in interview to get a Java job). So I've not worked on Java in professional environment, so no guidance. I have database, entity classes, JPA relationships. Use cases are like, user has albums, album has pics, user has locations, location has co-ordinates etc. I used List (ArrayList) everywhere. I can do anything with List and DB, get some entry, find etc. For example, I will keep the list of users in List, then use queries to get some entry (why would I keep them in Map with id/email as key?). I know very well the working and features, implementing classes of Map, Set. I can use them for solving some algorithm, processing some data etc. In interviews, I get asked have you worked with these, where have you used them etc. So, Please tell me cases where they should be used (DB or any popular real use case).

    Read the article

  • Array manipulation in gsettings' set command

    - by Daniel
    Is there an easy way to do array manipulation in gsettings? I am comparing gsettings to OS X's defaults command that offers the defaults domain --array key overwrite-value and defaults domain --array-add key added-value interface for manipulating arrays. As far as I can tell there is only gsettings set domain key "['overwrite-value']" available to gsettings. Not really pretty for when you want to add or remove one entry from an array. I have seen a suggestion that allow me to add to an array, but I would rather use a interface if there is one.

    Read the article

  • Java Phones: How to set up JTAPI?

    - by Adam Tannon
    I want to use JTAPI (1.4 - latest) to create an app that will call my phone whenever I need it to. I downloaded JSR043 (JTAPI specification) and have been reading the API docs and it seems pretty straight forward with respect to how to code JTAPI. However I seriously doubt that getting a Java app on my laptop to call my cell phone doesn't require some 3rd party or middle man service provider and possibly other entities/configurations as well. So I ask: besides using the JTAPI in my Java code, what do I need to install or set up to have a Java app that calls my phone? Thanks in advance!

    Read the article

  • Mounting filesystem with special user id set

    - by qbi
    I want to mount the device /dev/sda3 to the directory /foo/bar/baz. After mounting the directory should have the uid of user johndoe. So I did: sudo -u johndoe mkdir /foo/bar/baz stat -c %U /foo/bar/baz johndoe and added the following line to my /etc/fstab: /dev/sda3 /foo/bar/baz ext4 noexec,noatime,auto,owner,nodev,nosuid,user 0 1 When I do now sudo -u johndoe mount /dev/sda3 the command stat -c %U /foo/bar/baz results in root rather than johndoe. What is the best way to mount this ext4-filesystem with uid johndoe set?

    Read the article

  • Question Virtual Network and NAT set-up

    - by Jay
    Hi Guys! I need some help. I'm completely new to Linux. I'm trying to set up the following scenario: +-----+eth0 +-----+ +---+ | VM2 |-----------| VM1 |---------------| H | +-----+ eth1 +-----+eth0 (NAT) +---+ VM2 - Virtual machine from Virtual Box, using Ubuntu VM1 - Virtual machine from Virtual Box, using Ubuntu: I want this to act as a NAT. H - Host, my Windows Vista The dots were just added since after saving the spaces disappear. So if I ping H from VM2, H would receive a different IP address from VM2. Could you give me a step by step on this? All machines are of course 32 bit. Thanks. Would appreciate the help so much.

    Read the article

  • Set Position of multiple bodies

    - by philipp
    I have a character composed of five bodies which are tied together by a lot of joints. On of them is the overall chassis, to which all forces and impulses are applied to move the whole Character. All in all that works very fine, except one thing: I need to set the Position of the Character so that it get Beamed from one place to the other in one single frame. Unfortunately I cannot get this to work. I tried the following code, without any success… playerbodies.forEach(function (bd) { bd.SetLinearVelocity(new b2.Vec2()); var t = bd.GetTransform(); t.p.x -= 10; bd.SetTransform(t, bd.GetAngle()); }); How can I make that happen?

    Read the article

  • The final set of SQLBits videos has been uploaded

    - by simonsabin
    The final set of SQLbits videos has been uploaded to the site. You can either watch online or download them. Some highlights of sessions that have been uploaded are Lies, Damned Lies And Statistics. Making The Most Out of SQL Server Statistics attend this session to understand exactly how the optimiser decides on its plans SSIS Dataflow Performance tuning Need to eek out a bit more oomph from your dataflows. This session might be of some use. TSQL Techniques – Why and how to tune a routine an overview...(read more)

    Read the article

  • Facebook likes reset after moving to HTTPS (URL manually set in script, though)

    - by aarondicks
    Hi fellow Facebook developers. I've got a question regarding the Facebook like button. We worked on a piece recently that embeds a number of social share buttons (please see the source code below or here on Harvey Water Softeners' website) When the piece was released, it was on HTTP, and received over 2k likes (the URL 'slug' hasn't changed at all). The site was recently migrated to permanent-on HTTPS, and the like data has been reset, and we've been left with 50 new, recent likes. If you see in the source code, the URL is set explicitly to like the HTTP version, which I believe to be correct. Can anyone help me work out what's happened here? Here's the HTML bit of the like button: <div class="fb-like" data-href="http://www.harveywatersofteners.co.uk/history-interior-design" data-layout="box_count" data-action="like" data-show-faces="false" data-share="false"></div> Thanks in advance Aaron

    Read the article

  • What You Said: How Do You Set Reminders?

    - by Jason Fitzpatrick
    Earlier this week we asked you to share your favorite tricks for staying on top of your tasks with timely reminders. Now we’re back to highlight some great reader tips (including a bit of software older than some of our readers). Most of us have to-do lists longer than we can do in a given day (or week!) and a constantly changing set of demands and next-actions. Having a timely and effective reminder system is the difference between dropping the ball and getting things done; how exactly that reminder system plays out, however, varied greatly from reader to reader. OJMDC sticks with analog reminders: Sticky notes in the middle of my monitor and in my wallet. I’ve tried my phone apps but I typically disregard them. HTG Explains: Is UPnP a Security Risk? How to Monitor and Control Your Children’s Computer Usage on Windows 8 What Happened to Solitaire and Minesweeper in Windows 8?

    Read the article

  • Partitioning set into subsets with respect to equality of sum among subsets

    - by Al.Net
    let say i have {3, 1, 1, 2, 2, 1,5,2,7} set of numbers, I need to split the numbers such that sum of subset1 should be equal to sum of subset2 {3,2,7} {1,1,2,1,5,2}. First we should identify whether we can split number(one way might be dividable by 2 without any remainder) and if we can, we should write our algorithm two create s1 and s2 out of s. How to proceed with this approach? I read partition problem in wiki and even in some articles but i am not able to get anything. Can someone help me to find the right algorithm and its explanation in simple English?

    Read the article

  • How to set position for a linear-gradient background in css3

    - by Virender Sehwag
    I am trying to set the position (that is, margin or padding from top) of body tag's linear background with image. My code is background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.9), rgb(0, 0, 0)), url("g2hd.jpg"); background-repeat: repeat, no-repeat; background-attachment: fixed; background-position: 0% 30px, center center; but 30px is not working but it works for normal for background-image:url("g2hd.jpg"); any idea

    Read the article

  • Set up a HomeGroup in Windows 7

    p Have you ever needed to share files with other computers in your household but didn t know how to do so If you have Windows 7 installed on the computers you can share files easily using the HomeGroup feature. Keep reading to find out what it is and just how easy it is to set up. p ... ALM Software Solution ? Try it live! Requirements Management, Project Planning, Implementation Tracking & QA Testing.

    Read the article

  • "MOZILLA_FIVE_HOME not set" zekr quran study software java error

    - by Acess Denied
    I have installed zekr Quran study software on ubuntu 12.04 and I upgraded to 12.10. then the zekr app has been giving me this error when ever I start it. org.eclipse.swt.SWTError: No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)] at org.eclipse.swt.SWT.error(SWT.java:4387) at org.eclipse.swt.browser.Mozilla.initMozilla(Mozilla.java:1939) at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:699) at org.eclipse.swt.browser.Browser.<init>(Browser.java:99) at net.sf.zekr.ui.QuranForm.makeFrame(QuranForm.java:628) at net.sf.zekr.ui.QuranForm.init(QuranForm.java:340) at net.sf.zekr.ui.QuranForm.<init>(QuranForm.java:319) at net.sf.zekr.ZekrMain.startZekr(ZekrMain.java:51) at net.sf.zekr.ZekrMain.main(ZekrMain.java:94) Please Advice me

    Read the article

  • quickest way to research a set of pages backlinks

    - by JeremyB
    I have a list of 300+ pages (they were chosen based on which pages rank for a keyword I'm interested in) and I want to compile a list all the (known) inbound links to those pages. What's the fastest way to do this? It seems like the only tools out there-- Yahoo Site Explorer, SEOMoz, Majestic, require you to either a) manually export each set of links by hand, or b) get data at the domain level (e.g. Majestic's clique hunter). Does anyone know of any efficient way to do this? I ask because I'm about to write a bunch of code and I don't want to waste my time if there's another tool that will work. I know SEOMoz and Majestic have API's but I'm wondering if there's a more user-friendly option.

    Read the article

  • Using google maps API, how can we set the current location as the default set location using map.set

    - by vs1984
    I am writing Javascript code using Google maps API. map = new google.maps.Map2(document.getElementById("map_canvas")); map.setCenter(new google.maps.LatLng(37.4419, -122.1419), 13); The above code sets the default location of the map canvas to Palo Alto. How can we write the script in such a way that the setCenter function automatically points to the current location of the client?

    Read the article

  • System will not boot without USB thumb drive inserted

    - by agent154
    I've had this issue before when trying out Linux Mint, but I was unable to get any assistance. I was then lead to believe that it was a problem related to Mint, and not grub. I installed Ubuntu 12.04 tonight on a second partition alongside Windows 7. I installed from a USB stick, and everything went peachy until I rebooted without the stick in my tower. It now says: error: no such device: 20cec6ca-4024-4237-84c3-2dba3c851497 grub rescue > I've verified via ls -l /dev/disk/by-uuid that my drive where Ubuntu is installed matches the UUID that supposedly doesn't exist. The UUID of my thumb drive when inserted happens to be 06B3-9C68. There is no mention of my USB drive's UUID anywhere in /boot/grub/grub.cfg I've also tried to re-install GRUB after booting into my system, removing the stick, and running grub-install /dev/sda. It still happens, and I cannot boot without the USB drive inserted into the computer. And what really gets my goat is that the boot order of my system is CDROMHard DriveUSB. It's not even reaching the USB to try to boot from it, so why does it matter that it's not there? Edit: Also, I ran grub-config without the stick in followed by another grub-install. Still no go. FWIW, here's my grub.cfg file: # # 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='(hd1,msdos5)' search --no-floppy --fs-uuid --set=root 20cec6ca-4024-4237-84c3-d2ba3c851497 if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=auto load_video insmod gfxterm insmod part_msdos insmod ext2 set root='(hd1,msdos5)' search --no-floppy --fs-uuid --set=root 20cec6ca-4024-4237-84c3-d2ba3c851497 set locale_dir=($root)/boot/grub/locale set lang=en_CA 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-25-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='(hd1,msdos5)' search --no-floppy --fs-uuid --set=root 20cec6ca-4024-4237-84c3-d2ba3c851497 linux /boot/vmlinuz-3.2.0-25-generic-pae root=UUID=20cec6ca-4024-4237-84c3-d2ba3c851497 ro quiet splash $vt_handoff initrd /boot/initrd.img-3.2.0-25-generic-pae } menuentry 'Ubuntu, with Linux 3.2.0-25-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod gzio insmod part_msdos insmod ext2 set root='(hd1,msdos5)' search --no-floppy --fs-uuid --set=root 20cec6ca-4024-4237-84c3-d2ba3c851497 echo 'Loading Linux 3.2.0-25-generic-pae ...' linux /boot/vmlinuz-3.2.0-25-generic-pae root=UUID=20cec6ca-4024-4237-84c3-d2ba3c851497 ro recovery nomodeset echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-3.2.0-25-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='(hd1,msdos5)' search --no-floppy --fs-uuid --set=root 20cec6ca-4024-4237-84c3-d2ba3c851497 linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=20cec6ca-4024-4237-84c3-d2ba3c851497 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='(hd1,msdos5)' search --no-floppy --fs-uuid --set=root 20cec6ca-4024-4237-84c3-d2ba3c851497 echo 'Loading Linux 3.2.0-23-generic-pae ...' linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=20cec6ca-4024-4237-84c3-d2ba3c851497 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='(hd1,msdos5)' search --no-floppy --fs-uuid --set=root 20cec6ca-4024-4237-84c3-d2ba3c851497 linux16 /boot/memtest86+.bin } menuentry "Memory test (memtest86+, serial console 115200)" { insmod part_msdos insmod ext2 set root='(hd1,msdos5)' search --no-floppy --fs-uuid --set=root 20cec6ca-4024-4237-84c3-d2ba3c851497 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/sda1)" --class windows --class os { insmod part_msdos insmod ntfs set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set=root 9014706714705268 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 ###

    Read the article

  • Grub won't boot windows after update from 11.10 to 12.04

    - by Holger
    thanks for your time and reading this, here's the deal: i upgraded from 11.10 to 12.04 and everything worked out until i rebooted, i had 11.10 sucessfully running as a dual boot with windows vista. when i rebooted, my GRUB was shot to hell, what ever option i selected it said partion not found or something similar... booting into a live version on a thumb drive and running bootrepair from there fixed the issue... but only for ubuntu, when i try to boot into windows it only goes back to GRUB. i'm not at home, and heres a list of what i have here with me... 1 4gb thumb drive, empty 1 8gb thumb drive, windows vista installer bootable 1 old laptop, the one i try to save, optical drive is not existent 2 Mbps internet connection can you help me get back into my windows without having to reinstall windows? or at least show me a way how to use my illustrator through a virtual machine or something? here's my 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='(hd0,msdos2)' search --no-floppy --fs-uuid --set=root 1063e402-b14f-45e5-92b6-d20a2e3a717e if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=auto load_video insmod gfxterm insmod part_msdos insmod ext2 set root='(hd0,msdos2)' search --no-floppy --fs-uuid --set=root 1063e402-b14f-45e5-92b6-d20a2e3a717e set locale_dir=($root)/boot/grub/locale set lang=de_DE 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, mit 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='(hd0,msdos2)' search --no-floppy --fs-uuid --set=root 1063e402-b14f-45e5-92b6-d20a2e3a717e linux /boot/vmlinuz-3.2.0-24-generic root=UUID=1063e402-b14f-45e5-92b6-d20a2e3a717e ro quiet splash $vt_handoff initrd /boot/initrd.img-3.2.0-24-generic } menuentry 'Ubuntu, mit Linux 3.2.0-24-generic (Wiederherstellungsmodus)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod gzio insmod part_msdos insmod ext2 set root='(hd0,msdos2)' search --no-floppy --fs-uuid --set=root 1063e402-b14f-45e5-92b6-d20a2e3a717e echo 'Linux 3.2.0-24-generic wird geladen …' linux /boot/vmlinuz-3.2.0-24-generic root=UUID=1063e402-b14f-45e5-92b6-d20a2e3a717e ro recovery nomodeset echo 'Initiale Ramdisk wird geladen …' initrd /boot/initrd.img-3.2.0-24-generic } submenu "Previous Linux versions" { menuentry 'Ubuntu, mit Linux 3.0.0-19-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail gfxmode $linux_gfx_mode insmod gzio insmod part_msdos insmod ext2 set root='(hd0,msdos2)' search --no-floppy --fs-uuid --set=root 1063e402-b14f-45e5-92b6-d20a2e3a717e linux /boot/vmlinuz-3.0.0-19-generic root=UUID=1063e402-b14f-45e5-92b6-d20a2e3a717e ro quiet splash $vt_handoff initrd /boot/initrd.img-3.0.0-19-generic } menuentry 'Ubuntu, mit Linux 3.0.0-19-generic (Wiederherstellungsmodus)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod gzio insmod part_msdos insmod ext2 set root='(hd0,msdos2)' search --no-floppy --fs-uuid --set=root 1063e402-b14f-45e5-92b6-d20a2e3a717e echo 'Linux 3.0.0-19-generic wird geladen …' linux /boot/vmlinuz-3.0.0-19-generic root=UUID=1063e402-b14f-45e5-92b6-d20a2e3a717e ro recovery nomodeset echo 'Initiale Ramdisk wird geladen …' initrd /boot/initrd.img-3.0.0-19-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='(hd0,msdos2)' search --no-floppy --fs-uuid --set=root 1063e402-b14f-45e5-92b6-d20a2e3a717e linux16 /boot/memtest86+.bin } menuentry "Memory test (memtest86+, serial console 115200)" { insmod part_msdos insmod ext2 set root='(hd0,msdos2)' search --no-floppy --fs-uuid --set=root 1063e402-b14f-45e5-92b6-d20a2e3a717e linux16 /boot/memtest86+.bin console=ttyS0,115200n8 } ### END /etc/grub.d/20_memtest86+ ### ### BEGIN /etc/grub.d/30_os-prober ### menuentry "Windows Vista (loader) (on /dev/sda1)" --class windows --class os { insmod part_msdos insmod ntfs set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set=root 2C9E66B39E6674EC 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 ###

    Read the article

  • Matchmaking algorithm with a set of filters

    - by Yuriy Pogrebnyak
    I'm looking for matchmaking algorithm for 1x1 online game. Players must be matched not by their skill or level, as usual, but by some specific filters. Each player sends request, where he specifies some set of parameters (generally, 2-4 parameters). If some parameter is specified, player can be matched only with those who has sent this parameter with exactly the same value, or those who hasn't specified this parameter. I need this algorithm to be thread-safe and preferably fast. It would be great if it'll work for 3-4 or even more parameters, but also I'm looking for algorithm that works with only one parameter (in my case it's game bet). Also I'd appreciate ideas on how to implement or improve this algorithm on my server platform - ASP.NET. One more problem I'm facing is that finding match can't be executed right after user sends request, because if other user sends request before matching for previous is finished, they won't be matched even is they possibly could. So it seems that match finding should be started on schedule, and I need help on how to optimize it and how to choose time interval for starting new match finding. P.S. I've also posted this question on stackoverflow

    Read the article

  • SQL SERVER – How to Set Variable and Use Variable in SQLCMD Mode

    - by Pinal Dave
    Here is the question which I received the other day on SQLAuthority Facebook page. Social media is a wonderful thing and I love the active conversation between blog readers and myself – actually I think social media adds lots of human factor to any conversation. Here is the question - “I am using sqlcmd in SSMS – I am not sure how to declare variable and pass it, for example I have a database and it has table, how can I make the table variable dynamic and pass different value everytime?” Fantastic question, and here is its very simple answer. First of all, enable sqlcmd mode in SQL Server Management Studio as described in following image. Now in query editor type following SQL. :SETVAR DatabaseName “AdventureWorks2012″ :SETVAR SchemaName “Person” :SETVAR TableName “EmailAddress“ USE $(DatabaseName); SELECT * FROM $(SchemaName).$(TableName); Note that I have set the value of the database, schema and table as a sqlcmd variable and I am executing the query using the same parameters. Well, that was it, sqlcmd is a very simple language to master and it also aids in doing various tasks easily. If you have any other sqlcmd tips, please leave a comment and I will publish it with due credit. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Server Management Studio, SQL Tips and Tricks, T SQL, Technology Tagged: sqlcmd

    Read the article

  • BizTalk Pipeline Component Error: "Object reference not set to an instance of an object"

    - by Stuart Brierley
    Yesterday I posted about my BizTalk Archiving Pipeline Component, which can be found on Codeplex if anyone is interested in taking a look. During testing of this component I began to encounter an error whereby the component would throw an "Object reference not set to an instance of an object" error when processing as a part of a Custom Pipeline. This was occurring when the component was reading a ReadOnlySeekableStream so that the data can be archived to file, but the actual code throwing the error was somewhere in the depths of the Microsoft.BizTalk.Streaming stack. It turns out that there is a known issue where this exception can be thrown because the garbage collector has disposed of of the stream before execution of the custom pipeline has completed. To get around this you need to add the streams in your code to the pipeline context resource tracker.   So a block of my code goes from:                         originalStrm = bodyPart.GetOriginalDataStream();                         if (!originalStrm.CanSeek)                         {                             ReadOnlySeekableStream seekableStream = new ReadOnlySeekableStream(originalStrm);                             inmsg.BodyPart.Data = seekableStream;                             originalStrm = inmsg.BodyPart.Data;                         }                         fileArchive = new FileStream(FullPath, FileMode.Create, FileAccess.Write);                         binWriter = new BinaryWriter(fileArchive);                         byte[] buffer = new byte[bufferSize];                         int sizeRead = 0;                         while ((sizeRead = originalStrm.Read(buffer, 0, bufferSize)) != 0)                         {                             binWriter.Write(buffer, 0, sizeRead);                         } to                         originalStrm = bodyPart.GetOriginalDataStream();                         if (!originalStrm.CanSeek)                         {                             ReadOnlySeekableStream seekableStream = new ReadOnlySeekableStream(originalStrm);                             inmsg.BodyPart.Data = seekableStream;                             originalStrm = inmsg.BodyPart.Data;                         }                         pc.ResourceTracker.AddResource(originalStrm);                         fileArchive = new FileStream(FullPath, FileMode.Create, FileAccess.Write);                         binWriter = new BinaryWriter(fileArchive);                         byte[] buffer = new byte[bufferSize];                         int sizeRead = 0;                         while ((sizeRead = originalStrm.Read(buffer, 0, bufferSize)) != 0)                         {                             binWriter.Write(buffer, 0, sizeRead);                         } So far this seems to have solved the issue, the error is no more, and my archive component is continuing its way through testing.

    Read the article

  • Acer aspire one d270 can not set brightness

    - by Marko
    I hope you can help me figure out how to set the brightness at my netbook. Following problem appears since I installed ubuntu 11.10 on my acer: I am not able to adjust the brightness by FN Keys nor manually at "systemsettings-display". After searching with google for a while, I found a way via the terminal to adjust it with the folloqing command: "sudo setpci -s 00:02.0 f4.b=7f" ( from 00-9f). That was a major breakthrough for me as I am still new to Linux OS. But still seeking a way to get the FN keys for brightness to work, I kept searching until I found "askubuntu.com". I read through various Questions by other acer users and tried there solutions, but unfortunately none worked out for me. From this thread: fn + arrow keys don't adjust actual brightness on an Acer Aspire 5740 "sudo gedit /etc/X11/xorg.conf". This command did not work because the file was not found. I also used nano instead of gedit, but the file was empty( I think it just created the file since it did not exist). These commands which i found gave me a boot loop and I had to repair ubuntu: sudo gedit /etc/default/grub Change the line GRUB_CMDLINE_LINUX="" into GRUB_CMDLINE_LINUX="acpi_osi=Linux" sudo update-grub From this post Screen Brightness not adjustable for Acer Aspire S3: I tried the solution from the last post, but it did not work either. Does anyone know what I could try? I would appreciate it, if someone could help me out with this. Thanks in advance Netbook specs: CPU: Intel Atom N2600 Memory: 2gb DDR3 Storage: 320 GB HD GPU: Intel GMA 3600

    Read the article

  • NTFS partitions mount as root instead of user as set in /etc/fstab

    - by G1bs0n
    I recently upgraded a server to Ubuntu 12.04 with a fresh install and my NTFS partitions won't mount as user at boot but I can mount them as user manually from the console with $ sudo mount -a. Using ntfsfix reports no problems and chkdisk sees nothing wrong under Windows 7. Are the drives not ready to be mounted at boot and default to root instead of user for some reason? Here is my /etc/fstab: UUID=E4E6B30CE6B2DDCC /media/Bowles ntfs-3g defaults,uid=1000,gid=1000,umask=022 0 0 UUID=A040C42340C3FDD2 /media/Burroughs ntfs-3g defaults,uid=1000,gid=1000,umask=022 0 0 UUID=EA022C73022C46C3 /media/DoctorGonzo ntfs-3g defaults,uid=1000,gid=1000,umask=022 0 0 UUID=BA425A384259FA19 /media/Geist ntfs-3g defaults,uid=1000,gid=1000,umask=022 0 0 UUID=E87CFAE57CFAAE06 /media/DouglasAdams ntfs-3g defaults,uid=1000,gid=1000,umask=022 0 0 Here is the output of ls -l after boot: drwxr-xr-x 1 xbmc xbmc 4096 Oct 31 21:46 Bowles drwxrwxr-x 1 root users 8192 Oct 31 21:46 Burroughs drwxrwxr-x 1 root users 4096 Oct 28 21:45 DoctorGonzo drwxrwxr-x 1 root users 12288 Oct 31 19:56 DouglasAdams drwxrwxr-x 1 root users 4096 Nov 3 01:03 Geist If I unmount and mount again with $ sudo mount -a from console, the output of ls -l: drwxr-xr-x 1 xbmc xbmc 4096 Oct 31 21:46 Bowles drwxr-xr-x 1 xbmc xbmc 8192 Oct 31 21:46 Burroughs drwxr-xr-x 1 xbmc xbmc 4096 Oct 28 21:45 DoctorGonzo drwxr-xr-x 1 xbmc xbmc 12288 Oct 31 19:56 DouglasAdams drwxr-xr-x 1 xbmc xbmc 4096 Nov 3 01:03 Geist Update I was fooling myself, I had a custom udev rule set up to auto-mount file systems by label for USB drives, borrowed from here, but didn't update the rule to accommodate for my additional hard drives. Updating the rule to auto-mount only drives after /dev/sde solved my problem. Thank you again for your reply cartoonist.

    Read the article

  • Infrastructure to effectively set up experiements and learn from them

    - by David
    Open-org.com is in the early stages of creating our first product, a place on the web, where one can ask lawyers questions at a fraction of their normal costs. An early stage front page can be found here. I got inspired by this video, which is recommended by Jeff Atwood, which talks about getting feedback faster, which is the reason for this question. The problem Needless to say, we want our conversion rates to be as high as possible. Therefore, we want to be able to rapidly set up a new experiment where we change something on the site (like moving an image slightly, rewriting a sentence etc.). We then want to present the modified page to a random subset of the users. After that we will compare the conversion rates of the experiment with another version. I could very well imagine that we want to run 10-100 experiments simultaneously and it would be nice to have features, where experiments that obviously have worse results will be ended before schedule. My question Does infrastructure to support the whole process exist? A short description of our infrastructure... We use EC2 and PHP and have a script to automatically start up new instances with all needed software. Still, starting up a new server for every experiment, seems like a bit of overkill, so I am wondering what other options exist. Btw. If you feel like working for Open-org.com, you can pick a task, and start working, or suggest a new task. All profits are given out to the contributors.

    Read the article

  • How to manage focus for a small set of simple widgets

    - by Christoph
    I'm developing a set of simple widgets for a small (128x128) display. For example I'd like to have a main screen with an overlay menu which I can use to toggle visibilty of main screen elements. Each option would be an icon with a box around it while it is selected. Button (left, up, right, down, enter) events should be given to the widget that has "focus". Focus is a simple thing to understand when using a GUI, but I'm having trouble implementing this. Can you suggest a simple concept for managing focus and input events? I have these simple ideas: Only one widget can have focus, so I need a single pointer to that widget. When this widget gets some kind of "cycle" input (as in "highlight the next item in this list"), the focus is given to a different widget. a widget must have a way of telling the application which widget the focus is given to next. if a widget cannot give a "next focus" hint, the application must be able to figure out where the focus should go. Widgets are currently structured like this: A widget can have a parent, which is passed to the constructor. Widgets are created statically, as I want to avoid dynamic memory allocation (I only have 16kB of RAM and I'd like to have control over that). widgets have siblings, implemented as an intrusive linked list (they have a next member). A parent has a pointer to the head of its list of children. Input events are arguments to the widgets buttonEvent methods which can accept or ignore that event. If it ignores the event, it can pass the event to its parent. My Questions: How can I manage focus for these widgets? Am I making this too complicated?

    Read the article

  • Mandelbrot set not displaying properly

    - by brainydexter
    I am trying to render mandelbrot set using glsl. I'm not sure why its not rendering the correct shape. Does the mandelbrot calculation require values to be within a range for the (x,y) [ or (real, imag) ] ? Here is a screenshot: I render a quad as follows: float w2 = 6; float h2 = 5; glBegin(GL_QUADS); glVertex3f(-w2, h2, 0.0); glVertex3f(-w2, -h2, 0.0); glVertex3f(w2, -h2, 0.0); glVertex3f(w2, h2, 0.0); glEnd(); My vertex shader: varying vec3 Position; void main(void) { Position = gl_Vertex.xyz; gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; } My fragment shader (where all the meat is): uniform float MAXITERATIONS; varying vec3 Position; void main (void) { float zoom = 1.0; float centerX = 0.0; float centerY = 0.0; float real = Position.x * zoom + centerX; float imag = Position.y * zoom + centerY; float r2 = 0.0; float iter; for(iter = 0.0; iter < MAXITERATIONS && r2 < 4.0; ++iter) { float tempreal = real; real = (tempreal * tempreal) + (imag * imag); imag = 2.0 * real * imag; r2 = (real * real) + (imag * imag); } vec3 color; if(r2 < 4.0) color = vec3(1.0); else color = vec3( iter / MAXITERATIONS ); gl_FragColor = vec4(color, 1.0); }

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >