User Profile
peiyezhu
Bronze Contributor
Joined 4 years ago
User Widgets
Recent Discussions
- 27Views0likes0Comments
- 18Views0likes1Comment
- 46Views0likes3Comments
Re: How import data from Json API
https://neofollower.com/panel/api/docs From this document,this is a POST submit instead of GET. example PHP <?php class Api { // API URL public $api_url = 'http://yourwebsite.com/api/v1'; // Your API key public $api_key = ''; /** * * Add Order * */ public function add_order($data) { $post = array_merge(array('key' => $this->api_key, 'action' => 'add'), $data); $result = $this->connect($post); return json_decode($result); } /** * * Order status * */ public function status($order_id) { $result = $this->connect(array( 'key' => $this->api_key, 'action' => 'status', 'order' => $order_id )); return json_decode($result); } /** * * Order multi status * */ public function multi_status($order_ids) { $result = $this->connect(array( 'key' => $this->api_key, 'action' => 'status', 'orders' => implode(",", (array)$order_ids) )); return json_decode($result); } /** * * All services * */ public function services() { $result = $this->connect(array( 'key' => $this->api_key, 'action' => 'services', )); return json_decode($result); } /** * * Balance * */ public function balance() { $result = $this->connect(array( 'key' => $this->api_key, 'action' => 'balance', )); return json_decode($result); } /** * * Connect to panel * */ private function connect($post) { $_post = Array(); if (is_array($post)) { foreach ($post as $name => $value) { $_post[] = $name.'='.urlencode($value); } } if (is_array($post)) { $url_complete = join('&', $_post); } $url = $this->api_url."?".$url_complete; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_USERAGENT, 'API (compatible; MSIE 5.01; Windows NT 5.0)'); $result = curl_exec($ch); if (curl_errno($ch) != 0 && empty($result)) { $result = false; } curl_close($ch); return $result; } } // Examples $api = new Api(); # return all services $services = $api->services(); # return user balance $balance = $api->balance(); // add order $order = $api->order(array('service' => 1, 'link' => 'http://example.com/test', 'quantity' => 100)); # Default $order = $api->order(array('service' => 1, 'link' => 'http://example.com/test', 'comments' => "good pic\ngreat photo\n:)\n;)")); # Custom Comments $order = $api->order(array('service' => 1, 'link' => 'http://example.com/test', 'quantity' => 100, 'runs' => 10, 'interval' => 60)); # Drip-feed # return status, charge, remains, start count, order_id $status = $api->status(23); # return orders status, charge, remains, start count, order_id $statuses = $api->multi_status([12, 2, 13]);0Views0likes0CommentsRe: Excel Code trying to copy cell data from one sheet to another based on 2 criteria
I have no windows PC to debug fully EXCEL vba api.BUT I have found there are sapces after Test like "Test " in table Track. x="ADODB.Connection" Set Conn = CreateObject(x) Conn.Open "Provider=Microsoft.Ace.OLEDB.12.0;Extended Properties='Excel 12.0;';Data Source=" & ThisWorkbook.FullName sql="select " sql=sql & " * from [Tracker$]" sql= sql & " where f6 like ""Test%""" 'olny add % wildcard to match "Test " set Rst=Conn.Execute(sql) ActiveCell.CopyFromRecordset Rst sql="select " sql=sql & " * from [My Plan$]" set Rst=Conn.Execute(sql) ActiveCell.CopyFromRecordset Rst5Views1like0Comments- 46Views1like0Comments
Re: Finding Possible Matches to a Solution
//select rowid,* from Sheet1; with recursive D as ( select f01 E,rowid old_rowid,1 level,f01 和,rowid x from Sheet1 union all select E||'+'||f01,Sheet1.rowid,D.level+1,f01+和,x||','||rowid from Sheet1,D where rowid>old_rowid and round(f01+和,2)<=40) select row_number() over () no,* from D where round(和,2)=40 limit 500;17Views0likes0Comments- 29Views0likes0Comments
Recent Blog Articles
No content to show