Hadoop, Pig, and Twitter (NoSQL East 2009)Kevin Weil
A talk on the use of Hadoop and Pig inside Twitter, focusing on the flexibility and simplicity of Pig, and the benefits of that for solving real-world big data problems.
Combine Apache Hadoop and Elasticsearch to Get the Most of Your Big DataHortonworks
Hadoop is a great platform for storing and processing massive amounts of data. Elasticsearch is the ideal solution for Searching and Visualizing the same data. Join us to learn how you can leverage the full power of both platforms to maximize the value of your Big Data.
In this webinar we'll walk you through:
How Elasticsearch fits in the Modern Data Architecture.
A demo of Elasticsearch and Hortonworks Data Platform.
Best practices for combining Elasticsearch and Hortonworks Data Platform to extract maximum insights from your data.
This is part of the Docker Series Course that I am presenting, the videos of which with practical example will be available soon.
Part 1:- Docker Concepts - Orientation
Part 2:- Docker Concepts - Edition
Part 3:- Docker Concepts - Kitematic
Part 4:- Docker Concepts - Docker Machine
Part 5:- Docker Concepts - Docker Compose
Part 6:- Docker Toolbox - Mac
Part 7:- Docker Toolbox - Windows
Part 8:- Docker Engine Installation - Mac
Part 9:- Docker Engine Installation - Windows
Part 10:- Docker Engine Installation - Linux
Part 11:- Docker Machine Installation - Mac
Part 12:- Docker Machine Installation - Windows
Part 13:- Docker getting Started -Pre-requisites
Part 14:-Docker on the Cloud - AWS
Part 15:- Docker on the Cloud - Azure
Part 16:- Running Containers
Part 17:- Running Multiple Containers
Part 18:- Getting Inside Containers
Part 19:- Containers and Images
Part 20:- Building an Application:Docker Build
Part 21:- Building an Application:Docker File
Part 22:- Docker Swarms
Part 23:- Docker Stacks
Part 24:- Docker Overview
Part 25:- Docker Networks
Part 26:- Docker Networks-Bridge
Part 27:- Docker Networks-Host
Part 28:- Docker Networks-Overlay
Part 29:- Docker Networks-Macvlan
Part 30:- Docker Networks-Advanced Container Networking
Part 31:- Docker Storage:- Volumes
Part 32:- Docker Storage:- Bind Mounts
Part 33:- Docker Storage:- temps mounts
Part 34:- Docker Storage:- Storage within Containers
This slide presents cocoa_send / receive external objects for Cycling'74 Max/MSP, which enables simple and stable communication between Max/MSP and Native OS X Cocoa programming environment.
Hadoop, Pig, and Twitter (NoSQL East 2009)Kevin Weil
A talk on the use of Hadoop and Pig inside Twitter, focusing on the flexibility and simplicity of Pig, and the benefits of that for solving real-world big data problems.
Combine Apache Hadoop and Elasticsearch to Get the Most of Your Big DataHortonworks
Hadoop is a great platform for storing and processing massive amounts of data. Elasticsearch is the ideal solution for Searching and Visualizing the same data. Join us to learn how you can leverage the full power of both platforms to maximize the value of your Big Data.
In this webinar we'll walk you through:
How Elasticsearch fits in the Modern Data Architecture.
A demo of Elasticsearch and Hortonworks Data Platform.
Best practices for combining Elasticsearch and Hortonworks Data Platform to extract maximum insights from your data.
This is part of the Docker Series Course that I am presenting, the videos of which with practical example will be available soon.
Part 1:- Docker Concepts - Orientation
Part 2:- Docker Concepts - Edition
Part 3:- Docker Concepts - Kitematic
Part 4:- Docker Concepts - Docker Machine
Part 5:- Docker Concepts - Docker Compose
Part 6:- Docker Toolbox - Mac
Part 7:- Docker Toolbox - Windows
Part 8:- Docker Engine Installation - Mac
Part 9:- Docker Engine Installation - Windows
Part 10:- Docker Engine Installation - Linux
Part 11:- Docker Machine Installation - Mac
Part 12:- Docker Machine Installation - Windows
Part 13:- Docker getting Started -Pre-requisites
Part 14:-Docker on the Cloud - AWS
Part 15:- Docker on the Cloud - Azure
Part 16:- Running Containers
Part 17:- Running Multiple Containers
Part 18:- Getting Inside Containers
Part 19:- Containers and Images
Part 20:- Building an Application:Docker Build
Part 21:- Building an Application:Docker File
Part 22:- Docker Swarms
Part 23:- Docker Stacks
Part 24:- Docker Overview
Part 25:- Docker Networks
Part 26:- Docker Networks-Bridge
Part 27:- Docker Networks-Host
Part 28:- Docker Networks-Overlay
Part 29:- Docker Networks-Macvlan
Part 30:- Docker Networks-Advanced Container Networking
Part 31:- Docker Storage:- Volumes
Part 32:- Docker Storage:- Bind Mounts
Part 33:- Docker Storage:- temps mounts
Part 34:- Docker Storage:- Storage within Containers
This slide presents cocoa_send / receive external objects for Cycling'74 Max/MSP, which enables simple and stable communication between Max/MSP and Native OS X Cocoa programming environment.
Projet d'accès aux résultats des étudiant via client mobile Patrick Bashizi
J'ai réalisé ce petit projet en 2009 (je crois) dans le cadre d'un cours à la faculté. Je l'ai retrouvé par hasard et vu sa simplicité, il pourait aider quelqu'un..
Il s'agit d'une application mobile J2ME cliente à un web service, developpé dans le même cadre, permettant aux étudiants de s'authentifier et accéder aux résultants de leurs examens.
Why Orchestration on a development machine
K8s on Docker local environment - Implementation details
Demo of K8s on Docker for Mac
So, what problems does it solve?
Webinar: Building Embedded Applications from QtCreator with DockerBurkhard Stubert
I show how QtCreator builds an embedded application against a Qt SDK encapsulated in a Docker container. QtCreator doesn't know which Yocto version was used for building the Qt SDK and which environment variables must be set for the SDK. QtCreator forwards the CMake calls for configuring, building and staging the application to the container, which executes these calls in the right environment.
Build and run embedded apps faster from qt creator with dockerQt
Have you ever considered, what it would require to use containers to build and deploy applications to embedded targets?
Of course, you have! So, in this webinar, Burkhard Stubert will show you how to replace cross-building your application in a Docker container, stopping the application on the target system, copying the application from your PC to the target system, and starting the application on the target system with… just clicking a button.
Speakers:
- Burkhard Stubert, Solopreneur, Embedded Use
- Tino Pyssysalo, Senior Product Manager, The Qt Company
Weather data meets ibm cloud. part 4 analysis and visualization of weather ...Einar Karlsen
This IBM Developer article shows how to analyse and visualize weather data using IBM Watson Studio, Jupyter notebooks for Python and IBM Cognos Dashboard Embedded service on IBM Cloud
Hudson Mendes, Lead Software Engineer @ Boxfish, speaker slides from the BelfastJUG meetup talk on April 25th, 2017 @ the Sunflower, Belfast, UK about Spring Boot, Java, and Docker.
Slides used in the BelfastJUG meet up session back in 2016.
We went through in depth aspects of how to use Java with Spring Boot and Docker together, where I shared some of my practical experience on those technologies.
Everyone loves fast web sites. And it makes good business sense as well. But there are lots of techniques that can be used. And some might work in one case but not in another.
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware
Hear hear dev & ops alike - ever got bitten by the fragmentation of the Cloud space at deployment time, By AWS vs Azure, Open Shift vs Heroku ? in a word, ever dreamt of configuring at once your Cloud application along with both its VMs and database ? Well, the extensible Open Cloud Computing Interface (OCCI) REST API (see http://occi-wg.org/) allows just that, by addressing the whole XaaS spectrum.
And now, OCCI is getting powerboosted by Eclipse Modeling and formal foundations. Enter Cloud Designer and other outputs of the OCCIware project (See http://www.occiware.org) : multiple visual representations, one per Cloud layer and technology. XaaS Cloud extension model validation, documentation & ops scripting generation. Simulation, decision-making comparison. Connectors that bring those models to life by getting their status from common Cloud services. Runtime middleware, deployed, monitored, adminstrated. And tackling the very interesting challenge of modeling a meta API in EMF's metamodel, while staying true to EMF, Eclipse tools and the OCCI standard.
Featuring Eclipse Sirius, Acceleo generators, EMF at runtime. Coming soon to a new Eclipse Foundation project near you, if so you'd like.
This talk includes a demonstration of the Docker connector and of how to use Cloud Designer to configure a simple Cloud application's deployment on the Roboconf PaaS system and OpenStack infrastructure.
Projet d'accès aux résultats des étudiant via client mobile Patrick Bashizi
J'ai réalisé ce petit projet en 2009 (je crois) dans le cadre d'un cours à la faculté. Je l'ai retrouvé par hasard et vu sa simplicité, il pourait aider quelqu'un..
Il s'agit d'une application mobile J2ME cliente à un web service, developpé dans le même cadre, permettant aux étudiants de s'authentifier et accéder aux résultants de leurs examens.
Why Orchestration on a development machine
K8s on Docker local environment - Implementation details
Demo of K8s on Docker for Mac
So, what problems does it solve?
Webinar: Building Embedded Applications from QtCreator with DockerBurkhard Stubert
I show how QtCreator builds an embedded application against a Qt SDK encapsulated in a Docker container. QtCreator doesn't know which Yocto version was used for building the Qt SDK and which environment variables must be set for the SDK. QtCreator forwards the CMake calls for configuring, building and staging the application to the container, which executes these calls in the right environment.
Build and run embedded apps faster from qt creator with dockerQt
Have you ever considered, what it would require to use containers to build and deploy applications to embedded targets?
Of course, you have! So, in this webinar, Burkhard Stubert will show you how to replace cross-building your application in a Docker container, stopping the application on the target system, copying the application from your PC to the target system, and starting the application on the target system with… just clicking a button.
Speakers:
- Burkhard Stubert, Solopreneur, Embedded Use
- Tino Pyssysalo, Senior Product Manager, The Qt Company
Weather data meets ibm cloud. part 4 analysis and visualization of weather ...Einar Karlsen
This IBM Developer article shows how to analyse and visualize weather data using IBM Watson Studio, Jupyter notebooks for Python and IBM Cognos Dashboard Embedded service on IBM Cloud
Hudson Mendes, Lead Software Engineer @ Boxfish, speaker slides from the BelfastJUG meetup talk on April 25th, 2017 @ the Sunflower, Belfast, UK about Spring Boot, Java, and Docker.
Slides used in the BelfastJUG meet up session back in 2016.
We went through in depth aspects of how to use Java with Spring Boot and Docker together, where I shared some of my practical experience on those technologies.
Everyone loves fast web sites. And it makes good business sense as well. But there are lots of techniques that can be used. And some might work in one case but not in another.
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware
Hear hear dev & ops alike - ever got bitten by the fragmentation of the Cloud space at deployment time, By AWS vs Azure, Open Shift vs Heroku ? in a word, ever dreamt of configuring at once your Cloud application along with both its VMs and database ? Well, the extensible Open Cloud Computing Interface (OCCI) REST API (see http://occi-wg.org/) allows just that, by addressing the whole XaaS spectrum.
And now, OCCI is getting powerboosted by Eclipse Modeling and formal foundations. Enter Cloud Designer and other outputs of the OCCIware project (See http://www.occiware.org) : multiple visual representations, one per Cloud layer and technology. XaaS Cloud extension model validation, documentation & ops scripting generation. Simulation, decision-making comparison. Connectors that bring those models to life by getting their status from common Cloud services. Runtime middleware, deployed, monitored, adminstrated. And tackling the very interesting challenge of modeling a meta API in EMF's metamodel, while staying true to EMF, Eclipse tools and the OCCI standard.
Featuring Eclipse Sirius, Acceleo generators, EMF at runtime. Coming soon to a new Eclipse Foundation project near you, if so you'd like.
This talk includes a demonstration of the Docker connector and of how to use Cloud Designer to configure a simple Cloud application's deployment on the Roboconf PaaS system and OpenStack infrastructure.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
4. BECOME AN XCODER
Apple Cocoa
Xcode Mac OS X Apple
Mac
Objective-C Xcode
(GUI)
[4]
[4.3] [4]
volume = baseArea * height; // [4.3]
Xcode
4
5. BECOME AN XCODER 0
0
Mac Macintosh
1. Mac Mac Mac
Mac Objective-C AppleScript
AppleScript
AppleScript for Absolute Starters
http://www.macscripter.net/books
2. Macintosh PC
Mac T Mac
Mac Mac
distributed computing, DC
Folding@home SETI@home
DC DC
Mac DC
Mac
DC Mac
Mac
Mac DC
DC
http://distributedcomputing.info/projects.html
3. Macintosh
4. Macintosh
5
7. BECOME AN XCODER 1
1
Xcode
Objective-C
2+6=
=3*4 *
x y
2+6=x
y=3*4
Objective-C
Objective-C statement
[1]
x = 4;
x 4
... [1]
compiler
Mac 0 1
Mac
7
8. BECOME AN XCODER 1
bug
debugging
x
pictureWidth [2]
[2]
pictureWidth = 8;
pictureWidth pictureWIDTH PictureWidth
[2]
Objective-C Objective-C
pictureWidth
"_"
door8k do8or do_or
door 8 8door
Door8
[3]
[3]
pictureWidth=8;
pictureHeight=6;
pictureSurfaceArea=pictureWidth*pictureHeight;
8
9. BECOME AN XCODER 1
[4]
pictureWidth = 8;
pictureHeight = 6;
pictureSurfaceArea = pictureWidth * pictureHeight;
[5]
[5]
pictureWidth = 8;
pictureHeight = 4.5;
pictureSurfaceArea = pictureWidth * pictureHeight;
integers [5.1] [5.2]
floating-
point
[5]
" "
[6]
int pictureWidth;
float pictureHeight, pictureSurfaceArea;
pictureWidth = 8;
pictureHeight = 4.5;
pictureSurfaceArea = pictureWidth * pictureHeight;
[6.1] int pictureWidth integer
[6.2]
float
pictureWidth int
float pictureSur-
faceArea [6.2]
int float
int float
long long double
9
10. BECOME AN XCODER 1
[7]
unsigned int chocolateBarsInStock;
unsigned int unsigned int
[8]
[8]
int x = 10;
float y= 3.5, z = 42;
operators
+
-
/
*
Objective-C
x = x + 1; [9] [10]
[9]
x++;
[10]
++x;
x ++
[11] [12]
[11]
x = 10;
10
11. BECOME AN XCODER 1
y = 2 * (x++);
[12]
x = 10;
y = 2 * (++x);
[11] y 20 x 11 [12.2]
x 2 1 x 11 y 22 [12]
[13]
[13]
x = 10;
x++;
y = 2 * x;
* / + - 2*3+4 10
2 * (3 + 4) 14
[14, 15]
[14]
int x = 5, y = 12, ratio;
ratio = y / x;
[15]
float x = 5, y = 12, ratio;
ratio = y / x;
[14] 2 [15]
2.4
% % operand
%
[16]
int x = 13, y = 5, remainder;
remainder = x % y;
11
20. BECOME AN XCODER 4
4
Cocoa
NSLog()
" "
NSLog()
Cocoa
NSLog()
[1]
int main()
{
NSLog(@"Julia is a pretty actress.");
return 0;
}
[1] "Julia is a pretty actress." @" "
string
NSLog()
[1]
2005-12-22 17:39:23.084 test[399] Julia is a pretty actress.
character
main()
[2]
NSLog(@"");
NSLog(@" ");
[2.1] empty string
[2.2] space
1
20
21. BECOME AN XCODER 4
[3.1] n
[3]
NSLog(@"Julia is a pretty nactress.");
Julia is a pretty
actress.
[3.1] escape NSLog()
"n" " "
NSLog()
[4]
NSLog(@"Julia is a pretty actress.n");
[4.1]
Julia is a pretty actress.n
[5]
int x, integerToDisplay;
x = 1;
integerToDisplay = 5 + x;
NSLog(@"The value of the integer is %d.", integerToDisplay);
%d % d deci-
mal number %d
integerToDisplay [5]
The value of the integer is 6.
%f %d
[6]
21
22. BECOME AN XCODER 4
float x, floatToDisplay;
x = 12345.09876;
floatToDisplay = x/3.1416;
NSLog(@"The value of the float is %f.", floatToDisplay);
.2 % f
[7]
float x, floatToDisplay;
x = 12345.09876;
floatToDisplay = x/3.1416;
NSLog(@"The value of the float is %.2f.", floatToDisplay);
% f % d
[8]
int x = 123456;
NSLog(@"%2d", x);
NSLog(@"%4d", x);
NSLog(@"%6d", x);
NSLog(@"%8d", x);
[8]
123456
123456
123456
123456
[8.1, 8.2]
[8.4]
[9]
float x = 1234.5678
NSLog(@"Reserve a space of 10, and show 2 significant digits.");
NSLog(@"%10.2d", x);
22
23. BECOME AN XCODER 4
[10.3]
%d %f int float
[10]
int x = 8;
float pi = 3.1416;
NSLog(@"The integer value is %d, whereas the float value is %f.", x, pi);
[10b]
int x = 8;
float pi = 3.1416;
NSLog(@"The integer value is %f, whereas the float value is %f.", x, pi);
The integer value is 0.000000, whereas the float value is 0.000000.
NSLog()
import NSLog()
#import <Foundation/Foundation.h>
[11]
#import <Foundation/Foundation.h>
float circleArea(float theRadius);
float rectangleArea(float width, float height);
int main()
{
float pictureWidth, pictureHeight, pictureSurfaceArea,
circleRadius, circleSurfaceArea;
pictureWidth = 8.0;
pictureHeight = 4.5;
circleRadius = 5.0;
pictureSurfaceArea = rectangleArea(pictureWidth, pictureHeight);
circleSurfaceArea = circleArea(circleRadius);
23
25. BECOME AN XCODER 5
5
Mac Mac
compiler Mac
Apple Xcode Mac OS X
Xcode
http://developer.apple.com
Xcode Developer Applications
Preferences File New Pro-
ject
Xcode
Objective-C GUI Graphical User
Interface Command Line Utility Foundation Tool
25
26. BECOME AN XCODER 5
justatry
Finish
Terminal
"Groups & Files"
GUI GUI
Xcode "Groups"
Groups & Files justatry Source
justatry.m [1] main()
main()
justatry.m Apple
main()
26
27. BECOME AN XCODER 5
Xcode main()
[1]
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) // [1.3]
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; // [1.5]
// insert code here...
NSLog(@"Hello, World!");
[pool release]; //[1.9]
return 0;
}
NSLog() import
main()
27
28. BECOME AN XCODER 5
NSlog
return 0;
main() [1.3]
NSAutoreleasePool [1.5]
pool release [1.9]
" "
main()
[1]
[1.3 1.5 1.9] Objective-
C
main
"pool"
Apple [1] Build and Go
build compile
Build and Go
Run Log
exited stopped 0 main()
[7.9]
[1]
NSLog " "
28
29. BECOME AN XCODER 5
[2]
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
// insert code here...
NSLog(@"Julia is a pretty actress") //
[pool release]; //[2.9]
return 0;
}
Build [2.9]
Xcode
error: parse error before "release".
parse
import
[2.1] # [2.8]
[2.9]
Apple [1] [3]
[3]
#import <Foundation/Foundation.h>
float circleArea(float theRadius); // [3.3]
29
30. BECOME AN XCODER 5
int main (int argc, const char * argv[]) // [3.5]
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int pictureWidth;
float pictureHeight, pictureSurfaceArea,
circleRadius, circleSurfaceArea;
pictureWidth = 8;
pictureHeight = 4.5;
circleRadius = 5.0;
pictureSurfaceArea = pictureWidth * pictureHeight;
circleSurfaceArea = circleArea(circleRadius);
NSLog(@"Area of picture: %f. Area of circle: %10.2f.",
pictureSurfaceArea, circleSurfaceArea);
[pool release];
return 0;
}
float circleArea(float theRadius) // [3.22]
{
float theArea;
theArea = 3.1416 * theRadius * theRadius;
return theArea;
}
float rectangleArea(float width, float height) // [3.29]
{
return width * height;
}
main() cir-
cleArea() [3.22] rectangleArea() [3.29]
main() [3.5] main() Apple
Area of picture: 36.000000. Area of circle: 78.54.
justatry has exited with status 0.
30
31. BECOME AN XCODER 5
Xcode
Xcode " " breakpoint
Build and Go popup menu
Build and Debug
31
32. BECOME AN XCODER 5
Xcode debugger
Continue debugger
Mac OS X
Objective-C
GUI
32
33. BECOME AN XCODER 6
6
[1.2]
[1]
int age = 42;
if (age > 30) // > " "
{
NSLog(@"age is older than thirty."); //[1.4]
}
NSLog(@"Finished."); //[1.6]
[1.2] if...
true
age > 30 [1.4]
[1.6] if
if...else [2]
[2]
int age = 42;
if (age > 30)
{
NSLog(@"age is older than thirty."); //[2.4]
}
else
{
NSLog(@"age is not older thirty."); //[2.7]
}
NSLog(@"Finished."); //[1.6]
[2.7] [2]
[2.2]
==
>
33
34. BECOME AN XCODER 6
<
>=
<=
!=
-
if
true false
Objective-C true false 1 0 BOOL
"true" 1 YES "false"
0 NO
[3]
int x = 3;
BOOL y;
y = (x == 4); // y 0
AND & &&
OR | ||
[4]
if ( (age >= 18) && (age < 65) )
{
NSLog(@"Probably has to work for a living.");
}
[5]
if (age >= 18)
{
34
35. BECOME AN XCODER 6
if (age < 65)
{
NSLog(@"Probably has to work for a living.");
}
}
35
36. BECOME AN XCODER 7 while
7
while
[1]
[1]
NSLog(@"Julia is a pretty actress.");
NSLog(@"Julia is a pretty actress.");
NSLog(@"Julia is a pretty actress.");
Objective-C
[2]
for
2.7
[2]
int x;
for (x = 1; x <= 10; x++)
{
NSLog(@"Julia is a pretty actress.");
}
NSLog(@"The value of x is %d", x);
[2] [1.4] 10 x 1
x <= 10 x 1
x x++
x 2 10 10
x 11 x <= 10
[2.6] loop x 11 10
x++
[3]
[3]
float celsius, tempInFahrenheit;
for (tempInFahrenheit = 0; tempInFahrenheit <= 200; tempInFahrenheit =
tempInFahrenheit + 20)
36
37. BECOME AN XCODER 7 while
{
celsius = (tempInFahrenheit - 32.0) * 5.0 / 9.0;
NSLog(@"%10.2f -> %10.2f", tempInFahrenheit, celsius);
}
0.00 -> -17.78
20.00 -> -6.67
40.00 -> 4.44
60.00 -> 15.56
80.00 -> 26.67
100.00 -> 37.78
120.00 -> 48.89
140.00 -> 60.00
160.00 -> 71.11
180.00 -> 82.22
200.00 -> 93.33
Objective-C
while () { }
do {} while ()
for-loop
false loop
[4]
int counter = 1;
while (counter <= 10)
{
NSLog(@"Julia is a pretty actress.n");
counter = counter + 1;
}
NSLog(@"The value of counter is %d", counter);
counter 11
do {} while ()
[5]
37
38. BECOME AN XCODER 7 while
int counter = 1;
do
{
NSLog(@"Julia is a pretty actress.n");
counter = counter + 1;
}
while (counter <= 10);
NSLog(@"The value of counter is %d", counter);
counter 11
GUI
38
39. BECOME AN XCODER 8 (GUI)
8
GUI
Objective-C
GUI Objective-C C
C Objective-C C
"Objective" Objective-C object
Objective-C
Objective-C
Objective-C
Safari Objective-C
Mac Safari
message
39
40. BECOME AN XCODER 8 (GUI)
close
Safari
Safari Apple
a.
b. template Safari
b class
behave
instance 76
40
41. BECOME AN XCODER 8 (GUI)
Mac minimize
Dock
access
close " "
close methods
RAM
button text field
close
41
42. BECOME AN XCODER 8 (GUI)
Mac
message sending expression
Objective-C [1.1] [1.2]
[1]
[receiver message];
[receiver message:argument];
[1.2]
Xcode Application
Cocoa Application GUI
Xcode Groups & Files Resources
MainMenu.nib Double-click
42
43. BECOME AN XCODER 8 (GUI)
Xcode MainMenu.nib
Interface Builder File
Hide Others "Window"
"Window"
"Cocoa-" GUI
" " palettes window
GUI "Window"
"System Font Text" GUI
GUI
43
44. BECOME AN XCODER 8 (GUI)
NSButton
NSTextView Apple
"Window"
properties command-shift-
i "Window" In-
stances command-shift-i
pop-up menu Attributes Textured Window
brushed-steel look
Interface Builder inspector
behavior
inherit Objective-C C
44
45. BECOME AN XCODER 8 (GUI)
NSWindow
"close"
" " superclass
hierarchy of inheritance
Objective-C sig-
nal error
implement
override
Apple
Apple
Apple close
invoke close
close recursive
[2]
//
[super close]; // close
"NSObject"
NSObject subclass NSWindow NSResponder
NSObject NSObject
MainMenu.nib Classes NSObject
Classes Subclass NSObject MainMenu.nib
"MAFoo"
45
46. BECOME AN XCODER 8 (GUI)
MAFoo
MAFoo My Application
NS NS Apple NextStep
Apple Next, Inc. NextStep Mac OS X Steve
Jobs
CocoaDev wiki
http://www.cocoadev.com/index.pl?ChooseYourOwnPrefix
Cocoa NSWindow
NSColor MAFoo
Interface Builder Classes Instantiate MAFoo In-
stances MAFoo
MAFoo
46
48. BECOME AN XCODER 8 (GUI)
MAFoo
inspector Outlet outlet "text-
Field"
outlet MAFoo
MAFoo 5 "Set to 5"
"Reset"
48
49. BECOME AN XCODER 8 (GUI)
a) "Reset" MAFoo
b) "Set to 5" MAFoo
c) MAFoo
MainFile.nib Instances Control
Reset MaFoo
MAFoo
MAFoo
inspector MAFoo
"reset:" Connect
49
50. BECOME AN XCODER 8 (GUI)
inspector
MAFoo reset:
Set to 5 MAFoo
MAFoo MAFoo control
Connect
MainMenu.nib MAFoo Classes
MAFoo Classes
Create Files for MAFoo Interface Builder
50
51. BECOME AN XCODER 8 (GUI)
MAFoo
Xcode Other
Sources
Classes
Xcode
51
55. BECOME AN XCODER 9
9
Apple setIntValue:
Apple
bug-free
Interface Builder
"NSButton"
''System Font Text" "NSTextField"
NSTextField
Xcode Help->Documentation Cocoa
"NSTextField" API-Search
NSText-
Field
NSTextField Class NSTextField
55
56. BECOME AN XCODER 9
Xcode Cocoa
NSObject
Method Types
NSTextField
NSControl NSView
HTML Inherits from
NSControl NSControl
NSControl
Inherits from NSView : NSResponder : NSObject
Setting the control s value
– setIntValue:
56
57. BECOME AN XCODER 9
setIntValue:
setIntValue:
- (void)setIntValue:(int)anInt
Sets the value of the receiver’s cell (or selected cell) to
the integer anInt. If the cell is being edited, it aborts all
editing before setting the value; if the cell doesn’t inherit
from NSActionCell, it marks the cell’s interior as needing to
be redisplayed (NSActionCell performs its own updating of
cells).
NSTextField
signature
Objective-C
void setInt-
Value: textField MAFood
(int) anInt
5 0
textField
" " Accessors
setIntValue:
[1]
- (int) intValue
textfield
[2]
resultReceived = [textField intValue];
Objective-C
57
58. BECOME AN XCODER 9
"
" polymorphism object-oriented programming
run-time
GUI setIntValue:
58
59. BECOME AN XCODER 10 awakeFromNib
10
awakeFromNib
Apple
framework [12] Foundation Kit
Application Kit
GUI
nib nib Next Interface Buil-
der Application Kit
Xcode Help Documentation
Full-Text Search
Full-Text Search Ap-
plication Kit Return Xcode Applica-
tion Kit Reference for Objective-C
Protocols NSNibAwakening
NSNibAwaking
Declared in AppKit/NSNibLoading.h
Programming Topic Loading Resources
Contents:
Protocol Description
Method Types
Instance Methods
Protocol Description
This informal protocol consists of a single method, awakeFrom-
Nib. Classes can implement this method to perform final ini-
tialization of state after objects have been loaded from an
Interface Builder archive.
59
61. BECOME AN XCODER 11
11
C
- pointer
- Objective-C
Mac
[1]
int x = 4;
Mac
x
[1] int
x long long double
"x = 4" 4 x
x address
x
x
pointer
& x
&x
expression x evaluate x
4 &x x
[2]
int *y;
y int y
x x y
61
62. BECOME AN XCODER 11
[3]
y = &x;
*y
4 "x"
*y = 5
"x = 5"
1
[4]
void increment(int *y)
{
*y = *y + 1;
}
[5]
int x = 4;
increment(&x);
// x 5
62
63. BECOME AN XCODER 12
12
integer long float
double BOOL pointer
string NSLog()
%
%d
[1]
float piValue = 3.1416;
NSLog(@"Here are three examples of strings printed to the screen.n");
NSLog(@"Pi approximates %10.4f.n", piValue);
NSLog(@"The number of eyes of a dice is %d.n", 6);
NSString NSMutableString NSString
[2]
NSString *favoriteComputer;
favoriteComputer = @"Mac!";
NSLog(favoriteComputer);
[2.1]
11
[2]
[3]
int *y;
y [2.1]
favoriteComputer NSString
Objective-C
@ Objective-C C
C Objective-C
Objective-C @
63
64. BECOME AN XCODER 12
Objective-C C Objective-C Uni-
code ASCII Unicode
[4]
[4]
NSString *favoriteActress = @"Julia";
favoriteActress "Julia"
favoriteComputer
[5] NSString
[5]
#import <Foundation/Foundation.h>
int main (int argc, const char *argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSString *x;
x = @"iBook"; // [5.7]
x = @"MacBook Pro Intel"; //
NSLog(x);
[pool release];
return 0;
}
MacBook Pro Intel
NSString immutable
Objective-C
64
65. BECOME AN XCODER 12
NSMutableString
length [6]
[6]
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int theLength;
NSString * foo;
foo = @"Julia!";
theLength = [foo length]; // [6.10]
NSLog(@"The length is %d.", theLength);
[pool release];
return 0;
}
The length is 6.
foo bar
x
[6.10] foo length length NSString
- (unsigned int)length
Returns the number of Unicode characters in the receiver.
[7]
uppercaseString
NSString
[7]
65
66. BECOME AN XCODER 12
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *foo, *bar;
foo = @"Julia!";
bar = [foo uppercaseString];
NSLog(@"%@ is converted into %@.", foo, bar);
[pool release];
return 0;
}
Julia! is converted into JULIA!
NSMutableString NSMutableString
appendString:
[8]
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSMutableString *foo; // [8.7]
foo = [@"Julia!" mutableCopy]; // [8.8]
[foo appendString:@" I am happy"];
NSLog(@"Here is the result: %@.", foo);
[pool release];
return 0;
}
66
67. BECOME AN XCODER 12
Here is the result: Julia! I am happy.
[8.8] mutableCopy NSString
mutable [8.8] foo
"Julia!"
Objective-C
[8.7] Objective-
C " " " "
" "
[8.7] foo "Julia!"
"foo"
foo bar
bar = foo;
foo bar
"foo"
"bar"
foo [foo dosomething];
bar [bar dosomething];
[9]
#import <Foundation/Foundation.h>
67
68. BECOME AN XCODER 12
int main (int argc, const char * argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSMutableString *foo = [@"Julia!" mutableCopy];
NSMutableString *bar = foo;
NSLog(@"foo points to the string: %@.", foo);
NSLog(@"bar points to the string: %@.", bar);
NSLog(@"------------------------------");
[foo appendString:@" I am happy"];
NSLog(@"foo points to the string: %@.", foo);
NSLog(@"bar points to the string: %@.", bar);
[pool release];
return 0;
}
foo points to the string: Julia!
bar points to the string: Julia!
------------------------------
foo points to the string: Julia! I am happy
bar points to the string: Julia! I am happy
8
MAFoo
68
69. BECOME AN XCODER 13
13
array
index
element
1
1
NSArray NSMutableArray
[NSMutableArray array]
… …
NSMutableArray
Objective-C
meta-classes
Cocoa
"+" "-" 8 [4.5]
array
array
+ (id)array
69
70. BECOME AN XCODER 13
Creates and returns an empty array. This method is used by mu-
table subclasses of NSArray.
See Also: + arrayWithObject:, + arrayWithObjects:
[1]
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSMutableArray *myArray = [NSMutableArray array];
[myArray addObject:@"first string"];
[myArray addObject:@"second string"];
[myArray addObject:@"third string"];
int count = [myArray count];
NSLog(@"There are %d elements in my array", count);
[pool release];
return 0;
}
There are 3 elements in my array
0
objectAtIndex: [2.13]
[2]
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
70
71. BECOME AN XCODER 13
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSMutableArray *myArray = [NSMutableArray array];
[myArray addObject:@"first string"];
[myArray addObject:@"second string"];
[myArray addObject:@"third string"];
NSString *element = [myArray objectAtIndex:0]; // [2.13]
NSLog(@"The element at index 0 in the array is: %@", element);
[pool release];
return 0;
}
The element at index 0 in the array is: first string
[3]
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSMutableArray *myArray = [NSMutableArray array];
[myArray addObject:@"first string"];
[myArray addObject:@"second string"];
[myArray addObject:@"third string"];
int i;
int count;
71
72. BECOME AN XCODER 13
for (i = 0, count = [myArray count]; i < count; i = i + 1)
{
NSString *element = [myArray objectAtIndex:i];
NSLog(@"The element at index %d in the array is: %@", i, element);
}
[pool release];
return 0;
}
The element at index 0 in the array is: first string
The element at index 1 in the array is: second string
The element at index 2 in the array is: third string
NSArray NSMutableArray
replace
replaceObjectAtIndex:withObject:
Objective-C
[4]
[myArray replaceObjectAtIndex:1 withObject:@"Hello"];
1 @"Hello"
valid
Objective-C
" " Smalltalk
Objective-C expressive
" "
Objective-C
72
73. BECOME AN XCODER 14
14
Mac RAM
free
destroy
Cocoa
" " retain count
1 =
3
2
3
73
74. BECOME AN XCODER 14
retain
release Cocoa "autore-
lease pool" release -
autorelease pool
autorelease autorelease pool release
autorelease pool
autorelease pool
Cocoa reference count-
ing 15 Cocoa
Apple Apple Cocoa
automatic garbage collection
Apple
Apple 2006 WWDC World Wide Developer Conference
2007 Xcode 3.0 automatic garbage collection
Objective-C 2.0
74
75. BECOME AN XCODER 15
15
Xcode Objective-C
Apple
Apple
http://www.apple.com/developer
http://osx.hyperjeff.net/reference/CocoaArticles.php
http://www.cocoadev.com
http://www.cocoabuilder.com
http://www.stepwise.com
http://lists.apple.com/mailman/listinfo/cocoa-dev cocoa-dev
mailing list
http://www.cocoabuilder.com
http://www.catb.org/~esr/faqs/smart-questions.html "How To Ask Questions The
Smart Way" " " http://mis.ndhu.edu.tw/docu/
question.htm
Cocoa Stephen Kochan Programming in Objective-C
Big Nerd Ranch Aaron Hillegass Cocoa Programming for Mac OS X
Xcode James Duncan Davidson Apple O'Reilly Cocoa
with Objective-C
Mac
Apple
http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuid
elines/index.html
75