Add multilingual language and systems learning tracks
This commit is contained in:
1 parent
07338189fc
commit
d8d1c40118
844 files changed
+6061
No files matched your search
@@ -0,0 +1,9 @@
|
||||
# Objective-C — paghimo ug pagsulay
|
||||
|
||||
[Agila University track](https://edu.agilaos.com/track.php?track=15&lang=ceb)
|
||||
|
||||
Mga 15 minutos matag leksyon. Tag-ana, padagana, usba, ipasabot, ug tubaga ang pagsusi sa University.
|
||||
|
||||
- [Lesson 1: Collection ug balikbalik nga buluhaton](lesson-1/lesson.html)
|
||||
- [Lesson 2: Usa ka importante nga kinaiya sa pinulongan](lesson-2/lesson.html)
|
||||
- [Lesson 3: Paghimo, gub-a, ug sulayi ang study planner](lesson-3/lesson.html)
|
||||
@@ -0,0 +1,15 @@
|
||||
<!doctype html><html lang="ceb"><meta charset="utf-8"><title>Collection ug balikbalik nga buluhaton</title><h1>Collection ug balikbalik nga buluhaton</h1><p>15-minutong sesyon: pagbasa sulod sa 3 minutos, pag-trace sa 3, pag-eksperimento sa 7, ug pagtubag sa check sa 2. Paggahin og dugang oras kon gikinahanglan.</p><p>Ang collection nagtipig sa may kalabotang value. Bisitahon sa loop ang 1, 2, ug 3; ang total gikan sa 0 mahimong 1, 3, ug 6. Isulat ang trace imbes manag-an. Ilha ang una ug kataposang valid nga posisyon: mahimong 1-based ang Pascal array samtang zero-based ang daghang ubang container. Idugang og value ug taronga ang bounds. Ipasabot ang resulta alang sa empty collection.</p><p>Ang square brackets mopadala og message sa receiver: <code>[plan completed]</code>. Ang <code>@interface</code> nagdeklarar og method ug ang <code>@implementation</code> naghatag sa lawas niini. Explicit memory management ang gigamit niini nga GNUstep exercises, dili Apple ARC.</p><pre><code class="language-objectivec">#import <Foundation/Foundation.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
int main(void) {
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
NSArray *minutes = [NSArray arrayWithObjects:
|
||||
[NSNumber numberWithInt:1], [NSNumber numberWithInt:2], [NSNumber numberWithInt:3], nil];
|
||||
int total = 0;
|
||||
for (NSNumber *value in minutes) total += [value intValue];
|
||||
printf("%d\n", total);
|
||||
[pool drain];
|
||||
return 0;
|
||||
}
|
||||
</code></pre><p><strong>Gipaabot nga resulta:</strong> <code>6</code></p><h3>Praktis ug ebidensiya</h3><p>Isulat ang tagna, aktuwal nga resulta, ug hinungdan sa pagkapareho o kalainan. Ang completion check mosukod sa pagsabot; ang practice task mopauswag sa kahanas.</p><p><a href="https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html">Reperensiya sa pinulongan</a></p></html>
|
||||
@@ -0,0 +1,14 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
int main(void) {
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
NSArray *minutes = [NSArray arrayWithObjects:
|
||||
[NSNumber numberWithInt:1], [NSNumber numberWithInt:2], [NSNumber numberWithInt:3], nil];
|
||||
int total = 0;
|
||||
for (NSNumber *value in minutes) total += [value intValue];
|
||||
printf("%d\n", total);
|
||||
[pool drain];
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<!doctype html><html lang="ceb"><meta charset="utf-8"><title>Usa ka importante nga kinaiya sa pinulongan</title><h1>Usa ka importante nga kinaiya sa pinulongan</h1><p>15-minutong sesyon: pagbasa sulod sa 3 minutos, pag-trace sa 3, pag-eksperimento sa 7, ug pagtubag sa check sa 2. Paggahin og dugang oras kon gikinahanglan.</p><p>Gamita ang nota sa pinulongan sa ubos aron ipasabot ang pag-usab sa state. Ilha unsa ang gikopya, gipaambit, mahimong mapakyas, ug gibuhian. Dili tanan nga pangutana magamit niini nga programa: isulti kung hain. Paghimo og usa ka kausaban, tag-ana ang epekto, ug itandi sa aktuwal nga resulta. Mahimong lahi ang lagda sa pamilyar nga operator sa laing pinulongan.</p><p>Ang square brackets mopadala og message sa receiver: <code>[plan completed]</code>. Ang <code>@interface</code> nagdeklarar og method ug ang <code>@implementation</code> naghatag sa lawas niini. Explicit memory management ang gigamit niini nga GNUstep exercises, dili Apple ARC.</p><pre><code class="language-objectivec">#import <Foundation/Foundation.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
@interface StudyPlan : NSObject
|
||||
- (int)completed;
|
||||
@end
|
||||
@implementation StudyPlan
|
||||
- (int)completed { return 3; }
|
||||
@end
|
||||
int main(void) {
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
StudyPlan *plan = [[StudyPlan alloc] init];
|
||||
printf("%d\n", [plan completed]);
|
||||
[plan release];
|
||||
[pool drain];
|
||||
return 0;
|
||||
}
|
||||
</code></pre><p><strong>Gipaabot nga resulta:</strong> <code>3</code></p><h3>Praktis ug ebidensiya</h3><p>Isulat ang tagna, aktuwal nga resulta, ug hinungdan sa pagkapareho o kalainan. Ang completion check mosukod sa pagsabot; ang practice task mopauswag sa kahanas.</p><p><a href="https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html">Reperensiya sa pinulongan</a></p></html>
|
||||
@@ -0,0 +1,17 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
@interface StudyPlan : NSObject
|
||||
- (int)completed;
|
||||
@end
|
||||
@implementation StudyPlan
|
||||
- (int)completed { return 3; }
|
||||
@end
|
||||
int main(void) {
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
StudyPlan *plan = [[StudyPlan alloc] init];
|
||||
printf("%d\n", [plan completed]);
|
||||
[plan release];
|
||||
[pool drain];
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<!doctype html><html lang="ceb"><meta charset="utf-8"><title>Paghimo, gub-a, ug sulayi ang study planner</title><h1>Paghimo, gub-a, ug sulayi ang study planner</h1><p>15-minutong sesyon: pagbasa sulod sa 3 minutos, pag-trace sa 3, pag-eksperimento sa 7, ug pagtubag sa check sa 2. Paggahin og dugang oras kon gikinahanglan.</p><p>Ang mapuslanong test motandi sa resulta ug requirement. Dili angay mahimong negative ang nahibiling trabaho sa nonnegative input domain sa planner. Padagana ang starter, tuyoang tangtanga ang proteksiyon kon labaw sa total ang completed, ug siguroa nga adunay check nga mapakyas. Ibalik kini. Idugang ang duha ka study task, summary, ug boundary cases. I-save ang source ug ebidensiya sa Agila Forge. Ipasabot ang matag linya, apil ang gisugyot sa AI.</p><p>Ang square brackets mopadala og message sa receiver: <code>[plan completed]</code>. Ang <code>@interface</code> nagdeklarar og method ug ang <code>@implementation</code> naghatag sa lawas niini. Explicit memory management ang gigamit niini nga GNUstep exercises, dili Apple ARC.</p><pre><code class="language-objectivec">#import <Foundation/Foundation.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
int remaining(int total, int done) { return done >= total ? 0 : total - done; }
|
||||
int main(void) {
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
assert(remaining(4,1)==3);
|
||||
assert(remaining(4,4)==0);
|
||||
assert(remaining(4,5)==0);
|
||||
assert(remaining(0,0)==0);
|
||||
puts("Nipasar");
|
||||
[pool drain];
|
||||
return 0;
|
||||
}
|
||||
</code></pre><p><strong>Gipaabot nga resulta:</strong> <code>Nipasar</code></p><h3>Praktis ug ebidensiya</h3><p>Isulat ang tagna, aktuwal nga resulta, ug hinungdan sa pagkapareho o kalainan. Ang completion check mosukod sa pagsabot; ang practice task mopauswag sa kahanas.</p><p><a href="https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html">Reperensiya sa pinulongan</a></p></html>
|
||||
@@ -0,0 +1,14 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
int remaining(int total, int done) { return done >= total ? 0 : total - done; }
|
||||
int main(void) {
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
assert(remaining(4,1)==3);
|
||||
assert(remaining(4,4)==0);
|
||||
assert(remaining(4,5)==0);
|
||||
assert(remaining(0,0)==0);
|
||||
puts("Nipasar");
|
||||
[pool drain];
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user