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
| <cfscript> | |
| public function readImage(fullpath){ | |
| try { | |
| return ImageNew(fullpath); | |
| } catch (any e) { | |
| //trying java imageio | |
| var imageFile = createObject("java", "java.io.File").init(fullpath); | |
| // read the image into a BufferedImage | |
| var ImageIO = createObject("java", "javax.imageio.ImageIO"); | |
| try { |
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
| <cfdump var="#TimeSlot(Minutslot = 15)#" /> | |
| <cffunction name="TimeSlot" output="false" access="public" returntype="any"> | |
| <cfargument name="Minutslot" type="numeric" required="true"> | |
| <cfif 1440 MOD arguments.Minutslot NEQ 0> | |
| <cfthrow type="user" message="Invalid Minute slot"> | |
| </cfif> | |
| <cfset var i = 0> |
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
| git checkout development | |
| IF %ERRORLEVEL% neq 0 GOTO error | |
| git merge vikas | |
| IF %ERRORLEVEL% neq 0 GOTO error | |
| git push origin development | |
| IF %ERRORLEVEL% neq 0 GOTO error | |
| git checkout master | |
| IF %ERRORLEVEL% neq 0 GOTO error | |
| git merge development | |
| IF %ERRORLEVEL% neq 0 GOTO error |
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
| for /f "delims=" %%d in ('dir /s /b /ad ^| sort /r') do rd "%%d" |
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
| SELECT | |
| tbl.name 'Table Name', | |
| c.name 'Column Name', | |
| t.Name 'Data type', | |
| c.max_length 'Max Length', | |
| c.precision, | |
| c.is_nullable, | |
| ISNULL(i.is_primary_key, 0) 'Primary Key' | |
| FROM sys.columns c | |
| INNER JOIN sys.types t ON c.user_type_id = t.user_type_id |
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
| SELECT column, expression, column as alias | |
| FROM table1, table2, table3 | |
| FOR JSON [AUTO | PATH] |
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 Imap = require('imap'); | |
| var config = require('../config')(process.env['NODE_ENV']); | |
| var winston = require('winston'); | |
| var path = require("path"); | |
| var logger = new (winston.Logger)({ | |
| transports: [ | |
| new (winston.transports.File)({ | |
| filename: path.resolve(__dirname + '/../logs/all-logs.log'), |
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
| function cleanEmptyFoldersRecursively(folder) { | |
| var fs = require('fs'); | |
| var path = require('path'); | |
| var folderStat = fs.statSync(folder); | |
| var isDir = folderStat.isDirectory(); | |
| if (!isDir) { | |
| return; | |
| } |
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"?> | |
| <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
| targetNamespace='http://webservice.example.com/' | |
| xmlns:tns='http://webservice.example.com/' | |
| elementFormDefault="qualified"> | |
| <xs:element name="shiporder" type='tns:shiporder' /> | |
| <xs:complexType name="shiporder"> | |
| <xs:sequence> | |
| <xs:element name="orderperson" type="xs:string"/> | |
| <xs:element name="shipto" type='tns:shipto' /> |
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
| <cfsavecontent variable="xml_stream"><cfoutput><?xml version="1.0" encoding="UTF-8"?> | |
| <shiporder orderid="889923" | |
| xmlns="http://webservice.example.com/" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://webservice.example.com/ https://gist.githubusercontent.com/vikaskanani/016522bc8969008e5efdf6770effc430/raw/5eec95f8eb34c538f1cfd1e543b22027e021eafa/ShipOrder.xsd"> | |
| <orderperson>John Smith</orderperson> | |
| <shipto> | |
| <name>Ola Nordmann</name> | |
| <address>Langgt 23</address> | |
| <city>4000 Stavanger</city> |
OlderNewer