This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {AppRegistry} from 'react-native'; | |
import router from './Router' | |
class Index extends React.Component { | |
render() { | |
return router.route(this.props.key, this.props.data) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import Component1 from "./components/Component1"; | |
import Component2 from "./components/Component2"; | |
class Router { | |
constructor(registry = {}) { | |
this._registry = registry; | |
} | |
route(routingKey, props) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ReactScreen extends Activity implements DefaultHardwareBackBtnHandler { | |
protected ReactInstanceManager reactInstanceManager; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
reactInstanceManager = ReactInstanceManager.builder() | |
.setApplication(this.getApplication()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
body{ | |
counter-reset: n; | |
} | |
div:before { | |
counter-increment: n; | |
content: counter(n); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There is a mine grid of size mxn and the mine positions are known by the system. Now, Given a coordinate display the mine grid. If a mine is hit, End the game else continue the game until all the cells are opened. | |
Input => 3 3 // mine of size 3 x 3 | |
Input => 12 23 33 // mines are at (1,2) (2,3) (3,3) | |
Output => x x x | |
x x x | |
x x x | |
Input => 1,1 | |
Output => o x x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Exports Issues from a specified repository to a CSV file | |
Uses basic authentication (Github username + password) to retrieve Issues | |
from a repository that username has access to. Supports Github API v3. | |
""" | |
import csv | |
import requests | |