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
FragmentTransaction ft = getSherlockActivity().getSupportFragmentManager().beginTransaction(); | |
Fragment currentFragment = new ProductDetail(ID); | |
ft.replace(R.id.fragmentArea, currentFragment); | |
ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); | |
ft.addToBackStack(null); | |
ft.commit(); |
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
Environment.getExternalStorageDirectory().getAbsolutePath(); |
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
ArrayList<MenuDummy> menuList = new ArrayList<MenuDummy>() {{ | |
add(new MenuDummy("All article", MenuDummy.OPEN_TAG, "*")); | |
add(new MenuDummy("Category", MenuDummy.OPEN_TAG, "category")); | |
}}; |
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 FooLoader extends AsyncTaskLoader { | |
Context context; | |
public FooLoader(Context context) { | |
super(context); | |
this.context = context; | |
} | |
@Override |
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
$('#mySelect').empty(); | |
// OR | |
$('#mySelect') | |
.find('option') | |
.remove() | |
.end() | |
.append('<option value="whatever">text</option>') | |
.val('whatever') |
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
var hero; | |
if ( localStorage.getItem('heroImg')) { | |
hero = localStorage.getItem('heroImg'); | |
} | |
else { | |
hero = '/9j/4AAQSkZJRgABAgAAZABkAAD/7 /.../ 6p+3dIR//9k='; | |
localStorage.setItem('heroImg',hero); | |
} |
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
function isValidEmailAddress(emailAddress) { | |
var pattern = new RegExp(/^(("[\w-+\s]+")|([\w-+]+(?:\.[\w-+]+)*)|("[\w-+\s]+")([\w-+]+(?:\.[\w-+]+)*))(@((?:[\w-+]+\.)*\w[\w-+]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][\d]\.|1[\d]{2}\.|[\d]{1,2}\.))((25[0-5]|2[0-4][\d]|1[\d]{2}|[\d]{1,2})\.){2}(25[0-5]|2[0-4][\d]|1[\d]{2}|[\d]{1,2})\]?$)/i); | |
return pattern.test(emailAddress); | |
} |
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
function checkPiva(piva) { | |
if(piva.length==11) { | |
var m = 0,a = 0; | |
var n = piva.split(""); | |
var s = parseInt(n[0]) + parseInt(n[2]) + parseInt(n[4]) + parseInt(n[6]) + parseInt(n[8]); | |
for(var i=1; i<10; i=i+2) { | |
a = parseInt(n[i])*2; | |
if(a>9) |
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 class DownloadImageTask extends AsyncTask<String, Void, Bitmap> { | |
ImageView bmImage; | |
public DownloadImageTask(ImageView bmImage) { | |
this.bmImage = bmImage; | |
} | |
protected Bitmap doInBackground(String... urls) { | |
String urldisplay = urls[0]; | |
Bitmap mIcon11 = null; |
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
<div id="colonna_sx"> | |
<img src="http://www.sioi.it/wp-content/themes/theme1239/images/italia.png" alt="Mappa italia" width="450" height="542" border="0" usemap="#Map"> | |
<map name="Map" id="Map"> | |
<area shape="poly" coords="207,487,209,473,219,465,263,471,337,456,319,504,327,521,317,538,264,517,251,508,248,505" class="iframe" href="?page_id=1798&regione=sicilia" alt="Sicilia"> | |
<area shape="poly" coords="340,476,361,470,371,453,375,440,376,426,389,418,395,421,395,397,379,386,372,376,373,361,360,371,344,370,361,424,347,433,339,456" class="iframe" href="?page_id=1798&regione=calabria" alt="Calabria"> | |
<area shape="poly" coords="373,362,396,335,421,349,439,369,448,354,429,330,345,290,353,274,316,266,309,292,325,312,343,307,380,341" class="iframe" href="?page_id=1798&regione=puglia" alt="Puglia"> | |
<area shape="poly" coords="334,364,342,369,361,370,373,348,367,332,340,311,331,313,321,330,336,346" class="iframe" href="?page_id=1798&regione=basilicata" alt="Basilicata"> | |
<are |