-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblog.html
More file actions
219 lines (185 loc) · 6.37 KB
/
Copy pathblog.html
File metadata and controls
219 lines (185 loc) · 6.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<!DOCTYPE html>
<html>
<!--This is a comment. Head style-->
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Blog posts</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
<script type="text/javascript" src="main.js"></script>
<style>
body{
margin: 2%;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
border: 1px solid #e7e7e7;
background-color: #f3f3f3;
}
li {
float: left;
}
li a{
display: block;
color: #666;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover:not(.active) {
background-color: #ddd;
}
li a.active{
color:white;
background-color: #4CAF50;
}
table,th, td{
border: 1px solid black;
}
</style>
</head>
<!--This is a comment. Menu bar-->
<body style="background-color:white">
<ul>
<li><a href="index.html"><font size="6">Home</font></a></li>
<li><a href="blog.html"><font size="6">Blog</font></a></li>
<li><a href="about.html" target="_blank"><font size="6">About</font></a></li>
</ul>
<!--The body-->
<h1>TRNSYS</h1>
<details>
<summary>Tips and tricks for TRNSYS</summary>
<p>In the C/C++ language, the argument needs to be replaced as shown in the table below.</p>
<table style ="width:100%">
<tr>
<td><strong>FORTRAN</strong></td>
<td width="195" valign="top"><strong>C/C++</strong></td>
</tr>
<tr>
<td width="167" valign="top"> <p>Integer</p></td>
<td width="195" valign="top"> <p>int*</p></td>
</tr>
<tr>
<td width="167" valign="top"> <p>Real(8),<br>Double Precision</p></td>
<td width="195" valign="top"> <p>double*</p></td>
</tr>
<tr>
<td width="167" valign="top"> <p>Character(Len=n)</p></td>
<td width="195" valign="top"> <p>char*, size_t n</p></td>
</tr>
</table>
<h2>Integer</h2>
<b>TRNSYS.h<b>
<p><code>extern "C" __declspec(dllimport) void _cdecl SETTYPEVERSION(int* ver);</code></p>
<p><code>#define setTypeVersion SETTYPEVERSION</code></p>
</details>
<hr>
<h1>OS</h1>
<details>
<summary>Tips and tricks for using operating system (Linux,Windows,etc.)</summary>
<h2>Compiling a software from source in linux</h2>
<p>For installing the software in a specified directory <br>
<code>
mkdir ~/directory <br>
./configure --prefix=$HOME/directory <br>
make <br>
make install<br>
</code>
</p>
<p>
More information can be found <a href="https://blog.eduardovalle.com/2015/10/15/installing-software-without-root/">here</a>
</p>
<p>
Linux: tar extract files <br>
Extract or Unpack a TarBall file <br>
To unpack or extract a tar file, type: <br>
<code>
tar -xvf file.tar
</code>
<p>
More information can be found <a href="https://www.cyberciti.biz/faq/tar-extract-linux/">here</a>
</p>
Q: How can I sort the output of 'ls' by last modified date? <br>
A: <code>ls -t</code> or (for reverse) <code>ls -tr</code> <br>
<h2><a href="http://www.hostingadvice.com/how-to/change-file-permissions-linux/">How to change file permissions in linux</a></h2>
</p>
</details>
<hr>
<h1>Vim</h1>
<details>
<summary>Read more</summary>
<p>undo: u <br>
redo: ctrl+r <br>
The :substitute command searches for a text pattern, and replaces it with a text string
:%s/foo/bar/g <br>
Find each occurence of 'foo' (in all lines), and replace it with 'bar'<br>
:s/foo/bar/g <br>
Find each occurrence of 'foo' (in the current line only), and replace it with 'bar'. <br>
:%s/foo/bar/gc <br>
Change each 'foo' to 'bar', but ask for confirmation first. <br>
:%s/\<foo\>/bar/gc <br>
Change only whole words exactly matching 'foo' to 'bar'; ask for confirmation. <br>
<b>sed, a stream editor</b>
Q: How to delete all lines of the files in Vim <br>
A: <br>
1. Type <code>gg</code> to move the cursor to the first line of the file. <br>
2. Type <code>dG</code> to delete all the lines.
</p>
</details>
<hr>
<h1>Python</h1>
<details>
<summary>Tips and tricks for using python</summary>
<h2>Matplotlib</h2>
<h2>Package and environment managers</h2>
The two most popular tools for setting up environments are: <br>
PIP (a Python package manager; funnily enough, it stands for “Pip Installs Packages”) with virtualenv (a tool for creating isolated environments)
Conda (a package and environment manager)<br>
Create a new environment: conda create --name python3 python3 <br>
Create a new environment and install all the standard anaconda packages installed by default:<br>
conda create --name python3 python3 anaconda <br>
To active the environment:<br>
source activate python3 (linux) <br>
To deactivate <br>
source deactivate <br>
<h2>Useful python scripts</h2>
<h2>Building an API using Python</h2>
</details>
<h1>CAO</h1>
<p>SketchUP</p>
<details>
<summary>Tips and tricks for using CAO tools</summary>
Q: Default SketchUp axes orientations?<br>
A: <br>
<img src="https://cdn-enterprise.discourse.org/sketchup/uploads/default/original/3X/0/c/0c8aa372bcd92a04187951dd65304f65bac61195.jpg" alt="SketchUp axes orientations">
</details>
<h1>Git</h1>
<p>Git</p>
<details>
<summary>Tips and tricks for using Git</summary>
Q1: What is the simplest way to list confilicted files in git?<br>
A1: <code>git diff --name-only --diff-filter=U</code> or maybe just <code>git status</code>
Q2: What is the simplest way to accept all (incomming or current) changes in confilicted files in git?<br>
A2: <code>git checkout --theirs -- filenames </code> or maybe just <code>git status</code>
Q3: Setting up multiple GitHub accounts on Windows
A3: http://kevinpelgrims.com/blog/2012/07/20/setting-up-multiple-github-accounts-on-windows/
</details>
<script type="text/javascript">
/*
* World population counter - by Javascript Kit (http://www.javascript.com)
* Based on code by Adam Brown
* This notice Must stay intact for use
* Visis JavaScript Kit (http://www.javascriptkit.com) for this script and more
*/
function maind()
{
startdate = new Date()
now(startdate.getYear(), startdate.getMonth(), startdate.getDate(), startdate.getHours(), startdate.getMinutes(), startdate.getSeconds())
}
</script>
</body>
</html>