Skip to content

Instantly share code, notes, and snippets.

View androidfanatic's full-sized avatar
🏠
Working from home

ManishRaj androidfanatic

🏠
Working from home
View GitHub Profile
@androidfanatic
androidfanatic / Times
Created February 27, 2021 17:08
Ignore/prevent adblock wall/message from Times of India
Append `?utm_source=facebook` to the URL
Example: https://timesofindia.indiatimes.com/india/hold-onto-my-last-tweet-prashant-kishor-reiterates-prediction-on-bjps-seats-in-bengal/articleshow/81241783.cms?utm_source=facebook
[{"name":"India","total":{"active":71270,"confirmed":129524,"deceased":3868,"recovered":54385}},{"districtData":{"Araria":{"notes":"","active":3,"confirmed":5,"deceased":0,"recovered":2,"delta":{"confirmed":0,"deceased":0,"recovered":0}},"Arwal":{"notes":"","active":18,"confirmed":23,"deceased":0,"recovered":5,"delta":{"confirmed":0,"deceased":0,"recovered":0}},"Aurangabad":{"notes":"","active":34,"confirmed":48,"deceased":0,"recovered":14,"delta":{"confirmed":0,"deceased":0,"recovered":0}},"Banka":{"notes":"","active":69,"confirmed":70,"deceased":0,"recovered":1,"delta":{"confirmed":0,"deceased":0,"recovered":0}},"Begusarai":{"notes":"","active":108,"confirmed":130,"deceased":1,"recovered":21,"delta":{"confirmed":0,"deceased":0,"recovered":0}},"Bhagalpur":{"notes":"","active":45,"confirmed":72,"deceased":0,"recovered":27,"delta":{"confirmed":0,"deceased":0,"recovered":0}},"Bhojpur":{"notes":"","active":16,"confirmed":39,"deceased":0,"recovered":23,"delta":{"confirmed":0,"deceased":0,"recovered":0}},"Buxar":{
render() {
return (
<ListView
items={items}
render={({ item }) => (<div>{item.label}</div>)}
/>
)
}
export default class CounterApp extends React.Component {
constructor(props) {
super(props);
this.state = {
timeThen: ...,
timeNow: Date.now()
};
this.someAction = this.someAction.bind(this);
this.anotherAction = this.anotherAction.bind(this);
this.yetAnotherAction = this.yetAnotherAction.bind(this);
render() {
return (
<div>
{this.state.timeThen > this.state.timeNow ? (
<>
<button onClick={() => { /* some action */ }} />
<button onClick={() => { /* another action */ }} />
</>
) : (
<button onClick={() => { /* yet another action */ }} />
render() {
const { count } = this.state;
return (
<div className="App">
<button
onClick={() => {
this.setState({ count: count + 1 });
}}>
COUNT ({count})
</button>
<Button onTap={() => {
this.prevPage();
}}>Previous<Button>
increaseCount = () => {
this.setState({ count: this.state.count + 1 });
};
render() {
return (
<div className="App">
<button onClick={this.increaseCount}>
COUNT ({this.state.count})
</button>
render() {
return (
<div className="App">
<button onClick={this.increaseCount.bind(this)}>COUNT ({this.state.count})</button>
</div>
);
}
export default class CounterApp extends React.Component {
constructor(props) {
super(props);
this.state = { count: 0 };
this.increaseCount = this.increaseCount.bind(this);
}
increaseCount() {
this.setState({ count: this.state.count + 1 });
}