code_junkie

What is the most unusual-yet-effective technique you have discovered or used?

Nov 13th, 2011
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. // find the propositions in which A and B disagree
  2. int temp = (A0 & B1) | (A1 & B0);
  3. // if they disagree
  4. if (temp != 0){
  5. // make a new clause by combining them
  6. // and removing the proposition where they disagree
  7. int R0 = (A0 | B0) & !temp;
  8. int R1 = (A1 | B1) & !temp;
  9. // do something with the result R
  10. }
  11.  
  12. Foo &foo;
  13.  
  14. private string Test(int arg) {
  15. try {
  16. //extensive setup
  17.  
  18. if (arg > 5) return "too big";
  19. return "normal";
  20. } finally {
  21. // extensive clean up
  22. }
  23. }
Add Comment
Please, Sign In to add comment