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
| //Update Anti Virus | |
| Home users just want to update their antivirus. Business users | |
| are usually admins who want to grab the latest update so they can | |
| redistribute it within their company. And they want to know when | |
| a new update is available so they can trigger some other | |
| notification or distribution program. The problem is that the name | |
| of the update changes, so that makes it harder to code for something | |
| when you don't know the name in advance! |
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
| //Convert URL into Hyperlink | |
| function _make_url_clickable_cb($matches) { | |
| $ret = ''; | |
| $url = $matches[2]; | |
| if ( empty($url) ) | |
| return $matches[0]; | |
| // removed trailing [.,;:] from URL | |
| if ( in_array(substr($url, -1), array('.', ',', ';', ':')) === true ) { |
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
| API Code: | |
| <?php | |
| //Modify these | |
| $API_KEY = 'your-token-here'; | |
| $SECRET = 'your-secret-here'; | |
| $TOKEN = 'your-secret-here'; | |
| $STORE_URL = 'yourestore.myshopify.com'; | |
| $PRODUCT_ID = 'product-id-here'; | |
| $url = 'https://' . $API_KEY . ':' . md5($SECRET . $TOKEN) . '@' . $STORE_URL . '/admin/products/' . $PRODUCT_ID . '.xml'; |
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
| //Coin Toss Program | |
| import random | |
| headcount = tailcount = 0 | |
| userinput = ' ' | |
| print "Now tossing a coin.." | |
| while userinput.lower() ! = "q": | |
| flip = random.choice(['heads', 'tails']) | |
| if flip == 'heads' : | |
| headcount += 1 | |
| print "heads! the number of heads is now %d" % headcount |
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
| # program: spider.py | |
| # author: aahz | |
| # version: 1.1 | |
| # date: June 2006 | |
| # description: start on command line with URL argument | |
| # Finds pages within a web site. | |
| # These modules do ost of the work | |
| import sys | |
| import urllib2 |
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
| <? | |
| /** | |
| * Crypt :: two-way encryption class using RIJNDAEL 256 AES standard | |
| * @uses MCRYPT_RIJNDAEL_256 | |
| * | |
| * The MIT License | |
| Copyright (c) 2010 Chris Nizzardini | |
| Permission is hereby granted, free of charge, to any person obtaining a copy |
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
| Assembly_Function | |
| #PURPOSE: Program to illustrate hoe functions work. Computes 2^3 + 5^5 | |
| # Everything in the main program is stored in registers, so the data section doesn't have anything | |
| .section .data | |
| .section .text | |
| .global _start |
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
| #Counting Program | |
| #Purpose: This program finds the maximum number of set of data items. | |
| #VARIABLES: The registers have the following uses: | |
| # %edi - Holds the index of the data item being examined | |
| # %ebx = Largest data item found | |
| # %eax - Current data item | |
| #The following memory locations are used: | |
| # data_items - contains the item data. A 0 is used to terminate the data. |
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
| #Recursive Function | |
| #PURPOSE - Given a number, this program computes the factorial. | |
| # For example, the factorial of 3 is 3*2*1, or 6. | |
| # The factorial of 4 is 4*3*2*1 | |
| # This program shows how to call a function recursively | |
| .section .data |
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
| Imports System.Net.Mail | |
| Sub aspireReference1Email() | |
| 'Get all contents from database for emailing and PDF | |
| Dim credentials As String = Session("UserID") | |
| Dim dt As New DataTable | |
| Dim ASPIRE As String = "ASPIRE" | |
| Dim sqlConn As New SqlConnection(ConfigurationManager.ConnectionStrings("CRTCConnectionString").ConnectionString) | |
| sqlConn.Open() |