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
remove_risk_free <- function(stocks, risk_free, rf_col_name) { | |
if(class(risk_free) != class(timeSeries()) || class(stocks) != class(timeSeries())) { | |
stop("The two first parameters must be timeSeries objects") | |
} | |
if(nrow(risk_free) != nrow(stocks)) { | |
stop("The two time series must be from the same size") | |
} | |
ret <- stocks[,1] |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> | |
<StartAction>Program</StartAction> | |
<StartProgram>C:\Program Files\Autodesk\AutoCAD 2013\acad.exe</StartProgram> | |
<StartWorkingDirectory>C:\Program Files\Autodesk\AutoCAD 2013\</StartWorkingDirectory> | |
</PropertyGroup> | |
</Project> |
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
[CommandMethod("DesenharQuadrado")] | |
public void DesenharQuadrado() | |
{ | |
} |
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
var retaAB = new Line(pontoA, pontoB); | |
var retaAC = new Line(pontoA, pontoC); | |
var retaBD = new Line(pontoB, pontoD); | |
var retaCD = new Line(pontoC, pontoD); |
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
var document = Application.DocumentManager.MdiActiveDocument; | |
using (var transaction = document.TransactionManager.StartTransaction()) | |
{ | |
var blockTable = transaction.GetObject(document.Database.BlockTableId, OpenMode.ForRead) as BlockTable; | |
var blockTableRecord = transaction.GetObject(blockTable[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord; | |
} |
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
var pontoA = new Point3d(0, 100, 0); | |
var pontoB = new Point3d(100, 100, 0); | |
var pontoC = new Point3d(0, 0, 0); | |
var pontoD = new Point3d(100, 0, 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
blockTableRecord.AppendEntity(retaAB); | |
transaction.AddNewlyCreatedDBObject(retaAB, true); | |
blockTableRecord.AppendEntity(retaAC); | |
transaction.AddNewlyCreatedDBObject(retaAC, true); | |
blockTableRecord.AppendEntity(retaBD); | |
transaction.AddNewlyCreatedDBObject(retaBD, true); | |
blockTableRecord.AppendEntity(retaCD); |
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
using Autodesk.AutoCAD.ApplicationServices; | |
using Autodesk.AutoCAD.DatabaseServices; | |
using Autodesk.AutoCAD.Geometry; | |
using Autodesk.AutoCAD.Runtime; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; |
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
[CommandMethod("LerNome")] | |
public static void LerNome() | |
{ | |
var documento = Application.DocumentManager.MdiActiveDocument; | |
var editor = documento.Editor; | |
var opcoes = new PromptEntityOptions("\nSelecione a entidade: "); | |
opcoes.SetRejectMessage("\nPor favor, selecione uma reta (Line)."); | |
opcoes.AddAllowedClass(typeof(Line), false); | |
opcoes.AllowNone = false; |
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
static void RegistrarApp(string nome) | |
{ | |
var documento = Application.DocumentManager.MdiActiveDocument; | |
var banco = documento.Database; | |
using (var transacao = documento.TransactionManager.StartTransaction()) | |
{ | |
var tabela = transacao.GetObject(banco.RegAppTableId, OpenMode.ForRead, false) as RegAppTable; |
OlderNewer