Search Results

Search found 22224 results on 889 pages for 'point of sale'.

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

  • Can a problem have a relation of aggregation and composition both between two classes at same point

    - by learner
    Can a problem have a relation of aggregation and composition both between two classes at same point of time? Like any real time scenario where there can be aggregation corresponding to one method and composition related to other method. I m unable to figure out any scenario where both composition and aggregation occurs simultaneously between two classes. Any help will be appreciable.

    Read the article

  • How to find the insertion point in an array using binary search?

    - by ????
    The basic idea of binary search in an array is simple, but it might return an "approximate" index if the search fails to find the exact item. (we might sometimes get back an index for which the value is larger or smaller than the searched value). For looking for the exact insertion point, it seems that after we got the approximate location, we might need to "scan" to left or right for the exact insertion location, so that, say, in Ruby, we can do arr.insert(exact_index, value) I have the following solution, but the handling for the part when begin_index >= end_index is a bit messy. I wonder if a more elegant solution can be used? (this solution doesn't care to scan for multiple matches if an exact match is found, so the index returned for an exact match may point to any index that correspond to the value... but I think if they are all integers, we can always search for a - 1 after we know an exact match is found, to find the left boundary, or search for a + 1 for the right boundary.) My solution: DEBUGGING = true def binary_search_helper(arr, a, begin_index, end_index) middle_index = (begin_index + end_index) / 2 puts "a = #{a}, arr[middle_index] = #{arr[middle_index]}, " + "begin_index = #{begin_index}, end_index = #{end_index}, " + "middle_index = #{middle_index}" if DEBUGGING if arr[middle_index] == a return middle_index elsif begin_index >= end_index index = [begin_index, end_index].min return index if a < arr[index] && index >= 0 #careful because -1 means end of array index = [begin_index, end_index].max return index if a < arr[index] && index >= 0 return index + 1 elsif a > arr[middle_index] return binary_search_helper(arr, a, middle_index + 1, end_index) else return binary_search_helper(arr, a, begin_index, middle_index - 1) end end # for [1,3,5,7,9], searching for 6 will return index for 7 for insertion # if exact match is found, then return that index def binary_search(arr, a) puts "\nSearching for #{a} in #{arr}" if DEBUGGING return 0 if arr.empty? result = binary_search_helper(arr, a, 0, arr.length - 1) puts "the result is #{result}, the index for value #{arr[result].inspect}" if DEBUGGING return result end arr = [1,3,5,7,9] b = 6 arr.insert(binary_search(arr, b), b) p arr arr = [1,3,5,7,9,11] b = 6 arr.insert(binary_search(arr, b), b) p arr arr = [1,3,5,7,9] b = 60 arr.insert(binary_search(arr, b), b) p arr arr = [1,3,5,7,9,11] b = 60 arr.insert(binary_search(arr, b), b) p arr arr = [1,3,5,7,9] b = -60 arr.insert(binary_search(arr, b), b) p arr arr = [1,3,5,7,9,11] b = -60 arr.insert(binary_search(arr, b), b) p arr arr = [1] b = -60 arr.insert(binary_search(arr, b), b) p arr arr = [1] b = 60 arr.insert(binary_search(arr, b), b) p arr arr = [] b = 60 arr.insert(binary_search(arr, b), b) p arr and result: Searching for 6 in [1, 3, 5, 7, 9] a = 6, arr[middle_index] = 5, begin_index = 0, end_index = 4, middle_index = 2 a = 6, arr[middle_index] = 7, begin_index = 3, end_index = 4, middle_index = 3 a = 6, arr[middle_index] = 5, begin_index = 3, end_index = 2, middle_index = 2 the result is 3, the index for value 7 [1, 3, 5, 6, 7, 9] Searching for 6 in [1, 3, 5, 7, 9, 11] a = 6, arr[middle_index] = 5, begin_index = 0, end_index = 5, middle_index = 2 a = 6, arr[middle_index] = 9, begin_index = 3, end_index = 5, middle_index = 4 a = 6, arr[middle_index] = 7, begin_index = 3, end_index = 3, middle_index = 3 the result is 3, the index for value 7 [1, 3, 5, 6, 7, 9, 11] Searching for 60 in [1, 3, 5, 7, 9] a = 60, arr[middle_index] = 5, begin_index = 0, end_index = 4, middle_index = 2 a = 60, arr[middle_index] = 7, begin_index = 3, end_index = 4, middle_index = 3 a = 60, arr[middle_index] = 9, begin_index = 4, end_index = 4, middle_index = 4 the result is 5, the index for value nil [1, 3, 5, 7, 9, 60] Searching for 60 in [1, 3, 5, 7, 9, 11] a = 60, arr[middle_index] = 5, begin_index = 0, end_index = 5, middle_index = 2 a = 60, arr[middle_index] = 9, begin_index = 3, end_index = 5, middle_index = 4 a = 60, arr[middle_index] = 11, begin_index = 5, end_index = 5, middle_index = 5 the result is 6, the index for value nil [1, 3, 5, 7, 9, 11, 60] Searching for -60 in [1, 3, 5, 7, 9] a = -60, arr[middle_index] = 5, begin_index = 0, end_index = 4, middle_index = 2 a = -60, arr[middle_index] = 1, begin_index = 0, end_index = 1, middle_index = 0 a = -60, arr[middle_index] = 9, begin_index = 0, end_index = -1, middle_index = -1 the result is 0, the index for value 1 [-60, 1, 3, 5, 7, 9] Searching for -60 in [1, 3, 5, 7, 9, 11] a = -60, arr[middle_index] = 5, begin_index = 0, end_index = 5, middle_index = 2 a = -60, arr[middle_index] = 1, begin_index = 0, end_index = 1, middle_index = 0 a = -60, arr[middle_index] = 11, begin_index = 0, end_index = -1, middle_index = -1 the result is 0, the index for value 1 [-60, 1, 3, 5, 7, 9, 11] Searching for -60 in [1] a = -60, arr[middle_index] = 1, begin_index = 0, end_index = 0, middle_index = 0 the result is 0, the index for value 1 [-60, 1] Searching for 60 in [1] a = 60, arr[middle_index] = 1, begin_index = 0, end_index = 0, middle_index = 0 the result is 1, the index for value nil [1, 60] Searching for 60 in [] [60]

    Read the article

  • What is the best way to deal with 404s that are all trying to point to the same page that are from an external site?

    - by Lee
    I started getting 404s showing up in my Google Webmaster's Tools from a site linking to a specific category but with odd characters at the end of the url. So Something like this: http://example.com/category/puppies%EF%BC%9A.textwidget%E8%A6%81%E7%B4%A0%E7%B7%A8%E9%9B%86 Google Webmaster says that there are about 120 of these links and I can imagine there will be more to come. What is the best way to handle these links from an seo point-of-view? I have heard 301 redirecting too many links at one time can cause Google to ding the site but I don't want this site to continue posting broken links. Any help on this would be appreciated.

    Read the article

  • Domain Name from 123-reg, VPS from Linode. How to point to Google Mail for Business?

    - by Ashutosh Jindal
    I have bought a domain from 123-reg.co.uk and have successfully pointed it to the IP Address of my Linode VPS so that going to the domain serves up the pages from the Apache server running on the VPS. The instructions I followed to do this are : Now, I am trying to get the domain's mail handled by Google Apps for Business. I have tried updating the MX records at Linode following this tutorial : http://library.linode.com/email/google-mail And also followed the instructions to update the MX Records in 123-reg's control panel : I am slightly confused now. Where should I be adding the MX records? In my domain registrar's control panel or in Linode's VPS? Both have options to update the MX records.

    Read the article

  • What kind of DNS and IIS configuration is needed to allow multiple domains to point to a multi-tenant web application?

    - by holiveira
    I'm developping a multi-tenant web application in ASP.NET MVC and it will provide my users the ability to have a custom subdomain pointing to their account page (like user.myapp.com). I already have it working by using a wildcard DNS entry and a code to query the database to load the user data based on the domain. I'm planning to offer the possibility of using custom domains, allowing the users to buy their own domains and use it instead of the subdomains that will be provided by default. I currently use DNSMadeEasy to host the DNS for the application main domain. I just don't know what kind of settings I must make to allow this feature to work, since the users will have domains hosted in several companies. Will I have to create my own nameservers and provide it to my users? What other things I must consider to implement it efficiently?

    Read the article

  • In DNS can an IN NS point to a CNAME?

    - by Mark Wagner
    Is it allowed to have an NS record be a CNAME? E.g.: subdomain.example.com. IN NS ns1.example.com. ns1.example.com. CNAME foo.example.com. foo.example.com. IN A 10.1.1.1 This doesn't seem to work in bind though this (of course) does: subdomain.example.com. IN NS foo.example.com. foo.example.com. IN A 10.1.1.1 Any pointers to RFCs prohibiting this setup would be appreciated.

    Read the article

  • Is it bad to have the Reverse DNS for two IPs point to the same domain name?

    - by Daniel Vandersluis
    I am in the process of setting up a new server for my domain (the site will be moved, it is not for load balancing or the like), which has a different IP address from my existing server. My current server has a reverse DNS PTR record set up pointing its IP to mydomain.com. Is it bad to set up a reverse DNS PTR record for the new IP pointing to mydomain.com as well? Or should I wait until I do my migration to set up the record?

    Read the article

  • At what point does Active Directory and Domain Services become necessary? [closed]

    - by user970638
    I see time and time again such services running in a business environment with only 10 users. Everyone in the office authenticates with the DC and interacts with a shared drive where files and documents are stored. I can't help but think...reeeeealy? But I don't know, that's why I'm asking. To me it seems like you need to reach a certain threshold of size and needs before you throw a DC into the mix. ie: a 20+ user business (and growing) with permission requirements that separate the sales team from accounting. Thoughts?

    Read the article

  • b Is it bad to have the Reverse DNS for two IPs point to the same domain name?

    - by Daniel Vandersluis
    I am in the process of setting up a new server for my web application (the site will be moved, it is not for load balancing or the like), which has a different IP address from my existing server. My current server has a reverse DNS PTR record set up pointing its IP to mydomain.com. Is it bad to set up a reverse DNS PTR record for the new IP pointing to mydomain.com as well? Or should I wait until I do my migration to set up the record? Update: I forgot to mention, the A record for the mydomain.com points to the old server's IP address, not the new one, if it matters.

    Read the article

  • Accidentally moved FUSE mounted mount point, not cannot unmount. Any option besides reboot?

    - by Catskul
    I mounted a disk image using a few different FUSE modules and then subsequently renamed the parent directory. The mounts have disappeared from the mtab and now the OS refuses to unmount them. fusermount -u mnt returns: fusermount: entry for /home/catskul/foo/mnt not found in /etc/mtab sudo fusermount -u mnt returns: fusermount: failed to unmount /home/catskul/foo/mnt: Device or resource busy sudo fuser -a mnt returns: Cannot stat file /proc/986/fd/55: Permission denied mnt:

    Read the article

  • Create access point (uap0) on debian 7(arm) - not found?

    - by ethrbunny
    I'm working with a fanless PC that has an ARM chipset, 2 eth plugs and a wifi card (among other things). If I install debian 6 on it all three network interfaces are available at boot time. Today I tried to install debian 7 and had numerous errors indicating that the wireless card isn't supported. uap0: error fetching interface information: Device not found SIOCSIFADDR: No such device uap0: ERROR while getting interface flags: No such device uap0: ERROR while getting interface flags: No such device No such device ERR:UAPHOSTCMD is not supported by uap0 ERR:Command sending failed! No such device ERR:UAPHOSTCMD is not supported by uap0 ERR:Command sending failed! I've tried comparing the kernel module list to the working system but there are too many other differences to make something obvious enough (to me) stand out. How would I get started debugging this problem?

    Read the article

  • Internet Explorer changes brightness

    - by Sale
    I have a very annoying problem with IE8 on Vista: My screen brightness changes when I view a page with IE. It slowly dimms brightness some 20% - enough to be noticeable. This seems to be dependent on the OVERALL brightness of the page viewed or of the amount of bright space on the page... sometimes it dimms down if the page is bright, sometimes the complete different, it dimms when lot of dark space is on the page. I know this sounds weird, I cannot describe it better. It takes about one,two seconds from on brightness level to the other. This ONLY occurs in IE - not in Word or any other application. Please help! This dimming is very stressfull for my eyes.

    Read the article

  • How can I tell my dd-wrt router to use someone's Amazon Affiliates link when I point my browser to amazon.com?

    - by Michael Paul
    Here's what I'd like to do. Instead of a one-time donation to one of my favorite free tools (junecloud.com) I'd like to do what they suggest here and use their Amazon Affiliates link to do all my Amazon shopping. I shop at amazon once or twice a week, so this is a great way to let them earn lots of long-term cash without me dropping a dime. My thought was to go into my dd-wrt enabled router and tell it, "any time I go to amazon.com on any computer in the house, please go to http://www.amazon.com/gp/redirect.html?link_code=ur2&tag=junecloud-20&camp=1789&creative=9325&location=%2F instead. (That URL simply redirects me to amazon.com but every purchase I make during that session is credited to JuneCloud.) Once logged into dd-wrt, I went to Services Services DNSMasq but I'm not really sure how to get it to work from there, or if it's even possible. I know I can redirect IP addresses, but I'm looking to redirect someone on my network from amazon.com to the special amazon affiliate code link. Hope that's clear. Thanks for any replies!

    Read the article

  • Under what circumstances would a junction point be more appropriate than a symbolic link?

    - by Benjamin Pollack
    Symbolic links were introduced an incredibly long time ago in Windows, yet I still encounter a large number of systems that use junction points. I know that symbolic links afford functionality not in junction points (e.g., they work on external drives); my question is whether there is functionality specific to junction points that make them more appropriate than symbolic links in some circumstances.

    Read the article

  • Is this a good starting point for iptables in Linux?

    - by sbrattla
    Hi, I'm new to iptables, and i've been trying to put together a firewall which purpose is to protect a web server. The below rules are the ones i've put together so far, and i would like to hear if the rules makes sense - and wether i've left out anything essential? In addition to port 80, i also need to have port 3306 (mysql) and 22 (ssh) open for external connections. Any feedback is highly appreciated! #!/bin/sh # Clear all existing rules. iptables -F # ACCEPT connections for loopback network connection, 127.0.0.1. iptables -A INPUT -i lo -j ACCEPT # ALLOW established traffic iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # DROP packets that are NEW but does not have the SYN but set. iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP # DROP fragmented packets, as there is no way to tell the source and destination ports of such a packet. iptables -A INPUT -f -j DROP # DROP packets with all tcp flags set (XMAS packets). iptables -A INPUT -p tcp --tcp-flags ALL ALL -j DROP # DROP packets with no tcp flags set (NULL packets). iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP # ALLOW ssh traffic (and prevent against DoS attacks) iptables -A INPUT -p tcp --dport ssh -m limit --limit 1/s -j ACCEPT # ALLOW http traffic (and prevent against DoS attacks) iptables -A INPUT -p tcp --dport http -m limit --limit 5/s -j ACCEPT # ALLOW mysql traffic (and prevent against DoS attacks) iptables -A INPUT -p tcp --dport mysql -m limit --limit 25/s -j ACCEPT # DROP any other traffic. iptables -A INPUT -j DROP

    Read the article

  • Configuration to point an X tty to a separate system?

    - by buu700
    Specifically, I have an Ubuntu 10.04 system with a headless Ubuntu 12.04 virtual machine, and I'm looking for a way to have it set up so pressing ctrl+alt+F8 will take me into another X client which is connected to an X server on the vm (with gdm appropriately displayed at startup, etc.). As in, my startup script should spin up the headless machine and then immediately perform a "startx" pointed at the vm.

    Read the article

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