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
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors | |
// License: GNU General Public License v3. See license.txt | |
erpnext.SMSManager = function SMSManager(doc) { | |
var me = this; | |
this.setup = function() { | |
console.log("SSS hello "); | |
var default_msg = { | |
'Lead' : '', |
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 getRequest(){ | |
var http = new XMLHttpRequest(); | |
var url = 'http://dummy.restapiexample.com/api/v1/employee/99990'; | |
// var params = 'orem=ipsum&name=binny'; | |
http.open('GET', url, true); | |
//Send the proper header information along with the request | |
http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); | |
http.onload = function() {//Call a function when the state changes. |
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
location @webserver { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
add_header 'Access-Control-Allow-Credentials' 'true'; | |
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; | |
add_header 'Access-Control-Allow-Headers' 'Authorization,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; | |
add_header 'Access-Control-Max-Age' 1728000; | |
add_header 'Content-Type' 'text/plain charset=UTF-8'; | |
add_header 'Content-Length' 0; |
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
@frappe.whitelist() | |
def shipment_api(so_name): | |
result = {} | |
if frappe.db.exists("Sales Order",so_name): | |
so = frappe.get_doc("Sales Order",so_name) | |
if so.in_shipment == 0: | |
result['message']="Collected" | |
result['alert']=False | |
else: |
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
@frappe.whitelist() | |
def shipment(so_name): | |
so = frappe.get_doc("Sales Order",so_name) | |
result = {} | |
if so.in_shipment == 0: | |
result['message']="not shipped yet" | |
return result | |
else: | |
shipment = frappe.get_doc("Shipment",so.shipment) |
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 book import Book | |
class LinkedList: | |
def __init__(self): | |
self.head = None | |
self.size = 0 | |
def get_size(self): |
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
class Book: | |
def __init__(self, title, author, ibsn, publisher, year_published, book_location, nextNode=None): | |
self.title = title | |
self.author = author | |
self.ibsn = ibsn | |
self.publisher = publisher | |
self.year_published = year_published |
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
.print-format table, .print-format tr, | |
.print-format td, .print-format div, .print-format p { | |
vertical-align: middle; | |
} | |
@media screen { | |
.print-format { | |
width: 104mm; | |
min-height: 40mm; | |
height: 40mm; | |
padding: 0; |
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
.print-format table, .print-format tr, | |
.print-format td, .print-format div, .print-format p { | |
vertical-align: middle; | |
} | |
@media screen { | |
.print-format { | |
width: 104mm; | |
min-height: 40mm; | |
height: 40mm; | |
padding: 0; |
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
def textQueries(sentences, queries): | |
res = {} | |
for idxx, q in enumerate(queries): | |
qs=str(q) | |
for idx, sentence in enumerate(sentences): | |
if all(word in sentence for word in q): | |
if qs in res: | |
res[qs] = [res[qs],str(idx)] | |
else: |
NewerOlder