Jack @ ASP.NET

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries for the ‘Others’ Category

Tips for working with template inheritance in Django

  1. If you use {% extends %} in a template, it must be the first template tag in that template. Template inheritance won’t work, otherwise.
  2. More {% block %} tags in your base templates are better. Remember, child templates don’t have to define all parent blocks, so you can fill in reasonable defaults in a number of blocks, then only define the ones you need later. It’s better to have more hooks than fewer hooks.
  3. If you find yourself duplicating content in a number of templates, it probably means you should move that content to a {% block %} in a parent template.
  4. If you need to get the content of the block from the parent template, the {{ block.super }} variable will do the trick. This is useful if you want to add to the contents of a parent block instead of completely overriding it. Data inserted using {{ block.super }} will not be automatically escaped (see the next section), since
    it was already escaped, if necessary, in the parent template.
  5. For extra readability, you can optionally give a name to your {% endblock %} tag. For example:
    {% block content %}

    {% endblock content %}
    In larger templates, this technique helps you see which {% block %} tags are being closed.

Google Web Toolkit (GWT) Overview

Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications. Its goal is to enable productive development of high-performance web applications without the developer having to be an expert in browser quirks, XMLHttpRequest, and JavaScript. GWT is used by many products at Google, including Google Wave and the new version of AdWords. It’s open source, completely free, and used by thousands of developers around the world.

The GWT SDK provides a set of core Java APIs and Widgets. These allow you to write AJAX applications in Java and then compile the source to highly optimized JavaScript that runs across all browsers, including mobile browsers for Android and the iPhone.

Constructing AJAX applications in this manner is more productive thanks to a higher level of abstraction on top of common concepts like DOM manipulation and XHR communication.

You aren’t limited to pre-canned widgets either. Anything you can do with the browser’s DOM and JavaScript can be done in GWT, including interacting with hand-written JavaScript.

Pipeline in PowerShell

PowerShell uses a pipeline for all command entries, which feeds the results of the preceding command directly into the subsequent command. The pipeline is active even when you enter only a single command because PowerShell always automatically adds the Out-Default cmdlet at the pipeline’s end so that it always results in a two-member instruction chain.

Single command results are passed as objects. The cmdlets can filter, sort, compare, measure, expand, and restrict pipeline elements. All cmdlets accomplish this on the basis
of object properties. In the process, the pipeline distinguishes between sequential and streaming modes. In streaming mode, command results are each collected, and then passed in mass onto the next command. Which mode you use depends solely on the pipeline commands used. Output cmdlets dispose of output. If you specify none, PowerShell automatically uses Out-Host to output the results in the console. However, you could just as well send results to a file or printer.

All output cmdlets convert objects into readable text while formatting cmdlets are responsible for conversion. Normally, formatting cmdlets convert only the most important, but if requested, all objects into text. The Extended Type System (ETS) helps convert objects into text. The ETS uses internal records that specify the best way of converting a particular object type into text. If an object type isn’t in an ETS internal record, the ETS resorts to a heuristic method, which is guided by, among other things, how many properties are contained in the unknown object.

In addition to traditional output cmdlets, export cmdlets store objects either as comma-separated lists that can be opened in Excel or serialized in an XML format. Serialized objects can be comfortably converted back into objects at a later time. Because when exporting, in contrast to outputting, only plain object properties, without cosmetic formatting, are stored so that no formatting cmdlets are used.

Solid State Design Considerations

In this size range single-phase units, in contrast, a large three-phase units, relatively simple (4 PC board), easy to service English speaking technical personnel to give the scene. Solid-state design is not suitable for carrying large equipment components (silicon, transistors, IGBT, high capacity dimmers, welders, etc.), feed distortion back unless you take the line on it, or have taken isolated and filters the distortion. Rotary unit can be used to handle these goods (and, in fact, often used to isolate the same from others such as plant load) – be sure to specify the load, and our application engineers to discuss rotating or solid state frequency converter unit properties.

Three-phase units (5KVA and above) using our solid-state IGBT’s design should be considered as options in these applications, including:

Any person less than 25% of the load motor is at full capacity.
50% or more of the cost difference is acceptable (as opposed to rotating design) to achieve quieter operation and rotation of the three options, special circumstances can not be achieved. Instead, a rotating design unit should always be cheaper (more than 12KVA), particularly so if the motor and start the surge in (click rotation here)
An ability to speak English, use an oscilloscope or a unit with electrical and technical personnel can easily return to any repair facility (in other words, it is in the United States or nearby), and of course need to (or, if the case of non-warranty repairs You are willing to pay the travel, expenses, parts and labor of our staff visited the site.)
SCR, thyristor, and similar equipment, feed distortion into the supply line (our units in this case) do not constitute more than 20% back to the load or the input filter or isolation built-in.

For small motors and sub-scores involving motor, starter motor design capacity of the limited application of solid-state surge is usually needed on the determinants of the size of kVA. For comparison, we rotate the smallest unit of a single phase 6KVA will start and run a 2.5hp, design of the motor and generator oversizing F code can be designed to handle up to a 27kw pump: 4HP engine “across the line cycle.” We offer to start the motor up to 1500hp 2000KVA rotating units.

Formula Drift chooses Brakohiapa for Inaugural Abu Dhabi Invitational

San Francisco, California: Tony Brakohiapa Formula One driver to Formula Drift Drift was busy in Abu Dhabi, United Arab Emirates (UAE), the first Formula One event in Aspen stadium ready terminals. Brakohiapa honored to join Donald Foster, Chris Forsberg, Formula Drift and selected by the organization for the February 25 meeting of the International Activities of the other drivers.

The new Aspen terminal circuit characteristic equation, motorcycles, Abu Dhabi, Australia, trailer tires and wheels, etc. Super V8 is the world’s fastest growing tourist destination, the event should attract one of the world-class people.

“Clearly, Abu Dhabi has a professional rafting race management, which is committed to providing world-class racing venue concerns. I look forward to becoming a F1 drift as a member of the team, saying:” Brakohiapa. Brakohiapa by sharing in the Facebook and Twitter (@ brakohiapa) fans in real time to update their first visit to the UAE.

Brakohiapa, 2009 Formula Drift private, is fully prepared, after had a very busy 2010 schedule. Highlights include Las Vegas in Las Vegas completed the first 4 Formula D, Ken Block runs in the first professional Gymkhana activities to on-line TV shows SGNL special guest to review Sony’s new GT Electronics Turismo 5 video game.

Brakohiapa would like to thank all the support of his sponsors. Specifically, Mark Skorka activities in preparation for the special wild horse and Cooper Tire Brakohiapa Sinergy racing tires, Upland, Ca. Other sponsors include Glazier Iron Works, Sam’s town car, barn style performances, ToiBoy production, Exedy, Eibach, Enkei, Seibon, go pro, Sparco and Realperformancemustangs.com

Lossless compression algorithms

Lossless compression algorithms usually take advantage of this way of statistics redundant to represent no error in the sender’s data more concisely. Lossless compression is possible, because most real-world data has statistical redundancy. For example, in the English text, the letter ‘e’ is much more common than the letter ‘Z’, and the probability that the letter ‘q’ will be the letter ‘Z’ is very small along. Another kind of compression is called lossy data compression or perceptual coding is possible, if some loss is acceptable fidelity. In general, lossy data compression will follow the study of how people look at the data. For example, the brightness the human eye is more sensitive to subtle changes in color than it is to change. JPEG image compression works by “rounding” of the lower part of some important information. Like a howden compressor? Lossy data compression provides a certain amount of compression to get the best fidelity. In some cases, transparent (easily detectable) compression is ideal, in other cases, the expense of fidelity to reduce the amount of data as much as possible.

Lossless compression schemes are reversible so that the original data can be rebuilt, and accept the damage plan to achieve higher compression some data loss.

However, lossless data compression algorithm will never be able to compress some files, in fact, any compression algorithm must not be compressed any data, including no clear pattern. Trying to compress already compressed so often leads to an extension of the data, will also try to compress all but the most trivial encryption of data.

In practice, lossy data compression will be compressed to a point where it can no longer work, although very lossy algorithms, such as deleting a file is always the last byte will always point to the compressed file is empty .