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
<Response> | |
<Say voice="alice">Check Please smile</Say> | |
</Response> |
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
cmake -D CMAKE_BUILD_TYPE=RELEASE \ | |
-D CMAKE_INSTALL_PREFIX=/usr/local \ | |
-D BUILD_NEW_PYTHON_SUPPORT=ON \ | |
-D WITH_CUDA=ON \ | |
-D ENABLE_FAST_MATH=1 \ | |
-D WITH_FFMPEG=ON \ | |
-D CUDA_FAST_MATH=1 \ | |
-D WITH_CUBLAS=1 \ | |
-D BUILD_opencv_python3=yes \ | |
-D CMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)") \ |
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
- (void) drawRect:(CGRect)rect on: (id)context | |
{ | |
CGContextSetFillColor(context, [self backgroundColor]); | |
CGContextFillRect(context, [self bounds]); | |
CGContextSetLineWidth(context, 0.5); | |
CGContextSetStrokeColor(context, [self foregroundColor]); | |
CGContextStrokeRect(context, [self bounds]); | |
} |
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
- (id) initWithFrame: (CGRect) aFrame | |
{ | |
[super initWithFrame: aFrame]; | |
[self backgroundColor: [CPColor whiteColor]]; | |
[self foregroundColor: [CPColor blackColor]]; | |
[handles addObject: [Handle target: self selector: @"topLeft"]]; | |
[handles addObject: [Handle target: self selector: @"topRight"]]; | |
[handles addObject: [Handle target: self selector: @"bottomLeft"]]; |
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
[basicToolbox | |
addTool: [SimpleRectangleTool drawing: _drawing] | |
withTitle: @"Create rectangle" | |
image: @"Resources/Rectangle.png"]; |
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
- (void) createFigureAt: (id) aPoint on: (id) aDrawing | |
{ | |
var frame = CGRectMake(aPoint.x, aPoint.y, 100, 50); | |
var newFigure = [SimpleRectangleFigure frame: frame]; | |
[aDrawing addFigure: newFigure]; | |
[self activateSelectionTool]; | |
} |
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
- (id) initWithFrame: (CGRect) aFrame | |
{ | |
[super initWithFrame: aFrame]; | |
[self backgroundColor: [CPColor whiteColor]]; | |
[self foregroundColor: [CPColor blackColor]]; | |
return 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
- (void) drawRect: (CGRect) rect on: (id) context | |
{ | |
CGContextSetFillColor(context, [self backgroundColor]); | |
CGContextFillRect(context, [self bounds]); | |
CGContextSetLineWidth(context, 0.5); | |
CGContextSetStrokeColor(context, [self foregroundColor]); | |
CGContextStrokeRect(context, [self bounds]); | |
} |
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
import org.apache.commons.lang.StringUtils; | |
private String computeMD5(String string) throws NoSuchAlgorithmException { | |
byte[] stringBytes = string.getBytes(); | |
MessageDigest messageDigest = MessageDigest.getInstance("MD5"); | |
messageDigest.update(stringBytes, 0, stringBytes.length); | |
String md5 = new BigInteger(1, messageDigest.digest()).toString(16); | |
md5 = StringUtils.leftPad(md5, 32, '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
<spring:bean id="hibernateSessionAdvice" class="org.mule.hibernate.extensions.HibernateSessionAdvice"> | |
<spring:constructor-arg index="0" ref="sessionFactory" /> | |
</spring:bean> | |
<custom-processor name="openSessionMP" class="org.mule.hibernate.extensions.OpenHibernateSessionMP"> | |
<spring:property name="advice" ref="hibernateSessionAdvice" /> | |
</custom-processor> | |
<custom-processor name="closeSessionMP" class="org.mule.hibernate.extensions.CloseHibernateSessionMP"> | |
<spring:property name="advice" ref="hibernateSessionAdvice" /> |
NewerOlder