Skip navigation
Help

Snippet

warning: Creating default object from empty value in /var/www/vhosts/sayforward.com/subdomains/recorder/httpdocs/modules/taxonomy/taxonomy.pages.inc on line 33.
Original author: 
Stack Exchange

Stack Exchange

This Q&A is part of a weekly series of posts highlighting common questions encountered by technophiles and answered by users at Stack Exchange, a free, community-powered network of 100+ Q&A sites.

Stack Exchange user and C# developer George Powell tries hard to follow the DRY principle. But as any good dev knows, it's not always possible, or even optimal, to stay original. Powell writes:

Often I write small methods (maybe 10 to 15 lines of code) that need to be reused across two projects that can't reference each other. The method might be something to do with networking / strings / MVVM etc. and is a generally useful method not specific to the project it originally sits in.

So how should you track shared snippets across projects so you know where your canonical code resides and know where it's in production when a bug needs to be fixed?

Read 15 remaining paragraphs | Comments

0
Your rating: None


Chrome Mobile: The Mobile Web Developers Toolkit (Part 1)

Building for mobile web requires a different mindset than desktop web development, and a different set of tools. The tools we're used to using often aren't available or would take up too much screen real estate. And going back to the dark ages of tweak/save/deploy/test/repeat isn't exactly optimal, so what can we do? Thankfully there are a number of great options - from remote debugging to emulation, mobile browsers are offering more and more tools to make our lives easier. We'll take a look at a couple of tools that you can use today to make cross platform mobile web development easier and then peer into the crystal ball to see what tools may bring in the future. Join us for Part 1 - as we take a look at a few boiler plates, frameworks and helpful libraries for building the mobile web.
From:
GoogleDevelopers
Views:
1562

69
ratings
Time:
36:53
More in
Science & Technology

0
Your rating: None

Gallery of themes for Code Prettify

Simple and lightweight syntax highlighting of source code snippets using Google Code Prettify JavaScript library for Drupal.

You don't need to add additional markup to source code and neither to specify the language of source code snippets since prettify will guess. Code prettify module for Drupal is compatible with WYSIWYG editors and includes several themes to customize the colors and styles of source code snippets.

Google Code Prettify JavaScript library supports all C-like (Java, PHP, C#, etc), Bash-like, and XML-like languages without need to specify the language and has customizable styles via CSS. Widely used with good cross-browser support. For more information, visit their project page on code.google.com.

Installation

  • Download the latest Google Code Prettify JavaScript library from: http://code.google.com/p/google-code-prettify/
  • Extract the content and place the js files and css inside of the following directory: sites/all/libraries/prettify
  • Enable module as usual.

Please consult README.txt for more information.

Usage

Out of the box, Code prettify module for Drupal comes configured to automatically perform syntax highlighting of source code snippets in <pre> or <code> tags on your Drupal pages. Automatic syntax highlighting mode is pretty simple, but powerful at the same time. Several settings can be configured at: Administration >> Configuration >> User interface >> Code prettify

In addition, code prettify module also provides a filter to allow users can post code verbatim. Prettify filter can be enabled and configured at: Administration >> Configuration >> Content authoring >> Text formats

Live demo coming soon.

0
Your rating: None