Coder Social home page Coder Social logo

codandoapple / aprenda-swift Goto Github PK

View Code? Open in Web Editor NEW
892.0 892.0 63.0 1.98 MB

Uma lista de conteúdos para você aprender Swift

Home Page: https://codandoapple.github.io/aprenda-swift/

Swift 93.11% Handlebars 4.17% Makefile 2.72%
apple appletv awesome awesome-ios hacktoberfest ios ipados mac-os macos objective-c safari swift swift-ui swift5 swiftui watchos

aprenda-swift's People

Contributors

alexandresantosal91 avatar alexbitar80 avatar guilhermeytalo avatar johanguse avatar lucasvieiraa avatar luizrebelatto avatar reisdev avatar rickymarq avatar rychillie avatar sidibecker avatar thyagoraphael 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

aprenda-swift's Issues

Action de validação de links não trata erros de timeout

O quê?

A action para validação dos links não está tratando links com timeout. Muitas vezes, apenas tentar novamente deve ser suficiente para que o link passe no teste.

Solução

Implementar um tratamento de exceção que lide com erros de timeout.

Criar um sumário

A ideia é criar um sumário para facilitar a localização dos tópicos e sub-tópicos de links.

Listas

Simple list

#include <stdio.h>
#include <stdlib.h>
#include "definitions.c"
#include "add ítems.c"
#include "show items.c"
#include "search item.c"
#include "del item.c"
#include "menú.c"

Int main(){
Menú ();
Return 0;

}

Definitions

/*
Node (data, id) ->

/*

Int cont = 1;

Struct node {
Int id;
Chat cad [20]
Float núm;
Struct node *next;

};

Enum booleano {false, true};
Enum booleano {add, delete, search, show, bye};

Menú

Void menú (){

 Struct node *cart = NULL;
 Int op;
 Struct node *tmp;
 Enum booleano res;
 While (1) {
       Print("choose...\n");
       Print ("1) add\n");
       Print ("2) del\n");
       Print ("3) search\n");
       Print ("4) show\n");
       Print ("5) bye\n");
       Scanf ("%d", &op);
  
 Switch (op) {
     Case 1: 
      Res = add item(&cart);
      If (res){
         Print("item added !\n");
      Break;
     Case 2: 

       Printf("which item...?\n);
        Scanf("%i", %id);
        Tmp = del item(&cart, id)
        If (tmp != NULL {
           Printf("we delete it!\n");
          Printf("%p\t%s\t%.2f\n", tmp, tmp->cad, tmp->num);

}
Break;

     Case 3:
        Printf("which item...?\n);
        Scanf("%i", %id);
        Tmp = search item(c, id)
        If (tmp != NULL {
           Printf("we found it!\n");
          Printf("%p\t%s\t%.2f\n", tmp, tmp->cad, tmp->num);

}
Break;
Case 4:
show items(cart);
Break;
Case 5:
/* exit */
Return;
Default;
Break;

}

}

add ítem

/*
(Struct node) cart -> | add ítem | -> boolean

/*
Enum booleano add item (struct node **c) {
Struct node new = (struct node)malloc(sizeof(struct node));
If(new != NULL){
New->id = cont++;
New->next = *c;
Scanf ("%s", new->cad);
Scanf ("%f", &new->num);
*c = new;
Return true;
}
Return false;
}

Show ítems

/*
Cart -> show items -> void
*/

Void show items(struct node *c){
While(c!= NULL){
Printf("%p\t%d\t%s\t%.2f\t->%p\n", c, c->id, c->cad, c->num, c->next);
c = c->next;
}
}

**Search item **

/*
Cart, id-> search item -> item or NULL
*/

Struct node *search item(struct node *c, int id) {
While (c != NULL) {
If (c->id == id){
Return c;
}
c = c->next;
}
Return NULL;
}

del item

/*
Cart, id -> del item -> item or NULL
*/

Struct node *del item(struct node **c, int id) {
Struct node *tmp = *c, *prev = NULL;
While (tmp != NULL) {
If(tmp->id == id){
If (prev == NULL){
*c = tmp->next;
Tmp->next = NULL;
} else {
Prev->next = tmp->next;
}
Tmp->next = NULL;
Return tmp;
}
Prev = tmp;
Tmp = tmp ->next;
}
Return NULL;
}

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.