one The certainty trap [electronic resource] : why we need to question ourselves more--and how we can judge others less / Ilana Redstone ; foreword by Joe Walsh. By darius.uleth.ca Published On :: Durham, North Carolina : Pitchstone Publishing, [2024] Full Article
one Investment limits for govt. bonds to be auctioned By www.thehindu.com Published On :: Mon, 06 Jun 2016 00:00:00 +0530 Full Article Mumbai Capital
one By 2021, India to have 810 m smartphone subscriptions By www.thehindu.com Published On :: Wed, 08 Jun 2016 00:00:00 +0530 Full Article Mumbai Capital
one ‘India is a bright spot in global smartphone scene’ By www.thehindu.com Published On :: Thu, 09 Jun 2016 00:00:00 +0530 Full Article Mumbai Capital
one Rupee rises one paisa to close at 83.96 against U.S. dollar By www.thehindu.com Published On :: Wed, 09 Oct 2024 17:13:25 +0530 At the interbank foreign exchange market, Rupee opened at 83.92 and finally settled for the day at 83.96 (provisional) Full Article Markets
one Delhi Ganesh: An actor who could be anyone on screen By www.thehindu.com Published On :: Sun, 10 Nov 2024 10:39:35 +0530 Delhi Ganesh, one of the most versatile artists of Tamil cinema, leaves behind a legacy of warmth, trust, and laughter Full Article Movies
one Indu Makkal Katchi youth wing president Omkar Balaji questioned for remarks on Nakkheeran Gopal By www.thehindu.com Published On :: Sun, 10 Nov 2024 16:08:20 +0530 The Coimbatore police question IMK youth wing leader for threatening to “chop off editor’s tongue”, sparking legal action and protests Full Article Tamil Nadu
one Telephone cord blister formation in solvent swollen elastomer films By pubs.rsc.org Published On :: Soft Matter, 2024, Advance ArticleDOI: 10.1039/D4SM01035C, Paper Open Access   This article is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported Licence.James S. Sharp, Nathaniel M. Roberts, Sam WalkerTelephone cord blister formation is studied in PDMS films swollen in four different solvents. Buckling and fracture mechanics theories are developed to interpret blister morphology and growth rates. A simple surface patterning method is introduced.To cite this article before page numbers are assigned, use the DOI form of citation above.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
one Carboxymethyl cellulose-stabilized calcium phosphate particles for injectable hydrogel-based bone tissue engineering By pubs.rsc.org Published On :: Soft Matter, 2024, Advance ArticleDOI: 10.1039/D4SM00670D, PaperPiyaporn Srisura, Yuwaporn Pinyakit, Umphan Ngoensawat, Pongsakorn Yuntasiri, Khoiria Nur Atika Putri, Theerapat Chanamuangkon, Waranyoo Phoolcharoen, Varol Intasanta, Voravee P. HovenCarboxymethyl cellulose-stabilized calcium phosphate particles well-dispersed in aqueous solution can be integrated into an injectable hydrogel made of methacrylated hyaluronic acid which is a promising material for bone regeneration applications.To cite this article before page numbers are assigned, use the DOI form of citation above.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
one A macroscopic magneto-optical response resulting from local effects in ferronematic liquid crystals By pubs.rsc.org Published On :: Soft Matter, 2024, 20,8363-8372DOI: 10.1039/D4SM00577E, PaperXiangshen Meng, Xiaowei Li, Jian Li, Yueqiang Lin, Xiaodong Liu, Zhenghong HeThe dynamic rotational behavior of composite chains under a rotating magnetic field was observed. The birefringence and dichroism variations in FNLCs mainly stem from the magnetic response of the composite chains, indicating local effects.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
one Design Tokens and Component Based Design By 24ways.org Published On :: Sat, 14 Dec 2019 12:00:00 +0000 Stuart Robson rolls up his sleeves and begins to piece together the jigsaw puzzle that is design tokens and component based design. Starting with the corners, and working around the edges, Stu helps us to piece together a full picture of a modern design system. If you stare at your twitter feed long enough, it can look like everyone is talking about Design Systems. In some cases you could be persuaded to think how shallow the term can go. “Isn’t this what we called Style Guides?”, “Here’s my React Design System”, “I’ve just updated the Design System in Sketch” To me, they are some and all of these things. Over the last 4 years of consulting with two clients on their Design System, my own view has changed a little. If you dig a little deeper into Design Systems twitter you will probably see the term “Design Tokens” pop up at least once a day somewhere. Design Tokens came out of work that was being done at Salesforce with Jina and others who pioneered the creation of Design Tokens as we know them today – creating the first command line tool in Theo that had started the adoption of Design Tokens to the wider Design Systems Community. A cool term but, what are they? If you look at your client work, your companies site, the project you’re working on you should notice some parts of the page have a degree of consistency: the background colour of your form buttons is the same colour as your link text, or your text has the same margin, or your card elements have the same spacing as your media object. These are design decisions, and they should be littered across the overall design of your project. These decisions might start off in a Sketch file and make their way into code from detailed investigation of a Sketch file, or you may find that the design evolves from your design application once it gets into code. These design decisions can change, and to keep them synchronised across design and development in applications, as well as a larger documentation site in your Design System, is going to take some effort. This is where Design Tokens come in, and I find the best way to succinctly reiterate what they are is via the two following quotes… “Design Tokens are an abstraction for everything impacting the visual design of an app/platform.” – Sönke Rohde …and “We use them in place of hard-coded values in order to maintain a scale-able and consistent visual system.” – Jina There are several global design decisions that we can abstract to create a top level design token – Sizing, Font Families, Font Styles, Font Weights, Font Sizes, Line Heights, Border Styles, Border Colours, Border Radius, Horizontal Rule Colours, Background Colours, Gradients, Background Gradients, Box Shadows, Filters, Text Colours, Text Shadow, Time, Media Queries, Z Index, Icons – these can all be abstracted as required. So, spicy Sass variables? We can look at Design Tokens as an abstraction of CSS, sort of like Sass variables, but spicier. Looking at them like this we can see that they are (in either .yaml or .json) a group of related key value pairs with more information that can be added as needed. The great thing with abstracting design decisions outside of your CSS pre-processor is that you’re not tying those decisions to one platform or codebase. As a crude example, we can see here that we are defining a name and a value that could then become our color, background-color, or border-color, and more. # Colours # ------- - name: color-red value: #FF0000 - name: color-green value: #00FF00 - name: color-blue value: #0000FF - name: color-white value: #FFFFFF - name: color-black value: #000000 These can then generate our Sass variables (as an example) for our projects. $color-red: #FF0000 !default; $color-green: #00FF00 !default; $color-blue: #0000FF !default; $color-white: #FFFFFF !default; $color-black: #000000 !default; Why are they so good Ok, so we now know what Design Tokens are, but why do we need them? What makes them better than our existing solutions (css pre-processors) for defining these design decisions? I think there are 5 really good reasons why we all should start abstracting these design decisions away from the CSS that they may live in. Some of these reasons are similar to reasons some developers use a pre-processor like Sass, but with added bonuses. Consistency Much like using a CSS pre-processor or using CSS custom properties, being able to define a background colour, breakpoint, or font-size in more than one place using the same key ensures that we are using the Sass values across the entire product suite we are developing for. Using our Design Tokens in their generated formats, we can be sure to not end up with 261 shades of blue. Maintainability By using a pre-processor like Sass, or using native CSS custom properties, we can already have maintainable code in our projects. Design Tokens also do this at the abstracted level as well. Scalability “Design Tokens enable us to scale our Design across all the permutations.” – Jina At this point, we’re only talking about abstracting the design decisions for use in CSS. Having Design Tokens allows design to scale for multiple brands or multiple projects as needed. The main benefit of Design Tokens in regards to scalability is the option that it gives us to offer the Design Tokens for other platforms and frameworks as needed. With some of the tools available, we can even have these Tokens shared between applications used by designers and developers. Your marketing site and your iOS application can soon share the same design decisions codified, and you can move towards creating an Android app or web application as required. Documentation If we abstract the design decisions from one platform specific programming language it would be no good if it wasn’t made to be easily accessible. The tools and applications available that are mentioned later in this article can now create their own documentation, or allow you to create your own. This documentation is either hosted within a web-based application or can be self-hosted with the rest of your Design Systems documentation. Most of the command line tools go further and allow you do add more details that you wish to convey in the documentation, making it as unique as it is required for your project. Empowerment When you abstract your design decisions to Design Tokens, you can help empower other people on the project. With the tools available today, and the tools that are just around the corner, we can have these design decisions determined by anyone on the team. No-one necessarily needs to understand how to set up the codebase to update the colour slightly. Some of the tools I mention later on allow you to update the Design Tokens in the browser. Design Systems are already “bridging the gap” between design and development. With Design Tokens and the tooling available, we can create better team relationships by closing that gap instead. Some of the benefits of creating and using Design Tokens are the same as using a pre-processor when it comes to authoring CSS. I feel the added bonuses of being able to empower other team members and document how you use them, as well as the fundamental reasoning in that they can be platform agnostic, are all great “selling points” to why you need to start using Design Tokens today. Tools There are several tools available to help you and your team to create the required files from your abstracted Design Tokens: Command Line Tools There are several tools available on the command line that can be used as part of, or separate to, your development process. These tools allow you to define the Design Tokens in a .json or .yaml file format which can then be compiled into the formats you require. Some have built in functions to turn the inputted values to something different when compiled – for example, turning hexadecimal code that is a Design Token into a RGB value in your .css file. These command line tools, written in JavaScript, allow you to create your own ways in which you want things transformed. My current client has certain design decisions for typography in long form content (font size, weight, line height and margins) which need to be together to make sense. Being able to write JavaScript to compile these design decisions into an independent Sass map for each element allows us to develop with assurance that the long form content has the correct styling. WYSIWYG Tools WYSIWYG (What You See Is What You Get Tools) have been around for almost as long as we have been able to make websites. I can just about remember using Dreamweaver 2, before I knew what a <table> was. When browsers started to employ vendor prefixes to new CSS for their browsers, a flurry of online WYSIWYG tools came with it built in. They’re still there, but the industry has moved on. Design Tokens also have a few WYSIWYG tools available. From simpler online tools that allow you to generate the correct Sass variables needed for your design decisions to tools that store your decisions online and allow you to export them as npm packages. These types of tools for creating Design Tokens can help empower the team as a whole, with some automatically creating documentation which can easily be shared with a url. Retrofitting Tools If you are starting from scratch on a new re-design or on a new project that requires a Design System and Tokens, the many of the tools mentioned above will help you along your way. But what if you’re in the middle of a project, or you have to maintain something and want to start to create the parts required for a Design System? Luckily there are several tools and techniques to help you make a start. One new tool that might be useful is Superposition. Currently in private beta with the public release set for Q1 of 2020 Superposition helps you “Extract design tokens from websites and use them in code and in your design tool.” Entering your domain gives you a nice visual documentation of your sites styles as Design Tokens. These can then be exported as Sass Variables, CSS Custom Properties, JavaScript with the team working on exports to iOS and Android. If you have an existing site, this could be a good first step before moving to one of the other tools mentioned above. You could also make use of CSSStats or Project Wallace’s Analysis page that I mentioned earlier. This would give you an indication of what Design Tokens you would need to implement. Component Based Design So, we’ve created our Design Tokens by abstracting the design decisions of brand colours, typography, spacing and more. Is that as far as we can go? Levels of Design Decisions Once we have created our first set of Design Tokens for our project, we can take it that little bit deeper. With command line tools and some of the applications available, you can link these more global decisions to a more deeper level. For example, you can take your chosen colours and make further design decisions on the themes of your project, such as what the primary, secondary, or tertiary colours are or what your general component and layout spacing will be. With this, we can go one step further. We could also define some component specific design decisions that can then be compiled for the developer to use. Invest in time to check over the designs with a fine toothcomb and make sure you are using the correct Sass variable or CSS custom property for that component. If you are going more than one or two levels of design decision making, you can compile each set of these Design Tokens to your Sass variables which can then be used as required. So you can provide: global, theme, component level Sass variables which can be used in the project. Or you could choose to only compile what you need for the components you are creating. Variables, Maps, Custom Properties Some of the tools available for creating and maintaining your Design Tokens allow you to compile to certain programming languages. With my current client work, I am making use of Sass variables, Sass maps, and CSS custom properties. The Design Tokens are compiled into one or more of these options depending on how they will be used. Colours are compiled as global Sass variables, inside of a couple of Sass maps and CSS custom properties. Our macro layout breakpoints are defined as a single Sass map. If we know we are creating a component that has the ability to be themed, we can make use of CSS custom properties to reduce the amount of CSS we need to override, and also allow us to inline things that can be changed via a CMS as required. Which leaves us using Sass variables for parts of a component that won’t change. We are using Sass maps differently still. As mentioned, we generate a Sass map containing the design decisions for each element of text, and we can use long form text. This Sass map is then compiled into separate CSS declarations as needed using Sass mixins. I find the beauty of being able to make use of the global, themed, and component level design decisions by compiling them into various formats (that essentially become CSS) and that gives us more power in authoring components. Creating Consistent Utility Classes As you have created your more global generic design decisions, you can create your own small set of utility classes. Using a pre-processor like Sass you can define a set of mixins and functions that can take your Design Tokens that have been compiled down into variables and maps and generate separate classes for each design decision. By making tokens available to all digital teams, we can enable them to create custom experiences that are aligned to current visual standards when a component does not (or will not) exist in the design system. Maya King In creating utility classes with Design Tokens (using something like Sass) you have consistency with the overall Design System for times when you or a team need to create a one-off component for a project. These exceptions tend to be something that won’t make it as part of the overall Design System, but it still needs that look and feel. Having classes available that we can guarantee use the generic, global design decisions from the Design Tokens means these one-off components should be well on their way to have the overall look and feel of the project, and will get any updates with little to no additional overhead. Wrapping Up I think we are starting to see the potential of using Design Tokens as Design Systems become even more popular. I think that, from this overview, we can see how they can help us close the gap that still exists in places between the designers and developers on the team. They can help empower people who do not code to make changes that can be automatically updating live work. I think you can start now. You may not have or need what you could term “a fully-fledged Design System” but this small step will help move towards one in the future and give you instant benefits of consistency and maintainability now. If you want more Design Tokens, as well as the links that are dotted around this article I also maintain a GitHub repo of Awesome Design Tokens which I try to keep updated with links to tools, articles, examples, videos, and anything else that’s related to Design Tokens. About the author Stuart Robson is a freelance front-end developer and design systems advocate who curates the design systems newsletter - news.design.systems More articles by Stuart Full Article Design style-guides
one Building a Dictaphone Using Media Recorder and getUserMedia By 24ways.org Published On :: Tue, 17 Dec 2019 12:00:00 +0000 Chris Mills brushes up his shorthand and shows how the MediaStream Recording API in modern browsers can be used to capture audio directly from the user’s device. Inching ever closer to the capabilities of native software, it truly is an exciting time to be a web developer. The MediaStream Recording API makes it easy to record audio and/or video streams. When used with MediaDevices.getUserMedia(), it provides an easy way to record media from the user’s input devices and instantly use the result in web apps. This article shows how to use these technologies to create a fun dictaphone app. A sample application: Web Dictaphone To demonstrate basic usage of the MediaRecorder API, we have built a web-based dictaphone. It allows you to record snippets of audio and then play them back. It even gives you a visualisation of your device’s sound input, using the Web Audio API. We’ll just concentrate on the recording and playback functionality in this article, for brevity’s sake. You can see this demo running live, or grab the source code on GitHub. This has pretty good support on modern desktop browsers, but pretty patchy support on mobile browsers currently. Basic app setup To grab the media stream we want to capture, we use getUserMedia(). We then use the MediaRecorder API to record the stream, and output each recorded snippet into the source of a generated <audio> element so it can be played back. We’ll first declare some variables for the record and stop buttons, and the <article> that will contain the generated audio players: const record = document.querySelector('.record'); const stop = document.querySelector('.stop'); const soundClips = document.querySelector('.sound-clips'); Next, we set up the basic getUserMedia structure: if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { console.log('getUserMedia supported.'); navigator.mediaDevices.getUserMedia ( // constraints - only audio needed for this app { audio: true }) // Success callback .then(function(stream) { }) // Error callback .catch(function(err) { console.log('The following `getUserMedia` error occured: ' + err); } ); } else { console.log('getUserMedia not supported on your browser!'); } The whole thing is wrapped in a test that checks whether getUserMedia is supported before running anything else. Next, we call getUserMedia() and inside it define: The constraints: Only audio is to be captured for our dictaphone. The success callback: This code is run once the getUserMedia call has been completed successfully. The error/failure callback: The code is run if the getUserMedia call fails for whatever reason. Note: All of the code below is found inside the getUserMedia success callback in the finished version. Capturing the media stream Once getUserMedia has created a media stream successfully, you create a new Media Recorder instance with the MediaRecorder() constructor and pass it the stream directly. This is your entry point into using the MediaRecorder API — the stream is now ready to be captured into a <Blob>, in the default encoding format of your browser. const mediaRecorder = new MediaRecorder(stream); There are a series of methods available in the MediaRecorder interface that allow you to control recording of the media stream; in Web Dictaphone we just make use of two, and listen to some events. First of all, MediaRecorder.start() is used to start recording the stream once the record button is pressed: record.onclick = function() { mediaRecorder.start(); console.log(mediaRecorder.state); console.log("recorder started"); record.style.background = "red"; record.style.color = "black"; } When the MediaRecorder is recording, the MediaRecorder.state property will return a value of “recording”. As recording progresses, we need to collect the audio data. We register an event handler to do this using mediaRecorder.ondataavailable: let chunks = []; mediaRecorder.ondataavailable = function(e) { chunks.push(e.data); } Last, we use the MediaRecorder.stop() method to stop the recording when the stop button is pressed, and finalize the Blob ready for use somewhere else in our application. stop.onclick = function() { mediaRecorder.stop(); console.log(mediaRecorder.state); console.log("recorder stopped"); record.style.background = ""; record.style.color = ""; } Note that the recording may also stop naturally if the media stream ends (e.g. if you were grabbing a song track and the track ended, or the user stopped sharing their microphone). Grabbing and using the blob When recording has stopped, the state property returns a value of “inactive”, and a stop event is fired. We register an event handler for this using mediaRecorder.onstop, and construct our blob there from all the chunks we have received: mediaRecorder.onstop = function(e) { console.log("recorder stopped"); const clipName = prompt('Enter a name for your sound clip'); const clipContainer = document.createElement('article'); const clipLabel = document.createElement('p'); const audio = document.createElement('audio'); const deleteButton = document.createElement('button'); clipContainer.classList.add('clip'); audio.setAttribute('controls', ''); deleteButton.innerHTML = "Delete"; clipLabel.innerHTML = clipName; clipContainer.appendChild(audio); clipContainer.appendChild(clipLabel); clipContainer.appendChild(deleteButton); soundClips.appendChild(clipContainer); const blob = new Blob(chunks, { 'type' : 'audio/ogg; codecs=opus' }); chunks = []; const audioURL = window.URL.createObjectURL(blob); audio.src = audioURL; deleteButton.onclick = function(e) { let evtTgt = e.target; evtTgt.parentNode.parentNode.removeChild(evtTgt.parentNode); } } Let’s go through the above code and look at what’s happening. First, we display a prompt asking the user to name their clip. Next, we create an HTML structure like the following, inserting it into our clip container, which is an <article> element. <article class="clip"> <audio controls></audio> <p>_your clip name_</p> <button>Delete</button> </article> After that, we create a combined Blob out of the recorded audio chunks, and create an object URL pointing to it, using window.URL.createObjectURL(blob). We then set the value of the <audio> element’s src attribute to the object URL, so that when the play button is pressed on the audio player, it will play the Blob. Finally, we set an onclick handler on the delete button to be a function that deletes the whole clip HTML structure. So that’s basically it — we have a rough and ready dictaphone. Have fun recording those Christmas jingles! As a reminder, you can find the source code, and see it running live, on the MDN GitHub. This article is based on Using the MediaStream Recording API by Mozilla Contributors, and is licensed under CC-BY-SA 2.5. About the author Chris Mills manages the MDN web docs writers’ team at Mozilla, which involves spreadsheets, meetings, writing docs and demos about open web technologies, and occasional tech talks at conferences and universities. He used to work for Opera and W3C, and enjoys playing heavy metal drums and drinking good beer. More articles by Chris Full Article Code apis
one Five Interesting Ways to Use Array.reduce() (And One Boring Way) By 24ways.org Published On :: Wed, 18 Dec 2019 12:00:00 +0000 Chris Ferdinandi turns the heat down low and lets the sauce reduce while we take a look at how to add spice to our source with a sprinkling of Array.reduce(). Just a little ingenuity with the humblest of functions. Of all the modern array methods, the one I had the hardest time wrapping my head around was Array.reduce(). On the surface, it seems like a simple, boring method that doesn’t do much. But below its humble exterior, Array.reduce() is actually a powerful, flexible addition to your developer toolkit. Today, we’re going to look at some cool things you can do with Array.reduce(). How Array.reduce() works Most of the modern array methods return a new array. The Array.reduce() method is a bit more flexible. It can return anything. Its purpose is to take an array and condense its content into a single value. That value can be a number, a string, or even an object or new array. That’s the part that’s always tripped me up – I didn’t realize just how flexible it is! The syntax The Array.reduce() accepts two arguments: a callback method to run against each item in the array, and a starting value. The callback also accepts two arguments: the accumulator, which is the current combined value, and the current item in the loop. Whatever you return is used as the accumulator for the next item in the loop. On the very first loop, that starting value is used instead. var myNewArray = [].reduce(function (accumulator, current) { return accumulator; }, starting); Let’s look at some examples to make this all tangible. 1. Adding numbers together Let’s say you had an array of numbers that you wanted to add together. Using Array.forEach(), you might do something like this: var total = 0; [1, 2, 3].forEach(function (num) { total += num; }); This is the cliche example for using Array.reduce(). I find the word accumulator confusing, so in this example, I’m calling it sum, because that’s what it is. var total = [1, 2, 3].reduce(function (sum, current) { return sum + current; }, 0); Here, we pass in 0 as our starting value. In the callback, we add the current value to the sum, which has our starting value of 0 on the first loop, then 1 (the starting value of 0 plus the item value of 1), then 3 (the sum value of 1 plus the item value of 2), and so on. Here’s a demo. 2. Combining multiple array methods into Array.map() and Array.filter() into a single step Imagine you had an array of wizards at Hogwarts. var wizards = [ { name: 'Harry Potter', house: 'Gryfindor' }, { name: 'Cedric Diggory', house: 'Hufflepuff' }, { name: 'Tonks', house: 'Hufflepuff' }, { name: 'Ronald Weasley', house: 'Gryfindor' }, { name: 'Hermione Granger', house: 'Gryfindor' } ]; You want to create a new array that contains just the names of wizards who are in Hufflepuff. One way you could do that is by using the Array.filter() method to get back just wizards whose house property is Hufflepuff. Then, you’d use the Array.map() method to create a new array containing just the name property for the remaining wizards. // Get the names of the wizards in Hufflepuff var hufflepuff = wizards.filter(function (wizard) { return wizard.house === 'Hufflepuff'; }).map(function (wizard) { return wizard.name; }); With the Array.reduce() method, we can get the same array in a single pass, improving our performance. You pass in an empty array ([]) as the starting value. On each pass, you check to see if the wizard.house is Hufflepuff. If it is, you push it to the newArr (our accumulator in this example). If not, you do nothing. Either way, you return the newArr to become the accumulator on the next pass. // Get the names of the wizards in Hufflepuff var hufflepuff = wizards.reduce(function (newArr, wizard) { if (wizard.house === 'Hufflepuff') { newArr.push(wizard.name); } return newArr; }, []); Here’s another demo. 3. Creating markup from an array What if, instead of creating an array of names, we wanted to create an unordered list of wizards in Hufflepuff? Instead of passing an empty array into Array.reduce() as our starting value, we’ll pass in an empty string ('') and call it html. If the wizard.house equals Hufflepuff, we’ll concatenate our html string with the wizard.name wrapped in an opening and closing list item (li). Then, we’ll return the html to become the accumulator on the next loop. // Create a list of wizards in Hufflepuff var hufflepuffList = wizards.reduce(function (html, wizard) { if (wizard.house === 'Hufflepuff') { html += '<li>' + wizard.name + '</li>'; } return html; }, ''); Add an opening and closing unordered list element before and after Array.reduce(), and you’re ready to inject your markup string into the DOM. // Create a list of wizards in Hufflepuff var hufflepuffList = '<ul>' + wizards.reduce(function (html, wizard) { if (wizard.house === 'Hufflepuff') { html += '<li>' + wizard.name + '</li>'; } return html; }, '') + '</ul>'; See it in action here. 4. Grouping similar items in an array together The lodash library has a groupBy() method takes a collection of items as an array and groups them together into an object based on some criteria. Let’s say you want an array of numbers. If you wanted to group all of the items in numbers together based on their integer value, you would do this with lodash. var numbers = [6.1, 4.2, 6.3]; // returns {'4': [4.2], '6': [6.1, 6.3]} _.groupBy(numbers, Math.floor); If you had an array of words, and you wanted to group the items in words by their length, you would do this. var words = ['one', 'two', 'three']; // returns {'3': ['one', 'two'], '5': ['three']} _.groupBy(words, 'length'); Creating a groupBy() function with Array.reduce() You can recreate that same functionality using the Array.reduce() method. We’ll create a helper function, groupBy(), that accepts the array and criteria to sort by as arguments. Inside groupBy(), we’ll run Array.reduce() on our array, passing in an empty object ({}) as our starting point, and return the result. var groupBy = function (arr, criteria) { return arr.reduce(function (obj, item) { // Some code will go here... }, {}); }; Inside the Array.reduce() callback function, we’ll check to see if the criteria is a function, or a property of the item. Then we’ll get its value from the current item. If there’s no property in the obj with that value yet, we’ll create it and assign an empty array as its value. Finally, we’ll push the item to that key, and return the object as the accumulator for the next loop. var groupBy = function (arr, criteria) { return arr.reduce(function (obj, item) { // Check if the criteria is a function to run on the item or a property of it var key = typeof criteria === 'function' ? criteria(item) : item[criteria]; // If the key doesn't exist yet, create it if (!obj.hasOwnProperty(key)) { obj[key] = []; } // Push the value to the object obj[key].push(item); // Return the object to the next item in the loop return obj; }, {}); }; Here’s a demo of the completed helper function. Special thanks to Tom Bremer for helping me make some improvements to this one. You can find this helper function and more like it on the Vanilla JS Toolkit. 5. Combining data from two sources into an array Remember our array of wizards? var wizards = [ { name: 'Harry Potter', house: 'Gryfindor' }, { name: 'Cedric Diggory', house: 'Hufflepuff' }, { name: 'Tonks', house: 'Hufflepuff' }, { name: 'Ronald Weasley', house: 'Gryfindor' }, { name: 'Hermione Granger', house: 'Gryfindor' } ]; What if you had another data set, an object of house points each wizard has earned. var points = { HarryPotter: 500, CedricDiggory: 750, RonaldWeasley: 100, HermioneGranger: 1270 }; Imagine you wanted to combine both sets of data into a single array, with the number of points added to each wizard’s data in the wizards array. How would you do it? The Array.reduce() method is perfect for this! var wizardsWithPoints = wizards.reduce(function (arr, wizard) { // Get the key for the points object by removing spaces from the wizard's name var key = wizard.name.replace(' ', ''); // If the wizard has points, add them // Otherwise, set them to 0 if (points[key]) { wizard.points = points[key]; } else { wizard.points = 0; } // Push the wizard object to the new array arr.push(wizard); // Return the array return arr; }, []); Here’s a demo combining data from two sources into an array. 6. Combining data from two sources into an object What if you instead wanted to combine the two data sources into an object, where each wizard’s name was the key, and their house and points were properties? Again, the Array.reduce() method is perfect for this. var wizardsAsAnObject = wizards.reduce(function (obj, wizard) { // Get the key for the points object by removing spaces from the wizard's name var key = wizard.name.replace(' ', ''); // If the wizard has points, add them // Otherwise, set them to 0 if (points[key]) { wizard.points = points[key]; } else { wizard.points = 0; } // Remove the name property delete wizard.name; // Add wizard data to the new object obj[key] = wizard; // Return the array return obj; }, {}); Here’s a demo combining two data sets into an object. Should you use Array.reduce() more? The Array.reduce() method has gone from being something I thought was pointless to my favorite JavaScript method. So, should you use it? And when? The Array.reduce() method has fantastic browser support. It works in all modern browsers, and IE9 and above. It’s been supported in mobile browsers for a long time, too. If you need to go back even further than that, you can add a polyfill to push support back to IE6. The biggest complaint you can make about Array.reduce() is that it’s confusing for people who have never encountered it before. Combining Array.filter() with Array.map() is slower to run and involves extra steps, but it’s easier to read. It’s obvious from the names of the methods what they’re supposed to be doing. That said, there are times where Array.reduce() makes things that would be complicated more simple rather than more complicated. The groupBy() helper function is a good example. Ultimately, this is another tool to add to your toolkit. A tool that, if used right, can give you super powers. About the author Chris Ferdinandi helps people learn vanilla JavaScript. He believes there’s a simpler, more resilient way to make things for the web. Chris is the author of the Vanilla JS Pocket Guide series, creator of the Vanilla JS Academy training program, and host of the Vanilla JS Podcast. His developer tips newsletter is read by thousands of developers each weekday. He’s taught developers at organizations like Chobani and the Boston Globe, and his JavaScript plugins have been used used by Apple and Harvard Business School. Chris Coyier, the founder of CSS-Tricks and CodePen, has described his writing as “infinitely quote-worthy.” Chris loves pirates, puppies, and Pixar movies, and lives near horse farms in rural Massachusetts. He runs Go Make Things with Bailey Puppy, a lab-mix from Tennessee. More articles by Chris Full Article Code javascript
one Flexible Captioned Slanted Images By 24ways.org Published On :: Sat, 21 Dec 2019 12:00:00 +0000 Eric Meyer gift wraps the most awkwardly shaped of boxes using nothing but CSS, HTML and a little curl of ribbon. No matter how well you plan and how much paper you have at your disposal, sometimes you just need to slant the gift to the side. We have a lot of new layout tools at our disposal these days—flexbox is finally stable and interoperable, and Grid very much the same, with both technologies having well over 90% support coverage. In that light, we might think there’s no place for old tricks like negative margins, but I recently discovered otherwise. Over at An Event Apart, we’ve been updating some of our landing pages, and our designer thought it would be interesting to have slanted images of speakers at the tops of pages. The end result looks like this. The interesting part is the images. I wanted to set up a structure like the following, so that it will be easy to change speakers from time to time while preserving accessible content structures: <div id="page-top"> <ul class="monoliths"> <li> <a href="https://aneventapart.com/speakers/rachel-andrew"> <img src="/img/rachel-andrew.jpg" alt=""> <div> <strong>Rachel Andrew</strong> CSS Grid </div> </a> </li> <li> <a href="https://aneventapart.com/speakers/derek-featherstone"> <img src="/img/derek-featherstone.jpg" alt=""> <div> <strong>Derek Featherstone</strong> Accessibility </div> </a> </li> <li> … </li> <li> … </li> </ul> </div> The id value for the div is straightforward enough, and I called the ul element monoliths because it reminded me of the memorial monoliths at the entrance to EPCOT in Florida. I’m also taking advantage of the now-ubiquitous ability to wrap multiple elements, including block elements, in a hyperlink. That way I can shove the image and text structures in there, and make the entire image and text below it one link. Structure is easy, though. Can we make that layout fully responsive? I wondered. Yes we can. Here’s the target layout, stripped of the navbar and promo copy. So let’s start from the beginning. The div gets some color and text styling, and the monoliths list is set to flex. The images are in a single line, after all, and I want them to be flexible for responsive reasons, so flexbox is 100% the right tool for this particular job. #page-top { background: #000; color: #FFF; line-height: 1; } #page-top .monoliths { display: flex; padding-bottom: 1em; overflow: hidden; } I also figured, let’s give the images a simple basis for sizing, and set up the hyperlink while we’re at it. #page-top .monoliths li { width: 25%; } #page-top .monoliths a { color: inherit; text-decoration: inherit; display: block; padding: 1px; } So now the list items are 25% wide—I can say that because I know there will be four of them—and the links pick up the foreground color from their parent element. They’re also set to generate a block box. At this point, I could concentrate on the images. They need to be as wide as their parent element, but no wider, and also match height. While I was at it, I figured I’d create a little bit of space above and below the captioning text, and make the strong elements containing speakers’ names generate a block box. #page-top .monoliths img { display: block; height: 33rem; width: 100%; } #page-top .monoliths div { padding: 0.5em 0; } #page-top .monoliths strong { display: block; font-weight: 900; } It looks like the speakers were all cast into the Phantom Zone or something, so that needs to be fixed. I can’t physically crop the images to be the “correct” size, because there is no correct size: this needs to work across all screen widths. So rather than try to swap carefully-sized images in and out at various breakpoints, or complicate the structure with a wrapper element set to suppress overflow of resized images, I turned to object-fit. #page-top .monoliths img { display: block; height: 33rem; width: 100%; object-fit: cover; object-position: 50% 20%; } If you’ve never used object-fit, it’s a bit like background-size. You can use it to resize image content within the image’s element box without creating distortions. Here, I set the fit sizing to cover, which means all of the img element’s element box will be covered by image content. In this case, it’s like zooming in on the image content. I also set a zooming origin with object-position, figuring that 50% across and 20% down would be in the vicinity of a speaker’s face, given the way pictures of people are usually taken. This is fairly presentable as-is—a little basic, perhaps, but it would be fine to layer the navbar and promo copy back over it with Grid or whatever, and call it a day. But it’s too square and boxy. We must go further! To make that happen, I’m going to take out the third and fourth images temporarily, so we can see more clearly how the next part works. That will leave us with Rachel and Derek. The idea here is to clip the images to be slanted, and then pull them close to each other so they have just a little space between them. The first part is managed with clip-path, but we don’t want to pull the images together unless their shapes are being clipped. So we set up a feature query. @supports (clip-path: polygon(0 0)) or (-webkit-clip-path: polygon(0 0)) { #page-top .monoliths li { width: 37.5%; } } I decided to test for both the un-prefixed and WebKit-prefixed versions of clip-path because Safari still requires the prefix, and I couldn’t think of a good reason to penalize Safari’s users for the slowness of its standards advancement. Then I made the images wider, taking them from 25% to 37.5%, which makes them half again as wide. Thanks to object fitting, the images don’t distort when I change their parent’s width; they just get wider and scale up the contents to fit. And now, it is time for clipping! @supports (clip-path: polygon(0 0)) or (-webkit-clip-path: polygon(0 0)) { #page-top .monoliths li { width: 37.5%; -webkit-clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%); clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%); } } Each coordinate pair in the polygon() is like the position pairs in background-position or object-position: the horizontal distance first, followed by the vertical distance. So the first point in the polygon is 25% 0, which is 25% of the way across the element box, and no distance down, so right at the top edge. 100% 0 is the top right corner. 75% 100% is on the bottom edge, three-quarters of the way across the element, and 0 100% is the bottom left corner. That creates a polygon that’s a strip three-quarters the full width of the element box, and runs from bottom left to top right. Now we just have to pull them together, and this is where old tricks come back into play: all we need is a negative right margin to bring them closer together. #page-top .monoliths li { width: 37.5%; margin-right: -7.5%; -webkit-clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%); clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%); } The separation between them is a little wider than we were originally aiming for, but let’s see what happens when we add the other two images back in and let flexbox do its resizing magic. Your browser doesn’t support HTML5 video. Here is a link to the video instead. Notice how the slants actually change shape as the screen gets narrower or wider. This is because they’re still three-quarters the width of the image element’s box, but the width of that box is changing as the screen width changes. That means at narrow widths, the slant is much steeper, whereas at wide widths, the slant is more shallow. But since the clipping path’s coordinates were all set with percentage distances, they all stay parallel to each other while being completely responsive to changes in screen size. An absolute measure like pixels would have failed. But how did the images get closer together just by adding in two more? Because the list items’ basic sizing added up to more than 100%, and they’re all set to flex-shrink: 1. No, you didn’t miss a line in the CSS: 1 is the default value for flex-shrink. Flex items will shrink by default, which after all is what we should expect from a flexible element. If you want to know how much they shrunk, and why, here’s what Firefox’s flex inspector reports. When there were only two list items, there was space enough for both to be at their base size, with no shrinkage. Once we went to four list items, there wasn’t enough space, so they all shrank down. At that point, having a negative right margin of -7.5% was just right to pull them together to act as a unit. So, now they’re all nicely nestled together, and fully responsive! The captions need a little work, though. Notice how they’re clipped off a bit on the left edge, and can be very much clipped off on the right side at narrower screen widths? This happens because the li elements are being clipped, and that clipping applies to all their contents, images and text alike. And we can’t use overflow to alter this: clipped is clipped, not overflowed. Fortunately, all we really need to do is push the text over a small amount. Inside the feature query, I added: #page-top .monoliths div { padding-left: 2%; padding-right: 26%; } This shifts the text just a bit rightward, enough to clear the clip path. On the right side, I padded the div boxes so their contents wouldn’t fall outside the clipped area and appear to slide under the next caption. We could also use margins here, but I didn’t for reasons I’ll make clear at the end. At the last minute, I decided to make the text at least appear to follow the slants of the images. For that, I just needed to shift the first line over a bit, which I did with a bit more padding. #page-top .monoliths strong { padding-left: 1%; } That’s all to the good, but you may have noticed the captions still overlap at really narrow screen widths. There are a lot of options here, from stacking the images atop one another to reverting to normal flow, but I decided to just hide the captions if things got too narrow. It reduces clutter without sacrificing too much in the way of content, and by leaving them still technically visible, they seem to remain accessible. @media (max-width: 35rem) { #page-top .monoliths div { opacity: 0.01 } } And that, as they say, is that! Fully responsive slanted images with text, in an accessible markup structure. I dig it. I did fiddle around with the separations a bit, and found that a nice thin separator occurred around margin-right: -8%, whereas beefier ones could be found above -7%. And if you crank the negative margin value to something beyond -8%, you’ll make the images overlap entirely, no visible separation—which can be a useful effect in its own right. I promised to say why I used padding for the caption text div rather than margins. Here’s why. #page-top .monoliths div { padding-left: 3%; padding-right: 26%; border-top: 2px solid transparent; background: linear-gradient(100deg,hsl(292deg,50%,50%) 50%, transparent 85%); background-clip: padding-box; } It required a wee bit more padding on the left to look decent, and an alteration to the background clipping box in order to keep the purple from filling the transparent border area, but the end result is pretty nifty, if I do say so myself. Alternatively, we could drop the background gradient on the captions and put one in the background, with a result like this. I have no doubt this technique could be extended, made more powerful, and generally improved upon. I really wished for subgrid support in Chrome, so that I could put everything on a grid without having to tear the markup structure apart, and there are doubtless even more interesting clipping paths and layout patterns to try out. I hope these few ideas spark some much better ideas in you, and that you’ll share them with us! About the author Eric A. Meyer (@meyerweb) has been a burger flipper, a college webmaster, an early blogger, one of the original CSS Samurai, a member of the CSS Working Group, a consultant and trainer, and a Standards Evangelist for Netscape. Among other things, Eric co-wrote Design For Real Life with Sara Wachter-Boettcher for A Book Apart and CSS: The Definitive Guide with Estelle Weyl for O’Reilly, created the first official W3C test suite, assisted in the creation of microformats, and co-founded An Event Apart with Jeffrey Zeldman. Eric lives with his family in Cleveland, Ohio, which is a much nicer city than you’ve probably heard. He enjoys a good meal whenever he can and considers almost every form of music to be worthwhile. More articles by Eric Full Article Design css
one Crop tops with cream cones By www.thehindu.com Published On :: Mon, 08 Aug 2016 18:15:28 +0530 Full Article Metroplus
one Is anyone listening? By www.thehindu.com Published On :: Thu, 08 Sep 2016 17:15:57 +0530 Archana Shah says it is time people heard the stories of our craftspeople and gave them a place in the sun Full Article Metroplus
one Say cheers to this one! By www.thehindu.com Published On :: Thu, 31 Mar 2016 17:42:24 +0530 Cold pressed juices are the latest health fad to hit Bengaluru. Nikhil Varma takes a sip. Full Article Metroplus
one Editorial. Monetary easing in the West good news for India By www.thehindubusinessline.com Published On :: Sun, 04 Aug 2024 20:59:50 +0530 But food inflation could hold the RBI’s hand in reversing its interest rate cycle in the near future Full Article Editorial
one Editorial. Monetary policy can’t quell stubborn food inflation By www.thehindubusinessline.com Published On :: Wed, 16 Oct 2024 20:45:56 +0530 Monetary policy cannot do very much to control food inflation, given that it is caused by supply bottlenecks rather than increase in demand Full Article Editorial
one Aptus Value Housing posts 16% rise in Q2 standalone net at ₹137 cr By www.thehindubusinessline.com Published On :: Tue, 05 Nov 2024 19:58:43 +0530 The Company achieved a 22 per cent % year-on-year increase in net profit in Q2 FY25, driven by business growth, stable asset quality, and a continuous focus on enhancing productivity Full Article Money & Banking
one LIC Q2FY25 results second quarter standalone net profit declined about 4% By www.thehindubusinessline.com Published On :: Fri, 08 Nov 2024 20:30:08 +0530 Second quarter standalone net profit declined about 4 per cent year-on-year (y-o-y) to Rs ₹7,621 crore Full Article Money & Banking
one Alone in the Abyss / directed by: Claudie Ottawa ; produced by: Manon Barbeau, Patricia Bergeron, Manon Barbeau, Yves Bisaillon, Ravida Din ; production agencies: Corporation Wapikoni mobile (Montreal), National Film Board of Canada (Montreal) By darius.uleth.ca Published On :: Montreal : National Film Board of Canada, 2018 Full Article
one Drone pilot training to be launched at Vikarama Simhapuri University in Nellore By www.thehindu.com Published On :: Sat, 09 Nov 2024 19:32:14 +0530 A consortium of five companies will sign an MoU with the university to co-create a certification programme in Drone Engineering Full Article Andhra Pradesh
one Endowments Secretary and Commissioner takes oath as ex-officio member of TTD Trust Board By www.thehindu.com Published On :: Mon, 11 Nov 2024 18:58:44 +0530 Full Article Andhra Pradesh
one Andhra Pradesh govt.. to deploy ‘kisan drones’ in agriculture sector this year By www.thehindu.com Published On :: Tue, 12 Nov 2024 07:56:53 +0530 The drones would be mainly helpful in spraying fertilizer and pesticides, and said all villages in the State are targeted to be covered in three years, says Minister Atchannaidu Full Article Andhra Pradesh
one Guarantee scheme detractors disillusioned over Karnataka’s economic growth, says Laxmi Hebbalkar By www.thehindu.com Published On :: Sat, 02 Nov 2024 07:00:00 +0530 Karnataka has achieved 10.2% GDP in 2023-24, higher to national average of 8.2%, says Udupi district in-charge minister Full Article Mangaluru
one Vending zone to be functional from November 13 By www.thehindu.com Published On :: Mon, 11 Nov 2024 20:01:52 +0530 Full Article Mangaluru
one Collective action can promote culture of honesty, Maharashtra Upa Lokayukta By www.thehindu.com Published On :: Mon, 11 Nov 2024 20:44:08 +0530 Full Article Mangaluru
one Wine merchants deny allegations of giving money for Maharashtra polls By www.thehindu.com Published On :: Mon, 11 Nov 2024 22:12:56 +0530 Full Article Mangaluru
one Odisha Civil Services prelims postponed due to Dana By www.thehindu.com Published On :: Wed, 23 Oct 2024 19:13:14 +0530 Full Article Education
one Know your English | He puts his pants on one leg at a time By www.thehindu.com Published On :: Mon, 28 Oct 2024 08:30:00 +0530 Understanding the difference between ‘breakdown’ and ‘break down’ and the pronunciation of ‘opine’ in English language Full Article Education
one Indian HEIs tuning to global rankings; private ones taking the lead By www.thehindu.com Published On :: Wed, 30 Oct 2024 06:30:00 +0530 While government HEIs have improved their positions in THE and QS rankings, private ones that have implemented various measures for research and international engagement have done better. Full Article Education
one Putting the smartphone in its place By www.thehindu.com Published On :: Sat, 09 Nov 2024 17:13:22 +0530 A mathematics teacher turned counsellor is on a mission to promote digital well-being across classrooms and homes Full Article Chennai
one Ashok Leyland standalone Q2 net up 37% to ₹770 cr. By www.thehindu.com Published On :: Fri, 08 Nov 2024 19:32:29 +0530 Full Article Business
one India Cements standalone Q2 net loss widens to ₹240 cr. By www.thehindu.com Published On :: Fri, 08 Nov 2024 21:48:21 +0530 Full Article Business
one Ramco Cements Q2 standalone net skids to ₹26 cr. on weak demand By www.thehindu.com Published On :: Mon, 11 Nov 2024 22:00:24 +0530 Full Article Business
one Island City: Loneliness, love and longing By www.thehindu.com Published On :: Fri, 02 Sep 2016 08:37:03 +0530 Three stories compellingly underline the theme of freedom from oppression in Island City. Full Article Cinema
one Akira: breaks bones, but not stereotypes By www.thehindu.com Published On :: Fri, 02 Sep 2016 16:09:36 +0530 'Akira' is yet another film in which being a strong woman essentially means having to suffer and sacrifice Full Article Reviews
one ‘Macharla Niyojakavargam’ movie review: An extra loud, outdated actioner By www.thehindu.com Published On :: Fri, 12 Aug 2022 15:35:36 +0530 This cringey Telugu potboiler starring Nithiin and Krithi Shetty is a test of patience Full Article Movies
one ‘Custody’ movie review: Venkat Prabhu’s mix of conflict and humour works for this Naga Chaitanya, Arvind Swami actioner By www.thehindu.com Published On :: Fri, 12 May 2023 15:57:16 +0530 Director Venkat Prabhu’s Telugu-Tamil bilingual ‘Custody’ is not among his best, but has plenty going for it Full Article Movies
one India in consultation with Indonesia at WTO over duty on ceramic tiles By www.thehindubusinessline.com Published On :: Tue, 27 Aug 2024 21:07:09 +0530 Exports from India dipped since Indonesia imposed safeguard duties on the product Full Article Real Estate
one Realty firms account for 17% of QIP money raised this year By www.thehindubusinessline.com Published On :: Mon, 28 Oct 2024 18:55:49 +0530 Of the ₹75,923 crore raised via QIPs till September, realty firms raised ₹12,801 crore Full Article Markets
one Swapping old ones for new By www.thehindu.com Published On :: Fri, 20 Jul 2012 19:55:29 +0530 Full Article Arts
one Something for everyone By www.thehindu.com Published On :: Thu, 10 Jan 2013 20:24:51 +0530 Ethnic wear, jewellery, knick knacks…. this fair has it all Full Article Metroplus
one One craft at a time By www.thehindu.com Published On :: Thu, 08 Dec 2022 12:18:28 +0530 An opportunity for Hyderabadis to shops all the crafts of Kutch under one roof Full Article Life & Style
one Facile one-pot synthesis of novel imidates as multifunctional organic fluorescent materials By pubs.rsc.org Published On :: Org. Chem. Front., 2024, Advance ArticleDOI: 10.1039/D4QO01628A, Research ArticleFeng-Ting Liu, Shuo Wang, Yong-Shun Chen, Jun-Ying Miao, Bao-Xiang Zhao, Zhao-Min LinA novel one-pot synthesis of multifunctional organic fluorescent imidates from quinolinium salt derivatives, nitrosoarenes and alcohols was presented. This method had a wide substrate scope and excellent isolated yields.To cite this article before page numbers are assigned, use the DOI form of citation above.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
one Towards the total synthesis of mandelalide B: construction of the tetrahydrofuran/α-hydroxyl lactone fragment By pubs.rsc.org Published On :: Org. Chem. Front., 2024, 11,6353-6357DOI: 10.1039/D4QO01433B, Research ArticleJia-Lei Yan, Jie Yu, Yingying Cheng, Mingze Yang, Zhengshuang Xu, Tao YeA stereocontrolled synthesis of the tetrahydrofuran/α-hydroxy lactone fragment of mandelalide B has been accomplished. The synthesis features a Horner-Wadsworth-Emmons fragment assembly strategy and a highly stereospecific iodine-induced cyclization.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
one Transition-metal-catalyzed regiodivergent sulfonylation of aziridrines for the synthesis of β-amino sulfones By pubs.rsc.org Published On :: Org. Chem. Front., 2024, 11,6340-6346DOI: 10.1039/D4QO01376J, Research ArticleQinqiong Zeng, Yujia Gong, Xiaochun He, Xuemei Zhang, Zhong LianWe developed the first transition-metal-catalyzed, regiodivergent sulfonylation of aziridines, enabling the efficient synthesis of diverse β-amino sulfones under mild conditions with broad substrate compatibility and high regioselectivity.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
one Chiral synthetic unprecedented spiro[indoline-2,3'-thiophen]-3-ones via an organocatalytic asymmetric sulfa-Michael/aldol cascade reaction By pubs.rsc.org Published On :: Org. Chem. Front., 2024, 11,6426-6436DOI: 10.1039/D4QO01551G, Research ArticleMao Zhang, Xing-Hai Fei, Gui-Ping Yang, Cheng Lin, Wen-Jie Li, Ming-Liang Rao, Meng Zhou, Chong Zhao, Bin He, Yong-Long ZhaoA cinchona-derived squaramide-catalyzed asymmetric sulfa-Michael/aldol cascade reaction of 2-ylideneoxindoles with 1,4-dithiane-2,5-diol was developed to realize the chiral synthesis of spiro[indoline-2,3'-thiophen]-3-ones.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article
one Asymmetric synthesis of (aza)flavanones by the evolution of CarOx ligands By pubs.rsc.org Published On :: Org. Chem. Front., 2024, 11,6444-6449DOI: 10.1039/D4QO01345J, Research ArticleJuan Yang, Wenlong Kong, Mingxin Chang, Jixing Lai, Shengkun LiAmino-pyridine-oxazoline (NHPyOx) is conceived as an unprecedented model via the core-emulating optimization of CarOx ligands.The content of this RSS Feed (c) The Royal Society of Chemistry Full Article