text:
Programming? No, it's Projamming
Hopefully not duplicate, but I did not find one.
Challenge
The challenge is to write full program, which compiles (without errors), but, when executed, will not finish the execution till the end, because an error appears during the execution.
Rules

It has to be full program, which is compile-able or interpret-able in such way, that it produces no syntax errors.
You can use any mechanics, which will do something, so that the interpreter of your program kills the program. This includes (but is not limited to): exceptions, overflows, SIGSEGVs. However, asking the interpreter to kill the program explicitly does not count (by calling exit()-like functions).
It may be compiler/OS dependent, as long as it's not using obvious bug in compiler/interpreter. So depending on Undefined behavior in C/C++ is valid, but using version 1.0.17b of language interpreter, which throws random_exception when run is not. If it depends on something, it's good to write so in the answer.
The program will take no input, but it may (or may not) produce any output to STDOUT, or STDERR.
This is code-golf, but it is not about finding the language with least amount of bytes, but to find a least bytes solution in all languages. So I will not accept any answer.

Catalogue
I hope Martin Büttner won't get mad at me for copy-pasting his catalogue.
The Stack Snippet at the bottom of this post generates the catalogue from the answers a) as a list of shortest solution per language and b) as an overall leaderboard.
To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:
# Language Name, N bytes

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:
# Ruby, <s>104</s> <s>101</s> 96 bytes

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:
# Perl, 43 + 2 (-p flag) = 45 bytes

You can also make the language name a link which will then show up in the snippet:
# [><>](http://esolangs.org/wiki/Fish), 121 bytes

/* Configuration */

var QUESTION_ID = 61390; // Obtain this from the url
// It will be like http://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 43365; // This should be the user ID of the challenge author.

/* App */

var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page;

function answersUrl(index) {
  return "http://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

function commentUrl(index, answers) {
  return "http://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}

function getAnswers() {
  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answer_ids.push(id);
        answers_hash[id] = a;
      });
      if (!data.has_more) more_answers = false;
      comment_page = 1;
      getComments();
    }
  });
}

function getComments() {
  jQuery.ajax({
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      data.items.forEach(function(c) {
        if (c.owner.user_id === OVERRIDE_USER)
          answers_hash[c.post_id].comments.push(c);
      });
      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();
    }
  });
}

getAnswers();

var SCORE_REG = /<h\d>\s*([^\n,<]*(?:<(?:[^\n>]*>[^\n<]*<\/[^\n>]*>)[^\n,<]*)*),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;

var OVERRIDE_REG = /^Override\s*header:\s*/i;

function getAuthorName(a) {
  return a.owner.display_name;
}

function process() {
  var valid = [];

  answers.forEach(function(a) {
    var body = a.body;
    a.comments.forEach(function(c) {
      if(OVERRIDE_REG.test(c.body))
        body = '
' + c.body.replace(OVERRIDE_REG, '') + '
';
    });

    var match = body.match(SCORE_REG);
    if (match)
      valid.push({
        user: getAuthorName(a),
        size: +match[2],
        language: match[1],
        link: a.share_link,
      });
    else console.log(body);
  });

  valid.sort(function (a, b) {
    var aB = a.size,
        bB = b.size;
    return aB - bB
  });

  var languages = {};
  var place = 1;
  var lastSize = null;
  var lastPlace = 1;
  valid.forEach(function (a) {
    if (a.size != lastSize)
      lastPlace = place;
    lastSize = a.size;
    ++place;

    var answer = jQuery("#answer-template").html();
    answer = answer.replace("{{PLACE}}", lastPlace + ".")
                   .replace("{{NAME}}", a.user)
                   .replace("{{LANGUAGE}}", a.language)
                   .replace("{{SIZE}}", a.size)
                   .replace("{{LINK}}", a.link);
    answer = jQuery(answer);
    jQuery("#answers").append(answer);

    var lang = a.language;
    lang = jQuery(''+lang+'').text();

    languages[lang] = languages[lang] || {lang: a.language, lang_raw: lang, user: a.user, size: a.size, link: a.link};
  });

  var langs = [];
  for (var lang in languages)
    if (languages.hasOwnProperty(lang))
      langs.push(languages[lang]);

  langs.sort(function (a, b) {
    if (a.lang_raw.toLowerCase() > b.lang_raw.toLowerCase()) return 1;
    if (a.lang_raw.toLowerCase() < b.lang_raw.toLowerCase()) return -1;
    return 0;
  });

  for (var i = 0; i < langs.length; ++i)
  {
    var language = jQuery("#language-template").html();
    var lang = langs[i];
    language = language.replace("{{LANGUAGE}}", lang.lang)
                       .replace("{{NAME}}", lang.user)
                       .replace("{{SIZE}}", lang.size)
                       .replace("{{LINK}}", lang.link);
    language = jQuery(language);
    jQuery("#languages").append(language);
  }

}
body { text-align: left !important}

#answer-list {
  padding: 10px;
  width: 290px;
  float: left;
}

#language-list {
  padding: 10px;
  width: 290px;
  float: left;
}

table thead {
  font-weight: bold;
}

table td {
  padding: 5px;
}

<link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Shortest Solution by Language

Language	User	Score

Leaderboard

	Author	Language	Size

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

Don't worry about it; that snippet was made to be copy-pasted. ;)

Why is this getting downvotes? Someone should at least post a comment explaining why they didn't like this question. I upvoted it.

Would of done much better as a popularity contest

I didn't downvote but tbh, the challenge is not very interesting. The solution with the least amount of bytes will not be very creative most of the times.

For me, the scope of the question is simply far too wide: "write a program that doesn't work". For interpreted languages, the problem is ill-defined (and will usually hinge on "a compiler would spot this, but my language is interpreted, so...") - an example is @fschmengler's answer, which is within the scope of the question (I'm not criticising!), but wouldn't work in a compiled language. For compiled languages, a mature compiler's goal is to prevent the trivial answers to this question (except for exhaustion issues, perhaps).  There is no "wow!" factor from this question as it stands.

I didn't want to make it popularity contest, because of this question

The reason that question is so popular is that it asks for creativity. Golf answers to trivial questions are generally underwhelming.

I think this would be better as a Popularity Contest. It seems too trivial, since print 1/0 is too easy.

@fschmengler This is about finding the shortest solution per language.

@LegionMammal978 yes that's why I said most of the time

Also, how is this too broad?

C, 5 bytes
main;

On modern systems it will crash because main is not in an executable section. On older systems it will execute some junk and crash.

Never knew about this!

Brainfuck, 1 byte
[
There's no matching ] to jump to. Depending on how smart your compiler/interpreter is, it may give you a syntax error, but the original spec didn't allow for syntax errors - only runtime errors.
Try it online

Python, 1 byte
_

NameError! :D
This works because NameErrors in Python occur at run-time, NOT compile-time.

Heh, same as my JS answer ;)

CJam, 1 bytes
;

This will try to pop from an empty stack.
Try it online.

JavaScript Shell, 7 bytes
clear()

The clear function has been quite controversial but to clarify this uses the SpiderMonkey shell. It will throw a Segmentation fault: 11

PHP, 7 Bytes
<?=o();

This Santa smiley crashes with Fatal error: Call to undefined function o() in [...]

<?=0/0; would have been shorter but I got tired of division by zero errors.

0/0 will only raise a warning like Warning: Division by zero in Command line code on line 1. "will not finish the execution till the end" would not be satisfied. PS: congrats to 1k rep. :)

Ah, of course you are right

Try this: <?$a();. It will produce: Notice:  Undefined variable: a in [...][...] on line 1\nFatal error:  Function name must be a string in [...][...] on line 1 (The \n is a real newline). (Evidence: http://sandbox.onlinephpfunctions.com/code/7bdf972a50c186cefa0ba8d48a26387f0248247b)

JavaScript, 1 byte
_

Tries to access the undefined variable _, which raises a ReferenceError. JS doesn't check for inexistent variables until runtime, so if you tried this code:
console.log("No error??/")
_
console.log("Huh...")

It would error out with ReferenceError: _ is not defined, then print No error??/, but not Huh....

C#, 36 bytes
class C{static void Main(){Main();}}

Throws a StackOverflowException. I can't remove the main function and still have it compile.

T-SQL, 9 bytes
EXEC('@')

Causes the following error
Msg 137, Level 15, State 2, Line 1
Must declare the scalar variable "@".

Pyth, 3 Bytes
/00

Result:

 Traceback (most recent call last):
  File "pyth.py", line 671, in <module>
  File "<string>", line 3, in <module>
  File "/app/macros.py", line 506, in div
ZeroDivisionError: integer division or modulo by zero

You can actually just use /, which will throw an ArgumentError at runtime.

PoGo, 2 Bytes
vi

Result

EXCEPTION_INT_DIVIDE_BY_ZERO

Loader, 8 bytes
There are shorter solutions, but this is the shortest one that's actually legal syntax:
throw ""

Throws the empty string as an error message (which, in the reference implementation, corresponds to a popup error notification reading Error: followed by a single trailing space).

C++, 23 bytes
int main() {
    main();
}

Crashes with Segmentation fault: 11

This would be shorter if some of the whitespace were removed.

Haskell, 10 bytes
main=[]!!0

Fails with the Prelude.!!: index too large error.

STATA, 1 byte
a
Outputs unrecognized command:  a, but this error occurs at run-time.
For an error not in the range 100 to 199 (considered syntax errors), use
set ob `=9^9'

This gave me the following to standard error:
op. sys. refuses to provide memory
    Stata ran out of room to track where observations are stored.  Right now, Stata has 1m bytes allocated to track observations.  Stata
    requested an extra 738m bytes (in 738 1m pieces) and the operating system said no.  Stata is currently tracking 0 observations and was
    asked to track 0.  You are up against the memory limits of this computer.


text:
Figure out the maximum amount of candy a child can collect
The city of Poughkeepsie celebrates Halloween every year. Geographically, the city is a rectangle that is 30 miles long and 45 miles wide. On a map, it looks like a grid, with its east-west roads horizontally dividing the city into 1-mile-long rectangles and its north-south roads vertically dividing the city likewise. There is one house at each road intersection.
The city's residents tend to be more generous with their candy as one moves toward the center of the rectangle. The resident at the lower-left corner of the city - whom we'll call Bob - gives out 10 candies per child. If a child starts at Bob's house and proceeds eastward, each resident they come across will give them 5 more candies than the last one (In other words, Bob's nearest eastern neighbor will give 15 candies. If a child walks another mile to the next eastern neighbor, they get another 20 candies.) After they reach the horizontal center street, that number decreases by 5. If that same child instead proceeds northward of Bob's house - which is located at (0,0) - each resident they meet will give them 10 more candies than the previous resident. After they reach the relevant center street, each resident they meet will give 10 less.
The number of candies given out by residents who do not live on the edges of the city is the sum of the number of candies given out by the two neighbors who live on the nearest borders of the city. So, a resident who lives at (44,29) will give out the number of candies given by the resident at (45,29) + the number of candies given by the resident at (30,44).
Important note: The only way to access each house is by walking along roads or adjacent paths. One is not allowed to, for example, bee-line from Bob's house to (1,1) - s/he must first either walk along the y-axis for 1 mile, turn right and walk for another mile; or walk along the x-axis for 1 mile, turn left and walk for another mile. Also, once a child has received candy from a house, they will receive no more candy from that same house.
Objective:
Your program is to figure out how much candy a child can receive if s/he starts at Bob's house and is to walk no more than a given distance "d".
Scoring
Programs will be scored based on the size (in bytes) of the source code.

Also, you have not specified how much candy is received from the north and east borders.

@Zgarb: Each resident gives as much candy as does the resident who shares a street with, but lives on the opposite border from, them. So, the resident at (45,5) gives the same amount of candy as the resident at (0,5)

This doesn't take into account how terrible the traffic/roads are in Poughkeepsie. ;) (Assuming you're talking about NY).

It's a grid? https://www.google.com/maps/place/Poughkeepsie,+NY/@41.6933795,-73.9162482,14z/data=!4m2!3m1!1s0x89dd3e642be0bb3b:0x5ea85debfb20f349

Also what if I go from Bob's house to (0,1) and (1,1) but then (2,1) and (2,2) where it isn't possible to reach the edge with 1 step?

@ev3commander:  1) We assume a fictional city that has a grid layout, 2) I don't understand your question. To travel from (2,1) to (2,2) you walk 1 mile along the line segment at x=2.

I meant how much candy I would get at (2,2).

Does the path have to end back at Bob's house, or can it arbitrarily end in the middle of the city?

@Mego It can end anywhere within the inputted walking distance from Bob's house.

@ev3commander If you end up at (2,2) you get the number of candies given by the resident at (2,0) + the number of candies given by the resident at (0,2). There is one - and only one - house per intersection.

Jelly, 58 bytes
Ø+0r;U$ṗµØ1W;⁸+\Q%“.þ‘)ẎẠ$Ƈµ20Ḋ×©5Ḋ+þ14Ḋ×⁵¤⁺;"Wɼ;ŒBm0⁸œị§Ṁ

Try it online!
Very slow (brute force), TIO can handle up to 8. Test cases in \$[0,8]\$: Try it online!

Note: I've tested cases until $4$ by hand.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Numbers with multiple runs of ones
Task
Find the set of numbers such that the binary representation contains two or more runs of 1 separated by at least one 0.
For example, the for the numbers that are 4 bits long:
 0 0000        (no ones)
 1 0001        (only one run)
 2 0010        (only one run)
 3 0011        (only one run)
 4 0100        (only one run)
 5 0101 Valid
 6 0110        (only one run)
 7 0111        (only one run)
 8 1000        (only one run)
 9 1001 Valid
10 1010 Valid
11 1011 Valid
12 1100        (only one run)
13 1101 Valid
14 1110        (only one run)
15 1111        (only one run)

Input
An integer provided to the application via some input in the range 3 .. 32.  This represents the maximum number of bits to count up to.
The input of n indicates that the numbers 0 .. 2n-1 need to be examined.
Output
A delimited (your choice) list of all numbers meeting the criteria. The numbers are to be presented in numeric order.  An extra trailing delimiter is acceptable.  Data structure enclosures (e.g. [] and similar) are also acceptable.
Example
Input: 3
Output: 5

Input: 4
Output: 5, 9, 10, 11, 13

Input: 5
Output: 5, 9, 10, 11, 13, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 29

This is code-golf - the answer with the least amount of bytes wins.

I think you missed 23 for n=5.

@xnor you are correct.  Thank you, and yep, that also makes it not equivalent to A094695.  Hmm.  https://oeis.org/A101082 vs https://oeis.org/A166934

@VTCAKAVSMoACE yes.  If one is \n delimiting and putting a \n on the last line, then , delimited with a , trailing should be acceptable too.  Updated.

Can the input be in a list format like [1, 2, 3]?

@kirbyfan64sos yes. Updated.

Does the output have to be sorted?

@kirbyfan64sos yes: "The numbers are to be presented in numeric order."

@ThomasKwa that is really a matter of the implementation. If you are providing code, it should run somewhere correctly (see the bit about specific python implementation in comments).

Are we allowed to exit with an error after the output is generated?

@ThomasKwa good and interesting question. I'm going to have to go with "I'm really only concerned about the output" and so to your question, yes, it may exit with an error after the output is generated.

Pyth, 12 bytes
f<2r.BT8U^2Q

Try it online.
Idea
The binary representation of any positive number always begins with a run of 1s, possibly followed by other, alternating runs of 0s and 1s. If there are at least three separate runs, two of them are guaranteed to be runs of 1s.
Code
              (implicit) Store the evaluated input in Q.
         ^2Q  Calculate 2**Q.
f       U     Filter; for each T in [0, ..., 2**Q-1]:
    .BT         Compute T's binary representation.
   r   8        Perform run-length encoding.
                This returns a list of character/run-length pairs.
 <2             Discard the trailing two pairs.
                This returns a non-empty array if there are more than 2 runs.
              Keep T if the array was truthy (non-empty).

Python, 48
lambda n:[i for i in range(2**n)if'01'in bin(i)]

I had been vastly overthinking this. We just need to check if the binary expansion contains '01'.
For there to be two runs of ones, the one on the right must be preceded by a 0. If there's only one run, there won't be any leading 0's, so that won't happen.

Old answer:
lambda n:[i for i in range(2**n)if len(set(bin(i).split('0')))>2]

The Python binary representation works very nicely here. A binary number is written like bin(9)=='0b10110'. Splitting at '0' results in a list of

Empty strings to the left of the initial 0, between any two consecutive 0's, and to the right of any final 0
The letter b followed by one or more leading ones
Runs of 1's that are not leading

The first two categories always exist, but the last one only exists if there is a run one 1's that doesn't contain the leading '1', and so only if there's more than one run of 1's. So, it suffices to check if the list contains more than 2 distinct elements.
Python 3.5 saves 2 chars by unpacking {*_} in place of set(_).

Thanks for the idea to use /01/ instead of /10+1/. I took advantage of that in Perl.

Ruby, 44 40 38 chars
crossed out 44 is still regular 44 ;(
->n{(0..2**n).select{|x|/01/=~'%b'%x}}

An anonymous function (proc, actually) that takes an integer and returns an array.
Uses the regex /10+1/: a 1, at least one 0, and then another 1. @histocrat points out that if 01 is anywhere in the string, there must be a 1 somewhere before it.

Using a format string is a bit shorter here: /10+1/=~'%b'%x. Also, you can save a character by using an inclusive range(0..2**n) since 2**n will never have multiple runs.

@histocrat Huh, I never knew you could flip the order of the string and the regex with =~. Thanks!

Wait, actually the regex /01/ works just as well. If there's a 01, there must be a 1 to the left somewhere.

@histocrat Oh, that's clever! That saves two characters.

Julia, 43 41 bytes
n->filter(i->ismatch(r"01",bin(i)),1:2^n)

This creates an unnamed function that accepts an integer and returns an array. It uses histocrats's regex trick (used in Doorknob's answer), where 01 will only match if there's a preceding 1.
Ungolfed:
function f(n::Int)
    # Take the integers from 1 to 2^n and filter them down to
    # only those such that the binary representation of the integer
    # matches the regex /01/.
    filter(i -> ismatch(r"01", bin(i)), 1:2^n)
end

histocrat's trick, not mine. :)

@Doorknob Oh hey, now you both get credit. :)

Matlab, 79 68 64 59
The idea is interpreting the binary number as array of zeros and ones, and then calculating the absolute difference between each pair of neighbours. If we have two or more times a difference of 1, then we obviously have a run of two or more ones. Note that this only works if we represent the binary number without leading zeros.
@(n)find(arrayfun(@(k)sum(~~diff(dec2bin(k)+0))>1,1:2^n-1))

Old versions:
k=1:2^input('')-1;k(arrayfun(@(k)sum(~~diff(dec2bin(k)+0))>1,k))

for k=1:2^input('')-1;if sum(~~diff(dec2bin(k)+0))>1;disp(k);end;end

for k=1:2^input('')-1;if sum(~~conv(dec2bin(k)+0,[-1,1],'v'))>1;disp(k);end;end

JavaScript (ES7), 89 85 72 69 62 bytes
Holy cow, creating ranges in JS is not easy. Perhaps it would be shorter with an actual for loop. Nope, I lied; it's actually a bit longer. Oh well. I guess I'll just have to settle for 27 bytes saved. (7 thanks to Mwr247!)
x=>[for(a of Array(1<<x).keys())if(/01/.test(a.toString(2)))a]

Works properly in the latest versions of Firefox, but probably not in any other browser. Try it out:

Code:
<textarea id="textbox" style="margin-top:5px; margin-bottom:5px"></textarea>

Input:
<textarea id="inputbox" style="margin-top:5px; margin-bottom:5px">5</textarea>
<button id="testbtn">Test!</button><button id="resetbtn">Reset</button>

Original Code Output:

New Code Output:

(Snippet taken from this page)
Suggestions welcome!

You can use .keys() instead of .fill() and a instead of i to tie mine for 62: x=>[for(a of Array(1<<x).keys())if(/01/.test(a.toString(2)))a]

@Mwr247 Thanks! I wonder if it's possible in under 62... :)

Haskell, 68 61 53 bytes
Improvement from Damien
g x|x`mod`4==1=x>4|2>1=g$x`div`2
a x=filter g[1..2^x]

History:
This fixes the bug(Switched == and =, and square instead of power of two). And replace true with 2>1 and false with 1>2. Also thanks to point out that 2^x is always fail. Thanks to Thomas Kwa and nimi
g x|x<5=1>2|x`mod`4==1=2>1|2>1=g$x`div`2
a x=filter g[1..2^x]

Originally
g x|x<5=False|x`mod`4=1==True|2>1=g$x`div`2
a x=filter g[1..(x^2-1)]

If it have to be full program,
g x|x<5=False|x`mod`4==1=True|2>1=g$x`div`2
main=interact$show.a
a x=filter g[1..2^(read x)]

Lambdas are fine, since OP didn't specify writing a named function or program. By the way, welcome to PPCG!

I think you mean 1..(2^x-1) which can just be 1.. (2^x) since 2^x always fails.

You can replace the constants False and True with 1>2 and 1<2. No need for the parentheses around 2^x-1. (BTW: you have a typo: it must be 4==1=True).

Thanks for typo correction. It was late night in my time.

nice tricks!I think you can reduce g to:  g x|xmod4==1=x>4|2>1=g$xdiv2

Do I have to golf the full program version?

@ChristianIrwan: No, a full program is only required if the challenge explicitly asks for it. Per default a function is also valid.

APL, 34 27 bytes
{0~⍨{⍵×2<+/2≢/⍵⊤⍨⍵/2}¨⍳2*⍵}

This creates an unnamed monadic function that accepts an integer on the right and returns an array.
Explanation:
                     }¨⍳2*⍵}  ⍝ For each integer from 1 to 2^input...
              ⍵⊤⍨⍵/2         ⍝ Get the binary representation as a vector
           2≢/                ⍝ Pairwise non-match, yielding a boolean vector
       2<+/                   ⍝ Check whether the number of trues is >2
     ⍵×                       ⍝ Yield the integer if so, otherwise 0
{0~⍨{                         ⍝ Remove the zeros from the resulting array

Saved 7 bytes thanks to Dennis!

C (gcc), 111 99 bytes
long i,x;main(a,b)char**b;{for(;++i<1L<<atol(b[1]);x>>ffsl(~x)-1&&printf("%ld,",i))x=i>>ffsl(i)-1;}

Try it online!
12 bytes shaved of thanks to @ceilingcat!
Ungolfed:
int main(int a, char **b) {
  for(long i = 0, x = 0; ++i < (1LL << atol(b[1])); ) {
    x = i >> (ffsl(i) - 1);
    if (x >> (ffsl(~x) - 1))
      printf("%ld,", i);
  }
}

The function ffsl() gives you the index of the first bit that is set in a long integer. So we loop from i = 1 to 2^number_of_bits. We set x to i shifted right until we have removed all consecutive zero bits on the least significant end. Then, we shift x right until we have removed all consecutive 1 bits at the least signficant end. If the result is still non-zero, we found a match.

I've gotta say that I really like that someone did a bit manipulation answer rather than a "convert to string and regex" approach.

@MichaelT I wonder if there's a short olution using only primitive bitwise operations.

@ThomasKwa That might be something to do as a [tag:code-challenge].

Interesting. You can also write the test like this: if (popcount(i ^ (i*2))>3), and expand popcount() to a series of bitwise ANDs and shift operations. But that would result in quite long code.

note that long doesn't necessarily have 64 bits

@ThomasKwa y=x|(x-1) to turn on all rightmost 0 bits.  Then z=y&(y+1) to turn off all trailing 1 bits.  If z is non-zero, then the original number had more than one run.

1 << atol(b[1]) should read 1L << atol(b[1]) in the ungolfed version

@ThomasKwa: Indeed there is a shorter solution using only primitive bitwise operations. Just posted.

@ceilingcat You're good :) But Alchymist has us both beaten.

Java, 214 165 155 154 148 141 110 bytes
This submission exploits the fact that a binary string representation of a number in Java never has a leading zero. If the string "01" appears in the binary representation of a number, that must mark the second occurrence of the number "1".
Golfed:
String f(int l){String r="";for(long i=5;i<1L<<l;++i)if(Long.toString(i,2).contains("01"))r+=i+", ";return r;}

Ungolfed:
public class NumbersWithMultipleRunsOfOnes {

  public static void main(String[] a) {
    // @formatter:off
    String[][] testData = new String[][] {
      { "3", "5" },
      { "4", "5, 9, 10, 11, 13" },
      { "5", "5, 9, 10, 11, 13, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 29" }
    };
    // @formatter:on

    for (String[] data : testData) {
      System.out.println("Input: " + data[0]);
      System.out.println("Expected: " + data[1]);
      System.out.print("Actual:   ");
      System.out.println(new NumbersWithMultipleRunsOfOnes().f(Integer.parseInt(data[0])));
      System.out.println();
    }
  }

  // Begin golf
  String f(int l) {
    String r = "";
    for (long i = 5; i < 1L << l; ++i)
      if (Long.toString(i, 2).contains("01")) r += i + ", ";
    return r;
  }
  // End golf
}

Program output (remember, trailing delimiters are acceptable):
Input: 3
Expected: 5
Actual:   5,

Input: 4
Expected: 5, 9, 10, 11, 13
Actual:   5, 9, 10, 11, 13,

Input: 5
Expected: 5, 9, 10, 11, 13, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 29
Actual:   5, 9, 10, 11, 13, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 29,

Couln't you use int for the counter variable?

All integer types in Java are unsigned. In order to work with a 32 bit positive integer, a 64 bit long is required. Furthermore, using an int would actually increase the size of the code due to referencing the Integer wrapper class which does the number parsing. I think the likely place to save space would be the regex, but my testing showed I have to have leading and trailing .*

Oh right, but I thought you could use the Long wrapper with int? (Well not in this case but generally?)

Yes, the int will promote to long when used as a parameter with Long. In this case though there is not really any way to use an int because of the sign bit, and Integer is longer than Long. Still, I have found a few ways to squeeze some extra space out of a language as verbose as Java.

Can you use new Long() instead of Long.parseLong()?

@Ypnypn yes! I had been trying to stick with longs but I overlooked the fact that the right-hand of the << bit shift operator has to be an int anyway. This makes it more concise, even with a warning about unboxing Long into int. For another six bytes in a language not known for brevity, I'll take it.

CJam, 14
2qi#{2b2,#)},p

3 bytes shorter thanks to Dennis. Try it online

How about 2be\,2>`.

2be`2> and 2,#) should work as well. Also, the OP has clarified that the output can be printed in list form.

R, 55 47 bytes
(with some help from @Alex.A)
cat(grep("10+1",R.utils::intToBin(1:2^scan())))

R doesn't have a built in function to display converted numbers in a convenient way, so I'm using R.utils::intToBin for this, while all the rest is pretty much just report the location of the matched regex expression and print to STDOUT while separated by a space.

I think the default separator for cat is a space, so you could omit ,sep="," entirely, saving 7 bytes.

@AlexA. yeah, so can I use a space here as a sep? I wasn't sure

The OP said a delimiter of your choice, so I think a space seems reasonable enough. :)

Does this really need the cat function? without it, it the output will be tab delimited. The left hand counter is part of the UI, if you write it to a file this won't be included so it's not part of the output.

@freekvd without it won't print to STDOUT, Something about the silly rules of this site.

I thought you could also output by function return value if not otherwise specified?

@freekvd I didn't write a function here. I will need to switch cat with function(x)

But isn't gsub a function that returns a value?

@freekvd  You need to explicitly write function(x)cat(grep("10+1",R.utils::intToBin(1:2^x))) I haven't invented the rules, neither I think everyone follow them, but I always get comments when I don't.

JavaScript (ES6), 69 68 67 62 bytes
a=>[...Array(1</01/.test(i.toString(2)))

Today I discovered a new shorter way to dynamically fill arrays without the use of fill or map. Doing x=>[...Array(x).keys()] will return an array of range 0 to x. If you want to define your own range/values, use x=>[...Array(x)].map((a,i)=>i), as it's just a few bytes longer.

JavaScript (ES6) 76

f=n=>Array(1<<n).fill().map((_,x)=>/01/.test(x.toString(2))?x+',':'').join``

//TEST
for(i=1;i<16;i++)O.innerHTML+=i+' -> '+f(i)+'\n'

@DLosc no, the result would be something like ,,,,,5,,,,9,10,11,,13,,,,17,18,19,20,21,22,23,,25,26,27,,29,,

K5, 19 bytes
This operates along similar principles as Dennis' solution, but with fewer builtins to take advantage of.
{&2<+/'~0=':'+!x#2}

First, generate a series of binary x-tuples (+!x#2), then for each tuple find every point that a digit does not match the previous if we treat the -1st element of the list as 0 for this purpose (~0=':'). Our solutions are where two is less than the sum of each run count. (&2<+/').
Showing each intermediate step is clearer:
  4#2
2 2 2 2

  !4#2
(0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1)

  +!4#2
(0 0 0 0
 0 0 0 1
 0 0 1 0
 0 0 1 1
 0 1 0 0
 0 1 0 1
 0 1 1 0
 0 1 1 1
 1 0 0 0
 1 0 0 1
 1 0 1 0
 1 0 1 1
 1 1 0 0
 1 1 0 1
 1 1 1 0
 1 1 1 1)

  ~0=':'+!4#2
(0 0 0 0
 0 0 0 1
 0 0 1 1
 0 0 1 0
 0 1 1 0
 0 1 1 1
 0 1 0 1
 0 1 0 0
 1 1 0 0
 1 1 0 1
 1 1 1 1
 1 1 1 0
 1 0 1 0
 1 0 1 1
 1 0 0 1
 1 0 0 0)

  +/'~0=':'+!4#2
0 1 2 1 2 3 2 1 2 3 4 3 2 3 2 1

  2<+/'~0=':'+!4#2
0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 0

  &2<+/'~0=':'+!4#2
5 9 10 11 13

And all together:
  {&2<+/'~0=':'+!x#2}'3 4 5
(,5
 5 9 10 11 13
 5 9 10 11 13 17 18 19 20 21 22 23 25 26 27 29)

C++, 197 188 141 bytes
Note: this was written and tested using MSVC++ 2013. It appears that #includeing <iostream> includes all of the necessary C headers to make this work. It also appears that the code is no longer truly C++, but compiling using C++ allows that header trick which reduces the code size compared to including a bunch more C headers.
Using printf instead of cout also saves a couple bytes.
Golfed:
#include<iostream>
int main(int a,char**b){char c[34];for(long i=5;i<1L<<atol(b[1]);++i){_ltoa(i,c,2);if(strstr(c,"01"))printf("%ld\n",i);}}

Ungolfed:
#include <iostream>
int main(int a, char **b) {
  char c[34];
  for (long i = 5; i < 1L << atol(b[1]); ++i) {
    _ltoa(i, c, 2);
    if (strstr(c, "01"))
      printf("%ld\n", i);
  }
}

Yoiu can use '\n' instead of std::endl (in general), or ',' since any separator is valid and a trailing one is fine.

Instead of regexs, you could just do it with strstr(c,"01").

@G.Sliepen thanks! I honestly just copied my Java solution and converted to C++, but the simple solution is often best. I should probably do something similar with Java now.

Two small errors: 1<<atol(b[1]) should be 1L<<atol(b[1]), otherwise the result of that expression will be a signed 32 bit integer, which means the code will only run up to 2^30. The printf should use %ld to print numbers between 2^31 and 2^32 correctly.

Perl 5, 55 53 49 47 41 bytes
sprintf("%b",$_)=~/01/&&say for 0..2**<>

54 52 48 46 40 bytes, plus one for the -E flag instead of -e.

Thanks to xnor for the hint about using /01/ instead of /10+1/, which saved two bytes.
Thanks to Dennis for the advice to use <> instead of $ARGV[0], which saved six bytes.

Pip, 13 + 1 = 14 bytes
Takes input from the command line and uses the -s flag for spaces between output numbers.
01NTB_FI,2**a

Pretty straightforward: build range(2**a) and filter on lambda _: "01" in toBinary(_). I was pretty happy about thinking up the 01 idea independently. No quotes are needed around 01 because it scans as a numeric literal (numbers and strings are the same type in Pip).

Julia, 40 bytes
n->filter(i->count_ones(i$i>>1)>2,1:2^n)

This uses a somewhat different approach to the other Julia solution - rather than doing a string search for "01" in the bit string, it uses some mathematics to determine whether the number satisfies the condition.
i$i>>1 will have ones only in the places where the digit changes from zero to one, or one to zero. As such, there must be at least three ones for i to switch back and forth between zero and one enough times. count_ones finds the number of ones, and then filter removes the ones that don't have enough ones.

C, 84 81 bytes
long i,j,k;main(){for(scanf("%ld",&j);++i<1L<<j;k&k+1&&printf("%ld ",i))k=i|i-1;}

This is based on the comments I made on another C answer to this question about the possibility of using simple bitwise operators.  It works by switching all trailing 0 bits to 1 in the statement i|(i-1).  Then it switches all trailing 1 bits to 0 using k&(k+1).  This will result in a zero if there is only one run of ones and non-zero otherwise. I do make the assumption that long is 64-bit but could correct this at the expense of three bytes by using int64_t instead.
Ungolfed
long i,j,k;
main()
{
    for(scanf("%ld",&j);++i<1L<<j;)
    {
        k=i|(i-1);
        if((k&(k+1)) == 0)
            printf("%d ",i);
    }
}

int64_t is only defined if you #include<stdint.h>. ensuring 64 bit operation requires long long type at a cost of 5 bytes.

Note that you invoke undefined behaviour passing long i for %d format. Note also that () are superfluous for the & and | operators.  Fixing this saves 3 bytes!  long i,j,k;main(){for(scanf("%ld",&j);++i<1L<<j;k&k+1&&printf("%ld ",i))k=i|i-1;}

@chqrlie All very good points.  Thank you.

Python 2.7, 89 bytes
print[i for i in range(1,2**input())if[n[:1]for n in bin(i)[2:].split("0")].count("1")-1]

I think this could be golfed a bit.

@mbomb007 I tried that, it didn't work.

@mbomb007 Are you using Python 2.7?

Does it matter which version of 2.7? I run it on repl.it (2.7.2) and it doesn't work, but Ideone (2.7.10) does. It might just be a bug in repl.it though, not necessarily a version difference.

Your program incorrectly prints 0 in the output.

Also print[i for i in range(2**input())if[n[:1]for n in bin(i)[2:].split("0")].count("1")-1] is two bytes shorter. But with the fix for 0 would be the same length (89), if you use range(1,2**input()).

Pyth, 20 17 16 bytes
f:.BT"10+1"ZU^2Q

Live demo.

You can simply match "01". Except for 0, the binary repr. will always start with a 1.

TI-BASIC, 34 32 30 bytes
For a TI-83+/84+ series calculator.
For(X,5,e^(Ans
If log(sum(2=int(4fPart(X/2^randIntNoRep(1,Ans
Disp X
End

For a number to contain two runs of 1s, it must contain two 10s when we tack a trailing zero onto the binary representation.
Rather than generate the binary representation and check for a 10, we test pairs of bits mathematically by using remainder by 4 (int(4fPart(), which will give 2 where there is a 10. Because we don't care about order, randIntNoRep( is the shortest way to generate the list of exponents.
We use log( to check for the number of runs:

If there are at least 2 runs, then the log( is positive, and the number is displayed.
If there is one run, then the log( is 0, and the number is not displayed.
If there are no runs (which first happens at X=2^Ans), then log( throws an ERR:DOMAIN, stopping the output at exactly the right point.

We use e^(Ans as the ending argument of the For( loop—it's always greater than 2^Ans, but e^( is a single token, so it's one byte shorter.
Input/output for N=4:
4:prgmRUNSONES
               5
               9
              10
              11
              13

Then the calculator throws an error; the error screen looks like this:
ERR:DOMAIN
1:Quit
2:Goto

When 1 is pressed, the home screen is displayed again:
4:prgmRUNSONES
               5
               9
              10
              11
              13
           Error

TI calculators store all numbers in a BCD float with 14 digits of precision, not an int or binary float. Therefore, divisions by powers of two greater than 2^14 may not be exact. While I have verified that the trickiest numbers, 3*2^30-1 and 2^32-1, are handled correctly, I have not ruled out the possibility of rounding errors. I would however be surprised if there were errors for any input.

How do you count 32 bytes? It looks like 70 to me (including the newlines).

TI-BASIC is tokenized; it uses a proprietary character encoding in which all of these commands are one byte each and the others are two. It is the community consensus to score by this encoding-- see http://meta.codegolf.stackexchange.com/a/4764/39328 for details.

Oh, cool. Thanks FYI.

this doesnt beat flawr's answer but i couldnt resist the charm of the question

matlab(90)(70)
j=input('');for l=2:j-1,a=1;for k=l:-1:2,a=a+2^k;a:a+2^(k-1)-2,end,end

execution
4
ans =
5

ans =
9    10    11

ans =
13

principle

The series of numbers are a result of consequent strip of 1's, which does mean f(n,l)=2^l+2^(l+1)+....2^n

Any number taken from the interval ]f(n,l),f(n,l)+2^(l-1)[ where l>1 verifies this condition, so the outcome is a result of the negation of this series in terms of n.
x=1
x=x+1=01,
x=x+2^0=11,
x=x+1=001,
x=x+2^1=011,
x=x+2^0=111,
x=x+1=0001,
x=x+2^2=0011,
x=x+2^1=0111,
x=x+2^0=0111,
x=x+1=1111 ...
x+1, x=x+2^n, x=x+2^(n-1)...x=x+2^0
My program prints the range between each two lines (if exists)

Edit: unfortunately that doesnt make it golfed more but i wanted to add another approach of proceding this idea

after a period of struggle i succeded to find a mathematical representation for this series which is:
2^l(0+1+2^1+...2^k) with l+k < n
=2^l(2^k-1)
score=90
@(n)setdiff(0:2^n-1,arrayfun(@(x)2^mod(x,(n+1)-fix(x/(n+1)))*(2^fix(x/(n+1))-1),0:(n+1)^2))

C, 103 102 bytes
long i,x;main(int a,char**b){for(;++i<1L<<atoi(b[1]);)for(x=i;x>4&&(x%4!=1||!printf("%ld,",i));x/=2);}

Expanding (actually contracting) on G.Sliepen entry, taking advantage of xnor remark on the 01 pattern in the binary representation, but using only standard functions and some bit twiddling.
Ungolfed version:
long i, x;
main(int a, char**b) {
    for (; ++i < 1L << atoi(b[1]);) {
        for (x = i; x > 4 && (x % 4 != 1 || !printf("%ld,", i)); x /= 2)
            ;
    }
}

The inner loop scans i for the binary pattern 01 by iteratively shifting x to the right as long as it has 3 bits left. printf returns the number of characters printed, hence never 0, so the inner loop test fails after the printf, avoiding the need for a break statement.
C++, 129 128 bytes
Adapting the same idea, the C++ variant is here:
#include<iostream>
long i,x;int main(int a,char**b){for(;++i<1L<<atoi(b[1]);)for(x=i;x>4&&(x%4!=1||!(std::cout<<i<<','));x/=2);}

Technically, I should make i a long long to ensure 64 bit operation and compute upto 2^32 for an extra 5 bytes, but modern platforms have 64 bit ints.

JavaScript ES6, 60 bytes
Code
n=>[...Array(1<<n).keys()].filter(g=x=>x>4?x%4==1|g(x>>1):0)

Try it online!
Explanation
[...Array(1<<n).keys()]                                          Create an array of numbers from 0 to 2^n-1
                       .filter(                                  Find the numbers which meet criteria
                               g=x=>x>4?                  :0     If x is less than or equal to four return zero (false/invalid)
                                        x>4?x%4==1|              If the binary pattern ends with 01 return one (true/valid)
                                                   g(x>>1)       Otherwise bitshift right by one and try again

C 99
Thanks to @ceilingcat for making it much shorter
x,c;main(n,v){for(n--;c<1<<n;c++)for(v=0;v<32&&!(c&1<<v&&x&&x<v&&printf("%d ",c));)x=c&1<<v++?v:x;}

Try it online!

PowerShell, 80 bytes
while([Math]::Pow(2,$args[0])-gt$n++){$n|?{[Convert]::ToString($n,2)-match"01"}}

Python, 44 Bytes
Okay, this could probably be shorter but it's my first codegolf:
x=1
while True:
    if '01' in bin(x):
        print(x)
    x+=1

Think this answers the question, please don't down vote if it doesn't, just post whats wrong with it below.

You need to take input (input() is ideal) to get n, and then only count up to 2^n-1, rather than looping indefinitely. Also, you can use 1 and 2 spaces for the nesting, rather than 4 and 8, and using map or a list comprehension would probably shorten your code tremendously.

another different matlab answer of good score.
matlab 60(57)
@(n)find(mod(log2(bitcmp(1:2^n,fix(log2(1:2^n)+1))+1),1))

execution
>> @(n)find(mod(log2(bitcmp(1:2^n,fix(log2(1:2^n)+1))+1),1))

ans =
@(n)find(mod(log2(bitcmp(1:2^n,fix(log2(1:2^n)+1))+1),1))

>> ans(5)
ans =
 5     9    10    11    13    17    18    19    20    21    22    23    25    26    27    29

The idea is picking up numbers x where the binary representation of -(x)+1 doesnt contain only one occurence of 1

example:
0000111 is rejected because ~x=1111,~x+1=00001 contains one digit=1
0100111 is accepted because ~x=1011,~x+1=0111 contains many 1's

k4, 32 28 bytes
{&1<+/'1='-':'0b\:'o:!*/x#2}

explanation
                      */x#2   /x^2
                   o:!        /assign o to [0,x^2 -1), e.g. for x=2, o<-0 1 2 3
              0b\:'           /get binary value of each array elem
          -':'                /get delta of adjacent digits in each binary num
    +/'1='                    /sum each array to find how many deltas=1
 &1<                          /return elems where there were greater than 1 deltas=1

Jelly, 10 bytes
2*’BŒgṫɗƇ3

Try it online!
Translated from Dennis' Pyth solution.
        Ƈ     Filter the range from 1 to
2*’           2^input - 1
   B   ɗ      for elements the binary representations of which,
    Œg        when split into runs,
      ṫ  3    are nonempty with their first 2 elements removed.

Thunno 2, 7 bytes
OLæḃkdƇ

Try it online!
Explanation
OLæḃkdƇ  # Implicit input
OLæ      # Filter range(2**input) by:
   ḃkdƇ  #  Binary contains "01"?
         # Implicit output

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Print all 3 by 3 sturdy squares
A sturdy square (akin to a magic square) is an arrangement of the integers 1 to \$N^2\$ on an \$N\$ by \$N\$ grid such that every 2 by 2 subgrid has the same sum.
For example, for \$N = 3\$ one sturdy square is
1 5 3
9 8 7
4 2 6

because the four 2 by 2 subgrids
1 5
9 8
5 3
8 7
9 8
4 2
8 7
2 6
all sum to the same amount, 23:
$$23 = 1 + 5 + 9 + 8 = 5 + 3 + 8 + 7 = 9 + 8 + 4 + 2 = 8 + 7 + 2 + 6$$
Now there are sturdy squares for higher values of N and even rectangular versions but your only task in this challenge is to output all possible 3 by 3 sturdy squares. There are exactly 376 distinct 3 by 3 sturdy squares, including those that are reflections or rotations of others, and not all of them have the same sum of 23.
Write a program or function that takes no input but prints or returns a string of all 376 sturdy squares in any order, separated by empty lines, with up to two optional trailing newlines. Each square should consist of three lines of three space separated nonzero decimal digits.
Here is a valid output example:
1 5 3
9 8 7
4 2 6

1 5 6
8 7 3
4 2 9

1 5 6
8 9 3
2 4 7

1 5 7
9 6 3
2 4 8

1 6 2
8 9 7
4 3 5

1 6 2
9 7 8
4 3 5

1 6 3
9 8 7
2 5 4

1 6 7
8 5 2
3 4 9

1 6 7
9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 2 6

9 1 7
3 8 5
4 6 2

9 1 8
2 7 3
6 4 5

9 1 8
4 2 5
7 3 6

9 1 8
4 6 5
3 7 2

9 1 8
5 4 6
3 7 2

9 2 4
3 7 8
6 5 1

9 2 6
1 7 4
8 3 5

9 2 6
4 1 7
8 3 5

9 2 6
5 3 8
4 7 1

9 2 7
1 8 3
6 5 4

9 2 7
4 5 6
3 8 1

9 2 8
5 1 6
4 7 3

9 3 4
1 8 6
7 5 2

9 3 6
1 8 4
5 7 2

9 3 6
2 7 5
4 8 1

9 3 8
1 4 2
7 5 6

9 3 8
1 6 2
5 7 4

9 4 3
1 6 7
8 5 2

9 4 3
2 5 8
7 6 1

9 4 7
1 2 3
8 5 6

9 4 8
1 3 2
6 7 5

9 4 8
2 1 3
6 7 5

9 5 3
1 4 7
8 6 2

9 5 4
2 1 7
8 6 3

9 5 4
2 3 7
6 8 1

9 5 7
1 2 3
6 8 4
Your program must produce these same 376 sturdy squares, just not necessarily in this order. The output does not need to be deterministic, i.e. you could output them in different orders on different runs as long as they are all there.
The shortest code in bytes wins.
The topic of sturdy squares originated with this chat message of mine which led to a large amount of discussion on their properties and how to generate them. Props to Peter Taylor, feersum, and Sp3000 for continuing the discussion, and especially to El'endia Starman for drafting a corresponding OEIS sequence.

I'm not sure if I interpreted the trailing newline rule correctly. The output of my previous revision ended with 5 7 3\n\n, so there is one blank line after the last square. Is that admissible?

Yayyy I get extra props! :P

Maybe host the output somewhere else so that it is not too long on this page.

Pyth, 38 34 33 32 bytes
Vfq2l{sMX2.DR2.:T5b.pS9Vc3NjdH)k

5 bytes saved in formatting by Jakube
1 byte saved by switching to Peter Taylor's substrings of length five, remove the middles approach
Takes about a minute and a half to run on my machine.
How it works at the high level:

Generate all permutations (.pS9)
Form length 5 substrings (.:T5)
Remove the center element of each (.DR2)
Append a newline to the center element, marking it with a necessarily different sum (X2 ... b)
Filter for the squares where all such sums are equal (fq2l{)
Format and print (V ... Vc3NjdH)k)

Chop N inside the loop (V...Vc3N) instead of before the loop (VcL3...VN). Saves one additional byte.

Python 3, 169 168 164 bytes
Took the program I used to investigate these sturdy squares/rectangles and golfed it wayyyy down. Golfed off 4 bytes thanks to otakucode.
from itertools import*
r=range(1,10)
for p in permutations(r,6):
 x,y=p[0],p[5];q=p[:5]+(x+p[3]-p[2],y,y+p[1]-x,p[2]+y-x)
 if set(q)==set(r):print('%s %s %s\n'*3%q)

Explanation
Given a partially-filled sturdy square like this,
a b c
d e ?
g ? ?

The remaining three entries are uniquely determined, and are a+d-c, a+b-g, and c+g-a. So I generate all permutations of 0..8 with six elements, calculate the rest, and then check to see whether the set of this is the same as the set of 0..8. If it is, I print out the grid.

For reference, here's the original (with comments and extraneous code removed):
from itertools import permutations as P

n = 3
m = 3
permutes = P(range(m*n), m+n)

counter = 0
for p in permutes:
    grid = [p[:n]]
    for i in range(m-1):
        grid.append([p[n+i]]+[-1]*(n-1))
    grid[1][1] = p[-1]

    s = p[0]+p[1]+p[n]+p[-1]

    has = list(p)

    fail = 0
    for y in range(1,m):
        for x in range(1,n):
            if x == y == 1: continue

            r = s-(grid[y-1][x-1] + grid[y-1][x] + grid[y][x-1])

            if r not in has and 0 <= r < m*n:
                grid[y][x] = r
                has.append(r)
            else:
                fail = 1
                break

        if fail: break

    if not fail:
        counter += 1

print(counter)

love this technique

Very nice approach!  You can still save a few bytes though... in the loop, x,y=p[0],p[5]  then q=p+(y+p[3]-p[2],y+p[1]-x,p[2]+x-y)

@otakucode: Thanks for the tip!

CJam, 40 38 bytes
A,1>e!3f/{2{2few:::+z}*:|,1=},Ma*Sf*N*

Thanks to @PeterTaylor for golfing off 2 bytes!
This finishes instantly using the Java interpreter. It works using the online interpreter as well, but it requires a little patience. Try it online.
Test run
$ cjam sturdy-squares.cjam | head -n 8
1 5 3
9 8 7
4 2 6

1 5 6
8 7 3
4 2 9

$ cjam sturdy-squares.cjam | tail -n 8

9 5 4
2 3 7
6 8 1

9 5 7
1 2 3
6 8 4
$

How it works
A,1>     e# Push [1 ... 9].
e!       e# Push the array of all permutations of that array.
3f/      e# Split each into rows of length 3.
{        e# Filter; push the permutation, then:
  2{     e#   Do the following twice:
    2few e#     Split each row into overlapping splices of length 2.
         e#       [a b c] -> [[a b] [b c]]
    :::+ e#     Reduce each innermost vector to its sum.
         e#       [[a b] [b c]] -> [a+b b+c]
    z    e#     Transpose rows with columns.
  }*     e#   The result is [[s t] [u v]], the sums of all 2x2 squares.
  :|     e#   Perform set union of the pairs of sums.
  ,1=    e#   Check if the length of the result is 1 (unique sum).
},       e# Keep the array if the result was 1.
{        e# For each kept array:
  Sf*    e#   Join the elements of its rows, separating by spaces.
  ~M     e#   Dump the resulting strings and an empty string on the stack.
}%       e# Collect everything in an array.
N*       e# Join the strings, separating by linefeeds.

+1 And I was happy with the brevity of my answer!

Now that I've managed to golf my answer enough to stay one char ahead: Ma*Sf*N* saves two over {Sf*~M}%N*

@PeterTaylor It does indeed. Thanks!

Python 3.5, 135 bytes
from itertools import*
for x in permutations(range(1,10)):eval((("=="+"+x[%s]"*3)*4)[2:]%(*"013125367578",))and print("%d %d %d\n"*3%x)

Directly checks the sum of each square, minus the middle. Most likely still golfable by the "itertools is unnecessary" rule-of-thumb.

Mathematica 147 166 155 149 bytes
This generates the permutations of {1,2,3...9} and selects cases for which
(sum of digits at positions {1,2,4,5}) =
(sum of digits at positions {2,3,5,6}) =
(sum of the digits at positions {4,5,7,8}) =
(sum of the digits at positions {5,6,8,9})
f@s_:=Length@Tally[Tr@Extract[s,#]&/@Table[{{0},{1},{3},{4}}+k,{k,{1,2,4,5}}]]>1;
Row[Grid/@(#~Partition~3&/@Select[Permutations@Range@9,f@#&]),"\n"]

Output (a partial look)

Length[%]

376

CJam (39 37 bytes)
A,1>e!{5ew{2Mtz}2*::+)-!},3f/Ma*Sf*N*

Online demo (warning: may take over a minute to run, triggering "Abort this script?" prompts from the browser).
Works by filtering all possible grids using 5ew to map
[a b c d e f g h i]

to
[[a b c d e]
 [b c d e f]
 [c d e f g]
 [d e f g h]
 [e f g h i]]

and then discarding the middle element and the middle element of each other element to get
[[a b d e]
 [b c e f]
 [d e g h]
 [e f h i]]

which are the four squares.

Wow, that's brilliant.

Python2 327 271 270 263 260 bytes
z,v,s={},3,range(1,10)
while len(z)<376:
 for i in range(8):v=hash(`v`);s[i],s[v%9]=s[v%9],s[i]
 m=map(lambda i:sum(s[i:i+5])-s[i+2],[0,1,3,4]);T=tuple(s)
 if all(x==m[0] for x in m) and not T in z:
  z[T]=1;print '%i %i %i\n'*3 % tuple(s[0:3]+s[3:6]+s[6:9])

------------
This is... not so short but it uses no libraries. This randomly permutes a square, checks it for magicness, prints it, and records it to prevent duplicates. After it has printed 376 unique magic squares, it stops.
I borrowed the Pseudo Random Number Generator from Keith Randall's entry for the golf named " Build a random number generator that passes the Diehard tests "
z,v={},3
def R(x,y):global v;v=hash(`v`);return v
while len(z)<376:
 s=sorted(range(1,10),cmp=R)
 m=[sum(q) for q in map(lambda p:s[p[0]:p[1]+1]+s[p[2]:p[3]+1], [[i,i+1,i+3,i+4] for i in [0,1,3,4]] )]
 if all(x==m[0] for x in m) and not tuple(s) in z.keys():
  z[tuple(s)]=1;print '%i %i %i\n'*3 % tuple(s[0:3]+s[3:6]+s[6:9])

De-golfed
# each magic square is an array of 9 numbers
#
#for example [1 9 3 7 2 5 6 4 8]
#
#represents the following square
#
#1 9 3
#7 2 5
#6 4 8
#
# to generate a random square with each number represented only once,
# start with [1 2 3 4 5 6 7 8 9] and sort, but use a random comparison
# function so the sorting process becomes instead a random permutation.
#
# to check each 2x2 subsquare for sums, look at the indexes into the
# array: [[0,1,3,4] = upper left,[1,2,4,5] = upper right, etc.
#
# to keep track of already-printed magic squares, use a dictionary
# (associative array) where the 9-element array data is the key.

from random import *
def magic(s):
 quads=[]
 for a,b,c,d in [[0,1,3,4],[1,2,4,5],[3,4,6,7],[4,5,7,8]]:
  quads+=[s[a:b+1]+s[c:d+1]]
 summ=[sum(q) for q in quads]
 same= all(x==summ[0] for x in summ)
 #print quads
 #print 'sum',summ
 #print 'same',same
 return same

magicsquares={}
while len(magicsquares.keys())<376:
        sq = sorted(range(1,10),key=lambda x:random())
        if magic(sq) and not magicsquares.has_key(tuple(sq)):
                magicsquares[tuple(sq)]=1
                print sq[0:3],'\n',sq[3:6],'\n',sq[6:9],'\n'

Nothing random needs to be happening. There are exactly 376 distinct square solutions and you need to output each of them exactly once.

i did print exactly 376 distinct square solutions, and i output each of them exactly once. randomness is not banned in the description, nor is it banned in the 'standard loopholes' http://meta.codegolf.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default

Alright, fair enough.

You can use a worse random number generator as long as it gives you all of the squares you need.

Ruby 133
a=[]
[*1..9].permutation{|x|[0,1,3,4].map{|i|x[i]+x[i+1]+x[i+3]+x[i+4]}.uniq.size<2&&a<<x.each_slice(3).map{|s|s*' '}*'
'}
$><<a*'

'

Straightforward brute force approach. Test it here.

J, 83 bytes
([:;@,(<LF),.~[:(<@(LF,~":)"1@#~([:*/2=/\[:,2 2+/@,;._3])"2)(3 3)($"1)1+!A.&i.])@9:

This is a function that outputs a string containing the 376 sturdy squares. Uses brute-force, generates all permutations of 1 thru 9, shape each into a 3x3 array, and filters it by checking if the sums of each 2x2 subarray are equal. Completes in half a second.
Usage
   f =: ([:;@,(<LF),.~[:(<@(LF,~":)"1@#~([:*/2=/\[:,2 2+/@,;._3])"2)(3 3)($"1)1+!A.&i.])@9:
   $ f ''  NB. A function has to take something to be invoked,
           NB. but in this case it is not used by the function
   37 {. f ''  NB. Take the first 37 characters
1 5 3
9 8 7
4 2 6

1 5 6
8 7 3
4 2 9

   _38 {. f ''  NB. Take the last 38 characters
9 5 4
2 3 7
6 8 1

9 5 7
1 2 3
6 8 4

   NB. The output string ends with two newlines

APL (Dyalog Extended), 38 bytes
s⌿⍨1=≢∘∪⍤1⍪+/,⍤⊢⌺1 2 2⊢s←3 3⍴⍤1⌂pmat 9

Try it online!
Uses the builtin dfns.pmat to generate required permutations.
Will add an explanation soon.
Made with golfing help from Adám, who also ran the program on his machine for checking. ↓

Explanation
s⌿⍨1=≢∘∪⍤1⍪+/,⍤⊢⌺1 2 2⊢s←3 3⍴⍤1⌂pmat 9
                             1⌂pmat 9 matrix of permutations of 1..9
                      s←3 3⍴⍤         convert each to 3x3 matrix, and store in s
              ⊢⌺1 2 2⊢                get all overlapping 2x2 squares in each of those
        1⍪+/,⍤                        sum the flattened 2x2's of each
  1=≢∘∪⍤                              is there only 1 unique sum?
                                      this creates a bitmask for filtering each 3x3
s⌿⍨                                   filter s by that

Jelly, 22 bytes
9Œ!s€3+Ɲ€Z$⁺FEƲƇG€j⁾¶¶

Try it online!
Very inefficient. Times out on TIO, and takes around 4m30s on my local computer. Uses Dennis' method for finding the sums of the 2x2 submatrices. The last 6 bytes could be removed if the output format was more permissive. Outputs in the same order as in the question.
How it works
9Œ!s€3+Ɲ€Z$⁺FEƲƇG€j⁾¶¶ - Main link. No arguments
9Œ!                    - Yield all permutations of [1, 2, 3, 4, 5, 6, 7, 8, 9]
   s€3                 - Split each into a 3x3 matrix
              ƲƇ       - Keep those for which the following is true:
       Ɲ€              -   Over each neighbouring pair in each row:
      +                -     Take the sum
         Z             -    Transpose
          $⁺           -    Do this again
            F          -    Flatten
             E         -    Are all elements equal?
                G€     - Join each row by spaces and then join rows by newlines
                  j⁾¶¶ - Join the final matrices with two newlines

Japt, 34 bytes
+9 bytes for the output formatting :\
9õ á mò3 kÈ®ä+ÃÕ®ä+Ãrâ ÊÉÃ®m¸·ÃqR²

Try it

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Dames, do some math!
The order of operations, PEMDAS, is a basic rule in mathematics telling us which order operations should be performed:
"Parentheses, Exponents, Multiplication and Division, and Addition and Subtraction"
The problem is, PEMDAS is not very versatile! What if you wanted to do it in another order? We won't mess with the parentheses, so we keep them where they are (first).
Create a program that takes two arguments:

A string, telling which order the operations should follow. Some examples are "DAMES", "SAD, ME", "ME SAD", "MEADS". Yes, spaces and commas are OK, as it makes the order easier to remember.

Following suggestions in chat: Supporting spaces and commas is now optional.
If one of the letters is missing, or if there are additional letters that shouldn't be there, you can consider the input invalid and treat it however you like.

A string, or an expression containing the expression that should be evaluated.

Return the result of the expression as either a decimal number, or an integer. If the answer is not an integer, it has to be returned as a decimal number.
Rules:

It's OK to combine the two input arguments into one, if that's easier in your language.
It doesn't have to be a string, but it has to have letters. You can't substitute Addition with 1, Division with 2, etc.
You can choose which input is first.
The expression is evaluated right to left left to right. (Change of rule. Any submissions poster the first 12 hours that have this the other way around are accepted).
The operations use the symbols: ( ) ^ * / + -. For instance, you can't use ¤ instead of + for addition.
Spaces in the input expression is not valid as input
Unary +/- is not valid as input if it directly follows + or -. Consider 3+-2 as invalid input. It can be treated however you like (doesn't have to produce an error). If + or - follows any other operator than plus or minus, it's treated the usual way: 3*-3 = -9, sin(-2)=-0.909
The program must strictly follow the letters, so "EMDAS", 1-3+4 => -6, and "EMDSA", 1-3+4 => 2.

Examples:
Input:   "EMDAS", "3+6*2/4-1"   // -> 3+12/4-1 -> 3+3-1 -> 6-1 -> 5
Output:  5

Input:   "DAMES", "3+6*2/4-1"   // -> 3+6*0.5-1 -> 9*0.5-1 -> 4.5-1 -> 3.5
Output:  3.5

Input:   "SAD, ME", "3+6*2/4-1"  // -> 3+6*2/3 -> 9*2/3 -> 9*0.66667 -> 6
Output:  6

Input:   "ME ADS", "3+5^4/2-3*2 // -> 3+5^4/2-6 -> 3+625/2-6 -> 628/2-6 -> 314-6 -> 308
Output:  308

Input:   "AM EDS", "4*3-sin(0.5^2)*3+1" // -> 4*3-sin(0.5^2)*4 -> 12-sin(0.5^2)*4 -> 4*3-(4*sin(0.5^2)) -> 12-(4*sin(0.5^2)) -> 12-(4*sin(0.25)) -> 12-(4*0.24740) -> 12-0.98961 -> 11.01038
Output:  11.01038

Input:   "DAMES", "4-5-6"   // -> (4-5)-6 -> = -7
Output:  -7                  // NOT: -> 4-(5-6) -> 4-(-1) -> 5

Note, the parentheses where added to show that the multiplication 4*sin(0.5^2) is evaluated before the exponentiation.
This is code golf, so the shortest code in bytes win.

It's not exactly the same at all but this challenge is about changing to another order of operations and was the inspiration that made me like the idea of doing something similar. I think the Haskell answer could be re-worked to answer this question perhaps... Not sure if a strict duplicate, I quite like the idea of doing this challenge without the native ability to change the operators directly!

Bonus for functions removed, but there is still sin() in the examples.

Somewhat more evil than the aforementioned challenge, and I'm not going to contest it as duplicate (though a link to the original would have been appreciated). However, it is plain for everyone to see the evil director of The 2560 is none other than @Stewie Griffin. I have to say, I'm not surprised.

In the UK we are often taught it as BODMAS or BIDMAS at school. B = Brackets, O or I = Order or Indices.

Is p needed? It isn't in the examples

@ev3commander. It sais in the start that the parentheses are always first.

What's the precedence of unary signing?

JavaScript (ES6) 349 353 387 400
... maybe still golfable
This old parser of mine sometimes comes in handy - (already used in other 2 challenges)

E=
(d,x,W=[],Q=['_'],h={'(':1,_:8,')':7},z=1,C=n=>{for(;h[q=Q.pop()]<=h[n];W.push(q=='^'?Math.pow(a,b):eval(`a${q}b`)))a=W.pop(b=W.pop());Q.push(q,n)})=>([...d].map(l=>h[l='+-/*^'['ASDME'.search(l)]]=(d+=!!l),d=1),(x+')').replace(/\D|\d+/g,t=>(u=~~h[t])-1?u-7?u?z&&t=='-'?z=-z:C(t,z=1):(W.push(z*t),z=0):Q.pop(Q.pop(C(t),z=0)):z=!!Q.push('_')),W.pop())

// TEST
console.log=(...x)=>O.innerHTML+=x.join` `+'\n'

console.log(E('MDASE','3+4*5^2'))
console.log(E("EMDAS", "3+6*2/4-1")) // 5
console.log(E("DAMES", "3+6*2/4-1")) //3.5
console.log(E("SAD, ME", "3+6*2/4-1")) // 6
console.log(E("ME ADS", "3+5^4/2-3*2")) // 308
console.log(E("AM EDS", "4*3-sin(0.5^2)*3+1")) // 11.01038 sin not supported
console.log(E("DAMES", "4-5-6")) // -7

// MORE READABLE
U=(d,x,W=[],Q=['_'],h={'(':1,_:8,')':7},z=1,
  C=n=>{
    for(;h[q=Q.pop()]<=h[n];
        W.push(q=='^'?Math.pow(a,b):eval(`a${q}b`)))
      a=W.pop(b=W.pop());
    Q.push(q,n)
  }
)=>(
  [...d].map(l=>h[l='+-/*^'['ASDME'.search(l)]]=(d+=!!l),d=1),
  (x+')').replace(/\D|\d+/g,t=>
     (u=~~h[t])-1
       ?u-7
         ?u
           ?z&&t=='-'?z=-z:C(t,z=1)
           :(W.push(z*t),z=0)
         :Q.pop(Q.pop(C(t),z=0))
       :(Q.push('_'),z=1)
  ),
  W.pop()
)

Ungolfed

Evaluate=(oprec,expr)=>
{
  var tokens = expr.match(/\D|\d+/g).concat(')')
  var t,a,b,v, SignV
  var vstack=[]
  var ostack=['_']
  var op={ '(':8, _: 1, ')':2}
  oprec.match(/\w/g).map((l,p)=>op['+-/*^'['ASDME'.search(l)]]=7-p)
  var OPush=o=>ostack.push(o)
  var OPop=_=>ostack.pop()
  var VPush=v=>vstack.push(v)
  var VPop=v=>vstack.pop()

  var Scan=i=>
  {
    SignV = 1
    for (; t=tokens[i++]; )
    {
      if (t == '(')
      {
        OPush('_')
        SignV = 1
      }
      else if (t == ')')
      {
        CalcOp(t);
        OPop();
        OPop();
        SignV = 0
      }
      else if (op[t])
      {
        if (SignV && t=='-')
          SignV = -SignV
        else
          CalcOp(t), SignV = 1
      }
      else
      {
        VPush(SignV*t)
        SignV=0
      }
    }
  }
  var CalcOp=nop=>
  {
    for (; op[po = OPop()] >= op[nop];)
      b=VPop(), a=VPop(), CalcV(a,b,po);
    OPush(po), OPush(nop);
  }
  var CalcV=(a,b,o)=>
  {
//    console.log('CV',a,b,o)
    if (o=='+')
      a+=b
    if (o=='-')
      a-=b
    if (o=='*')
      a*=b
    if (o=='/')
      a/=b
    if (o=='^')
      a=Math.pow(a,b)
    VPush(a)
  }
  Scan(0)

  return VPop()
}

console.log=(...x)=>O.innerHTML+=x.join` `+'\n'

console.log(Evaluate('MDASE','3+4*5^2'))
console.log(Evaluate('EMDAS','3+6*2/4-1')) // 5
console.log(Evaluate("DAMES", "3+6*2/4-1")) //3.5
console.log(Evaluate("SAD, ME", "3+6*2/4-1")) // 6
console.log(Evaluate("ME ADS", "3+5^4/2-3*2")) // 308
console.log(Evaluate("AM EDS", "4*3-sin(0.5^2)*3+1")) // 11.01038 sin not supported
console.log(Evaluate("DAMES", "4-5-6")) // -7

I think you can remove the space in (t=>t=='('?(z=1, Q.push('_')), along with all the newlines.

@CᴏɴᴏʀO'Bʀɪᴇɴ working on it. Thanks

I think you can change the Math.pow(a,b) to a**b

@KritixiLithos yes but it would not be ES6 anymore

R 3.3.2: 209 196 187 177 bytes
The idea is to "misuse" the non-arithmetic operators <, &, |, ~, ? where we know the precedence (see ?Syntax in R - but before the override ;)) and overriding them with the given arithmetic operators. The mapping is according to the desired order of operations.
Spaces and commas in the input are not supported.
Golfed version
f=function(a,b){s=substr;l=list(E='^',M='*',D='/',A='+',S='-');q="<&|~?";for(i in 1:5){x=s(q,i,i);y=l[[s(a,i,i)]];assign(x,.Primitive(y));b=gsub(y,x,b,,,T)};eval(parse(text=b))}

Ungolfed and commented:
f = function(a,b) {
  s = substr
  # All arithmetic operators
  l = list(E = '^', M = '*', D = '/', A = '+', S = '-')
  # Some non-arithmetic R operators in descending precedence
  q = "<&|~?"
  for (i in 1:5) {
    # The substituted symbol
    x = s(q, i, i)
    # The original operator which has to be substituted
    y = l[[s(a, i, i)]]
    # Substitute the operator for the R interpreter
    assign(x, .Primitive(y))
    # Substitute the operator in the input string
    b = gsub(y, x, b, , , T)
  }
  # Parse and evaluate
  eval(parse(text = b))
}

Examples:
> f("EMDAS", "3+6*2/4-1")
[1] 5
> f("DAMES", "3+6*2/4-1")
[1] 3.5
> f("SADME", "3+6*2/4-1")
[1] 6
> f("MEADS", "3+5^4/2-3*2")
[1] 308
> f("AMEDS", "4*3-sin(0.5^2)*3+1")
[1] 11.01038
> f("DAMES", "4-5-6")
[1] -7


text:
Imperfections dans mon français
To conjugate a verb in l'imparfait, one needs to perform the following steps:

Find the "stem" of the word; this is achieved by omitting the -ons from the nous-conjugated form of the word. For example, vivre is nous vivons; removing -ons from vivons yields viv-.
Take the stem and add an appropriate ending, according to the subject. Here are the endings:
je         -ais
tu         -ais
il/elle    -ait

nous       -ions
vous       -iez
ils/elles  -aient

Objective Given a verb and a subject, output the imperfect form of that verb with respect to the subject. The input format can be in any format convenient to your language. Your submission can either be a program, snippet, or function. (Note that the verb does not have to be a real verb.)
You can assume that the verb is a regular verb, i.e, items like avoir would be treated as an -ir verb, not an irregular one. The only verb you have to quantify as irregular is être; it is conjugated as such:
j'étais
tu étais
il/elle était

nous étions
vous étiez
ils/elles étaient

Here are the conjugations for -er, -re, and -ir verbs in the nous forms
-ER => (e)ons           ; e is added after a 'g'
-RE => ons
-IR => issons

Anything that does not end with such does not have to be handled.
(Note that je merges with the next vowel, if there is one. E.g., je acheter -> j'achetais. h will be considered a vowel for our purposes.)
Example IOs
input: tu vivre
output: tu vivais

input: elles nager
output: elles nageaient

input: je morter
output: je mortais     ; incorrect in real life, but correct for our purposes

input: vous finir
output: vous finissiez

input: il croire
output: il croiait

input: nous jouer
output: nous jouions

Bonuses

-5N bytes for all N extra irregular verb handled.
-10% if you also output every conjugation of the verb in the imperfect tense.

This is a code-golf, so the shortest program in bytes wins.

@CᴏɴᴏʀO'Bʀɪᴇɴ Does je habiter become j' habite or j'habite?

@KritixiLithos Either is fine.

@CᴏɴᴏʀO'Bʀɪᴇɴ For the -10% bonus, does the input still need to have the pronoun, or can it just be the verb?

Morter doesn't exist, I assume you are referring to to die which is mourir, which would yield je mourais which is actually correct.

@Fatalize I was referring to morter. It's technically incorrect because its not a word.

Incidentally, il croiait is incorrect as well (should be il croyait).

@Arnauld the challenge doesn't handle irregulars

Processing, 342-10%(bonus) = 307.8
I have created a function. To call the function, include the pronoun as the first parameter and the verb as the second. For example, a("je","habiter")
Please note that my program conjugates the verb for all the pronouns, so that is how I got the 10% bonus.
void a(String a,String b){String[]e={"ais","ais","ait","ait","ions","iez","aient","aient"},p={"je","tu","il","elle","nous","vous","ils","elles"};if("aehiou".contains(b.charAt(0)+""))p[0]="j'";for(String i:p)println(i+" "+b.substring(0,b.length()-2)+(b.endsWith("ger")?"e":b.endsWith("ir")?"iss":"")+e[java.util.Arrays.asList(p).indexOf(i)]);}

Readable form:
void a(String a,String b){
  String[]e={"ais","ais","ait","ait","ions","iez","aient","aient"},p={"je","tu","il","elle","nous","vous","ils","elles"};
  if("aehiou".contains(b.charAt(0)+""))p[0]="j'";
  for(String i:p)
    println(i+" "+b.substring(0,b.length()-2)+(b.endsWith("ger")?"e":b.endsWith("ir")?"iss":"")+e[java.util.Arrays.asList(p).indexOf(i)]);
}

Output (for a("je", "habiter"))
j' habitais
tu habitais
il habitait
elle habitait
nous habitions
vous habitiez
ils habitaient
elles habitaient

Congratulations!

Yes! Yes! Yes! My first victory in code-golf! Yes! Yes! [clears throat] @CᴏɴᴏʀO'Bʀɪᴇɴ Thank you.

Not all verbs with a leading h will elide the pronoun. Only those with a silent h. Counter examples are haïr (je hais) (irregular anyway), hacher, haleter, halter, hérisser and many more.
You also miss the verbs ending in -cer, where the "nous form" becomes -çons.

Haskell, 366 362 352 bytes
s#v=m++g++d++t
 where
 m|v=="être"="ét"|i/="rio"&&i/="erd"&&i/="eri"=r 2 v|otherwise=r 3 v
 g=if(last m=='g'&&head t/='i')then"e"else""
 d|init i=="ri"="iss"|i=="eri"="y"|otherwise=""
 t|s=="je"||s=="tu"="ais"|elem s["il","elle","on"]="ait"|s=="nous"="ions"|s=="vous"="iez"|s=="ils"||s=="elles"="aient"
 r i=reverse.drop i.reverse
 i=take 3$reverse v

You can compile this in ghci and use it like so "je"#"choisir" to get "choisissais".
This code works with some irregular verbs. It can conjugate croire (je croyais, tu croyais…) or prendre as well as all its derivatives (apprendre, comprendre, etc.).
I couldn't find a short way to conjugate other verbs ending in -ire (such as lire, rire, dire, etc.) or in -dre (such as craindre, soudre, etc.).

Shouldn't it be 352 bytes because of the ê and é?

Java, 389 385 383 382 352.7 443-10%(bonus) = 398.7 bytes
Byte count reduced thanks to @PeterTaylor and @Fatalize

Please note that my program conjugates the verb for all the pronouns, so that is how I got the 10% bonus.

class A{public static void main(String[]a){String[]e={"ais","ais","ait","ait","ions","iez","aient","aient"},p={"je","tu","il","elle","nous","vous","ils","elles"},w=new java.util.Scanner(System.in).nextLine().split(" ");if("aehiou".contains(w[1].charAt(0)+""))p[0]="j'";for(String i:p)System.out.println(i+" "+w[1].substring(0,w[1].length()-2)+(w[1].endsWith("ger")?"e":w[1].endsWith("ir")?"iss":"")+e[java.util.Arrays.asList(p).indexOf(i)]);}}

Readable form (still quite messy):
 1| class A{
 2|   public static void main(String[]a){
 3|     String[]e={"ais","ais","ait","ait","ions","iez","aient","aient"};
 4|     String[]p={"je","tu","il","elle","nous","vous","ils","elles"};
 5|     String[]w=new java.util.Scanner(System.in).nextLine().split(" ");
 6|     if("aehiou".contains(w[1].charAt(0)+""))p[0]="j'";
 7|     for(String i: p) {
 8|       System.out.print(i+" "+w[1].substring(0,w[1].length()-2)+(w[1].endsWith("ger")?"e":w[1].endsWith("ir")?"iss":"")+e[java.util.Arrays.asList(p).indexOf(i)]);
 9|     }
10|   }
11| }

Explanation:

Lines 3-4: Initialisation of arrays.
Line    5: Read a line as input and split it into words
Line    6: Shorten the `je` to `j'` in presence of a succeeding vowel or a `h`.
Line    7: Create a for-loop iterating through all of the pronouns .
Line    8: Conjugate the verb(remove the ending from the infinite form of the verb and add ending accordingly) and print the result, along with the pronoun.

(Old Version) 393-10% = 352.7 bytes
Please note also that my old program does not obey with the new rule about the je merging into j'.
class A{public static void main(String[]a){String[]e={"ais","ais","ait","ait","ions","iez","aient","aient"},p={"je","tu","il","elle","nous","vous","ils","elles"},w=new java.util.Scanner(System.in).nextLine().split(" ");for(String i:p)System.out.println(i+" "+w[1].substring(0,w[1].length()-2)+(w[1].endsWith("ger")?"e":w[1].endsWith("ir")?"iss":"")+e[java.util.Arrays.asList(p).indexOf(i)]);}}

Why do you have both k and l?

@PeterTaylor Gee, thanks for spotting that one!

You have a useless space here: w[1].substring(0, w[1].length()-2)

@Fatalize I have removed the useless space in my latest edit.

Python 3, 258-10% = 232.2 223-10% = 200.7
Huge thanks to @WW for saving me 35 bytes!

def t(x,y):
 z=y[-2:];y=y[:-2];y+='e'*(y[-1]=='g');y+='iss'*(z=='ir')
 return[('j'+"e'"[y[0]in'aeiouh']+' tu il elle nous vous ils elles').split()[i]+' '+y+'ais ais ait ait ions iez aient aient'.split()[i]for i in range(8)]

Try it online!

You can use a split to compress your lists a little more.  Also using ; can help you to avoid some of the indentation.

You also don't need parens around your conditionals in the ifs.

Lastly you can use boolean multiplication to get around two of the ifs altogether.  Try it online!

Your submission seems to put a space after j', which doesn't seem to match the spec.

@WW Thanks! and in the comments of the main post the OP says "j' " with a space is fine

In that case here's a shorter version


text:
Implement an API for probability distributions
Introduction
In this challenge, your task is to implement a collection of simple functions that together form a usable mini-library for simple probability distributions.
To accommodate some of the more esoteric languages people like to use here, the following implementations are acceptable:

A code snippet defining a collection of named functions (or closest equivalents).
A collection of expressions that evaluate to named or anonymous functions (or closest equivalents).
A single expression that evaluates to several named or anonymous functions (or closest equivalents).
A collection of independent programs that take inputs from command line, STDIN or closest equivalent, and output to STDOUT or closest equivalent.

The functions
You shall implement the following functions, using shorter names if desired.

uniform takes as input two floating point numbers a and b, and returns the uniform distribution on [a,b]. You can assume that a < b; the case a ≥ b is undefined.
blend takes as inputs three probability distributions P, Q and R. It returns a probability distribution S, which draws values x, y and z from P, Q and R, respectively, and yields y if x ≥ 0, and z if x < 0.
over takes as input a floating point number f and a probability distribution P, and returns the probability that x ≥ f holds for a random number x drawn from P.

For reference, over can be defined as follows (in pseudocode):
over(f, uniform(a, b)):
    if f <= a: return 1.0
    else if f >= b: return 0.0
    else: return (b - f)/(b - a)

over(f, blend(P, Q, R)):
    p = over(0.0, P)
    return p*over(f, Q) + (1-p)*over(f, R)

You can assume that all probability distributions given to over are constructed using uniform and blend, and that the only thing a user is going to do with a probability distribution is to feed it to blend or over.
You can use any convenient datatype to represent the distributions: lists of numbers, strings, custom objects, etc.
The only important thing is that the API works correctly.
Also, your implementation must be deterministic, in the sense of always returning the same output for the same inputs.
Test cases
Your output values should be correct to at least two digits after the decimal point on these test cases.
over(4.356, uniform(-4.873, 2.441)) -> 0.0
over(2.226, uniform(-1.922, 2.664)) -> 0.09550806803314438
over(-4.353, uniform(-7.929, -0.823)) -> 0.49676329862088375
over(-2.491, uniform(-0.340, 6.453)) -> 1.0
over(0.738, blend(uniform(-5.233, 3.384), uniform(2.767, 8.329), uniform(-2.769, 6.497))) -> 0.7701533851999125
over(-3.577, blend(uniform(-3.159, 0.070), blend(blend(uniform(-4.996, 4.851), uniform(-7.516, 1.455), uniform(-0.931, 7.292)), blend(uniform(-5.437, -0.738), uniform(-8.272, -2.316), uniform(-3.225, 1.201)), uniform(3.097, 6.792)), uniform(-8.215, 0.817))) -> 0.4976245638164541
over(3.243, blend(blend(uniform(-4.909, 2.003), uniform(-4.158, 4.622), blend(uniform(0.572, 5.874), uniform(-0.573, 4.716), blend(uniform(-5.279, 3.702), uniform(-6.564, 1.373), uniform(-6.585, 2.802)))), uniform(-3.148, 2.015), blend(uniform(-6.235, -5.629), uniform(-4.647, -1.056), uniform(-0.384, 2.050)))) -> 0.0
over(-3.020, blend(blend(uniform(-0.080, 6.148), blend(uniform(1.691, 6.439), uniform(-7.086, 2.158), uniform(3.423, 6.773)), uniform(-1.780, 2.381)), blend(uniform(-1.754, 1.943), uniform(-0.046, 6.327), blend(uniform(-6.667, 2.543), uniform(0.656, 7.903), blend(uniform(-8.673, 3.639), uniform(-7.606, 1.435), uniform(-5.138, -2.409)))), uniform(-8.008, -0.317))) -> 0.4487803553043079

Can we use built-in functions to make them?

@AndréMuta I forgot that Mathematica probably has built-ins for all of this... but I'm going to allow them, as long as they follow the rules.

What is your suggestion on how to represent floating point data in BrainFuck?

@flawr For languages that don't have native floating point numbers, you can use any convenient encoding for floats between -10.0 and 10.0 (exclusive) that has at most 0.001 difference between consecutive values. The output should be accurate to within 0.01 difference for the test cases.

CJam, 58 bytes
{[\]}:U;
{[@]}:B;
{_,2={~1$-@@-\/0e>1e<}{6Yb@f*\.{O})[_1@-].*:+}?}:O;

These are postfix operators that work on the stack: 2.0 1.0 3.0 U O is over(2, uniform(1, 3)).
Score count
{[\]} is the function itself, :U; assigns it to the name U and pops it. Essentially this isn't part of the function, so by score counting rule 2, I'd only have to count {[\]}. B is defined similarly.
However, O is recursive, and if I don't specify a name, there's no way to recurse. So here, I'd be inclined to count the :O; part. Then my score is 5+5+48=58 bytes in total.
Explanation
U pops two arguments and makes a pair in reverse order: a b  =>  [b a].
B pops three arguments and makes a triple in rotated order: a b c  =>  [b c a].
O's structure is as follows:
{             }:O;   Define O as this function:
 _,2=        ?       If the argument list's length is 2:
     {~Γ}            Append the list to the stack and execute subprogram Γ.
         {~Δ}        Else, do the same, but execute subprogram Δ.

Subprogram Γ handles uniform distributions:
Executed ops      Explanation   Stack contents
============      ===========   ==============
                  Initial       f; b; a
1$                Copy b        f; b; a; b
  -               Difference    f; b; (a-b)
   @@             Rotate x2     (a-b); f, b
     -            Difference    (a-b); (f-b)
      \/          Flip divide   (f-b)/(a-b)
        0e>       Clamp low     max(0, (f-b)/(a-b))
           1e<    Clamp high    min(1, max(0, (f-b)/(a-b)))

Subprogram Δ handles blended distributions:
Executed ops              Explanation    Stack contents
============              ===========    ==============
                          Initial        f; [Q R P]
6Yb                       Push [1,1,0]   f; [Q R P]; [1 1 0]
   @                      Rotate         [Q R P]; [1 1 0]; f
    f*                    Multiply each  [Q R P]; [f f 0]
      \                   Swap           [f f 0]; [Q R P]
       .{O}               Pairwise O     [q r p]
           )              Uncons         [q r] p
            [_1@-]        [p, 1-p]       [q r] [p 1-p]
                  .*:+    Dot product    q*p+r*(1-p)

Ruby, 103
u=b=->*a{a}
o=->f,d{d[2]?(p=o[0,d[0]])*o[f,d[1]]+(1-p)*o[f,d[2]]:(f<a=d[0])?1:(f>b=d[1])?0:(b-f)/(b-a)}

Defines three lambdas, u, b, and o. u and b just create two-element and three-element arrays respectively. o assumes a two-element array is a uniform distribution and a three-element one is a blend of three distributions. In the latter case it calls itself recursively.

MATLAB, 73
Time for a little "functional programming" in MATLAB. These are 3 anonymous functions. Uniform and blend are called the same way as the examples, but for over the arguments should be swapped. I don't really need an over since the first two return functions, but as a formality feval is a function that can call a function.
%uniform
@(a,b)@(x)(x<b)*min(1,(b-x)/(b-a))
%blend
@(P,Q,R)@(x)P(0)*(Q(x)-R(x))+R(x)
%over
@feval

Now MATLAB's parsing and evaluation system is a little wonky to say the least. It doesn't allow you to directly call a function that was returned from a function. Instead, one must first save the result to a variable. The 4th example could be done as follows:
x=uniform(-5.233,3.384);y=uniform(2.767,8.329);z=uniform(-2.769,6.497);over(blend(x,y,z),0.738)

However, it is possible to get around this by using feval to call all the functions. If the following definitions are used, then the examples can be evaluated exactly as they are written.
uniform=@(a,b)@(x)(x<b)*min(1,(b-x)/(b-a))
blend=@(P,Q,R)@(x)feval(P,0)*(feval(Q,x)-feval(R,x))+feval(R,x)
over=@(x,f)feval(f,x)

Functions making functions... how perverse!

Mathematica, 129 116 bytes
u=UniformDistribution@{##}&;b=If[x<0,z,y]~TransformedDistribution~{x\uF3D2#,y\uF3D2#2,z\uF3D2#3}&;o=Probability[x>=#,x\uF3D2#2]&

u, b and o are uniform, blend, and over respectively.Wrapper over the standard functions. Replace the \uF3D2s with the 3-byte character. Just returns 0 and 1 for cases 1, 4, and 7.

Python, 146 bytes
u=lambda*a:a
b=u
x=lambda f,a,b:[int(f<=a),(b-f)/(b-a)][a<f<b]
y=lambda f,p,q,r:o(0,p)*o(f,q)+(1-o(0,p))*o(f,r)
o=lambda f,p:[x,y][len(p)-2](f,*p)

Same strategy as histocrat's Ruby answer, but in Python. To do recursion without a Z-combinator (which would be costly), x and y are defined as helper functions that evaluate over for 2- and 3-length argument tuples (uniform and blend arguments, respectively).
Test cases on ideone

Matlab, 104 bytes
I hope this is still valid, as this only works for distributions with support in [-10,10] which is the requirement for languages that have no floating point support. The support vector and the accuracy can be easily adjusted by just altering corresponding numbers. u,o,b is for uniform,blend,over. The pdf is just represented as a discrete vector. I think this approach can easily be transferred to other languages.
D=1e-4;X=-10:D:10;
u=@(a,b)(1/(b-a))*(a<X&X<b);
o=@(x,d)sum(d.*(X>x))*D;
b=@(p,q,r)o(0,p).*q+(1-o(0,p)).*r;

You can test them if you define those functions first and then just paste this code:
[o(4.356, u(-4.873, 2.441)) , 0.0;
o(2.226, u(-1.922, 2.664)) , 0.09550806803314438;
o(-4.353, u(-7.929, -0.823)) , 0.49676329862088375;
o(-2.491, u(-0.340, 6.453)) , 1.0;
o(0.738, b(u(-5.233, 3.384), u(2.767, 8.329), u(-2.769, 6.497))) , 0.7701533851999125;
o(-3.577, b(u(-3.159, 0.070), b(b(u(-4.996, 4.851), u(-7.516, 1.455), u(-0.931, 7.292)), b(u(-5.437, -0.738), u(-8.272, -2.316), u(-3.225, 1.201)), u(3.097, 6.792)), u(-8.215, 0.817))) , 0.4976245638164541;
o(3.243, b(b(u(-4.909, 2.003), u(-4.158, 4.622), b(u(0.572, 5.874), u(-0.573, 4.716), b(u(-5.279, 3.702), u(-6.564, 1.373), u(-6.585, 2.802)))), u(-3.148, 2.015), b(u(-6.235, -5.629), u(-4.647, -1.056), u(-0.384, 2.050)))) , 0.0;
o(-3.020, b(b(u(-0.080, 6.148), b(u(1.691, 6.439), u(-7.086, 2.158), u(3.423, 6.773)), u(-1.780, 2.381)), b(u(-1.754, 1.943), u(-0.046, 6.327), b(u(-6.667, 2.543), u(0.656, 7.903), b(u(-8.673, 3.639), u(-7.606, 1.435), u(-5.138, -2.409)))), u(-8.008, -0.317))) , 0.4487803553043079]

Matlab has FP support, so I think that this would be invalid.

I'm hesitant to allow this, since Matlab supports floating point numbers natively. If you can replace X and D with MIN_FLOAT and MAX_FLOAT (or whatever Matlab calls them), then this is a valid approach.

Yes, you could ouse realmax/realmin, you could even make a vector that goes throu all floating point number if you have enough memory.