This file contains 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
result = [] | |
n = int(input()) | |
arr = list(map(int, input().split())) | |
for i in range(0,2*n, 2): | |
result.append([arr[i],arr[i+1]]) | |
# sort a array based on first element | |
result.sort(key=lambda x: x[0]) | |
j = 0 | |
while j < len(result)-1: | |
if result[j][1] >= result[j+1][0]: |
This file contains 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
@Entity(tableName = Company.Companion.TableInfo.tableName) | |
data class Company( | |
@PrimaryKey | |
var _id: String = "", | |
var company: String = "", | |
var website: String = "", | |
var logo: String = "", | |
var about: String = "", | |
@Ignore | |
var members: List<Member> = emptyList() |
This file contains 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
private fun generateExcel() { | |
try { | |
val workbook = HSSFWorkbook() | |
val spreadSheet = workbook.createSheet("Sell Report") | |
/*Header "Sampe..."*/ | |
val rowA = spreadSheet.createRow(0) | |
val cellAA = rowA.createCell(0) | |
cellAA.setCellValue(HSSFRichTextString("Sampe")) | |
cellAA.setCellStyle( |
This file contains 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
#!/usr/bin/python | |
import urllib | |
from bs4 import BeautifulSoup | |
for i in range(101,9851): | |
url = 'https://app.getpricedrop.com/detail/' + str(i) +'?utm_source=whatsapp&utm_medium=msg' | |
boxurl = urllib.urlopen(url).read() | |
soup = BeautifulSoup(boxurl) | |
linescoreA = soup.find("span", {"class": "wrapper-word-price"}) | |
print linescoreA |
This file contains 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
class TransportActivity : AppCompatActivity() { | |
companion object { | |
val TAG = TransportActivity::class.simpleName | |
} | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
//handle permissions first, before map is created. not depicted here |
This file contains 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.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Canvas; | |
import android.graphics.Matrix; | |
import android.graphics.Paint; | |
import android.media.ExifInterface; | |
import android.os.AsyncTask; | |
import android.os.Environment; |
This file contains 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
@Deprecated("Using different methodology to send file") | |
fun sendFile(userId: EntityFullJid, file: File, description: String) { | |
mThreadHandler.post({ mConnection?.sendFile(userId, file, description) }) | |
} | |
private fun setUpFileTransferManager() { | |
val fileTransferManager = FileTransferManager.getInstanceFor(xmppTcpConnection) | |
fileTransferManager.addFileTransferListener(this) |
This file contains 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
class HomeListAdapter(val context: Context, contactBeans: RealmResults<ContactBean>?, val realmInstance: Realm, autoUpdate: Boolean) | |
: RealmRecyclerViewAdapter<ContactBean, HomeListAdapter.ViewHolder>(contactBeans, autoUpdate) { | |
val TAG = HomeListAdapter::class.simpleName | |
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { | |
val view = LayoutInflater.from(context).inflate(R.layout.item_chat, parent, false) | |
return ViewHolder(view) | |
} |
This file contains 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
^(?!(InputMethodManager|SurfaceView|SettingsInterface|SettingsInterface|NativeCrypto|System.out|libc-netbsd|Posix|WindowClient|ViewRootImpl|Surface|GraphicBuffer|Camera-JNI|FA|ActivityThread|View|CameraFramework|OpenSSLLib|skia|Bitmap|[MALI][Gralloc]|AudioTrack|AudioSystem|IJKMEDIA|J4A|art|System|MiniThumbFile|PhoneWindow|MediaStore|IInputConnectionWrapper|OpenGLRenderer|SQLiteDatabase|[MALI][Gralloc]|mali_winsys|NativeCrypto|ProgramBinary|RenderScript)) |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:state_enabled="true" android:state_pressed="true"> | |
<set> | |
<objectAnimator android:duration="100" android:propertyName="translationZ" android:valueTo="4dp" android:valueType="floatType" /> | |
</set> | |
</item> | |
<!-- base state --> | |
<item android:state_enabled="true"> | |
<set> |
NewerOlder