background preloader

Web Development

Facebook Twitter

Trending JavaScript repositories on GitHub today. Raphaël—JavaScript Library. Processing.js. Hammer.js - A javascript library for multi-touch gestures. D3.js - Data-Driven Documents. 14 Best WYSIWYG HTML Editors | Bashooka | Web & Graphic Design. In this post I suggest you to try 14 best free WYSIWYG editors that transform simple textarea HTML elements into powerful and useful rich text editors. This tiny jQuery Bootstrap WYSIWYG plugin turns any DIV into a HTML5 rich text editor. Sir Trevor is rich content editing entirely re-imagined for the web: an intuitive editor for web content which does not presuppose anything about how it will be rendered. MediumEditor has been written using vanilla JavaScript, no additional frameworks required.

All the tools are already available, all you need to do it tie them together with some really simple JavaScript, and it works! Save the web developers from my own affordable WYSIWYG editor difficulties textAngular is a super cool WYSIWYG Text Editor directive for AngularJS. Redactor is the most fantastic yet beautiful and easy-to-use WYSIWYG editor on jQuery. Mercury is a full featured HTML5 editor. TinyMCE has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.

CodeMirror. Egg.js - A Simple Way to Add Easter Eggs to Your Site. Egg.js is a simple JS library that has no prerequisites and allows you to easily add web easter eggs by watching the user's key strokes. Type the Konami code (up, up, down, down, left, right, left, right, b, a) to test it out. Example It's really easy to use. Just include the egg.js file on the page... ...then use the addCode() function to add in your easter eggs. You don't need to know the special Javascript key codes, as you can use plain English to define your egg (but you can use key codes if you want to).

You can also add a hook, as shown above using addHook(), that will run after any egg code is triggered. Even more simply, you can just add an easter egg via the constructor: var egg = new Egg("up,up,down,down,left,right,left,right,b,a", function() { jQuery('#egggif').fadeIn(500, function() { window.setTimeout(function() { jQuery('#egggif').hide(); }, 5000); }); }).listen(); Why? Credits Created by Mike Flynn (@thatmikeflynn) and Rob McVey (@negative_sleep) Tinygraphs. Scala.js. AngularJS — Superheroic JavaScript MVW Framework. Animated SVG Icons: Using Snap.svg to animate SVG icons. Sidebar Transitions. Appealing | Mobile UI Animations.

Call to Idea - Librairie design. SVG Drawing Animation. A little experiment that explores the usage of SVG line drawing animations to precede the appearance of graphics or website elements, simulating the loading of them. View demo Download source SVG is finally becoming a more utilized and fun website component. It’s really powerful and there are many creative possibilities for fun effects on a website using SVG.

Today we’d like to share two experimental concepts with you that make use of stroke animations, made popular by the animations on the PlayStation 4 and Xbox One review sites. This technique was introduced and explained by Jake Archibald in his article Animated line drawing in SVG and also explored by Brian Suda in his article Animating Vectors with SVG for 24Ways. For our experiments we are using his code to animate the strokes of the paths. So, what concepts did we explore? The beautiful illustrations of the devices are by Pixeden and you can find the PSD files here: We hope you like the effects and find them inspiring!

WebTest. JWebUnit - JWebUnit. New WebSpec API. WebSpec is Watij’s new cross browser and cross platform api for testing web applications. It works with IE, Mozilla, and Safari on their respective platforms for Windows, Linux, and Mac. You can write your scripts using Java or Ruby (via JRuby). The following documentation includes examples of using both. Installation WebSpec can be used with your favorite Java or JRuby IDE like IntelliJ IDEA, Eclipse, Netbeans, Redcar, etc…all you need to do is add the jars located in the lib folder to your classpath. Next you can either copy over the WebSpec src and compile it with your project, or you can just add webspec.jar located in the java/src/dist folder to your classpath. If you are using JRuby you also have to require ‘web_spec’ in your ruby file.

Note: If you are running on a Mac you must add -d32 to your Java VM parameters. Opening a URL Method chaining is a big part of WebSpec’s api and almost every method call will return a WebSpec framework class. Java Ruby WebSpec class: Tag class: Dialogs. Your first Load Test | Getting Started with loadUI. Try the full experience of Pro: The first view that you will see when you open LoadUI is the Workspace View. This is where you manage your projects. Create a new Project by dragging the New Project icon to the project list. Now, in the Create New Project dialog, enter a name for the new project, and click Create. This will create and open a new project. Expand the Runners category in the component toolbar by clicking the grey arrow next to it. Then add a Web Page Runner component by dragging the Web Page Runner icon to the project canvas.

Enter the URL of a web page which you wish to target for the test. Click Run Once to make sure that LoadUI can access the URL. Add a Fixed Rate VU Generator to generate some load; do this by dragging the Fixed Rate icon to the canvas, just as you did before with the Web Page Runner. Connect the two components by dragging the bottom connector of the Fixed Rate Generator to the top connector of the Web Page Runner component. jQuery API Documentation. Knockout : Home.

AJAX Service with JSON and XML Sample. This sample shows how to switch the response type of an operation between JSON and XML. This functionality is available regardless of whether the service is configured to be accessed by ASP.NET AJAX or by an HTML/JavaScript client page. The following section in Web.config can be used to make additional configuration changes to the endpoint.

It can be removed if no extra changes are needed. [OperationContract] [WebInvoke(ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Wrapped)] MathResult DoMathXml(double n1, double n2); The other operation uses the WebInvokeAttribute attribute and explicitly specifies JSON instead of XML for the response. [OperationContract] [WebInvoke(ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped)] MathResult DoMathJson(double n1, double n2); Note that in both cases the operations return a complex type, MathResult, which is a standard WCF data contract type. How to use the ObjectDataSource as a DataSource, simple example - Tips and tricks from a Developer Support perspective. I thought I’d give an example on how to use the ObjectDataSource in a webpage. A typical example could be listing states etc. This is fairly static data so it may be unnecessary to query a database for each request. However, in this example we’ll use the Authors and their Books as an example.

This example will use and ObjectDataSource as a DataSource. The object will be returned by projecting Authors and Books into a new class via a LINQ query. I use LINQ to Objects here but a database connection could be used as well. So, let’s get down to it. - Create a new WebSite, using Location: Filesystem works fine. - Right click the added App_Code folder, Add New Item -> Class, name it BookShop.cs and replace the code with this. using System; using System.Collections.Generic; using System.Linq; using System.Web; public class BookShop List<Author> Authors = new List<Author>(); List<Book> Books = new List<Book>(); public BookShop() CreateBooksAndAuthors(); public List<Author> GetAuthors() return Authors;

Simple Insert, Select, Edit, Update and Delete in Asp.Net GridView control - Database manipulations with DataTable in GridView. Step 3: Make Code-behind File ‘Default.aspx.cs’ Now we are going to do the code-behind part of this page. Les us explain you event by event coding on each methods. In the code-behind page, create an instance for the Customer class as follows Then create a private method 'FillCustomerInGrid' to retrieve the existing customer list from the database and bind it to the GridView. The CustomersCls class’s Fetch() method is used and it returns the data to a DataTable. On first stage it will return empty rows. So you cannot see any header, data or even footer rows of the GridView control. Initialize GridView control In the page load event, we have to call this FillCustomerInGrid method as follows, Fill DropDownList in GridView with dynamic values In column[4] - Type, there are two DropDownList controls, one in the EditItemTemplate section (cmbType) and another in FooterTemplate (cmbNewType).

Previously in this article, we have set the DataKeyNames values as Code, Type. Xiaojue/lithe. Cujojs/curl. Huge Collection of Code Snippets: HTAccess, PHP, WordPress, jQuery, HTML, CSS. Please excuse this self-serving, miscellaneous post, but I’ve just got to purge all of these code snippets and scraps collected over the years. Whenever I update this site, I place any removed/unused code snippets into a giant note file for future reference, just in case. There’s all sorts of different types of code and snippets that just keep growing and growing and.. and finally it gets to a point where I just need to dump everything and start fresh.

That is the purpose of this post. SO rather than delete some of these gems, I thought it would be useful to post them here at Perishable Press and share with anyone who finds them useful. .htaccess I do a lot of experimenting with htaccess, revising existing rules, updating blacklists, trying new techniques, and so forth. These snippets function independently, with each block of code functioning independently of the others. Performance snippets # DISABLE ETAGS <filesMatch "\\. Canonical snippets Security snippets Miscellaneous snippets <? <? Making an Expanding Code Box. On blogs that like to share snippets of code like this one, it is common to use the <pre> tag to wrap the code so that the spacing/indenting is maintained and long lines do not wrap. While this is desirable behavior, it can be undesirable to have those un-wrapped lines break out of their containers awkwardly and overlap other content.

On Digging Into WordPress, we use JavaScript (jQuery) to solve this problem. One solution could potentially be to use only CSS and expand the width with something like pre:hover , but JavaScript is more elegant: Expands only when needed Expands only to as wide as needed Expands with animation The CSS The <pre> tag is naturally block-level, so this is what we’ll use to style our code blocks and hide the overflow. The jQuery The real trick here is that the code blocks are wrapped not only in <pre> tags but also in <code> tags.

When a pre block is hovered… Measure the internal code blocks width If that width is wider than the pre block… Couple of things of note here. RequireJS. CoffeeScript.