Skip to content

Instantly share code, notes, and snippets.

View gupta-shrinath's full-sized avatar
:octocat:
Looking for good opportunities.

Gupta Shrinath gupta-shrinath

:octocat:
Looking for good opportunities.
View GitHub Profile
@gupta-shrinath
gupta-shrinath / README
Last active June 28, 2020 18:42
Boilerplate for README.md file
# Name
Description
## Status
## Technical Info.
## Testing
<?php
class Obj
{
public $id;
public $size;
public $color;
function __construct($id, $size, $color)
{
$this->id = $id;
$this->size = $size;
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
#include <stdio.h>
int maxOneRow(int array[][16],int r,int c) {
int currentRowCounter=0;
int maxOneRow = 0;
int maxRowCounter = 0;
int i=0,j = 0;
for(i;i<r;i++) {
for(j;j<c;j++) {
if(array[i][j]==1) {
// Function to test //
Future<List<Contact>> fetchContacts(http.Client client) async {
final response = await client.get(Uri.parse(url));
if (response.statusCode == 200) {
if (json.decode(response.body).toString().length > 2) {
List jsonResponse = json.decode(response.body);
return jsonResponse.map((e) => Contact.fromJson(e)).toList();
} else {
throw Exception('Failed to load contacts');
}
#Edit /etc/pulse/default.pa and add the following text at the bottom (Just what's between the ---- lines)
load-module module-echo-cancel source_name=noechosource sink_name=noechosink
set-default-source noechosource
set-default-sink noechosink
# pulseaudio -k
testWidgets("Show error text widget when future returns error",
(WidgetTester tester) async {
Future<List<Contact>>? future;
final contactsScreen = MaterialApp(
home: buildContactList(
contacts: future,
),
);
await tester.pumpWidget(contactsScreen);
await tester.pumpAndSettle();
TextFormField(
keyboardType: keyboard,
controller: controller,
maxLines: lines,
decoration: InputDecoration(
//contentPadding: EdgeInsets.all(12),
hintText: placeholder,
enabledBorder: border,
prefixIcon: SizedBox(
child: Center(
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Add icon library -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.btn-twitter {
background-color: DodgerBlue;
border: none;
[ +146 ms] executing: uname -m
[ +58 ms] Exit code 0 from: uname -m
[ ] x86_64
[ +10 ms] executing: [/home/droid/Tools/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +18 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] 3595343e20a61ff16d14e8ecc25f364276bb1b8b
[ +1 ms] executing: [/home/droid/Tools/flutter/] git tag --points-at 3595343e20a61ff16d14e8ecc25f364276bb1b8b
[ +88 ms] Exit code 0 from: git tag --points-at 3595343e20a61ff16d14e8ecc25f364276bb1b8b
[ ] 2.5.2
[ +16 ms] executing: [/home/droid/Tools/flutter/] git rev-parse --abbrev-ref --symbolic @{u}