- www.gideondsouza.com
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.Text; | |
using System.Linq; | |
using System.Collections.Generic; | |
namespace Gideon.Extensions | |
{ | |
static class ExportToCsvExtension | |
{ | |
//awesomeness!! XD | |
//found this at http://mikehadlow.blogspot.com/2008/06/linq-to-csv.html tweaked and fixed it |
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
Button btnLocation = (Button)findViewById(R.id.btnLocation); | |
btnLocation.setOnClickListener(new OnClickListener() { | |
public void onClick(View arg0) { | |
// Acquire a reference to the system Location Manager | |
LocationManager locationManager = | |
(LocationManager) AddressPOCActivity.this.getSystemService(Context.LOCATION_SERVICE); | |
// Define a listener that responds to location updates | |
LocationListener locationListener = new LocationListener() { | |
public void onLocationChanged(Location location) { | |
// Called when a new location is found by the network location provider. |
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
From d233e024722a0d05ce9d70eeeaaffa0517579ea2 Mon Sep 17 00:00:00 2001 | |
From: Gideon Israel Dsouza <gidisrael@gmail.com> | |
Date: Wed, 2 Oct 2013 21:12:21 +0530 | |
Subject: [PATCH 1/3] Updated known_pod_issues by running ./perl podcheck.t | |
--regen | |
MIME-Version: 1.0 | |
Content-Type: multipart/mixed; boundary="------------1.7.12.4 (Apple Git-37)" | |
This is a multi-part message in MIME format. | |
--------------1.7.12.4 (Apple Git-37) |
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
cpanm (App::cpanminus) 1.6005 on perl 5.016003 built for MSWin32-x64-multi-thread | |
Work directory is C:\Users\GIDEON~1.CON/.cpanm/work/1378190596.8644 | |
You have make C:\strawberry\c\bin\dmake.exe | |
You have LWP 6.04 | |
Falling back to Archive::Tar 1.90 | |
Searching Dist::Zilla on cpanmetadb ... | |
--> Working on Dist::Zilla | |
Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Dist-Zilla-4.300037.tar.gz | |
-> OK | |
Unpacking Dist-Zilla-4.300037.tar.gz |
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
long sum = 0; | |
long n = 2000000; | |
bool[] e = new bool[n];//by default they're all false | |
for (int i = 2; i < n; i++) | |
{ | |
e[i] = true;//set all numbers to true | |
} | |
//weed out the non primes by finding mutiples | |
for (int j = 2; j < n; j++) | |
{ |
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
public class HomeController : Controller | |
{ | |
public ActionResult Index() | |
{ | |
return View(); | |
} | |
public ActionResult Upload() | |
{ | |
var file = Request.Files["Filedata"]; | |
string savePath = Server.MapPath(@"~\Content\" + file.FileName); |
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
@{ | |
Layout = null; | |
} | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width" /> | |
<title>::Uploadify Example::</title> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.uploadify-3.1.min.js")"></script> |
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
require 'sinatra' | |
get '/' do | |
erb :form_multiple | |
end | |
post '/upload' do | |
#this method will get as ajax call for every file uploaded | |
@filename = params[:Filename] | |
file = params[:Filedata][:tempfile] |
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
<html> | |
<head> | |
<title>Image Upload</title> | |
<link rel="stylesheet" type="text/css" href="uploadify.css" /> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
<script type="text/javascript" src="jquery.uploadify.min.js"></script> | |
</head> | |
<body> | |
<h1>Upload Images</h1> |
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
<html> | |
<head> | |
<title>Show Image</title> | |
</head> | |
<body> | |
<h1>See Image</h1> | |
<img src="<%= @filename %>" /> | |
</body> | |
</html> |
NewerOlder