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
Face: default (sample) (customize this face) | |
Documentation: | |
Basic default face. | |
Defined in `faces.el'. | |
Family: Inconsolata | |
Foundry: unknown | |
Width: normal |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="course.labs.dangerousapp" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk | |
android:minSdkVersion="13" | |
android:targetSdkVersion="18" /> |
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
try: | |
curs.execute('REPLACE INTO nvd_cpe\ | |
(cpe, cpe_part, cpe_vendor, cpe_product, cpe_version, cpe_update, \ | |
cpe_edition, cpe_language) VALUES (?, ?, ?, ?, ?, ?, ?, ?)', \ | |
(str(nvd_cpe), str(nvd_cpe_variables[2]), str(nvd_cpe_variables[3]), | |
str( nvd_cpe_variables[4]), str(nvd_cpe_variables[5]), str(nvd_cpe_variables[6], ) | |
str(nvd_cpe_variables[7]), str(nvd_cpe_variables[8]))) | |
except Exception as e: | |
print "hello everyone" | |
print traceback.print_exc() |
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
try: | |
curs.execute('INSERT INTO nvd_cpe\ | |
(cpe, cpe_part, cpe_vendor, cpe_product, cpe_version, cpe_update, \ | |
cpe_edition, cpe_language) VALUES (?, ?, ?, ?, ?, ?, ?, ?)', \ | |
(nvd_cpe, nvd_cpe_variables[2], nvd_cpe_variables[3], nvd_cpe_variables[4], \ | |
nvd_cpe_variables[5], nvd_cpe_variables[6], nvd_cpe_variables[7], | |
nvd_cpe_variables[8])) | |
except Exception as e: | |
print e | |
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
# Function to print the last order row of new Order | |
def printOrder(d): | |
key = d.keys()[-1] | |
lpr = subprocess.Popen("/usr/bin/lpr", stdin=subprocess.PIPE) | |
lpr.stdin.write("OrderNo"+ str(key)+"\n") | |
lpr.stdin.write("Name :"+ d[key]['name'] + "\n") | |
lpr.stdin.write("tel :"+ str(d[key]['telephone'])+"\n") | |
for y in d[key]['items']: | |
lpr.stdin.write(y['name'] + " " + y['size'] +" " + str(y['quantity']) + " " +str(y['price']) + "\n") | |
lpr.stdin.write("$ "+ str(d[key]['total']) + " discount" +" "+ str(d[key]['discount']) ) |