Skip to content

Instantly share code, notes, and snippets.

View sudhirkhanger's full-sized avatar
🎯
Focusing

Sudhir Singh Khanger sudhirkhanger

🎯
Focusing
View GitHub Profile
public class CustomOnItemSelectedListenerB implements AdapterView.OnItemSelectedListener {
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
wordLengthB = Integer.parseInt(parent.getItemAtPosition(pos).toString());
Log.d("CustomB ", "getSelectedItem() " + spinnerB.getSelectedItem() +
" getItemAtPosition() " + parent.getItemAtPosition(7));
}
@sudhirkhanger
sudhirkhanger / jerbs.md
Created September 1, 2016 07:24 — forked from avinassh/jerbs.md
//TODO: When implementing abstract method dont change the declaration
@Override
public Loader<List<Guardian>> onCreateLoader(int i, Bundle bundle) {
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
String minMagnitude = sharedPrefs.getString(
getString(R.string.settings_order_by_key),
getString(R.string.settings_order_by_default));
String orderBy = sharedPrefs.getString(
getString(R.string.settings_order_by_key),
getString(R.string.settings_order_by_default)
@sudhirkhanger
sudhirkhanger / gist:2c9b2e4a051a5c9492ac81eef6246ebd
Created August 29, 2016 03:25
Retrofit2 part annotation error
08-29 08:52:56.716 28464-28464/com.sudhirkhanger.app.aswachhbharat E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.sudhirkhanger.app.aswachhbharat, PID: 28464
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=65537, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:59949 flg=0x1 }} to activity {com.sudhirkhanger.app.aswachhbharat/com.sudhirkhanger.app.aswachhbharat.ui.AswachhBharatActivity}: java.lang.IllegalArgumentException: @Part parameters using the MultipartBody.Part must not include a part name in the annotation. (parameter #1)
for method AbService.uploadImage
at android.app.Activity
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
$ sudo dnf history
[sudo] password for sudhir:
ID | Command line | Date and time | Action(s) | Altered
-------------------------------------------------------------------------------
232 | install nmap | 2016-08-03 16:07 | Install | 1
231 | update | 2016-07-31 21:12 | Update | 17
230 | remove thunderbird | 2016-07-29 15:59 | Erase | 1
229 | update --refresh | 2016-07-28 15:51 | Update | 56 EE
228 | install pencil | 2016-07-28 02:31 | Install | 2
227 | remove copyq | 2016-07-26 04:22 | Erase | 1
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
Show only header
Delivered-To: [email protected]
Received-SPF: pass (zoho.com: domain of _spf.google.com designates 209.85.220.67 as permitted sender) client-ip=209.85.220.67; [email protected]; helo=mail-pa0-f67.google.com;
Received: from mail-pa0-f67.google.com (mail-pa0-f67.google.com [209.85.220.67]) by mx.zohomail.com
with SMTPS id 146770077772572.01507298115541; Mon, 4 Jul 2016 23:39:37 -0700 (PDT)
Received: by mail-pa0-f67.google.com with SMTP id ts6so17627486pac.0
for <[email protected]>; Mon, 04 Jul 2016 23:39:37 -0700 (PDT)
Return-Path: <[email protected]>
Return-Path: <[email protected]>
@sudhirkhanger
sudhirkhanger / user-installed.txt
Created June 26, 2016 05:25
rpm -qa --qf '%{NAME}\n' | xargs sudo dnf mark install
$ rpm -qa --qf '%{NAME}\n' | xargs sudo dnf mark install
[sudo] password for sudhir:
bluez-cups-5.39-1.fc23.x86_64 marked as user installed.
nspr-4.12.0-1.fc23.x86_64 marked as user installed.
nspr-4.12.0-1.fc23.i686 marked as user installed.
perl-File-HomeDir-1.00-10.fc23.noarch marked as user installed.
ipxe-roms-qemu-20150407-3.gitdc795b9f.fc23.noarch marked as user installed.
plasma-breeze-5.6.4-1.fc23.x86_64 marked as user installed.
kamoso-2.0.2-23.20140902git.fc23.x86_64 marked as user installed.
python-feedparser-5.2.0-1.fc23.noarch marked as user installed.