This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- list indexes | |
-- http://stackoverflow.com/a/428235/10245 | |
-- https://gist.github.com/timabell/6da05a2b2542c907f179 | |
select | |
o.name as TableName, | |
i.name as IndexName, | |
i.type, | |
i.is_unique, | |
ic.key_ordinal as ColumnOrder, | |
ic.is_included_column as IsIncluded, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// method to add to dbcontext | |
/// <summary> | |
/// Set EF's OriginalValue of RowVersion for 'entity' to the supplied value. | |
/// This allows you to make use of EF's built-in concurrent-editing | |
/// when you don't have the entity as it was presented to the user to | |
/// edit (because of the stateless nature of the web). | |
/// Call this before SaveChanges to ensure concurrent edits don't go | |
/// unnoticed by users. | |
/// More info: http://stackoverflow.com/a/9190378/10245 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Permanent copy of schema extended properties | |
-- In a format suitable for easy source control and hand-editing. | |
-- All the properties are prefixed and only those will be added/updated/deleted by this script | |
-- At the bottom you'll find a commented-out `select` for generating the | |
-- insert block from an existing schema's extended properties. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
# About | |
Source: https://gist.github.com/timabell/6fbd85431925b5724d2f | |
Permanent copy of schema documentation in a format suitable for | |
easy source control and hand-editing. | |
This script template was created by Tim Abell, (c) 2015-2018 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DirectoryAndFileUtils | |
{ | |
public byte[] ReadFile(string path) | |
{ | |
try | |
{ | |
byte[] readBuffer = File.ReadAllBytes(path); | |
return readBuffer; | |
} | |
catch (IOException e) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop); | |
HttpContext.Current.Server.MapPath("~/UploadedFiles); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity; | |
import android.content.ContentResolver; | |
import android.database.Cursor; | |
import android.net.Uri; | |
import android.provider.ContactsContract; | |
import android.widget.ListView; | |
import android.widget.SimpleCursorAdapter; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Attribute VB_Name = "Module5" | |
Sub InsertPivotTableMain() | |
'create pivot table [test] | |
Call InsertPivotTable("testx", "tableTest", "newPivotTable", "data1", "data2", "data3") | |
End Sub | |
Private Sub InsertPivotTable(sourceWorksheetName As String, TableName As String, newWorksheetName As String, RowField As String, DataField1 As String, DataField2 As String) | |
'Declare Variables | |
Dim PSheet As Worksheet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package app.goplus.in.v2.network; | |
import retrofit2.Call; | |
import retrofit2.Callback; | |
import retrofit2.Response; | |
/** | |
* Created by pallavahooja on 16/05/16. | |
*/ | |
public class APIHelper { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by milechainsaw on 7/19/16. | |
* | |
* Exponential backoff callback for Retrofit2 | |
* | |
*/ | |
public abstract class BackoffCallback<T> implements Callback<T> { | |
private static final int RETRY_COUNT = 3; | |
/** | |
* Base retry delay for exponential backoff, in Milliseconds |