PHP - Include Cross Domain File
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.domain.com");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
?>

ē„ę„ / Permanent Vacation

⣠Chile in a Photography ā£
taylor price
"I'm Dorothy Gale from Kansas"

Origami Around
occasionally subtle


Discoholic šŖ©
Monterey Bay Aquarium
Alisa U Zemlji Chuda
Acquired Stardust

JBB: An Artblog!

shark vs the universe
h
Aqua Utopiaļ½ęµ·ć®åŗć§čØę¶ćē“”ć
tumblr dot com

#extradirty
2025 on Tumblr: Trends That Defined the Year

seen from United Kingdom
seen from United States
seen from China
seen from Romania

seen from United States
seen from Mexico

seen from Malaysia
seen from United States

seen from Indonesia

seen from United States
seen from Malaysia
seen from New Zealand

seen from Malaysia
seen from United Kingdom
seen from United States

seen from United Kingdom

seen from United States
seen from United States
seen from United States

seen from United States
@codersapprentice-blog
PHP - Include Cross Domain File
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.domain.com");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
?>

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch ⢠No registration required ⢠HD streaming
Android - Send Email From Your App
/* Create the Intent */ final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); /* Fill it with Data */ emailIntent.setType("plain/text"); emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"[email protected]"}); emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject"); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Text"); /* Send it off to the Activity-Chooser */ context.startActivity(Intent.createChooser(emailIntent, "Send mail..."));
Emails only works if you are using the application in a real phone, so if you are using the emulator, try it on a real phone.
Android - Google Maps inside an App
In AndroidManifest.xml ------------------------ <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> In the Java code for the activity --------------------------------- add "implements LocationListener" to the defination of the class String MapUrl = "http://www.google.com/maps?q=37.423156,-122.084917"; //MapUrl = "http://maps.google.com/maps?q=Pizza,texas&ui=maps"; private WebView _webView; _webView = (WebView)_yourrelativelayourSrc.findViewById(R.id.layout_webview); _webView.getSettings().setJavaScriptEnabled(true); _webView.getSettings().setBuiltInZoomControls(true); _webView.getSettings().setSupportZoom(true); LocationManager locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_FINE); String provider = locationManager.getBestProvider(criteria,true); //In order to make sure the device is getting the location, request updates. locationManager.requestLocationUpdates(provider, 1, 0, this); mostRecentLocation = locationManager.getLastKnownLocation(provider); MapUrl = "http://www.google.com/maps?q=" + mostRecentLocation.getLatitude().toString() + "," + Ā mostRecentLocation.getLongitude().toString(); final String centerURL = "javascript:centerAt(" +Ā mostRecentLocation.getLatitude() + "," + Ā mostRecentLocation.getLongitude()+ ")"; _webView.setWebChromeClient(new WebChromeClient() { Ā Ā Ā public void onProgressChanged(WebView view, int progress) Ā Ā Ā { Ā Ā Ā Ā Ā Ā // Activities and WebViews measure progress with different scales. Ā Ā Ā Ā Ā Ā // The progress meter will automatically disappear when we reach 100% Ā Ā Ā Ā Ā Ā ((Activity) activity).setProgress(progress * 1000); Ā Ā Ā } }); //Wait for the page to load then send the location information _webView.setWebViewClient(new WebViewClient(){ Ā Ā @Override Ā Ā public void onPageFinished(WebView view, String url){ Ā Ā Ā _webView.loadUrl(centerURL); Ā Ā } }); _webView.loadUrl(MapUrl);
Android - Basic Gesture Detection
//Implement the following events in your class public class ActivitySwipeDetector implements View.OnTouchListener { static final String logTag = "ActivitySwipeDetector"; static final int MIN_DISTANCE = 100; private float downX, downY, upX, upY; public void onRightToLeftSwipe(){ Ā Ā Log.i(logTag, "RightToLeftSwipe!"); Ā Ā activity.doSomething(); } public void onLeftToRightSwipe(){ Ā Ā Log.i(logTag, "LeftToRightSwipe!"); Ā Ā activity.doSomething(); } public void onTopToBottomSwipe(){ Ā Ā Log.i(logTag, "onTopToBottomSwipe!"); Ā Ā activity.doSomething(); } public void onBottomToTopSwipe(){ Ā Ā Log.i(logTag, "onBottomToTopSwipe!"); Ā Ā activity.doSomething(); } public boolean onTouch(View v, MotionEvent event) { Ā Ā switch(event.getAction()){ Ā Ā Ā Ā case MotionEvent.ACTION_DOWN: { Ā Ā Ā Ā Ā Ā downX = event.getX(); Ā Ā Ā Ā Ā Ā downY = event.getY(); Ā Ā Ā Ā Ā Ā return true; Ā Ā Ā Ā } Ā Ā Ā Ā case MotionEvent.ACTION_UP: { Ā Ā Ā Ā Ā Ā upX = event.getX(); Ā Ā Ā Ā Ā Ā upY = event.getY(); Ā Ā Ā Ā Ā Ā float deltaX = downX - upX; Ā Ā Ā Ā Ā Ā float deltaY = downY - upY; Ā Ā Ā Ā Ā Ā // swipe horizontal? Ā Ā Ā Ā Ā Ā if(Math.abs(deltaX) > MIN_DISTANCE){ Ā Ā Ā Ā Ā Ā Ā Ā // left or right Ā Ā Ā Ā Ā Ā Ā Ā if(deltaX < 0) { this.onLeftToRightSwipe(); return true; } Ā Ā Ā Ā Ā Ā Ā Ā if(deltaX > 0) { this.onRightToLeftSwipe(); return true; } Ā Ā Ā Ā Ā Ā } Ā Ā Ā Ā Ā Ā else { Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Log.i(logTag, "Swipe was only " + Math.abs(deltaX) + " long, need at least " + MIN_DISTANCE); Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā return false; // We don't consume the event Ā Ā Ā Ā Ā Ā } Ā Ā Ā Ā Ā Ā // swipe vertical? Ā Ā Ā Ā Ā Ā if(Math.abs(deltaY) > MIN_DISTANCE){ Ā Ā Ā Ā Ā Ā Ā Ā // top or down Ā Ā Ā Ā Ā Ā Ā Ā if(deltaY < 0) { this.onTopToBottomSwipe(); return true; } Ā Ā Ā Ā Ā Ā Ā Ā if(deltaY > 0) { this.onBottomToTopSwipe(); return true; } Ā Ā Ā Ā Ā Ā } Ā Ā Ā Ā Ā Ā else { Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Log.i(logTag, "Swipe was only " + Math.abs(deltaX) + " long, need at least " + MIN_DISTANCE); Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā return false; // We don't consume the event Ā Ā Ā Ā Ā Ā } Ā Ā Ā Ā Ā Ā return true; Ā Ā Ā Ā } Ā Ā } Ā Ā return false; } } //To Bind the touch events on your controls
ActivitySwipeDetector activitySwipeDetector = new ActivitySwipeDetector(this); lowestLayout = (RelativeLayout)this.findViewById(R.id.lowestLayout); lowestLayout.setOnTouchListener(activitySwipeDetector);
Android - Open Gallery For Image
//Open Gallery To Select Image Intent intent = new Intent(Intent.ACTION_GET_CONTENT);intent.setType("image/*");startActivityForResult(intent, 0); //To Show Image After Selection or Get its Path protected void onActivityResult(int requestCode, int resultCode, Intent imageReturnedIntent) { Ā Ā Ā super.onActivityResult(requestCode, resultCode, imageReturnedIntent); Ā Ā Ā switch(requestCode) { Ā Ā Ā case 0: Ā Ā Ā Ā Ā if(resultCode == RESULT_OK){Ā Ā Ā Ā Ā Ā Ā Ā Uri selectedImage = imageReturnedIntent.getData(); Ā Ā Ā Ā Ā Ā Ā String[] filePathColumn = {MediaStore.Images.Media.DATA}; Ā Ā Ā Ā Ā Ā Ā Cursor cursor = getContentResolver().query(selectedImage, filePathColumn, null, null, null); Ā Ā Ā Ā Ā Ā Ā cursor.moveToFirst(); Ā Ā Ā Ā Ā Ā Ā int columnIndex = cursor.getColumnIndex(filePathColumn[0]); Ā Ā Ā Ā Ā Ā Ā String filePath = cursor.getString(columnIndex); // file path of selected image Ā Ā Ā Ā Ā Ā Ā cursor.close();Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā // Ā Convert file path into bitmap image using below line. Ā Ā Ā Ā Ā Ā Ā Bitmap yourSelectedImage = BitmapFactory.decodeFile(filePath); Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā // put Ā bitmapimage in your imageview Ā Ā Ā Ā Ā Ā Ā yourimgView.setImageBitmap(yourSelectedImage); Ā Ā Ā Ā Ā } Ā Ā Ā } }

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch ⢠No registration required ⢠HD streaming
Android - Adding External JARS in Your Project
A Best way to add External Jars to your Anroid Project or any Java project is:
Create a folder call 'lib' into you project root folder
Copy your Jar files to the lib folder
Now right click on the Jar file and Build Path > Add to Build Path, this will create a folder called 'Refrenced Library' into you project, and your are done
By do doing like this, whenever you transfer you project, you will not miss you libraries which are being referenced to some space on your Hard drive.
Android - Share Menu Feature
Intent intent = new Intent(android.content.Intent.ACTION_SEND);intent.setType(ātext/plainā);intent.putExtra(android.content.Intent.EXTRA_TEXT, āYour Linkā);intent.putExtra(android.content.Intent.EXTRA_SUBJECT, āSome extra text if you want itā);startActivity(Intent.createChooser(intent, āShare viaā));
C# - Decoding String From Base64
staticĀ publicĀ stringĀ DecodeFrom64(stringĀ encodedData)
{
Ā Ā byte[] encodedDataAsBytesĀ = System.Convert.FromBase64String(encodedData);
Ā Ā stringĀ returnValueĀ = System.Text.ASCIIEncoding.ASCII.GetString(encodedDataAsBytes);
Ā Ā returnĀ returnValue;
}
C# - Encoding Strings to Base64
staticĀ publicĀ stringĀ EncodeTo64(stringĀ toEncode)
{
Ā Ā Ā Ā byte[] toEncodeAsBytesĀ = System.Text.ASCIIEncoding.ASCII.GetBytes(toEncode);
Ā Ā Ā Ā stringĀ returnValueĀ = System.Convert.ToBase64String(toEncodeAsBytes);
Ā Ā Ā Ā returnĀ returnValue;
}
Android - Access SQLite Database File in Emulator
You have to be on the DDMS perspective on your Eclipse IDE
(Window > Open Perspective > Other > DDMS)
and the most important:
YOUR APPLICATION MUST BE RUNNING SO YOU CAN SEE THE HIERARCHY OF FOLDERS AND FILES.
Then in theĀ File Explorer TabĀ you will follow the path :
data > data > your-package-name > databases > your-database-file.
Then select the file, click on theĀ disket iconĀ in the right corner of the screen to download theĀ .dbĀ file. If you want to upload a database file to the emulator you can click on theĀ phone icon(beside disket icon)Ā and choose the file to upload.
If you want to see the content of theĀ .dbĀ file, I advise you to use SQLite Database Browser, which you can downloadĀ here.
PS: If you want to see the database from your real device, you must root your phone.
Source:Ā http://stackoverflow.com/questions/1510840/where-does-android-emulator-store-sqlite-database

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch ⢠No registration required ⢠HD streaming
Decompile APK file to JAR
The Following Tutorial Describes very thoroughly how to decompile APK file to get its source code. I have tried it myself and its working. Keep in mind it only gets the "JAVA" code not the layouts and any other resources. http://a4apphack.com/security/sec-code/extract-android-apk-from-market-and-decompile-it-to-java-source
Windows - Lock Folder
Following link explains very beautifully how to lock the folder with password. http://www.simplehelp.net/2010/11/29/how-to-create-a-password-protected-folder-in-windows-7/
How to Create RESTful webservice using WCF
Setting Up the Project: The Following link explains very throughly how to create a RESTful webservice using WCF Project type.Ā http://www.codeproject.com/Articles/105273/Create-RESTful-WCF-Service-API-Step-By-Step-GuideĀ Creating Operation & DataContract For the Services: http://www.codeproject.com/Articles/29570/Simple-WCF-Hosting-and-Consuming
Javascript - Detect Browser
function getInternetExplorerVersion() { var rv = -1; // Return value assumes failure. //You can user "navigator.appName" to detect other browsers as well. if (navigator.appName == 'Microsoft Internet Explorer') { var ua = navigator.userAgent; var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); if (re.exec(ua) != null) { rv = parseFloat(RegExp.$1); if (rv > -1) { if (rv < 9.0) { alert("This is Not Microsoft Internet Explorer 9.0"); return; } } } } }
iPhone/iPad Splash Screen File Names
Default File Names for Individual Orientation of Device:
Default-Portrait.png
Default-PortraitUpsideDown.png
Default-Landscape.png
Default-LandscapeLeft.png
Default-LandscapeRight.png

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch ⢠No registration required ⢠HD streaming
Setting NTFS Permissions with C# Programmatically
Reference the dll, and use it.
using Microsoft.Win32.Security;
Here's a method to add a dir, and set NTFS permissions on it for a given user:
private Boolean CreateDir(String strSitePath, String strUserName) { Boolean bOk; try { Directory.CreateDirectory(strSitePath); SecurityDescriptor secDesc = SecurityDescriptor.GetFileSecurity(strSitePath, SECURITY_INFORMATION.DACL_SECURITY_INFORMATION); Dacl dacl = secDesc.Dacl; Sid sidUser = new Sid (strUserName); // allow: folder, subfolder and files // modify dacl.AddAce (new AceAccessAllowed (sidUser, AccessType.GENERIC_WRITE | AccessType.GENERIC_READ | AccessType.DELETE | AccessType.GENERIC_EXECUTE , AceFlags.OBJECT_INHERIT_ACE | AceFlags.CONTAINER_INHERIT_ACE)); // deny: this folder // write attribs // write extended attribs // delete // change permissions // take ownership DirectoryAccessType DAType = DirectoryAccessType.FILE_WRITE_ATTRIBUTES | DirectoryAccessType.FILE_WRITE_EA | DirectoryAccessType.DELETE | DirectoryAccessType.WRITE_OWNER | DirectoryAccessType.WRITE_DAC; AccessType AType = (AccessType)DAType; dacl.AddAce (new AceAccessDenied (sidUser, AType)); secDesc.SetDacl(dacl); secDesc.SetFileSecurity(strSitePath, SECURITY_INFORMATION.DACL_SECURITY_INFORMATION); bOk = true; } catch { bOk = false; } return bOk; } /* CreateDir */
The AceFlags determine the level of inheritance on the object. And the DirectoryAccessType is used to create a AccessType with some permissions not in the AccessType enum. I hope this is useful.
iPhone ā Set or change title of UIBarButtonItem
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"TITLE GOES HERE" style:UIBarButtonItemStyleBordered target:self action:@selector(functionToCallOnClick)];