Skip to content

Instantly share code, notes, and snippets.

View Nazmul56's full-sized avatar
🎯
Focusing

Nazmul Haque Nazmul56

🎯
Focusing
View GitHub Profile
##########################Screen Recorder First Permission###################################################
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Intent android.media.projection.MediaProjectionManager.createScreenCaptureIntent()' on a null object reference
at com.durbinlabs.durtc.CallActivity.shareScreen(CallActivity.java:1486)
at com.durbinlabs.durtc.CallActivity.startScreenRecording(CallActivity.java:1479)
at com.durbinlabs.durtc.CallActivity.onToggleScreenShare(CallActivity.java:1455)
at com.durbinlabs.durtc.CallActivity.onRequestPermissionsResult(CallActivity.java:606)
at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:7429)
at android.app.Activity.dispatchActivityResult(Activity.java:7280)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4292)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4340) 
1. Oops… I spelled that last commit message wrong
git commit --amend
2. Oops… I forgot to add a file to that last commit
git add missed-file.txt
git commit --amend
5. Oops… I made a spelling mistake in my branch name
git branch -m future-brunch feature-branch
##Target Module build.gradle
defaultConfig {
...
manifestPlaceholders = [pkgName: "com.ducomm"]
}
##Targate Module Mainfest.xml
...
<activity
android:name=".activity.SipIncomingActivity"
######################################################
Install APK From PC to Android Device or Emulator
######################################################
C:\Users\Nazmul\AppData\Local\Android\Sdk\platform-tools>
adb install -r app-release.apk
######################################################
Wifi Debugging
######################################################
@Nazmul56
Nazmul56 / SumRowColumn.cpp
Created July 4, 2018 07:45
Sum Of Row and Column
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
int R; int C;
int inputArray[100][100] = {0};;
int tc;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RegexMatches {
public static void main( String args[] ) {
// String to be scanned to find the pattern.
String line = "a=sendrecv a=rtcp-mux a=rtcp-rsize a=rtpmap:96 VP8 90000 a=rtcp-fb:96 goog-remb a=rtpmap:96 VP8 90001 a=rtpmap:96 VP8 90002";
String codec = "VP8";
// Helper method to munge an SDP to enable simulcasting (Chrome only)
function mungeSdpForSimulcasting(sdp) {
// Let's munge the SDP to add the attributes for enabling simulcasting
// (based on https://gist.github.com/ggarber/a19b4c33510028b9c657)
var lines = sdp.split("\r\n");
var video = false;
var ssrc = [-1],
ssrc_fid = -1;
var cname = null,
msid = null,
var prioritizeVideoCodecs;
var prioritizeAudioCodecs;
//On peer Connection
this.pc.on('offer', function (offer) {
offer = prioritizeVideoCodecs(offer);
offer = prioritizeAudioCodecs(offer);
if (self.parent.config.nick) offer.nick = self.parent.config.nick;
self.send('offer', offer);
});
@Nazmul56
Nazmul56 / Base.java
Created August 29, 2017 04:51
Salut Sample Activity
package com.peak.pricey;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
package com.example.hp.animationonrecyclerview;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import java.util.ArrayList;
import java.util.List;