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
<?php | |
class DataArray { | |
private static $start; | |
private static $end; | |
/** | |
* Costructor, start date end date in epochtime | |
* @param [type] $start [description] |
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() { | |
if( $('.sm-visible').is(':visible') ) { | |
console.log('is tablet'); | |
/** | |
* code | |
**/ | |
} | |
if( $('.xs-visible').is(':visible') ) { | |
console.log('is smartphone'); | |
/** |
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
<?php // encoding: utf-8 | |
/*Copyright 2008Qian Qin(email : mail@qianqin.de) | |
This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation; either version 2 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, |
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 CURLtoShop { | |
/** | |
* CURL in POST | |
* @param [type] $url url della chiamata | |
* @param [type] $posts campi post | |
* @return [type] [description] | |
*/ | |
public static function post($url, $posts) { |
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"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:id="@android:id/background"> | |
<shape> | |
<corners android:radius="5dip" /> | |
<gradient | |
android:startColor="@color/progress_blue" | |
android:centerColor="@color/progress_blue" | |
android:centerY="0.75" |
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
if (stripos($text, "world") !== false) { | |
echo "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
Gson gson = new Gson(); | |
// Obj -> JSON String | |
ObjectClass object = new ObjectCLass(); | |
String jsonString = gson.toJson(object); | |
// JSON String -> Obj | |
Type listType = new TypeToken<ObjectClass>(){}.getType(); | |
ObjectClass object = gson.fromJson(jsonString, listType); |
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
// Prevent close on backpress | |
dialog.setOnKeyListener( new DialogInterface.OnKeyListener() { | |
@Override | |
public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) { | |
if(keyCode == KeyEvent.KEYCODE_BACK) | |
return true; | |
else | |
return false; | |
} | |
}); |
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
/** | |
* Created by marcocattaneo on 21/01/15. | |
*/ | |
public class MyFragment extends Fragment { | |
public static MyFragment newInstance() { | |
MyFragment frag = new MyFragment(); | |
return frag; | |
} |
OlderNewer