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
public static Bitmap loadBitmapFromView(View v) { | |
Bitmap b = Bitmap.createBitmap( v.getLayoutParams().width, v.getLayoutParams().height, Bitmap.Config.ARGB_8888); | |
Canvas c = new Canvas(b); | |
v.layout(v.getLeft(), v.getTop(), v.getRight(), v.getBottom()); | |
v.draw(c); | |
return b; | |
} |
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 void FillListView(decimal pKod) | |
{ | |
_mDataTable = DbManager.GetPersonelDataSet(pKod).Tables[0]; | |
ViewState.Add("PersonelData", _mDataTable); | |
DetailsView1.DataSource = _mDataTable; | |
DetailsView1.DataBind(); | |
} |
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
-- To Base64 string | |
CREATE FUNCTION [dbo].[fn_str_TO_BASE64] | |
( | |
@STRING VARCHAR(MAX) | |
) | |
RETURNS VARCHAR(MAX) | |
AS | |
BEGIN | |
RETURN ( | |
SELECT |
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
public boolean isInternetAvailable() { | |
try { | |
InetAddress ipAddr = InetAddress.getByName("google.com"); //You can replace it with your name | |
if (ipAddr.equals("")) { | |
return false; | |
} else { | |
return true; | |
} |
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
SELECT TOP 10 | |
'http://localhost:51376/?q=' | |
+ CONVERT(VARCHAR(32), HASHBYTES('MD5', | |
CAST(qwerty.Gonderi_No AS NVARCHAR(250))), 2) | |
FROM ( SELECT gnd.Gonderi_No | |
FROM dbo.Gonderiler AS gnd | |
) AS qwerty | |
ORDER BY qwerty.Gonderi_No; |
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
public class AutoFitTextView extends AppCompatTextView { | |
private static final int NO_LINE_LIMIT = -1; | |
private final RectF _availableSpaceRect = new RectF(); | |
private final SizeTester _sizeTester; | |
private float _maxTextSize, _spacingMult = 1.0f, _spacingAdd = 0.0f, _minTextSize; | |
private int _widthLimit, _maxLines; | |
private boolean _initialized = false; | |
private TextPaint _paint; |
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
/* | |
* Copyright 2015 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 |
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
USE [colombo] | |
GO | |
-- drop prev version | |
IF EXISTS (SELECT name | |
FROM sysobjects | |
WHERE name = N'pco_cursor_test1' | |
AND type = 'P') | |
DROP PROCEDURE pco_cursor_test1 | |
GO |
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
public class Circle extends View { | |
private static final int START_ANGLE_POINT = 90; | |
private final Paint paint; | |
private final RectF rect; | |
private float angle; | |
public Circle(Context context, AttributeSet attrs) { |
OlderNewer