| using System; | |
| using System.Threading.Tasks; | |
| using NUnit.Framework; | |
| namespace PuppeteerSharp.Contrib.Sample | |
| { | |
| public class Examples | |
| { | |
| async Task<IBrowser> Browser() | |
| { |
| require('isomorphic-fetch'); | |
| fetch('https://1jzxrj179.lp.gql.zone/graphql', { | |
| method: 'POST', | |
| headers: { 'Content-Type': 'application/json' }, | |
| body: JSON.stringify({ query: '{ posts { title } }' }), | |
| }) | |
| .then(res => res.json()) | |
| .then(res => console.log(res.data)); |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
| /* | |
| Template | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/2.3.22/rx.all.js"></script> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> |
I have collected and moderated these ideas from various public sources and put into one place so that problem solvers and solution developers may find inspirations. Because I wish to update it regularly, I have setup as a single page wiki. You may try these ideas on hackathons/competitions/research; some are quite intense problems and some are not. Many of the problems were prepared keeping Dhaka/Bangladesh in mind, but of course can be applied to just about any underdeveloped/developing and sometimes developed countries.
- Eradicate Extreme Poverty and Hunger
- Education
- Healthcare
- Governance
| <auth> | |
| <login if={'login'==opts.action || 'logout' == opts.action} action={opts.action}></login> | |
| <register if={'register' == opts.action}></register> | |
| <change-pass if={'verifyEmail' == opts.action || 'changePass' == opts.action} action={opts.action} uid={opts.uid} data={opts.data}></changePass> | |
| <script> | |
| console.log(opts.action); | |
| if(opts.action=='login' && Cookies.get('apiKey')) riot.route('myAccount'); | |
| if(opts.action=='register' && Cookies.get('apiKey')) riot.route('myAccount'); | |
| else if(opts.action=="" && Cookies.get('apiKey')) riot.route('myAccount'); |
| using System; | |
| using System.Threading; | |
| static class Program { | |
| static void Main() { | |
| Console.Write("Performing some task... "); | |
| using (var progress = new ProgressBar()) { | |
| for (int i = 0; i <= 100; i++) { | |
| progress.Report((double) i / 100); |
| [diff] | |
| tool = vsdiffmerge | |
| [difftool] | |
| prompt = true | |
| [difftool "vsdiffmerge"] | |
| cmd = \"C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\vsdiffmerge.exe\" \"$LOCAL\" \"$REMOTE\" //t | |
| keepbackup = false | |
| trustexistcode = true | |
| [merge] | |
| tool = vsdiffmerge |
Microsoft’s navigator.msLaunchUri method only works in Internet Explorer on Windows 8. Therefore I came up with a (nearly) cross-browser implementation that uses the native msLaunchUri when it’s available and falls back to adventurous hacks when running in other browsers.
launchUri (uri, successCallback, noHandlerCallback, unknownCallback)
