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
from PIL import Image | |
from resizeimage import resizeimage | |
# For square images | |
input_path_square_image = [ | |
'./original/schedule-girl-1.PNG', | |
'./original/schedule-girl-2.PNG', | |
'./original/schedule-girl-3.PNG', | |
'./original/schedule-girl-4.PNG' | |
] |
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
import requests, json, xmltodict | |
request_url = 'https://ws.ondemand.qas.com/ProOnDemand/V3/ProOnDemandService.asmx?WSDL=' | |
qas_token = '<add your token>' | |
soap_action = 'http://www.qas.com/OnDemand-2011-03/DoSearch' | |
headers = { | |
'Content-Type':'text/xml', | |
'Auth-Token':qas_token, | |
'SOAPAction': soap_action | |
} |
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
const axios = require('axios') | |
const parseString = require('xml2js').parseString | |
const qas_token = '<add your token>' | |
const soap_action = 'http://www.qas.com/OnDemand-2011-03/DoSearch' | |
const xml = '<?xml version="1.0" encoding="UTF-8" ?> \ | |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ond="http://www.qas.com/OnDemand-2011-03">\ | |
<soapenv:Header>\ | |
<ond:QAQueryHeader />\ | |
</soapenv:Header>\ |
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
<fields> | |
<field | |
name="productname_s" | |
type="productnamemanualsynonyms" | |
indexed="true" | |
stored="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
<fieldType name="productnamemanualsynonyms" | |
class="solr.TextField" | |
positionIncrementGap="500" | |
sortMissingLast="true"> | |
<analyzer> | |
<tokenizer class="solr.StandardTokenizerFactory"/> | |
<filter class="solr.TrimFilterFactory"/> | |
<filter class="solr.SynonymFilterFactory" | |
expand="true" | |
ignoreCase="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
<?xml version="1.0" encoding="utf-8"?> | |
<schema name="example" version="1.5"> | |
<fields> | |
<field name="productname_s" type="productnamemanualsynonyms" indexed="true" stored="true"/> | |
<field name="productcode_t" type="productcodemanualsynonyms" indexed="true" stored="true"/> | |
<field name="productcategory_sm" type="productcategorymanualsynonyms" indexed="true" stored="true"/> | |
<field name="_content" type="text_general" indexed="true" stored="false" /> | |
<field name="_database" type="string" indexed="true" stored="true" /> | |
<field name="_path" type="string" indexed="true" stored="true" multiValued="true" /> | |
<field name="_uniqueid" type="string" indexed="true" stored="true" required="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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class FirstOrDefaultOrWhere | |
{ | |
public static MyModel GetModel() | |
{ | |
List<MyModel> modelList = new List<MyModel> | |
{ |
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
var a = 'global'; | |
var check = { | |
a: 'hello', | |
b: function() { | |
console.log(this.a); | |
}, | |
c: function() { | |
setTimeout(function(){ | |
// this becomes global because setTimeout's call site is global |
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
# run test > py.test --html=report.html registerPage.py | |
import pytest | |
import time | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC |
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
<!-- add class name and css --> | |
<img | |
src="img/logo.svg" | |
alt="My Logo" | |
class="my-logo-svg"> | |
<style> | |
.my-logo-svg { | |
width: 250px; | |
height: 94px; |