I hereby claim:
- I am vedhavyas on github.
- I am vedhavyas (https://keybase.io/vedhavyas) on keybase.
- I have a public key whose fingerprint is F41E CDD3 DC96 7F1A AF2D 0308 BF62 2A66 FD4B 3589
To claim this, I am signing this object:
import java.util.Scanner; | |
public class Attributes{ | |
public static void main(String [] args){ | |
Scanner scanIN = new Scanner(System.in); | |
Scanner scanSTR = new Scanner(System.in); | |
String [] temp; | |
String str; | |
System.out.println("No. of attributes"); | |
int numAtr = scanIN.nextInt(); |
private ArrayList<String> getOwnerPhone() { | |
ArrayList<String> numbers = new ArrayList<>(); | |
getPhoneFromContacts(numbers); | |
getPhoneFromProfile(numbers); | |
return numbers; | |
} | |
private void getPhoneFromContacts(ArrayList<String> numbers) { | |
final AccountManager manager = AccountManager.get(this); | |
final Account[] accounts = manager.getAccountsByType("com.google"); |
package com.instamojo.mink.services; | |
import android.animation.ValueAnimator; | |
import android.app.Service; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.graphics.PixelFormat; | |
import android.graphics.Point; | |
import android.os.IBinder; | |
import android.view.Gravity; |
//Add library by adding the following line in dependencies section in gradle file | |
compile 'com.squareup.okhttp3:okhttp:3.2.0' | |
//Making a Post request | |
OkHttpClient client = new OkHttpClient(); | |
RequestBody body = new FormBody.Builder() | |
.add("name", "Name Here") | |
.add("email", "email here") | |
.add("purpose", "purpose here") |
I hereby claim:
To claim this, I am signing this object:
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
# Add the following to your shell init to set up gpg-agent automatically for every shell | |
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
source ~/.gnupg/.gpg-agent-info | |
export GPG_AGENT_INFO | |
else |
package main | |
import ( | |
"io" | |
"net/http" | |
"os/exec" | |
) | |
var ( | |
BUF_LEN = 1024 |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
package main | |
import "fmt" | |
func main() { | |
nums := []int{256, 2, 100, 122234456, 10024} | |
fmt.Println(nums) | |
buf := encodeNumbers(nums...) | |
fmt.Println(buf) | |
fmt.Println(decodeNumbers(buf)) |
package main | |
import "fmt" | |
func kadanes(d []int) int { | |
var lm, gm int | |
var init bool | |
for _, n := range d { | |
lm = max(n, n+lm) |