User Tools

Site Tools


study_questions_lucky_dip_creation

This is an old revision of the document!


Study Questions - Lucy Dip Creation

1. Copy the source of the questions and paste into Notepad++.

2. Remove the tag bit at the bottom.

3. In regular expression mode, replace

^====+.+====$

with nothing.

4. In extended mode, replace

/* --== Answer Question separator ==-- */

with

<html>\n      </td>\n    </tr>\n    <tr>\n      <td width="50%">\n</html>\n

5. In extended mode, replace

/* --== Question Answer separator ==-- */

with

\n<html>\n      </td>\n      <td width="50%">\n</html>

6. Replace the first html element with

<html>
  <table border="1" width="100%">
    <tr>
      <td width="50%">
</html>

7. Add this to end

<html>
      </td>
    </tr>
</html>

8. Select all and copy to the clipboard.

9. Goto http://tallguyracing.com/wiki/doku.php?id=playground:playground and edit.

10. Paste from the clipboard and save it.

11. Select it (including the RSS XML Feed etc buttons).

12. Open a new document in OpenOffice and paste the contents into it.

13. Delete all the crap at the top.

14. Load styles → Wiki Export 2, Text + Pages + Overwrite.

15. Right click table → Table… → Text Flow tab → Untick Allow row to break…

16. For each page,

16.1. Put the cursor in the last row of the page.

16.2. Click the Insert Row button lots.

16.3. Copy and paste the all the cells on the first page to the second. Note that this will overwrite the cells, so if there are not some blanks leftover, undo and go back to 17.2.

16.4. Delete the blank cells.

17. Modify the paragraph style 'Table Contents'. Change the Font color to black.

18. Highlight the left columns of odd pages and the right columns of the even pages (outside ones if two pages are displayed at once), change the background colour to black.

19. Select everything and paste into the master StudyQuestions file.

Questions To Be Lucky Dipped

Lesson 2: Debugging and Tracing

C10L2Q1: How can you programmatically signal a break to the debugger?

Answer: Call the Debugger.Log.

C10L2Q2: How do you prevent a member from appearing in the variable watch window while debugging?

Answer: Add a DebuggerBrowsable attribute to the member and pass in DebuggerBrowserState.Never.

C10L2Q3: How do you specify what text will appear in the Value column of the variable watch window for a custom class while debugging?

Answer: Add a DebuggerDisplay attribute to the member.

C10L2Q3: What does the DebuggerDisplay attribute do?

Answer: Specifies what should be displayed in the Value column of the variable watch window while debugging.

C10L2Q4: What does the DebuggerHidden attribute do?

Answer: It prevents the debugger from breaking inside a class, method or property, even if there is a breakpoint.

C10L2Q5: How do you prevent the debugger from breaking inside a class, method or property, even if there is a breakpoint?

Answer: Add a DebuggerHidden attribute to the class, method or property.

C10L2Q6: How do you cause the debugger to automatically step over a section of code?

Answer: Add a DebuggerStepThrough attribute to the code.

C10L2Q7: What does the DebuggerStepThrough attribute do and how is it different to the DebuggerHidden attribute?

Answer: The DebuggerStepThrough attribute causes the debugger to step over the code it decorates, but does not hide the code like the DebuggerHidden attribute does.

Pragmatic Programming

PragC2Q4: What is a technique for avoiding or reducing imposed duplication?

Answer: Code generation.

study_questions_lucky_dip_creation.1249690531.txt.gz · Last modified: 2017/01/01 19:54 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki