Skip to content

Instantly share code, notes, and snippets.

@raxcat
raxcat / gist:ca716f72d185f9b32a64c42b9137d9ca
Created May 10, 2024 07:50
牛牛 RSI抄底三大铁律,扩展三大卖出铁律
{RSI抄底三大铁律,扩展三大卖出铁律}
{
【直接买】
弘历JOSIE:RSI在30以下【直接买】:
HTTPS://WWW.YOUTUBE.COM/WATCH?V=YVLTATBTNSG
1.参数为14的RSI,跌到30以下;
2.最后1根在30以下的K线为关键K;
3.后续站上关键K的最高买入;
4.买入当天最低止损。
}
{
//create the MPAudioVideoRoutingPopoverController class at runtime
id TheClass = NSClassFromString(@"MPAVRoutingSheet");
id testObject = [[TheClass alloc] initWithFrame:self.view.bounds];
// the selector to call for creating the right popover controller
SEL initMethod = @selector(showInView:withCompletionHandler:);
NSMethodSignature* signature = [TheClass instanceMethodSignatureForSelector: initMethod];
NSInvocation* invocation = [NSInvocation invocationWithMethodSignature: signature];
@raxcat
raxcat / DictionaryExtension.swift
Created December 27, 2015 16:29
searchKeyOfValue swift dictionary extension
extension Dictionary where Key:Hashable, Value:Equatable {
func searchKeyOfValue(target:Value) -> Key? {
for (key, element) in self {
if element == target {
return key
}
}
return nil
}
}
@raxcat
raxcat / UpdateInterfaceOrientation.m
Last active August 27, 2015 14:48
Update interface orientation for custom container view controllers.
//this code snippet is only needed if you create your own container view controller class(eg. UINavigationController,
//UITabbarController) and you needed to force to update the interface orientation of your app, just works like
//Apple's implementation of dismissViewController: in UINavigationController.
// Use this code snippet in your dismiss method. (after removing the target child view controller)
// @require iOS5 and above.
UIInterfaceOrientation currentOrientation = [UIApplication sharedApplication].statusBarOrientation;
UIInterfaceOrientationMask mask = (1<<currentOrientation);
if(self.shouldAutorotate && (self.supportedInterfaceOrientations&mask)==0){
@raxcat
raxcat / AlertViewModal.js
Last active August 27, 2015 09:47
AlertViewModal (Marionette, Bootstrap, Modal View Controller, UIAlertView, inspired by UIAlertViewController)
(function (Marionette, $) {
"use strict";
var Controllers = window.Controllers = window.Controllers || {};
Controllers.AlertViewController = Marionette.Object.extend({
initialize: function (options) {
this._debugLog("[AlertViewController] initialize");
},
show: function (options) {
-(IBAction) startCaptureSession:(id)sender{
if([AVCaptureDevice videoCameraCount]==0)
return;
if(self.sessionBackCamera.isRunning == YES)
return;
DTrace();
NSError *error= nil;
@raxcat
raxcat / gist:76cef141628067f45d9d
Created October 17, 2012 03:20
A Post-Action shell script for xcode 4 scheme
#define variable
PostActionsFolder="PostActionsFolder"
DMGFolder="DMGFolder"
#Change to the build folder
echo "BUILT_PRODUCTS_DIR: "${BUILT_PRODUCTS_DIR}
cd ${BUILT_PRODUCTS_DIR}
rm -rf $PostActionsFolder
#create a PostActionsFolder
@raxcat
raxcat / gist:f3aeb43b1c8946f2d0d3
Created October 16, 2012 14:23
Get iTerm up, Create a terminal window, Create a default session, do what you want(here is the launch a screen to usb serial port)
tell application "iTerm"
activate
-- make a new terminal
set myterm to (make new terminal)
-- talk to the first terminal
tell the first terminal
-- launch a default shell in a new tab in the same terminal