Git Product home page Git Product logo

cc4e's People

Contributors

cahan0506 avatar chadniedert avatar csev avatar guaifi avatar konkiourtidou avatar michaelgrigoryan25 avatar mislavskii avatar mtotschnig avatar omareid451 avatar pranabsarma18 avatar pravintargaryen avatar ransomsec avatar samiulbasir avatar sarveshmd avatar shanedewar avatar spdrman avatar srcatto avatar vick2592 avatar yashajoshi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cc4e's Issues

Missing page 178?

Is it a blank page? Or is it missing? File page_178.jpg

Thanks and keep up the good work!

From Python to C - The Rosetta Stone Lecture (cc_02_03.c)

According to the test I did on my Mac, there is an issue related with the C code you present.
scanf is not stoping you to input more than 100 chars on name, and if you want to get 100 chars you need to define the name var with 101 length.

Quiz typo, correct answer?

Couldn't find the page/code for this.

https://www.cc4e.com/lessons/core
Quiz: Types, Operators, and Expressions

(a) Q7
If the result of the logical expression (12>10) is assignmed to an integer variable in C, what is the value that is assigned?

Typo - is assignmed
Correct answer is expected to be 1 as, 12 > greater than 10, true (would be 0 if false.
Accepted as correct is 0, False.
K&R pg 189 appendix A 7.6 relational operators.

1 discussion report the question option is "\1". A browser render/typo in source issue?

(b) Q12
Since ANSI C does not have a predevined value for 'true', which of these is the most "correct" way to define a true value in ANSI C code?

typo - predevined
typo - #define TRUE (1)

Correct answer would be a non 0 value, that is 1 according to lessons.
Marked as wrong, the TRUE (1). The correct answer is TRUE (0==0) makes sense to me. I've seen this before. Using gcc -ansi to test. Both of those return 1 i.e. non 0 so either would be right.

Typo and difficult to read

I stumbled upon the typo with the first then in this sentence

By now, you know then the authors mention the PDP-11 they are sharing aspects of the challenge of making C work on previous

Not being a native English speaker I was not sure if it should be:

By now, you know when the authors mention the PDP-11

or

By now, you know that when the authors mention the PDP-11

And asked ChatGPT, which came up with some additional suggestions that make sense, IMHO:

Yes, there are a few issues with the sentence you provided. Here's a revised version:
"By now, you know that when the authors mention the PDP-11, they are discussing the challenge of making C work on previous generation computers with short memory words and small amounts of memory, while simultaneously ensuring its compatibility with the incoming generation of computers with larger words and more memory."
This revision clarifies the relationship between the mention of the PDP-11 and the challenge of making C work on different generations of computers. It also improves the overall clarity and structure of the sentence.

Darkmode on reading the textbook(the md file)

Hey Dr. Chuck,

I'm from your SI311. In my computer, I turn on the darkmode on everything due to my eyes' condition. However, it doesn't quite work when I'm reading the C Language textbook from my browser. I have tried using the "Read Mode" and different plug-ins, but it doesn't load the comment section of the book. I think this is because the source code indicates that you importing content from another md file.

I have to manually change the html styles in my console, which works pretty well:

document.querySelector("body").style.color = "#ffffff" 
document.querySelector("body").style.backgroundColor = "#192734" 

Do you have any recommendation on enabling darkmode? Or this could be a potential feature to implement?

Before:
image
After:
Screenshot 2023-01-11 at 3 19 24 PM

Chapter 3 heading seems wrong

Section 3.9 of the book is called Goto's and Labels, which seems to be grammatically incorrect. However, since the title of corresponding section in the original book is Goto and Labels, it should be corrected either way.

c_167_01.c indention line 58-76

The FOR-statement is not a complete block.

  • for (fp = _iob; fp < _iob + _NFILE; fp++)

Appendix A seems to be missing.

I read the book with great pleasure :-)

quiz in chapter 1 and 2

As you are in the process of creating and testing the "tools", perhaps the following will help you

chapter 1 quiz:
In question 22 "Whay does the ..." -> What...

chapter 2 quiz:
question 1: "int must ... iin length" -> ... in ...
question 8: "None of the above" answer doesn't always appear last, maybe it should be "None of the rest"
question 10: none of the given answers are correct for j, should 42 be 2?

Hope that helps you,
Great work!!

In example c_101_01, has an extra =

if you compare *s++ == *t++ you will never asign t to s. The == should be =

strcpy(s, t) /* copy t to s; pointer version 3 - corrected*/
char *s, *t;
{
while (*s++ = *t++)
;
}

Questions

I have a few questions.

  1. In book/code/c_026_01.c, a function is called get_line, but in the book, it is getline without the underscore in between. Should I change the name to getline or shall I leave it alone ?
  2. In chap01.md, 1.5 A Collection of Useful Programs, we have four sub headers, File Copying, Character Counting, Line Counting and Word Counting. It would be helpful for readers if they were labelled as 1.5.1, 1.5.2 and so on. Shall I add those or shall we keep up with the book ?
  3. It would be really helpful if we had a Table of Contents in the drop down which is in the top right corner of https://www.cc4e.com/book/. Even though that dropdown might seem like a table of contents, it does not show all the sub headings of each chapter. So we could add a new page in the dropdown called Table of Contents, and add all the chapters and sub headings of all chapters. If we decide that we can implement this, the problem is, we have seperate url for each chapter, for example https://www.cc4e.com/book/chap02.md , but we don't have url for each sub header, so we can't link the sub heading in the table of contents to go to the specific page and scroll to the correct sub heading, but we can make it go to the correct chapter.
    To solve this issue, we will have to write some php to add an id for each h2 tag in each chapter. For example, instead of this <h2>1.1 Getting Started</h2>, we will have to do <h2 id="getting-started">1.1 Getting Started</h2> or <h2 id="1.1">1.1 Getting Started</h2>, if we can change the html so that all h2's have an id, we can link the sub headings in Table of Contents to URLs like this https://cc4e.com/book/chap01.md#1.1 or https://cc4e.com/book/chap01.md#getting-started

Screenshot from 2021-07-23 21-12-38

  1. In chap01.md, I found two random Yada lines, are they added for some reminder or shall I remove those ?
    Yada:
    image

From Python to C - The Rosetta Stone Lecture (cc_02_10.c)

Declaring a C function as you present is not supported anymore.
int mymult( a, b)
int a, b;
{
...
}
β€œmust” be:
int mymult( int a, int b) {
...
}

From my Mac cc I got the following "warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x"

Session expiry

The login session expiry duration for www.cc4e.com is very short. While working on my assignment, I encountered an issue where I lost all my code because of the session expiry. I believe there should be a mechanism in place to automatically save the code every few seconds to prevent such incidents. Thank you.

Slides issues from discussions

Student report, cc4e/lectures/KR-1.pptx. My edit in (...).

With deep respect for Dr. Chuck.
In reviewing the presentation, I found the following errors:

  1. On slides 5, 9 in the listings kr_01_01.c, kr_01_4.c "import" is used instead of the keyword "include"
  2. On slide 5 in the listing kr_01_01.c, a double slash (%s\\n) is inserted in line 7 which breaks the '\n' operator
  3. On slide 10 in listing kr_01_05.c, there is a useless variable len in the py_len() function, it can be safely removed. (i is returned, len in not used)
    (
    chg int i, len=0; to int i;
    chg for(i=0;self[i];i++) len=i; to for(i=0;self[i];i++);
    suggest adding space after ; for readability, for(i=0; self[i]; i++);
    )

Clarification on Exercise RS-8

While working through the CC4E online C programming course, I encountered a challenge with the exercise RS-8 , specifically related to understanding the pre-validation error messages.

The message "NOT GRADED: You need to read the input." was displayed.
I was using gets() to read the input as I had adapted my code from exercise RS-7.

This led to some confusion because RS-7 was quite similar and explicitly requires the use of gets() and the lecture notes and problem statement did not specify the use of scanf() for RS-8.

I found the validation code on:

# cc4e/tools/ccauto/rs-08-guess.php
# line: 81
function ccauto_require($LAUNCH) { 
    return array(
        array('scanf', 'You need to read the input.'),
        array('while', 'You need to read the input until the user gets the correct guess.'),
        array('else if', 'This application is best solved using a multi-way if statement (i.e. else if).'),
    );
}

I propose updating the pre-validation message to be more explicit in this case.
For example, changing the message to "You need to read the input. (Use scanf)".

I am willing to contribute to this improvement by creating a pull request with the suggested change to the pre-validation message.

Thank you for considering this suggestion. I look forward to any feedback or thoughts on this proposal.

Aliased scan images

Would it be possible for you to add to the repo the original scanned images of the book pages, without any image processing?

It appears that the scanned pages are heavily processed, most likely to prepare them for OCR. i.e. all anti-aliasing has been removed and only hard-edged black characters on white background remain.

So, when reading the original book pages, which can be quite enjoyable, is it made less enjoyable by that harsh text.

Thanks for you time.

Problems in the Code Screen / "Run Code" Button Disabled

Multiple posts. Exercise RS-8: Write a C program
https://www.cc4e.com/tools/ccauto/index.php?PHPSESSID=

The Run Code button isn't working, Reset Code does. To the right-hand side of Reset Code is a little spinner, going for 8 minutes now.

All exercises at - https://www.cc4e.com/lessons/python , picking at random - Object Oriented Programming section 9/13 Implement a Python str class

A posted solution - "For all of the exercises, the "Run Code" button is greyed out and I have to edit the HTML in the Inspect Element section of my browser to remove the "disabled" tag on the button in order to submit my exercises."

Another 2 threads, one post is, 12 days ago
this should do: document.getElementById("runcode").removeAttribute("disabled")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.