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.content.Context; | |
| import android.graphics.Bitmap; | |
| import android.graphics.BitmapShader; | |
| import android.graphics.Canvas; | |
| import android.graphics.PorterDuff; | |
| import android.graphics.Shader; | |
| import android.graphics.drawable.BitmapDrawable; | |
| import android.graphics.drawable.ClipDrawable; | |
| import android.graphics.drawable.Drawable; | |
| import android.graphics.drawable.LayerDrawable; |
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
| //DNS Query Program on Linux | |
| //Author : Silver Moon ([email protected]) | |
| //Dated : 29/4/2009 | |
| //Header Files | |
| #include<stdio.h> //printf | |
| #include<string.h> //strlen | |
| #include<stdlib.h> //malloc | |
| #include<sys/socket.h> //you know what this is for | |
| #include<arpa/inet.h> //inet_addr , inet_ntoa , ntohs etc |
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
| #!/bin/sh | |
| # Usage: ./watch-fds.sh <application_id> [delay_secs = 5] | |
| APP_ID=${1:?missing application id} | |
| DELAY=$(( ${2:-5} )) | |
| DEVICE_LIMIT=$(( $(adb shell ulimit -n) )) | |
| WARN_THRESHOLD=$(( ${DEVICE_LIMIT} / 3 )) | |
| echo "Will warn at ${WARN_THRESHOLD}" |
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
| RelativeLayout layout = (RelativeLayout) findViewById(R.id.rel); | |
| GradientDrawable drawable = new GradientDrawable(); | |
| drawable.setColors(new int[] { | |
| Color.parseColor("#FFF6B7"), | |
| Color.parseColor("#F6416C") | |
| }); | |
| drawable.setGradientType(GradientDrawable.LINEAR_GRADIENT); | |
| drawable.setOrientation(GradientDrawable.Orientation.LEFT_RIGHT); |
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
| /* | |
| * Copyright (c) 2018 Zhang Hai <[email protected]> | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
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.content.Context; | |
| import android.util.AttributeSet; | |
| import android.util.Xml; | |
| import android.webkit.JavascriptInterface; | |
| import android.webkit.WebView; | |
| import android.webkit.WebViewClient; | |
| public class HtmlTextEditor extends WebView { | |
| class JsObject { |
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 org.yeshen.download; | |
| import android.os.Handler; | |
| import android.os.HandlerThread; | |
| import android.os.Looper; | |
| import android.support.annotation.Nullable; | |
| import android.support.annotation.UiThread; | |
| import android.support.annotation.WorkerThread; | |
| import android.util.Log; |
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
| #! /usr/bin/env python | |
| # Client and server for udp (datagram) echo. | |
| # | |
| # Usage: udpecho -s [port] (to start a server) | |
| # or: udpecho -c host [port] <file (client) | |
| import sys | |
| from socket import * |
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
| /* | |
| * Copyright (C) 2022 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
OlderNewer