Git Product home page Git Product logo

interactive-tutorials's People

Contributors

16bits3g4l avatar addaxsoft avatar aikram24 avatar azizimj avatar bashedpotato avatar ddmkr avatar derco0n avatar duhhello avatar inazense avatar johnklawrence avatar karellism avatar kgashok avatar lzw-723 avatar mayank8888 avatar mchlnix avatar nh2amine avatar olberger avatar onioneffect avatar peritract avatar qwong95 avatar rich1n avatar rickhaws avatar ronreiter avatar shrn01 avatar snackersteph avatar tipdyt avatar tuomas56 avatar txidol avatar victor-ru avatar westonstearns 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  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

interactive-tutorials's Issues

Remove closing `?>` for php only code

The closing ?> has plagued php forever causing headers to be sent and bugs to be had.

PSR-0/1/2, pear, and zend all require closing tags be omitted unless you're including some sort of markup.

what

C and python c++

Deploying Updates

Hi @ronreiter. Are changes to the tutorials on master automatically deployed?

A pull request of mine was merged in recently #324 but the changes haven't appeared on <learn-c.org>. I just want to make sure that I didn't make a mistake or if it just takes a while before the changes get deployed.

php folder not UTF8

Hello
When trying to compile on windows, it fails due to issues with a text file in the PHP folder of learn-php.org


WARNING:root:loading data for domain: learn-php.org
Traceback (most recent call last):
  File "main.py", line 200, in <module>
    init_tutorials()
  File "main.py", line 163, in init_tutorials
    tutorial_dict["page_title"] = tutorial.decode("utf8")
  File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe0 in position 9: invalid continuation byte

learncs.org Basic Classes tutorial is not passable.

The solution code gives this error:

prog.cs(3,24): error CS0542: `Main.Main()': member names cannot be the same as their enclosing type
prog.cs(2,14): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings

Changing one of the "Main"s to something else doesn't allow you to pass.

learn-c.org/de: No tutorials available

When you take a look at the German version of the website, there are no tutorials available (click a link in the TOC of the Welcome page and the tutorial comes up empty).
But there are German translations available in the repo.

After a quick look it seems the link text/target in the TOC links are mixed up.

I will try to submit a pull request in the next days.

No solution on C - Array Tutorial

Hello,

I started translating the C tutorials and will see how far I will come and I noticed, that the solution for the Array is the same as the tutorial code.

Am I missing something?

Update: This is already addressed by this pull request.

#127

Update2: No it isn't. Will make my own solution, then. #135

Operators in javascript.

Where I put an asterisk for muliplication, at my *= /= -= += shortcuts, you made it italic, so now it makes no sense.

Invalid syntax error in main.py

I cloned interactive-tutorials locally and installed Flask with the intention to verify my contributes.
When I start Flask with

FLASK_APP="main.py -d learnpython.org" flask run

I got the error

File "/home/fabrizio/interactive-tutorials/main.py", line 152
except Exception, e:

I'm using Python 3.5.2

Programming in c

include <stdio.h>

int main() {
/* define first_name /
/
define last_name */
char name[100];

/* testing code */
if (strncmp(first_name, "John") != 0) return 1;
if (strncmp(last_name, "Doe") != 0) return 1;

last_name[0] = 'B';
sprintf(name, "%s %s", first_name, last_name);
if (strncmp(name, "John Boe", 100) == 0) {
printf("Done!\n");
}

return 0;
}

print missing in learnpython.org

In here at the tutorial of the topic 'Basic Operators' , example 3rd,
viz. Using two multiplication symbols makes a power relationship.
The print (squared)
print(cubed)
is missing.

JAVA Array Tutorial - Numbers

Probably added a lot more detail than needed, but here's a solution

package arrays;
public class Arrays
{

public static void main(String[] args)
    {
    // TODO code application logic here
    // create the array
    int[] numbers = {1,2,3};
    // setting length to spot 2 as array counter starts at 0.  [0]=1, [1]=2,
    // and [2] = 3
    int length = numbers[2];       
    // Declare variable chars of type char
    // at this point length should = 3 and chars will have 4 spots
    char[] chars = new char[length];
    System.out.println(numbers.length);
    // original line: chars[numbers.length+4='y'
    // this will fail due to the array length on being set to 3 and 
    // adding 4 will send the array out of bounds.
    chars[numbers.length-1] ='y';
    System.out.println(chars[numbers.length-1]);
    System.out.println("Done!");
    }   

}

OUTPUT:

run:
3
y
Done!
BUILD SUCCESSFUL (total time: 0 seconds)

Ruby hello world tutorial.

In the tutorial, the code block in the tutorial part says ruby It should not say ruby. The tutorial I made does not have that error, so I think the ```ruby is not working on the site.

Run locally

How can I run the server locally, sorry have not done a lot of work with python but ver interested in what you have put together here, would love a chance to contribute!

Cheers,
Otis Wright.

Translation to Spanish

I would like to translate some tutorial to Spanish. I expect you could give me some feedback about this.

Thank you.

By the way awesome work

Miss link in Learnshell Decision making Chapter

Logical combinations

if <a href='/en/%24VAR_A-eq_1_%26%26_%28%24VAR_B_%3D_%22bee%22_'¥> | $VAR_T = "tee") <¥/a> ; then
command...
fi

Above is what I see. This may be a miss of link address, I am not familiar with HTML.

Change python tutorial to match output and type of myfloat

My propose is to change the file: Variables and types in order to match the variable type on output of the exercise (the variable is of the type float, but the output is required to be int):

more precisely, change

Expected Output

String: hello Float: 10 Integer: 20

testing code

if mystring == "hello": print "String: %s" % mystring if isinstance(myfloat, float) and myfloat == 10.0: print "Float: %d" % myfloat if isinstance(myint, int) and myint == 20: print "Integer: %d" % myint

to

Expected Output

String: hello Float: 10.0 Integer: 20

testing code

if mystring == "hello": print "String: %s" % mystring if isinstance(myfloat, float) and myfloat == 10.0: print "Float: %0.1f" % myfloat if isinstance(myint, int) and myint == 20: print "Integer: %d" % myint

learn-c while loops

there is a problem this code it should print 6 as well but the expected output doesn't agree.

#include <stdio.h>

int main() {
int array[] = {1, 7, 4, 5, 9, 3, 5, 11, 6, 3, 4};
int i = 0;

while (i < 10) {
    if(array[i] < 5){
        i++;
        continue;
    }

    if(array[i] > 10){
        break;
    }

    printf("%d\n", array[i]);
    i++;
}

return 0;

}

solution for perl loops exercise

I came up with a solution, and I saw the exercise said there was none and it asked that the solution be posted here. Hopefully this is the correct place to post it!

For this solution, I needed to do a "USE INTEGER", which we haven't "learned" yet...so maybe that needs to be a lesson somewhere before this chapter?

use integer;
@numbers = (951,402,984,651,360,69,408,319,601,485,980,507,725,547,
            544,615,83,165,141,501,263,617,865,575,219,390,237,412,
            566,826,248,866,950,626,949,687,217,815,67,104,58,512,24,
            892,894,767,553,81,379,843,831,445,742,717,958,609,842,
            451,688,753,854,685,93,857,440,380,126,721,328,753,470,
            743,527);
# write your code below
$max = scalar @numbers;       
for ($count=0 ; $count <= $max ; $count++)
{
  $current = $numbers[$count];
  $count1 = $current / 2;
  if ($count1*2 == $current) {print $current, "\n";}
  if ($current == 237) {last;}
}

Help with windows

I got this installed, and when i click on a link to any of the links, it redirects me to the actual website, and unable to use it offline

Java Arguments Tutorial Unsolveable

The Sphere Engine is configured to run Main.java with no arguments. However, the point of the tutorial is to learn how to work with arguments.

Modify how the Sphere Engine is configured such that arguments are passed.

Provide Dockerfile to help run locally inside Docker container

Testing the framework from the checked-out repo requires flask, which may not be obvious to install (and may lead to some clutter).

It would be great to provide a Dockerfile which allows to run the examples inside a container, for local testing.

Java Sphere Engine Console

The Java tutorial console is not working. The gear animation appears in the output window when "Run," but nothing happens.

Javascript Inheritance

Great set of tutorials, only small comment
after you do:

Student.prototype = new Person(); // inherit Person

you should adjust the constructor to point to Student instead of Person

// correct the constructor pointer because it points to Person
Student.prototype.constructor = Student;

Maybe also show how to use the person constructor, and then how
student can inherit from that, instead of creating a init method...

Java tutorial solution, Variables_and_Types

The solution is incorrect. You must put (float) in
float e = 2.0;
like
float e = (float)2.0;
The real solution is
public class Main {
public static void main(String[] args) {
byte zero = 0;
short a = 3;
int b = 1;
char d = ' ';
float e = (float)2.0;
boolean f = true;
String output = "H" + a + b + b + zero + d + "w" + zero + "r" + b + "d" + d + e + d + f;
System.out.println(output);
}
}

Java boolean

The first sentence under boolean is phrased a little awkwardly. Just a heads up.

Annoying ads

Hi,

while I understand that you have to pay for the servers, lots of my readers felt repelled by the amount and style of ads on your website. Could you maybe revisit your web page marketing and transition to a less obtrusive model?

Kind regards
Eric

Output in Java tutorial (https://www.learnjavaonline.org/en/Loops) is wrong.

I reference this part of the page:

int i;
for (i = 0; i < 5; i++) {
    if (i >= 3) {
        break;
    }
    System.out.println("Yuhu");
    if (i >= 1) {
        continue;
    }
    System.out.println("Tata");
}
System.out.println(i);
// Output
// Yuhu
// Tata
// Yuhu
// Yuhu
// 3

This output is wrong as best as I can tell. Because the second if statement is >=' and not just ==`, the program should continue to print out "Tata" until the loop breaks.

EDIT: I see my mistake, @ShinHacker 's explanation below was very helpful.

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.