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 list_all_files($conn_id, $path){ | |
$buff = ftp_rawlist($conn_id, $path); | |
$res = parse_rawlist( $buff) ; | |
static $flist = array(); | |
if(count($res)>0){ | |
foreach($res as $result){ | |
// verify if is dir , if not add to the list of files | |
if($result['size']== 0){ | |
// recursively call the function if this file is a folder | |
list_all_files($conn_id, $path.'/'.$result['name']); |
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
//Install PM> Install-Package Microsoft.Bcl.Async | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
class ExTask : Task | |
{ | |
public ExTask(Action action) |
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
//Please enter the details: | |
//First name: | |
//Last name: | |
//Grade(9-12): | |
//Student Id: | |
//Username: | |
//GPA(0.0-4.0): | |
//Plex | |
//Vera | |
//9 |
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
int sum = 0; | |
int input = 10000000000; | |
for(int i =0;i <= input;i++){ | |
sum += i; | |
} | |
Console.WriteLine(sum); |
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
uint p = 10000000 | |
uint sum = p*(p+1)/2; |
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 | |
/* | |
I fact problem when I want make html_encode to more than item on array or object I retreved from Model in Codeigniter to | |
put them on Form or print them and because I don't want to encode or escape html from model and also lazy to do that each time | |
with each item :D | |
*/ | |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
if (!function_exists('bulk_html_encode')) { |
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-proxy |
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 binding = new WSHttpBinding(); | |
binding.SendTimeout = new TimeSpan(0, 0, 0, 0, 100000); | |
binding.OpenTimeout = new TimeSpan(0, 0, 0, 0, 100000); | |
binding.MaxReceivedMessageSize = 10000; | |
binding.ReaderQuotas.MaxStringContentLength = 10000; | |
binding.ReaderQuotas.MaxDepth = 10000; | |
binding.ReaderQuotas.MaxArrayLength = 10000; | |
var endpoint = new EndpointAddress("http://localhost:57102/MyService.svc"); | |
var myClient = new WebServiceclient(binding, endpoint); |
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
wb = InitBrowser( ) | |
wb?setlocation(-8, -8) | |
wb?setsize(1382, 744) | |
wb?Goto("http://addmefast.com/free_points/facebook_likes") | |
sleep(1000) | |
wb?ScrollTo(0,240) | |
wb?Click(701,409) | |
sleep(10000) | |
wb?SelectTab(1) | |
wb?ScrollTo(0,0) |
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
internal static class UnixTimestampConverter | |
{ | |
public static DateTime Epoch | |
{ | |
get | |
{ | |
return new DateTime(1970, 1, 1, 0, 0, 0, 0); | |
} | |
} |