Skip to content

Commit a1f94af

Browse files
committed
new instr
1 parent eb3aff5 commit a1f94af

File tree

2 files changed

+18
-50
lines changed

2 files changed

+18
-50
lines changed

_pages/2019/spring/psets/3/resize/less/resize.adoc

+9-25
Original file line numberDiff line numberDiff line change
@@ -182,36 +182,20 @@ If you happen to use `malloc`, be sure to use `free` so as not to leak memory. T
182182

183183
== Testing
184184

185-
If you'd like to peek at, e.g., ``large.bmp``'s headers (in a more user-friendly way than `xxd` allows), you may use a program called `peek` in the staff solution sandbox. Perhaps better yet, if you'd like to compare your outfile's headers against those from the <<staffs-solution,staff's solution>>, you can copy the files from the link:https://sandbox.cs50.io/aa2c48ff-2520-408a-9951-2b9da0934399[the staff solution sandbox] by following these steps. Within **the sandbox**, you could run:
185+
If you'd like to peek at, e.g., ``large.bmp``'s headers (in a more user-friendly way than `xxd` allows), you may execute the below.
186186

187-
[source,bash]
188-
----
189-
mkdir staff && mv peek resize staff && zip -r staff.zip staff
190-
----
191-
192-
to produce a file named `staff.zip`. Using the file browser in the sandbox, you could download it to your computer.
193-
194-
Back in the IDE, highlight `~/pset3/resize` in the file browser, then choose **Upload Local Files** from the File menu, select the `staff.zip` file on your computer, and click **Open** to upload it to your `~/pset3/resize` folder. Click **Close** in the **Upload Files** dialog box.
195-
196-
Finally, in your IDE terminal, run this command to unpack the `staff.zip` file:
197-
198-
[source,bash]
199-
----
200-
unzip ~/pset3/resize/staff.zip -d ~/pset3/resize
201-
----
202-
203-
Then, when connected to your `~/pset3/resize/less` directory in the terminal, you can run the staff's `resize` solution like this:
204-
205-
[source,bash]
187+
[source]
206188
----
207-
../staff/resize 4 small.bmp staff.bmp
189+
~cs50/2019/spring/pset3/peek large.bmp
208190
----
209191

210-
And you can use the peek utility like this:
192+
Better yet, if you'd like to compare your outfile's headers against those from the <<staffs-solution,staff's solution>>, you might want to execute commands like the below. (Think about what each is doing.)
211193

212-
[source,bash]
194+
[source]
213195
----
214-
../staff/peek student.bmp staff.bmp
196+
./resize 4 small.bmp student.bmp
197+
~cs50/2019/spring/pset3/resize 4 small.bmp staff.bmp
198+
~cs50/2019/spring/pset3/peek student.bmp staff.bmp
215199
----
216200

217201
=== `check50`
@@ -240,7 +224,7 @@ To try out the staff's own implementation of `resize`, execute
240224
./resize
241225
```
242226

243-
within link:https://sandbox.cs50.io/aa2c48ff-2520-408a-9951-2b9da0934399[this sandbox].
227+
within [this sandbox](https://sandbox.cs50.io/aa2c48ff-2520-408a-9951-2b9da0934399).
244228

245229
== How to Submit
246230

_pages/2019/spring/psets/3/resize/more/resize.adoc

+9-25
Original file line numberDiff line numberDiff line change
@@ -189,36 +189,20 @@ If you happen to use `malloc`, be sure to use `free` so as not to leak memory. T
189189

190190
== Testing
191191

192-
If you'd like to peek at, e.g., ``large.bmp``'s headers (in a more user-friendly way than `xxd` allows), you may use a program called `peek` in the staff solution sandbox. Perhaps better yet, if you'd like to compare your outfile's headers against those from the <<staffs-solution,staff's solution>>, you can copy the files from the link:https://sandbox.cs50.io/aa2c48ff-2520-408a-9951-2b9da0934399[the staff solution sandbox] by following these steps. Within **the sandbox**, you could run:
192+
If you'd like to peek at, e.g., ``large.bmp``'s headers (in a more user-friendly way than `xxd` allows), you may execute the below.
193193

194-
[source,bash]
195-
----
196-
mkdir staff && mv peek resize staff && zip -r staff.zip staff
197-
----
198-
199-
to produce a file named `staff.zip`. Using the file browser in the sandbox, you could download it to your computer.
200-
201-
Back in the IDE, highlight `~/pset3/resize` in the file browser, then choose **Upload Local Files** from the File menu, select the `staff.zip` file on your computer, and click **Open** to upload it to your `~/pset3/resize` folder. Click **Close** in the **Upload Files** dialog box.
202-
203-
Finally, in your IDE terminal, run this command to unpack the `staff.zip` file:
204-
205-
[source,bash]
206-
----
207-
unzip ~/pset3/resize/staff.zip -d ~/pset3/resize
208-
----
209-
210-
Then, when connected to your `~/pset3/resize/more` directory in the terminal, you can run the staff's `resize` solution like this:
211-
212-
[source,bash]
194+
[source]
213195
----
214-
../staff/resize 4 small.bmp staff.bmp
196+
~cs50/2019/spring/hacker3/peek large.bmp
215197
----
216198

217-
And you can use the peek utility like this:
199+
Better yet, if you'd like to compare your outfile's headers against those from the <<staffs-solution,staff's solution>>, you might want to execute commands like the below. (Think about what each is doing.)
218200

219-
[source,bash]
201+
[source]
220202
----
221-
../staff/peek student.bmp staff.bmp
203+
./resize 4.0 small.bmp student.bmp
204+
~cs50/2019/spring/hacker3/resize 4.0 small.bmp staff.bmp
205+
~cs50/2019/spring/hacker3/peek student.bmp staff.bmp
222206
----
223207

224208
=== `check50`
@@ -247,7 +231,7 @@ To try out the staff's own implementation of `resize`, execute
247231
./resize
248232
```
249233

250-
within link:https://sandbox.cs50.io/cf791495-d296-437d-bc60-cf27e43c7622[this sandbox].
234+
within [this sandbox](https://sandbox.cs50.io/cf791495-d296-437d-bc60-cf27e43c7622).
251235

252236
== How to Submit
253237

0 commit comments

Comments
 (0)