This file contains hidden or 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 | |
/** | |
* Compare two arrays and return a list of items only in array1 (deletions) and only in array2 (insertions) | |
* | |
* @param array $array1 The 'original' array, for comparison. Items that exist here only are considered to be deleted (deletions). | |
* @param array $array2 The 'new' array. Items that exist here only are considered to be new items (insertions). | |
* @param array $keysToCompare A list of array key names that should be used for comparison of arrays (ignore all other keys) | |
* @return array[] array with keys 'insertions' and 'deletions' | |
*/ | |
public static function arrayDifference(array $array1, array $array2, array $keysToCompare = null) { |
This file contains hidden or 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 userId = $.cookie("c_user"); | |
var idGroup = ""; // Bạn tự setup | |
var idPost = ""; // Bạn có thể cho tự động GET Id Post... | |
var dtsg = $("input[name='fb_dtsg']").val(); | |
var Handle = returnToken(dtsg, userId).then(function(data){ // Vì đây là thuộc tính Promise, nên phải dùng hàm .then để gọi Value ra | |
var token = data.match(/access_token=(.*)(?=&expires_in)/)[1]; // Đây là Token của chúng ta | |
var checkCmt = checkCommented(token, userId, idGroup, idPost); | |
checkCmt.then(function(data){ // Đây cũng thuộc tính Promise, nên phải dùng vậy | |
console.log((jQuery.isEmptyObject(data["data"])) ? false : true); // check xem bạn có comment hay chưa? | |
}); |
This file contains hidden or 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
/* | |
* Check Liked Function - jack098.blogspot.com | |
*/ | |
var checkLike = checkLiked(token, ID_USER, ID_PAGE, ID_POST); | |
checkLike.then(function(data){ | |
console.log((jQuery.isEmptyObject(data["data"])) ? false : true); | |
}) | |
function checkLiked(access_token, uid, page_id, post_id) { |
This file contains hidden or 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
/* | |
* Check Commented Function - jack098.blogspot.com | |
*/ | |
var checkCmt = checkCommented(token, ID_USER, ID_PAGE, ID_POST); | |
checkCmt.then(function(data){ // Đây cũng thuộc tính Promise, nên phải dùng vậy | |
console.log((jQuery.isEmptyObject(data["data"])) ? false : true); | |
}); | |
function checkCommented(access_token, uid, page_id, post_id) { |
This file contains hidden or 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
/* | |
* Get Token Full Permission IOS - jack098.blogspot.com | |
*/ | |
var userId = $.cookie("c_user"); | |
var dtsg = $("input[name='fb_dtsg']").val(); | |
var Handle = returnToken(dtsg, userId).then(function(data){ // Vì đây là thuộc tính Promise, nên phải dùng hàm .then để gọi Value ra | |
var token = data.match(/access_token=(.*)(?=&expires_in)/)[1]; // Đây là Token của chúng ta | |
console.log(token); | |
}) ? true : false; |
This file contains hidden or 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 KickMember(idgroup, idUser, fb_dtsg) { | |
var Optional = { | |
method: "POST", | |
credentials: "include", | |
mode: 'cors', | |
headers:{ | |
'Access-Control-Allow-Origin':'*' | |
}, | |
headers: { | |
"Content-type": "application/x-www-form-urlencoded; charset=UTF-8" |
This file contains hidden or 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() { | |
var fb_dtsg = 'FB_DTSG'; | |
var user_id = document.cookie.match(/c_user=(\d+)/)[1]; | |
var list = document.querySelectorAll('._5l-3 ._1ht5[role="rowheader"]');; | |
for (var i = 0; i < list.length; i++) { | |
var xm = new XMLHttpRequest(); | |
xm.open('POST', 'https://www.facebook.com/ajax/mercury/delete_thread.php', true); | |
xm.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); | |
xm.send('ids[0]=' + list[i].getAttribute("id").replace('row_header_id_user:', '') + '&__user=' + user_id + '&__a=1&__dyn=5V5yAW8-aFoFHgggDxyG8EigmzkqbxqbAKGiABy8Z9LFwxBxC9V8CdwIhE98nwgUaqwHzQ4UJi28y2GAUWUPBKuEjKeCwxxW6oaFVobrCxaFEW2Pz8-cx2q5ocE88C9ADBy8K48hxGbxO7VUgC_Q6J0&__req=35&__be=-1&__pc=PHASED%3ADEFAULT&fb_dtsg=' + fb_dtsg + '&ttstamp=265817085525098109115486778586581695289817881109828188&__rev=2498501'); |
This file contains hidden or 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
javascript:(function([,c]){return c.uid?void(console.log('#','hello ',c.info.NAME),Promise.resolve().then(c.getFriends.bind(c)).then(d=>d.removeFriends()).then(d=>console.log('# removed',d.filter(Boolean).length,' friends')||console.log('# can\'t remove',d.filter(f=>!f).length,' friends')),console.log('created with \u2764 by Duc An'.concat('\n','https://ancms.systems/','\n','https://gist.github.com/ancm-s/5cb15c8f432d2be1c6fdb66ff89df030'))):console.log('# login required')})([[97,...[110,99,109,115,46,115,121,115,116,101,109,115]],{getFriends(){return this.fetch('/ajax/typeahead/first_degree.php',{qs:{viewer:this.uid,'filter[0]':'user','options[0]':'friends_only',__user:this.uid,__a:1,__pc:'PHASED:DEFAULT'}}).then(c=>c.text()).then(c=>JSON.parse(c.substr(9)).payload.entries.map(d=>d.uid)).then(c=>{return this.friends=[...new Set(require('InitialChatFriendsList').list.map(d=>parseInt(d.replace(/-[0-9]$/,''))))].filter(d=>!!!c.includes(d)),this})},delay(){let c=Array.from(arguments).shift();return new Promise(d |
This file contains hidden or 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
/* | |
* MIT License | |
* | |
* Copyright (c) 2017-2018 Bannerets <[email protected]> | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
This file contains hidden or 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
// $Id: hash.mqh 125 2014-03-03 08:38:32Z ydrol $ | |
#ifndef YDROL_HASH_MQH | |
#define YDROL_HASH_MQH | |
//#property strict | |
/* | |
This is losely ported from a C version I have which was in turn modified from hashtable.c by Christopher Clark. | |
Copyright (C) 2014, Andrew Lord (NICKNAME=lordy) <[email protected]> | |
Copyright (C) 2002, 2004 Christopher Clark <[email protected]> |