Skip to content

Instantly share code, notes, and snippets.

mvark mvark

Block or report user

Report or block mvark

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View OCR.html
<!DOCTYPE html>
<html>
<head>
<title>OCR Sample</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
function processImage() {
View CAPTCHATextExtractor
javascript:(function()%7Bdocument.getElementById("captchaTexttab1").value%3Ddocument.getElementById("captchaDivtab1").innerHTML.split(" ").join("")%7D)()
@mvark
mvark / BingSearchv5More.html
Last active Jun 9, 2016
Fetching results using version 5 of Bing Search API
View BingSearchv5More.html
<!DOCTYPE html>
<html>
<head>
<title>Bing Search v5 - show all results</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>
<script>
// more info: http://mvark.blogspot.com/2016/06/how-to-use-bing-search-v5-api-with.html
@mvark
mvark / BingSearchv5Simple.html
Last active Jun 9, 2016
A simple jQuery based sample to show Bing Search v5 API in action
View BingSearchv5Simple.html
<!DOCTYPE html>
<html>
<head>
<title>Bing Search v5 - Simple, show fewer results</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
// more info: http://mvark.blogspot.com/2016/06/how-to-use-bing-search-v5-api-with.html
@mvark
mvark / desc.html
Last active Mar 12, 2016
The page ZXing Barcode Scanner will send the scanned barcode text
View desc.html
<!-- Read related post: http://mvark.blogspot.in/2016/03/how-to-scan-barcode-with-android.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Desc</title>
</head>
<body>
<script>document.write(location.href);</script>
</body>
@mvark
mvark / zxing.html
Last active Mar 12, 2016
HOW TO scan a barcode with Android smartphone camera from a web page (works within an Android browser & smartphone having ZXing Barcode Scanner installed)
View zxing.html
<!-- Read related post: http://mvark.blogspot.in/2016/03/how-to-scan-barcode-with-android.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<a href="zxing://scan/?ret=http://example.azurewebsites.net/desc.html?code={CODE}">Scan</a>
</body>
@mvark
mvark / QuotesInInjectedText.html
Created Jan 14, 2015
JavaScript function to handle quotes within injected text assigned to Title attribute of a HTML element
View QuotesInInjectedText.html
Before:
elem.append('<a title="'results[i].title
+ '" href="http://www.youtube.com/embed/' + results[i].id + '?autoplay=1&vq=small&autohide=2&iv_load_policy=3" >' + results[i].title + '</a>');
function htmlEscape(str) {
return String(str)
.replace(/'/g, ''')
.replace(/"/g, '"');
}
@mvark
mvark / DownloadAsExcel.cs
Created Jan 8, 2015
C# code sample to implement "Download as Excel" feature for a web page with content from a data source
View DownloadAsExcel.cs
<%@ Page Language="C#" %>
<script runat="server">
void Page_Load(Object Src, EventArgs E)
{
try
{
System.Data.DataTable workTable = new System.Data.DataTable();
workTable.TableName = "Customers";
workTable.Columns.Add("Id");
workTable.Columns.Add("Name");
@mvark
mvark / DownloadAsDoc.cs
Created Jan 8, 2015
C# code sample to implement "Download as Word Document" feature for a web page with content from a data source
View DownloadAsDoc.cs
<%@ Page Language="C#" %>
<script runat="server">
void Page_Load(Object Src, EventArgs E)
{
try
{
System.Data.DataTable workTable = new System.Data.DataTable();
workTable.Columns.Add("Id");
workTable.Columns.Add("Name");
System.Data.DataRow workRow;
@mvark
mvark / EmailwithDynamicAttachment.cs
Created Jan 8, 2015
C# code sample to send an email with a Word or Excel file attachment built on the fly. More info - http://mvark.blogspot.in/2007/01/how-to-send-email-with-word-or-excel.html
View EmailwithDynamicAttachment.cs
<%@ Page Language="C#" %>
<script runat="server">
void Page_Load(Object Src, EventArgs E)
{
try
{
System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
System.Net.NetworkCredential cred = new System.Net.NetworkCredential("someone@acme.com", "p@ssword");
You can’t perform that action at this time.