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
using System; | |
using System.Collections.Generic; | |
using System.Drawing; | |
using System.Text; | |
using System.Windows.Forms; | |
using System.Net; | |
using System.IO; | |
namespace FBDesktop | |
{ |
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
//main_activity_super.xml | |
<menu xmlns:android="http://schemas.android.com/apk/res/android" > | |
<item android:id="@+id/logout" | |
android:title="logout" | |
android:showAsAction="never"/> | |
<item android:id="@+id/refresh" | |
android:title="refresh" | |
android:showAsAction="never"/> | |
<!-- http://stackoverflow.com/questions/8312344/how-to-add-a-dropdown-item-on-the-action-bar --> |
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
//the use | |
public void btnAdd_Click(View v) { | |
ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); | |
nameValuePairs.add(new BasicNameValuePair("mailto", "test@test.com")); | |
nameValuePairs.add(new BasicNameValuePair("subject", "test")); | |
CustomHttpTask poster = new CustomHttpTask(); | |
poster.setHTTP_Method(CustomHttpTask.httpMethod.POST); | |
poster.setNameValuePairs(nameValuePairs); |
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
//call | |
string srcString = ""; | |
if (comboBox1.SelectedIndex == 0) | |
srcString = "field-artist=" + txtArtist.Text.Substring(0, pos) + "&field-title=" + txtAlbum.Text.Substring(pos + 1); | |
WebREQ dbase = new WebREQ(@"http://www.amaxon.com/gp/search?search-alias=popular&" + srcString + "&sort=relevancerank"); | |
dbase.downloadSTR += new WebREQ.URL(dbase_downloadSTR); | |
dbase.get(); | |
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 | |
var record = {}; | |
record['testfield1'] = "test1"; | |
record['testfield2'] = "test2"; | |
record['testfield3'] = "test3"; | |
var preserveNodes = ['ccategories', 'stats', 'competitions', 'causes', 'companies']; | |
updateNode('https://' + baseURL + '/testcat/' + $('#oTESTCAT_updateID').val(), record, preserveNodes, 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
//references : | |
//Firebase Custom Login - https://www.firebase.com/docs/security/custom-login.html | |
//Firebase REST API - https://www.firebase.com/docs/rest-api.html | |
// | |
//Firebase Token Generator for PHP - https://github.com/firebase/firebase-token-generator-php | |
//Encode and decode JSON Web Tokens (JWT) in PHP - https://github.com/firebase/php-jwt | |
//Firebase PHP Helper Library - https://github.com/ktamas77/firebase-php | |
*1* | |
//upload to server FirebaseToken.php + JWT.php + firebaseLib.php + |
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
//source - by Rajeev - http://stackoverflow.com/a/20132526/1320686 | |
//create an interface BtnClickListener | |
public interface BtnClickListener { | |
public abstract void onBtnClick(int position, View v); | |
} | |
//on adapter pass the activity/fragment listener | |
private BtnClickListener mClickListener = null; | |
public ProfilAdapter(Context context, List<Customer> list, BtnClickListener listener) { |
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 | |
//$data sample | |
//"Apr 14 2018 02:38 AM",10,test,,1.00,Android,Apple,95,{ jsonTest : jsonTitle} | |
class StatsRecord { | |
public $date; | |
public $event_name; | |
public $app_version; | |
public $app_platform; |
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
//index.html (jQuery) | |
$.ajax({ | |
type : "POST", | |
url : "getResults.php", | |
data : "ID=" + "160", | |
datatype : "json", | |
success : function(result) { | |
console.log(result); | |
}, | |
error : function(msg) { |
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
//procedure | |
DELIMITER $$ | |
CREATE PROCEDURE ADD_CAUSECOMPANY (IN fb_idVAR varchar(50), OUT resVAL INT) | |
BEGIN | |
DECLARE x INT; | |
select id into x from fb_causescompanies where fb_id = fb_idVAR; | |
IF (x > 0 ) THEN |
OlderNewer