
BitTorrent Turns Web Browsers Into a File-Sharing Hub BitTorrent Inc., the people behind the popular BitTorrent client uTorrent, have just unveiled a new project that turns web browsers into fully fledged file-sharing hubs. "Torque" uses the new Btapp.js library and enables developers to code a wide variety of browser-based file-sharing apps. To show what it's capable of, BitTorrent released a torrent client for Chrome and a browser-based file-sharing app. Downloading torrents in a web-browser is nothing new. Opera integrated BitTorrent support half a decade ago, and for other browsers there are plugins and web-based tools available. However, BitTorrent Inc. believes that much more can be done from the browser environment. With Torque, developers can easily build a wide variety of downloading and sharing web-apps. “Torque is both an underlying, fully fledged torrent client, as well as a simple JavaScript interface designed to make the technology as accessible as possible,” Patrick Williams, lead engineer on Torque told TorrentFreak.
Hacking Exposed - Web Applications Linux/UNIX For DOS Users Command Comparison: To find out how to do something on UNIX simply type "man -k subject_matter". This will do a key word search for all commands dealing with the subject matter. Then use the appropriate command. Online manuals are available on all the commands by typing "man command_name". MS/Windows info: Shell Descriptor/Operators: Shell Script Operators: Bash shell aliases for DOS users: The following are bash shell aliases which can be added to the system profile or the user's personal profile ($HOME/.bashrc) to correct and help DOS users on Linux. Devices: Equivalent Linux and MS/Windows GUI Applications: Links: YoLinux Tutorials: bash - Bash man page Books:
HTML5 Presentation In March 1936, an unusual confluence of forces occurred in Santa Clara County. A long cold winter delayed the blossoming of the millions of cherry, apricot, peach, and prune plum trees covering hundreds of square miles of the Valley floor. Then, unlike many years, the rains that followed were light and too early to knock the blossoms from their branches. Instead, by the billions, they all burst open at once. Seemingly overnight, the ocean of green that was the Valley turned into a low, soft, dizzyingly perfumed cloud of pink and white. Then came the wind. It roared off the Pacific Ocean, through the nearly uninhabited passes of the Santa Cruz Mountains and then, flattening out, poured down into the great alluvial plains of the Valley. This perfumed blizzard hit Stevens Creek Boulevard, a two-lane road with a streetcar line down its center, that was the main road in the West Valley.
URL Encoding RFC 1738: Uniform Resource Locators (URL) specification The specification for URLs (RFC 1738, Dec. '94) poses a problem, in that it limits the use of allowed characters in URLs to only a limited subset of the US-ASCII character set: "...Only alphanumerics [0-9a-zA-Z], the special characters "$-_.+! HTML, on the other hand, allows the entire range of the ISO-8859-1 (ISO-Latin) character set to be used in documents - and HTML4 expands the allowable range to include all of the Unicode character set as well. URLs should be encoded everywhere in an HTML document that a URL is referenced to import an object (A, APPLET, AREA, BASE, BGSOUND, BODY, EMBED, FORM, FRAME, IFRAME, ILAYER, IMG, ISINDEX, INPUT, LAYER, LINK, OBJECT, SCRIPT, SOUND, TABLE, TD, TH, and TR elements.) What characters need to be encoded and why? How are characters URL encoded? Example Space = decimal code point 32 in the ISO-Latin set. 32 decimal = 20 in hexadecimal The URL encoded representation will be "%20" URL encoding converter
C++ Programming/Exercises/Iterations Iterations[edit] Solutions requirements Solutions must: Use only standard C++.Be compilable.Be in accordance to general coding practices. and should: Handle error situations, even if behavior is not defined. Please do not add solutions that are 99% similar to another that is already present, if it is an improvement just add it to the existing solution. EXERCISE 1[edit] Write a program that asks the user to type an integer and writes "YOU WIN" if the value is between 56 and 78 (both included). int main() {int i; cout << "Type all numbers between 58 and 73: " << endl; cin>>i; if (i>=58 && i<=78) { cout << "YOU WIN" << i << endl; else cout<<"YOU LOSE!" EXERCISE 2[edit] Write a program that asks the user to type all the integers between 8 and 23 (both included) using a for loop. Solution Alternative solution by Bartosz Radwanski //Alternative solution by Bartosz Radwanski//This one allows the numbers to be entered in random order and exits//when all correct numbers have been entered. Alternate solution
RGB-to-Hex Color Converter RGB-to-Hex Conversion Question: How do I convert RGB values of a color to a hexadecimal string? Answer: The RGB-to-hexadecimal converter algorithm is simple: make sure that your values are in the range 0...255, convert R, G, B to hex strings, and then concatenate the three hex strings together. function rgbToHex(R,G,B) {return toHex(R)+toHex(G)+toHex(B)} function toHex(n) { n = parseInt(n,10); if (isNaN(n)) return "00"; n = Math.max(0,Math.min(n,255)); return "0123456789ABCDEF".charAt((n-n%16)/16) + "0123456789ABCDEF".charAt(n%16); } Notes: The script parses the input R, G, B values as integers using the standard function parseInt(string,10); the second, optional argument 10 specifies that the value must be parsed as a decimal number. RGB/hex codes for named colors supported in most browsers are listed below: See also:
Testing Your Web Applications for Cross-Site Scripting Vulnerabilities Published: May 6, 2005 by Chris Weber, Casaba Security, LLC (chris@casabasec.com) By now there’s no argument that cross-site scripting attacks are real and potently dangerous. XSS attacks involve three parties: The attacker The victim The vulnerable Web site that the attacker exploits to take action on the victim Out of the three parties, the victim is the only one who actually runs the attacker’s code. What does an XSS vulnerability look like? XSS vulnerabilities exist when a Web application accepts user input through HTTP requests such as a GET or a POST and then redisplays the input somewhere in the output HTML code. 1. GET 2. <h1>Section Title</h1> You can see that the user input passed to the “title” query string parameter was probably placed in a string variable and inserted by the Web application into an <h1>tag. 3. The attacker could inject code by breaking out of the <h1>tag: There are many variations to try.
CSS Angles: Just the Edge Your Web Page Needs! With the influx of JavaScript libraries like jQuery and Prototype, a lot of the more basic elements of front-end development have fallen through the cracks. Gone are the days when we would sit down for a couple of hours to find a creative way to solve a CSS problem; now we immediately turn to JavaScript. Not to say that it’s a bad thing – it is what it is in the current state of web development. But sometimes we have to look back on those old techniques to find a new way of achieving a solution. The first place I saw the use of CSS angles was in Eric Meyer’s Slantastic demo. The border Property The border property is one of the most used and valuable properties available in CSS. border-width: 10px; border-style: solid; border-color: #333333; And in shorthand: border: 10px solid #333; There are also some popular CSS3 properties that have found their way onto the Web via vendors’ proprietary extensions: -moz-, -webkit-, and -khtml-. Creating the Triangle Building a Shelf Benefits Closing