sin Chemical processing handbook / editor, John J. McKetta Jr By library.mit.edu Published On :: Sun, 15 Sep 2019 06:47:51 EDT Online Resource Full Article
sin Energy management in plastics processing: strategies, targets, techniques, and tools / Dr. Robin Kent By library.mit.edu Published On :: Sun, 27 Oct 2019 06:20:31 EDT Online Resource Full Article
sin Processing of polymer nanocomposites / Samuel Kenig (ed.) By library.mit.edu Published On :: Sun, 27 Oct 2019 06:20:31 EDT Online Resource Full Article
sin Process Engineering: Addressing the Gap Between Studies and Chemical Industry. By library.mit.edu Published On :: Sun, 27 Oct 2019 06:20:31 EDT Online Resource Full Article
sin Health and safety aspects of food processing technologies / Abdul Malik, Zerrin Erginkaya, Hüseyin Erten, editors By library.mit.edu Published On :: Sun, 17 Nov 2019 06:24:26 EST Online Resource Full Article
sin Halogen-Free Flame-Retardant Polymers: Next-Generation Fillers for Polymer Nanocomposite Applications / Suprakas Sinha Ray, Malkappa Kuruma By library.mit.edu Published On :: Sun, 29 Dec 2019 06:24:32 EST Online Resource Full Article
sin Reports on the processing of exotic fruits by Felipe Richter Reis By library.mit.edu Published On :: Sun, 5 Jan 2020 06:25:05 EST Online Resource Full Article
sin Mitigating contamination from food processing / edited by Catherine S. Birch and Graham A. Bonwick By library.mit.edu Published On :: Sun, 26 Jan 2020 06:23:19 EST Online Resource Full Article
sin Fluoropolymer additives / Sina Ebnesajjad, Richard A. Morgan By library.mit.edu Published On :: Sun, 2 Feb 2020 06:24:06 EST Online Resource Full Article
sin Unsaturated Polyester Resins: blends, interpenetrating polymer networks, composites, and nano composites / edited by Sabu Thomas, Mahesh Hosur and Cintil Jose Chirayil By library.mit.edu Published On :: Sun, 2 Feb 2020 06:24:06 EST Online Resource Full Article
sin Recent advances in decolorization and degradation of dyes in textile effluent by biological approaches / Ram Lakhan Singh, Pradeep Kumar Singh and Rajat Pratap Singh By library.mit.edu Published On :: Sun, 16 Feb 2020 06:19:41 EST Online Resource Full Article
sin Explosives detection: sensors, electronic systems and data processing / edited by Lorenzo Capineri and Eyüp Kuntay Turmuş By library.mit.edu Published On :: Sun, 1 Mar 2020 06:22:22 EST Online Resource Full Article
sin Visualizing taste: how business changed the look of what you eat / Ai Hisano By library.mit.edu Published On :: Sun, 29 Mar 2020 06:19:37 EDT Dewey Library - TP370.9.C64 H57 2019 Full Article
sin Increasing the durability of paint and varnish coatings in building products and construction / Loganina Valentina Ivanovna By library.mit.edu Published On :: Sun, 19 Apr 2020 06:48:14 EDT Online Resource Full Article
sin Polylactic acid: a practical guide for the processing, manufacturing, and applications of PLA / Lee Tin Sin, Bee Soo Tueen By library.mit.edu Published On :: Sun, 19 Apr 2020 06:48:14 EDT Online Resource Full Article
sin Introduction to sol-gel processing / Alain C. Pierre By library.mit.edu Published On :: Sun, 26 Apr 2020 06:32:35 EDT Online Resource Full Article
sin Sinners : Jesus and his earliest followers / Greg Carey By prospero.murdoch.edu.au Published On :: Carey, Greg, 1965- Full Article
sin Admen and Eve : the Bible in contemporary advertising / Katie B. Edwards By prospero.murdoch.edu.au Published On :: Edwards, Katie B., author Full Article
sin A high-throughput and untargeted lipidomics approach reveals new mechanistic insight and the effects of salvianolic acid B on the metabolic profiles in coronary heart disease rats using ultra-performance liquid chromatography with mass spectrometry By feeds.rsc.org Published On :: RSC Adv., 2020, 10,17101-17113DOI: 10.1039/D0RA00049C, Paper Open Access   This article is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported Licence.Ying-peng Li, Cong-ying Wang, Hong-tao Shang, Rui-rui Hu, Hui Fu, Xue-feng XiaoHigh-throughput lipidomics provides the possibility for the development of new therapeutic drugs.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
sin In vivo and in vitro evaluation of dihydroartemisinin prodrug nanocomplexes as a nano-drug delivery system: characterization, pharmacokinetics and pharmacodynamics By feeds.rsc.org Published On :: RSC Adv., 2020, 10,17270-17279DOI: 10.1039/D0RA02150D, Paper Open Access   This article is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported Licence.Guolian Ren, Pei Chen, Jiaqi Tang, Wenju Guo, Rongrong Wang, Ning Li, Yujie Li, Guoshun Zhang, Ruili Wang, Shuqiu ZhangTo develop new, more effective and lower toxicity antitumor dihydroartemisinin (DHA) nanocomplexes, a DHA prodrug synthesized in this study was used to prepare DHA prodrug self-assembled nanocomplexes (DHANPs) by molecular self-assembly technology.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
sin Correction: Insects (Thrips hawaiiensis (Morgan)) change the stereochemical configuration of 1-phenylethanol emitted from tea (Camellia sinensis) flowers By feeds.rsc.org Published On :: RSC Adv., 2020, 10,17058-17060DOI: 10.1039/D0RA90047H, Correction Open Access   This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.Ying Zhou, Lanting Zeng, Yinyin Liao, Fang Dong, Qiyuan Peng, Jianlong Li, Jinchi Tang, Naoharu Watanabe, Ziyin YangThe content of this RSS Feed (c) The Royal Society of Chemistry Full Article
sin Cost-effective smart microfluidic device with immobilized silver nanoparticles and embedded UV-light sources for synergistic water disinfection effects By feeds.rsc.org Published On :: RSC Adv., 2020, 10,17479-17485DOI: 10.1039/D0RA00076K, Paper Open Access   This article is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported Licence.Amit Prabhakar, Mehul Agrawal, Neha Mishra, Nimisha Roy, Ankur Jaiswar, Amar Dhwaj, Deepti VermaA novel microfluidic-device for water disinfection via diverse physiochemical effects has been demonstrated.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
sin Detection of L-band electron paramagnetic resonance in the DPPH molecule using impedance measurements By feeds.rsc.org Published On :: RSC Adv., 2020, 10,17311-17316DOI: 10.1039/D0RA03285A, Paper Open Access   This article is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported Licence.Ushnish Chaudhuri, R. Mahendiran(a) Schematic diagram of our experimental set up. (b) Resistance and reactance of the DPPH molecule for 2 GHz current in the strip coil.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
sin Deposition of an ultra-thin polyaniline coating on a TiO2 surface by vapor phase polymerization for electrochemical glucose sensing and photocatalytic degradation By feeds.rsc.org Published On :: RSC Adv., 2020, 10,17387-17395DOI: 10.1039/D0RA01571G, Paper Open Access   This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.Sibani Majumdar, Debajyoti MahantaHere, we have synthesized an ultra-thin coating of polyaniline on a TiO2 nanoparticle surface (PANI–TiO2) using a simple vapor phase polymerization method.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
sin One pot fabrication of fluorescein functionalized manganese dioxide for fluorescence “Turn OFF–ON” sensing of hydrogen peroxide in water and cosmetic samples By feeds.rsc.org Published On :: RSC Adv., 2020, 10,17506-17514DOI: 10.1039/D0RA01980A, Paper Open Access   This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.Hassan Refat H. Ali, Ahmed I. Hassan, Yasser F. Hassan, Mohamed M. El-WekilThe fluorometric nanoprobe was fabricated via doping of fluorescein dye in MnO2 nanosheets (FLS/MnO2 NS) via facile co-precipitation method. It was used for analysis of H2O2 in different matrices through liberation of FLS after reduction of MnO2 NS.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
sin A chitosan-based edible film with clove essential oil and nisin for improving the quality and shelf life of pork patties in cold storage By feeds.rsc.org Published On :: RSC Adv., 2020, 10,17777-17786DOI: 10.1039/D0RA02986F, Paper Open Access   This article is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported Licence.Karthikeyan Venkatachalam, Somwang LekjingThis study assessed chitosan (CS)-based edible films with clove essential oil (CO) and nisin (NI) singly or in combination, for improving quality and shelf life of pork patties stored in cold conditions.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
sin Using HTML5 elements in WordPress post content By nicolasgallagher.com Published On :: Wed, 24 Feb 2010 16:00:00 -0800 Here are two ways to include HTML5 elements in your WordPress post content without WordPress’ wpautop function wrapping them in p tags or littering your code with line breaks. HTML5 has several new elements that you may want to use in your post content to markup document sections, headers, footers, pullquotes, figures, or groups of headings. One way to safely include these elements in your posts is simple; the other way is a bit more complicated. Both ways rely on hand-coding the HTML5 markup in the WordPress editor’s HTML view. If you are adding HTML5 elements to your post content then you should use an HTML5 doctype. Disable wpautop for your theme This is the simple way. Disable the wpautop function so that WordPress makes no attempt to correct your markup and leaves you to hand-code every line of your posts. If you want total control over every line of your HTML then this is the option for you. To disable wpautop entirely add these lines to your theme’s functions.php: remove_filter('the_excerpt', 'wpautop'); remove_filter('the_content', 'wpautop'); However, wpautop is generally quite useful if most of your posts are simple text content and you only occasionally want to include HTML5 elements. Therefore, modifying wpautop to recognise HTML5 elements might be more practical. Modify wpautop to recognise HTML5 elements WordPress’ wpautop is part of the core functions and can be found in this file within your WordPress installation: wp-includes/formatting.php. It controls how and where paragraphs and line breaks are inserted in excerpts and post content. In order to create a modified version of WordPress’ core wpautop function I started off by duplicating it in my theme’s functions.php file. What I’ve experimented with is disabling wpautop and adding a modified copy of it – which includes HTML5 elements in its arrayss – to my theme’s functions.php file. Add the following to your theme’s functions.php file and you’ll be able to use section, article, aside, header, footer, hgroup, figure, details, figcaption, and summary in your post content. (Probably best to try this in a testing environment first!) /* ----------------------------- MODIFIED WPAUTOP - Allow HTML5 block elements in wordpress posts ----------------------------- */ function html5autop($pee, $br = 1) { if ( trim($pee) === '' ) return ''; $pee = $pee . " "; // just to make things a little easier, pad the end $pee = preg_replace('|<br />s*<br />|', " ", $pee); // Space things out a little // *insertion* of section|article|aside|header|footer|hgroup|figure|details|figcaption|summary $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr|fieldset|legend|section|article|aside|header|footer|hgroup|figure|details|figcaption|summary)'; $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', " $1", $pee); $pee = preg_replace('!(</' . $allblocks . '>)!', "$1 ", $pee); $pee = str_replace(array(" ", " "), " ", $pee); // cross-platform newlines if ( strpos($pee, '<object') !== false ) { $pee = preg_replace('|s*<param([^>]*)>s*|', "<param$1>", $pee); // no pee inside object/embed $pee = preg_replace('|s*</embed>s*|', '</embed>', $pee); } $pee = preg_replace("/ +/", " ", $pee); // take care of duplicates // make paragraphs, including one at the end $pees = preg_split('/ s* /', $pee, -1, PREG_SPLIT_NO_EMPTY); $pee = ''; foreach ( $pees as $tinkle ) $pee .= '<p>' . trim($tinkle, " ") . "</p> "; $pee = preg_replace('|<p>s*</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace // *insertion* of section|article|aside $pee = preg_replace('!<p>([^<]+)</(div|address|form|section|article|aside)>!', "<p>$1</p></$2>", $pee); $pee = preg_replace('!<p>s*(</?' . $allblocks . '[^>]*>)s*</p>!', "$1", $pee); // don't pee all over a tag $pee = preg_replace("|<p>(<li.+?)</p>|", "$1", $pee); // problem with nested lists $pee = preg_replace('|<p><blockquote([^>]*)>|i', "<blockquote$1><p>", $pee); $pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee); $pee = preg_replace('!<p>s*(</?' . $allblocks . '[^>]*>)!', "$1", $pee); $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)s*</p>!', "$1", $pee); if ($br) { $pee = preg_replace_callback('/<(script|style).*?</\1>/s', create_function('$matches', 'return str_replace(" ", "<WPPreserveNewline />", $matches[0]);'), $pee); $pee = preg_replace('|(?<!<br />)s* |', "<br /> ", $pee); // optionally make line breaks $pee = str_replace('<WPPreserveNewline />', " ", $pee); } $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)s*<br />!', "$1", $pee); // *insertion* of img|figcaption|summary $pee = preg_replace('!<br />(s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol|img|figcaption|summary)[^>]*>)!', '$1', $pee); if (strpos($pee, '<pre') !== false) $pee = preg_replace_callback('!(<pre[^>]*>)(.*?)</pre>!is', 'clean_pre', $pee ); $pee = preg_replace( "| </p>$|", '</p>', $pee ); return $pee; } // remove the original wpautop function remove_filter('the_excerpt', 'wpautop'); remove_filter('the_content', 'wpautop'); // add our new html5autop function add_filter('the_excerpt', 'html5autop'); add_filter('the_content', 'html5autop'); The results are not absolutely perfect but then neither is the original wpautop function. Certain ways of formatting the code will result in unwanted trailing </p> tags or a missing opening <p> tags. For example, to insert a figure with caption into a post you should avoid adding the figcaption on a new line because an image or link appearing before the figcaption will end up with a trailing </p>. <!-- this turns out ok --> <figure> <a href="#"><img src="image.jpg" alt="" /></a><figcaption>A figure caption for your reading pleasure</figcaption> </figure> <!-- this turns out not so ok --> <figure> <a href="#"><img src="image.jpg" alt="" /></a> <figcaption>A figure caption for your reading pleasure</figcaption> </figure> Another example would be when beginning the contents of an aside with a paragraph. You’ll have to leave a blank line between the opening aside tag and the first paragraph. <aside> This content could be a pullquote or information that is tangentially related to the surrounding content. But to get it wrapped in a paragraph you have to leave those blank lines either side of it before the tags. </aside> Room for improvement Obviously there are still a few issues with this because if you format your post content in certain ways then you can end up with invalid HTML, even if it doesn’t actually affect the rendering of the page. But it seems to be pretty close! Leave a comment or email me if you are using this function and find there that are instances where it breaks down. I ran numerous tests and formatting variations to try and iron out as many problems as possible but it’s unlikely that I tried or spotted everything. Hopefully someone with more PHP and WordPress experience will be able to improve upon what I’ve been experimenting with, or find a simpler and more elegant solution that retains the useful wpautop functionality while allowing for the use of HTML5 elements in posts. Please share anything you find! Full Article
sin Better float containment in IE using CSS expressions By nicolasgallagher.com Published On :: Mon, 25 Apr 2011 17:00:00 -0700 Research into improving the cross-browser consistency of both the “clearfix” and “overflow:hidden” methods of containing floats. The aim is to work around several bugs in IE6 and IE7. This article introduces a new hack (with caveats) that can benefit the “clearfix” methods and the new block formatting context (NBFC) methods (e.g. using overflow:hidden) of containing floats. It’s one outcome of a collaboration between Nicolas Gallagher (that’s me) and Jonathan Neal. If you are not familiar with the history and underlying principles behind methods of containing floats, I recommend that you have a read of Easy clearing (2004), Everything you know about clearfix is wrong (2010), and Clearfix reloaded and overflow:hidden demystified (2010). Consistent float containment methods The code is show below and documented in this GitHub gist. Found an improvement or flaw? Please fork the gist or leave a comment. Micro clearfix hack: Firefox 3.5+, Safari 4+, Chrome, Opera 9+, IE 6+ .cf { /* for IE 6/7 */ *zoom: expression(this.runtimeStyle.zoom="1", this.appendChild(document.createElement("br")).style.cssText="clear:both;font:0/0 serif"); /* non-JS fallback */ *zoom: 1; } .cf:before, .cf:after { content: ""; display: table; } .cf:after { clear: both; } Overflow hack (NBFC): Firefox 2+, Safari 2+, Chrome, Opera 9+, IE 6+ .nbfc { overflow: hidden; /* for IE 6/7 */ *zoom: expression(this.runtimeStyle.zoom="1", this.appendChild(document.createElement("br")).style.cssText="clear:both;font:0/0 serif"); /* non-JS fallback */ *zoom: 1; } The GitHub gist also contains another variant of the clearfix method for modern browsers (based on Thierry Koblentz’s work). It provides greater visual consistency (avoiding edge-case bugs) for even older versions of Firefox. The only difference from existing float-containment methods is the inclusion of a CSS expression that inserts a clearing line-break in IE 6 and IE 7. Jonathan and I found that it helps to resolve some of the visual rendering differences that exist between these browsers and more modern ones. First I’ll explain what some of those differences are and when they occur. Containing floats in IE 6/7 In IE 6 and IE 7, the most common and robust method of containing floats within an element is to give it “layout” (find out more: On having Layout). Triggering “layout” on an element in IE 6/7 creates a new block formatting context (NBFC). However, certain IE bugs mean that previous float containment methods don’t result in cross-browser consistency. Specifically, this is what to expect in IE 6/7 when creating a NBFC: The top- and bottom-margins of non-floated child elements are contained within the ancestor element that has been given “layout”. (Also expected in other browsers when creating a NBFC) The bottom-margins of any right-floated descendants are contained within the ancestor. (Also expected in other browsers when creating a NBFC) The bottom-margins of any left-floated children are not contained within the ancestor. The margin has no effect on the height of the ancestor and is truncated, having no affect outside of the ancestor either. (IE 6/7 bug) In IE 6, if the right edge of the margin-box of a left-floated child is within 2px of the left edge of the content-box of its NBFC ancestor, the float’s bottom margin reappears and is contained within the parent. (IE 6 bug) Unwanted white-space can appear at the bottom of a float-container. (IE 6/7 bug) There is a lack of consistency between IE 6/7 and other browsers, and between IE 6 and IE 7. Thanks to Matthew Lein for his comment that directed me to this IE 6/7 behaviour. It was also recently mentioned by “Suzy” in a comment on Perishable Press. IE 6/7’s truncation of the bottom-margin of left-floats is not exposed in many of the test-cases used to demonstrate CSS float containment techniques. Using an IE-only CSS expression helps to correct this bug. The CSS expression Including the much maligned <br style="clear:both"> at the bottom of the float-container, as well as creating a NBFC, resolved all these inconsistencies in IE 6/7. Doing so prevents those browsers from collapsing (or truncating) top- and bottom-margins of descendant elements. Jonathan suggested inserting the clearing line-break in IE 6/7 only, using CSS expressions applied to fictional CSS properties. The CSS expression is the result of many iterations, tests, and suggestions. It runs only once, the first time an element receives the associated classname. *zoom: expression(this.runtimeStyle.zoom="1", this.appendChild(document.createElement("br")).style.cssText="clear:both;font:0/0 serif"); It is applied to zoom, which is already being used to help contain floats in IE 6/7, and the use of the runtimeStyle object ensures that the expression is replaced once it has been run. The addition of font:0/0 serif prevents the occasional appearance of white-space at the bottom of a float-container. And the * hack ensures that only IE 6 and IE 7 parse the rule. It’s worth noting that IE 6 and IE 7 parse almost any string used as CSS property. An earlier iteration used the entirely fictitious properties “-ms-inject” or “-ie-x” property to exploit this IE behaviour. *-ie-x: expression(this.x||(this.innerHTML+='<br style="clear:both;font:0/0">',this.x=1)); However, this expression is evaluated over and over again. Using runtimeStyle instead avoids this. Sergey Chikuyonok also pointed out that using innerHTML destroys existing HTML elements that may event handlers attached to them. By using document.createElement and appendChild you can insert the new element without removing all the events attached to other descendant elements. Containing floats in more modern browsers There are two popular methods to contain floats in modern browsers. Creating a new block formatting context (as is done in IE 6/7 when hasLayout is triggered) or using a variant of the “clearfix” hack. Creating a NBFC results in an element containing any floated children, and will prevent top- and bottom-margin collapse of non-floated children. When combined with the enhanced IE 6/7 containment method, it results in consistent cross-browser float containment. The other method, known as “clearfix”, traditionally used a single :after pseudo-element to clear floats in a similar fashion to a structural, clearing HTML line-break. However, to prevent the top-margins of non-floats from collapsing into the margins of their float-containing ancestor, you also need to use the :before pseudo-element. This is the approach taken in Thierry Koblentz’s “clearfix reloaded”. In contemporary browsers, the micro clearfix hack is also suitable. The method presented in this article should help improve the results of cross-browser float containment, whether you predominantly use “clearfix” or the NBFC method. The specific limitations of both the “clearfix” and various NBFC methods (as outlined in Thierry’s articles) remain. Problems Using a CSS expression to change the DOM in IE 6/7 creates problems of its own. Obviously, the DOM in IE 6/7 is now different to the DOM in other browsers. This affects any JavaScript DOM manipulation that may depend on :last-child or appending new children. This is still an experimental work-in-progress that is primarily research-driven rather than seeking to become a practical snippet of production code. Any feedback, further testing, and further experimentation from others would be much appreciated. Thanks to these people for contributing improvements: Jonathan Neal, Mathias Bynens, Sergey Chikuyonok, and Thierry Koblentz. Full Article
sin Responsive images using CSS3 By nicolasgallagher.com Published On :: Wed, 18 May 2011 17:00:00 -0700 Future CSS implementations should allow for some form of responsive images via CSS alone. This is an early idea for how that might be done. However, a significant drawback is that it would not prevent both “mobile optimised” and larger size images from being requested at larger screen resolutions. Note that the CSS presented here is not supported in any browsers at the time of writing. This method relies on the use of @media queries, CSS3 generated content, and the CSS3 extension to the attr() function. The principles are basically the same as those underpinning Filament Group’s work on Responsive Images. The source image is “mobile optimised” and the urls of larger size images are included using HTML data-* attributes. <img src="image.jpg" data-src-600px="image-600px.jpg" data-src-800px="image-800px.jpg" alt=""> Using CSS @media queries you can target devices above certain widths. Within each media query block, images with larger alternatives can be targeted using an attribute selector. CSS3 generated content allows you to replace the content of any element using the content property. At the moment, only Opera 10+ supports it. In CSS 2.1, the content property is limited to use with the :before and :after pseudo-elements. By combining the content property with the CSS3 extension to attr(), you will be able to specify that an attribute’s value is interpreted as the URL part of a url() expression. In this case, it means you will be able to replace an image’s content with the image found at the destination URL stored in a custom HTML data-* attribute. @media (min-device-width:600px) { img[data-src-600px] { content: attr(data-src-600px, url); } } @media (min-device-width:800px) { img[data-src-800px] { content: attr(data-src-800px, url); } } Fork the Gist Issues Unfortunately, there are a number of issues with this technique. It doesn’t prevent multiple assets being downloaded at larger screen widths because network activity kicks in before CSS is applied. That means, for example, that desktop environments would make 2 HTTP requests for an image and have to load more assets than if they had been served only the larger image in the source. It makes the assumption that wider screens are tied to better internet connections. It forces authors to create and maintain multiple image sizes for each image. At present, using the context menu (or drag and drop) to copy the image will result in the source file being copied and not the replacement image. It doesn’t account for devices with different pixel densities. Full Article
sin Custom CSS preprocessing By nicolasgallagher.com Published On :: Wed, 12 Mar 2014 17:00:00 -0700 Did you know that you can build your own CSS preprocessor with Node.js libraries? They can be used alongside established preprocessors like Sass, and are useful for defining tasks beyond preprocessing. Libraries like Rework and PostCSS let you create and assemble an arbitrary collection of plugins that can inspect or manipulate CSS. At the time of writing, Twitter uses Rework to perform various tasks against our CSS source code for twitter.com. Creating a CSS preprocessor with Rework At its core, Rework is a module that accepts a string of CSS, produces a CSS abstract syntax tree (AST), and provides an API for manipulating that AST. Plugins are functions that have access to the AST and a Rework instance. Rework lets you chain together different plugins and generate a string of new CSS when you’re done. The source string is passed into the rework function and each plugin is applied with .use(fn). The plugins transform the data in the AST, and .toString() generates the new string of CSS. Below is an example of a custom preprocessor script using Rework and Autoprefixer. It’s a simplified version of the transformation step we use for twitter.com’s CSS. var autoprefixer = require('autoprefixer'); var calc = require('rework-calc'); var rework = require('rework'); var vars = require('rework-vars')(); var css = fs.readFileSync('./css/main.css', 'utf-8'); css = rework(css) .use(vars) .use(calc) .toString(); css = autoprefixer().process(css); fs.writeFileSync('./build/bundle.css', css) The script runs rework-vars, rework-calc, and then passes the CSS to Autoprefixer (which uses PostCSS internally) to handle the addition of any necessary vendor prefixes. rework-vars provides a limited subset of the features described in the W3C-style CSS custom property spec. It’s not a polyfill! Variables can be declared as custom CSS properties on the :root element, prefixed with --. Variables are referenced with the var() function, taking the name of a variable as the first argument and an optional fallback as the second. For example, this source: :root { --width-button: 200px; } .button { width: var(--width-button); } yields: .button { width: 200px; } There are many different Rework plugins that you can use to create a custom preprocessor. A more complete list is available on npm. In order to limit the chances of long-term divergence between our source code and native CSS, I’ve chosen to stick fairly closely to features that are aligned with future additions to native CSS. Creating your own Rework plugin Rework plugins are functions that inspect or mutate the AST they are provided. Below is a plugin that rewrites the value of any font-family property to sans-serif. module.exports = function plugin(ast, reworkInstance) { ast.rules.forEach(function (rule) { if (rule.type != 'rule') return; rule.declarations.forEach(function (declaration, index) { if (declaration.property == 'font-family') { declaration.value = 'sans-serif'; } }); }); }; Rework uses css-parse to create the AST. Unfortunately, both projects are currently lacking comprehensive documentation of the AST, but it’s not difficult to piece it together yourself. Beyond preprocessing Since Rework and PostCSS expose an AST and provide a plugin API, they can be used for other CSS tasks, not just preprocessing. At Twitter, our CSS build pipeline allows you to perform custom tasks at 2 stages of the process: on individual files and on generated bundles. We use Rework at both stages. Individual files are tested with rework-suit-conformance to ensure that the SUIT-style CSS for a component is properly scoped. /** @define MyComponent */ :root { --property-MyComponent: value; } .MyComponent {} Bundles are preprocessed as previously described, and also tested with rework-ie-limits to ensure that the number of selectors doesn’t exceed IE 8/9’s limit of 4095 selectors per style sheet. Other tasks you can perform include generating RTL style sheets (e.g., css-flip) and extracting detailed information about the perceived health of your CSS (e.g., the number of different colours used, duplicate selectors, etc.). Hopefully this has given you a small glimpse into some of the benefits and flexibility of using these tools to work with CSS. Full Article
sin How to test React components using Karma and webpack By nicolasgallagher.com Published On :: Sat, 16 May 2015 17:00:00 -0700 I’m working on a project at Twitter that uses React and webpack. After a few conversations with @sokra last year, this is the setup I put in place for testing React components (authored using JSX and ES6) using Karma. Dependencies You’ll need to install various packages. It looks like a lot of dependencies, but all the non-Karma packages will be necessary for general module bundling during development. Full set of required packages: babel-core: to transform JSX and transpile ES6. babel-loader: webpack loader for Babel. karma: the test runner. karma-chai-plugins: assertion library (or your library of choice). karma-chrome-launcher: Chrome browser launcher. karma-cli: CLI tool for Karma. karma-mocha: adapter for the Mocha testing framework. karma-sourcemap-loader: sourcemap loader. karma-webpack: to use webpack with Karma. react webpack: module bundler webpack entry file If you use webpack-specific features in your modules (e.g., loaders, plugins) you will need to use webpack to build a test bundle. The fastest and simplest approach is to create a single, test-specific entry file. Create a file named tests.bundle.js. Within this file, you create a webpack context to match all the files that conform to a naming pattern – in this case *.spec.js(x). var context = require.context('.', true, /.+.spec.jsx?$/); context.keys().forEach(context); module.exports = context; Next, you point Karma to this file. Karma config Karma is configured using a karma.conf.js file. The browsers, plugins, and frameworks are specified in the standard way. Point Karma at the tests.bundle.js file, and run it through the relevant preprocessor plugins (see example below). The karma-webpack plugin relies on 2 custom properties of the Karma config: webpack and webpackMiddleware. The value of the former must be a webpack config object. module.exports = function (config) { config.set({ browsers: [ 'Chrome' ], // karma only needs to know about the test bundle files: [ 'tests.bundle.js' ], frameworks: [ 'chai', 'mocha' ], plugins: [ 'karma-chrome-launcher', 'karma-chai', 'karma-mocha', 'karma-sourcemap-loader', 'karma-webpack', ], // run the bundle through the webpack and sourcemap plugins preprocessors: { 'tests.bundle.js': [ 'webpack', 'sourcemap' ] }, reporters: [ 'dots' ], singleRun: true, // webpack config object webpack: { devtool: 'inline-source-map', module: { loaders: [ { exclude: /node_modules/, loader: 'babel-loader, test: /.jsx?$/ } ], } }, webpackMiddleware: { noInfo: true, } }); }; Rather than duplicating your webpack config, you can require it in the Karma config file and override the devtool value to get sourcemaps working. var webpackConfig = require('./webpack.config'); webpackConfig.devtool = 'inline-source-map'; module.exports = function (config) { config.set({ ... webpack: webpackConfig }); }; That’s all you need to do to configure Karma to use webpack to load your JSX, ES6 React components. Full Article
sin Using canvas to fix SVG scaling in Internet Explorer By nicolasgallagher.com Published On :: Mon, 18 May 2015 17:00:00 -0700 Internet Explorer 9–11 suffer from various bugs that prevent proper scaling of inline SVG’s. This is particularly problematic for SVG icons with variable widths. This is the canvas-based hack I’ve been using to work around the issue. A popular way to use SVG icons is to generate a spritemap of SVG symbol‘s that you then reference from elsewhere in a document. Most articles on the topic assume your icon dimensions are uniformly square. Twitter’s SVG icons (crafted by @sofo) are variable width, to produce consistent horizontal whitespace around the vectors. Most browsers will preserve the intrinsic aspect ratio of an SVG. Ideally, I want to set a common height for all the icons (e.g., 1em), and let the browser scale the width of each icon proportionally. This also makes it easy to resize icons in particular contexts – just change the height. Unfortunately, IE 9–11 do not preserve the intrinsic aspect ratio of an inline SVG. The svg element will default to a width of 300px (the default for replaced content elements). This means it’s not easy to work with variable-width SVG icons. No amount of CSS hacking fixed the problem, so I looked elsewhere – and ended up using canvas. canvas and aspect ratios A canvas element – with height and width attributes set – will preserve its aspect ratio when one dimension is scaled. The example below sets a 3:1 aspect ratio. <canvas height="1" width="3"></canvas> You can then scale the canvas by changing either dimension in CSS. canvas { display: block; height: 2rem; } Demo: proportional scaling of canvas. Fixing SVG scaling in IE This makes canvas useful for creating aspect ratios. Since IE doesn’t preserve the intrinsic aspect ratio of SVG icons, you can use canvas as a shim. A canvas of the correct aspect ratio provides a scalable frame. The svg can then be positioned to fill the space created by this frame. The HTML is straightforward: <div class="Icon" role="img" aria-label="Twitter"> <canvas class="Icon-canvas" height="1" width="3"></canvas> <svg class="Icon-svg"> <use fill="currentcolor" xlink:href="#icon-twitter"></use> </svg> </div> So is the CSS: .Icon { display: inline-block; height: 1em; /* default icon height */ position: relative; user-select: none; } .Icon-canvas { display: block; height: 100%; visibility: hidden; } .Icon-svg { height: 100%; left: 0; position: absolute; top: 0; width: 100%; } Setting the canvas height to 100% means it will scale based on the height of the component’s root element – just as SVG’s do in non-IE browsers. Changing the height of the Icon element scales the inner SVG icon while preserving its 3:1 aspect ratio. Demo: proportional scaling of svg in IE. Creating an Icon component The hack is best added to (and eventually removed from) an existing icon component’s implementation. If you’re generating and inlining an SVG spritemap, you will need to extract the height and width (usually from viewBox) of each of your icons during the build step. If you’re already using the gulp-svgstore plugin, it supports extracting metadata. Those dimensions need to be set on the canvas element to produce the correct aspect ratio for a given icon. Example React component (built with webpack): import iconData from './lib/icons-data.json'; import React from 'react'; import './index.css'; class Icon extends React.Component { render() { const props = this.props; const height = iconData[props.name.height]; const width = iconData[props.name.width]; // React doesn't support namespaced attributes, so we have to set the // 'use' tag with innerHTML const useTag = `<use fill="currentcolor" xlink:href="#icon-${props.name}"> </use>`; return ( <span className="Icon"> <canvas className="Icon-canvas" height={height} width={width} /> <svg className="Icon-svg" dangerouslySetInnerHTML={{__html: useTag}} key={props.name} /> </span> ); } } export default Icon; When I introduced this hack to a code base at Twitter, it had no impact on the the rest of the team or the rest of the code base – one of the many benefits of a component-based UI. Full Article
sin Coronavirus | Odisha records 52 cases, highest single-day spike By www.thehindu.com Published On :: Fri, 08 May 2020 23:29:46 +0530 43 cases from Ganjam district; State’s total mounts to 271 Full Article Other States
sin Punjab police arrest gangster Baljinder Singh By www.thehindu.com Published On :: Sat, 09 May 2020 02:46:59 +0530 He is wanted for murder, attempt to murder and smuggling of weapons and drugs Full Article Other States
sin Strategic excellence in the architecture, engineering, and construction industries [electronic resource] : how AEC firms can develop and execute strategy using lean Six Sigma / Gerhard Plenert and Joshua J. Plenert By prospero.murdoch.edu.au Published On :: Plenert, Gerhard Johannes, author Full Article
sin Streamlining business requirements [electronic resource] : the XCellR8 approach / Gerrie Caudle By prospero.murdoch.edu.au Published On :: Caudle, Gerrie Full Article
sin The stress test every business needs [electronic resource] : a capital agenda for confidently facing digital disruption, difficult investors, recessions and geopolitical threats / Jeffrey R. Greene, Steve Krouskos, Julie Hood, Harsha Basnayake, William Ca By prospero.murdoch.edu.au Published On :: Greene, Jeffrey R., author Full Article
sin Succeeding with SOA [electronic resource] : realizing business value through total architecture / Paul C. Brown By prospero.murdoch.edu.au Published On :: Brown, Paul C Full Article
sin Successes and failures of knowledge management [electronic resource] / edited by Jay Liebowitz, Distinguished Chair of Applied Business and Finance, Harrisburg University of Science and Technology, Harrisburg, Pennsylvania By prospero.murdoch.edu.au Published On :: Full Article
sin Talent-Gespräche [electronic resource] : Worum es geht, weshalb sie wichtig sind, wie sie richtig geführt werden / Roland Smith und Michael Campbell By prospero.murdoch.edu.au Published On :: Smith, Roland, 1951- author Full Article
sin Tapping into unstructured data [electronic resource] : integrating unstructured data and textual analytics into business intelligence / William H. Inmon, Anthony Nesavich By prospero.murdoch.edu.au Published On :: Inmon, William H Full Article
sin Technology entrepreneurship [electronic resource] : taking innovation to the marketplace / Thomas N. Duening, Ph.D, El Pomar Chair of Business and Entrepreneurship, Director, Center for Entrepreneurship, College of Business, University of Colorado at Colo By prospero.murdoch.edu.au Published On :: Duening, Thomas N Full Article
sin There's no such thing as an IT project [electronic resource] : a handbook for intentional business change / Bob Lewis, Dave Kaiser By prospero.murdoch.edu.au Published On :: Lewis, Bob, author Full Article
sin Thinkers 50 business thought leaders from India [electronic resource] : the best ideas on innovation, management, strategy, and leadership / Stuart Crainer + Des Dearlove By prospero.murdoch.edu.au Published On :: Crainer, Stuart Full Article
sin Thinkers 50 innovation [electronic resource] : breakthrough thinking to take your business to the next level / Stuart Crainer + Des Dearlove By prospero.murdoch.edu.au Published On :: Crainer, Stuart Full Article
sin Thriving under stress [electronic resource] : harnessing demands in the workplace / Thomas W. Britt, Ph.D., Professor of Psychology, Clemson University, Steve M. Jex, Ph.D., Professor of Psychology, Bowling Green State University By prospero.murdoch.edu.au Published On :: Britt, Thomas W., 1966- Full Article
sin Tibco spotfire [electronic resource] : a comprehensive primer : create innovative enterprise-class informatics solutions using TIBCO Spotfire / Michael Phillips By prospero.murdoch.edu.au Published On :: Phillips, Michael, author Full Article
sin Total quality management and just-in-time purchasing [electronic resource] : their effects on performance of firms operating in the U.S. / Hale Kaynak By prospero.murdoch.edu.au Published On :: Kaynak, Hale, 1956- Full Article
sin Transforming legacy organizations [electronic resource] : turn your established business into an innovation champion to win the future / Kris Oestergaard By prospero.murdoch.edu.au Published On :: Oestergaard, Kris, 1973- author Full Article
sin Transitioning to Agile [electronic resource] : understanding the business imperative for transforming enterprises / Rick Freedman By prospero.murdoch.edu.au Published On :: Freedman, Rick, author Full Article