PhpStorm now bundles WordPress coding style natively, starting from version 8.
- Go to
Project Settings>Code Style>PHP. - Select
Set From...(top right of window) >Predefined Style>WordPress.
No longer need to muck with this import! :)
| Online Dev Tutorial Site | |
| video2brain https://www.video2brain.com | |
| tutsplus https://tutsplus.com | |
| lynda http://www.lynda.com | |
| pluralsight http://pluralsight.com | |
| Infinite Skills http://www.infiniteskills.com | |
| udemy https://www.udemy.com | |
| teamtreehouse http://teamtreehouse.com |
| import eyed3 | |
| import re | |
| import glob | |
| def get_lyric(lrc): | |
| text = open(lrc).read() | |
| text = re.sub(r'(?:\[.*\])+', '', text).strip() | |
| text = map(lambda l: l.strip(), text.split('\n')) | |
| ans = [] | |
| for l in text: |
(by @andrestaltz)
So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.
Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:
Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
(by @andrestaltz)
So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.
Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:
Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
| { | |
| "vars": { | |
| "@gray-base": "#000", | |
| "@gray-darker": "lighten(@gray-base, 13.5%)", | |
| "@gray-dark": "lighten(@gray-base, 20%)", | |
| "@gray": "lighten(@gray-base, 33.5%)", | |
| "@gray-light": "lighten(@gray-base, 46.7%)", | |
| "@gray-lighter": "lighten(@gray-base, 93.5%)", | |
| "@brand-primary": "darken(#428bca, 6.5%)", | |
| "@brand-success": "#5cb85c", |
| import java.io.ByteArrayInputStream; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.util.Calendar; | |
| import javax.jcr.Node; | |
| import javax.jcr.Property; | |
| import javax.jcr.RepositoryException; | |
| import javax.jcr.Session; | |
| import javax.jcr.ValueFactory; |
| import org.apache.felix.scr.annotations.sling.SlingServlet; | |
| import org.apache.sling.api.SlingHttpServletRequest; | |
| import org.apache.sling.api.SlingHttpServletResponse; | |
| import org.apache.sling.api.resource.Resource; | |
| import org.apache.sling.api.resource.ResourceUtil; | |
| import org.apache.sling.api.servlets.SlingSafeMethodsServlet; | |
| @SlingServlet(paths = "/bin/permissioncheck/html", generateComponent = true, generateService = true) | |
| public class AuthCheckerServlet extends SlingSafeMethodsServlet { | |
| public void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) { |
| import org.apache.felix.scr.annotations.Component; | |
| import org.apache.felix.scr.annotations.Properties; | |
| import org.apache.felix.scr.annotations.Property; | |
| import org.apache.felix.scr.annotations.Service; | |
| import org.apache.sling.api.SlingConstants; | |
| import org.apache.sling.event.EventUtil; | |
| import org.apache.sling.event.jobs.JobProcessor; | |
| import org.apache.sling.event.jobs.JobUtil; | |
| import org.osgi.service.event.Event; | |
| import org.osgi.service.event.EventConstants; |
| import javax.jcr.Node; | |
| import org.apache.felix.scr.annotations.Component; | |
| import org.apache.felix.scr.annotations.Property; | |
| import org.apache.felix.scr.annotations.Reference; | |
| import org.apache.felix.scr.annotations.Service; | |
| import org.apache.sling.api.adapter.AdapterFactory; | |
| import org.apache.sling.api.resource.Resource; | |
| import org.apache.sling.api.resource.ResourceResolverFactory; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; |