Questions About 11011

How to find the number of binary numbers with the following constraints:

Given a binary digit count of n, and a maximum consecutive occurrence count of m, find the number of different possible binary numbers. Also, the leftmost and rightmost bit must be 1.

For example n = 5, and m = 3.

The count is 7: 10001 10011 10101 10111 11001 11011 11101

Notice we excluded 11111 because too many consecutive 1's exist in it.

This was an interview question I had recently, and It has been bothering me. I don't want to brute force check each number for legitimacy because m can be > 32.

http://www.stackoverflow.com/questions/14639310/how-to-find-the-number-of-binary-numbers-with-the-following-constraints

Ignoring the first bit using bitwise compare with permission model

I have the bits 101 and 110. I want to compare using some bitwise operator ignoring the first bit like 01 and 10.

Example:

I have:
101
110
===
01 & 10 <- How I want to consider
x00 <- The result I want

or

10110
11011
=====
0110 & 1011 <- How I want to consider
x0010 <- The result I want

How could I achieve this using bitwise operators in java?

Details:

  • The first bit will always be 1.
  • The other bits are variable. Both sides of the comparison will have the same number of bits.
  • I want to detect just how to make the comparison considering the other bits and ignoring the first.

Use case:

  • I have 2 permission values. The first is 5/101 (The permission required) and the second is 6/110 (The permission the user has).
  • Excluding the first block, which will always be 1, I want to compare the third block that represents a ce
http://www.stackoverflow.com/questions/14927950/ignoring-the-first-bit-using-bitwise-compare-with-permission-model

How do you get people to look at a network marketing opportunity.?

I have joined a new network marketing company but after getting 4 people in I'm out of people i know well to talk to I was wondering how to reach out to more people. I have a web site for people to look at www.livinity.com/11011 and I understand the business and really do love the products they sell if anyone can help pleases do. I would really like to know how to reach people on the net.
http://answers.yahoo.com/question/?qid=20060625060408AAcCLad

FreeBSD Jail with Loopback IP, IPFW, and natd - Outbound connections fail from jail

I've got a FreeBSD 9.0 server. It has several jails, but they all have this same issue. They can not initiate connections to the outside world. They communicate with each other and the host fine.

relevant rc.conf settings:

firewall_enable="YES"                   # IPFW
firewall_type="/etc/ipfw.rules"         # Rule script for IPFW

natd_enable="YES"                       # NAT for Internet Routing
natd_interface="wan0"                   # NAT Card
natd_flags="-f /etc/natd.conf -dynamic" # NAT Conf

ifconfig_lo1_name="jail1"
ifconfig_jail1="inet 192.168.1.101/32"

jail_asdf_rootdir="/jails/asdf"
jail_asdf_hostname="asdf.example.net"
jail_asdf_ip="192.168.1.101"
jail_asdf_devfs_enable="YES"

From sysctl.conf

security.jail.allow_raw_sockets=1

From ipfw.rules

# XXX 00050 divert natd ip4 from any to any via wan0
add 00060 check-state

# Allow me out
add 00135 
    
http://www.serverfault.com/questions/487649/freebsd-jail-with-loopback-ip-ipfw-and-natd-outbound-connections-fail-from-jail

In python, what is more efficient? Modifying lists or strings?

Regardless of ease of use, which is more computationally efficient? Constantly slicing lists and appending to them? Or taking substrings and doing the same?

As an example, let's say I have two binary strings "11011" and "01001". If I represent these as lists, I'll be choosing a random "slice" point. Let's say I get 3. I'll Take the first 3 characters of the first string and the remaining characters of the second string (so I'd have to slice both) and create a new string out of it.

Would this be more efficiently done by cutting the substrings or by representing it as a list ( [1, 1, 0, 1, 1] ) rather than a string?

http://stackoverflow.com/questions/2253234/in-python-what-is-more-efficient-modifying-lists-or-strings

Canshaft/Head Max lift with roller rockers?

So I am a little confused about something. when I am window shopping on places like summitracing.com and am looking at heads and camshafts they will say what the max lift is. For example, when looking at a camshaft it will say it has a max lift of .510 and the heads will have a max lift of .600. Now are the heads max lift with roller rockers at 1.5, 1.6, 1.7. are 1.5 roller rockers considered stock. When I look at heads they never include the roller rockers. Do you even need roller rockers on heads when building an engine. Can somebody please explain this to me. Thanks john. So I might be building a blown 496 later this year if the money comes up and I am wondering if these heads would work with this camshaft and 1.7 roller rockers. I have been told 1.7 is pretty much stock for big block chevys. http://www.summitracing.com/parts/rhs-11011-02/applications/make/chevrolet/engine-size/7-4l-454/year/1970 http://www.summitracing.com/parts/cca-cl01-409-8/overview/make/chevrolet
http://answers.yahoo.com/question/?qid=20140120115949AAn7f08