In Model View Controller in the context of Cocoa, when View(PolygonView) needs a reference to Model(PolygonShape):
Step 1: declare an instance variable of PolygonShape in PolygonView
Step 2 Link the Outlet PolygonShape to Class PolygonShape
Sunday, November 29, 2009
Thursday, October 15, 2009
#include vs #include "file"
First: <> vs ""
Both would work if file exist. The difference is the order of directories are searched.
In case of<>: ONLY searches in list of SYSTEM directories. If file does not exist in the system directories then C1083 error.
In case of "file": First searches in the including file directory(current file directory), if not found then searches in the SYSTEM directories. If either is found then C1083 error.
Second: file vs file.h
Some of the header files end with ".h" others do not. Eg stdio.h vs fstream .Both of the files are in system directory so proper inclusion would be
#include
#include
of course the following would work as well
#include "stdio"
#include "fstream.h"
See picture for more clarification example
verifies files are in system directory
ref:http://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html
Both would work if file exist. The difference is the order of directories are searched.
In case of
In case of "file": First searches in the including file directory(current file directory), if not found then searches in the SYSTEM directories. If either is found then C1083 error.
Second: file vs file.h
Some of the header files end with ".h" others do not. Eg stdio.h vs fstream .Both of the files are in system directory so proper inclusion would be
#include
#include
of course the following would work as well
#include "stdio"
#include "fstream.h"
See picture for more clarification example
verifies files are in system directory
ref:http://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html
Monday, September 14, 2009
Thursday, August 20, 2009
parameterized types are only available if is 5.0
Wednesday, August 19, 2009
Saturday, August 15, 2009
lost wireless connection after updating ubuntu kernel
Thursday, August 13, 2009
Thursday, August 6, 2009
Tuesday, August 4, 2009
cout
Wednesday, July 29, 2009
Cannot open include file No such file or directory
error message: Cannot open include file 'xyz.h' No such file or directory
happens when a header file is to be included: eg #include
causes: xyz.h is not in visual studio's include folder.
sol: put xyz.h into include folder at:
"VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\"
one way to locate the "include" folder is to open visual studio 2008 cmd prompt. see pic
for vs c++ 2008 express
for vs2005
header files in Visual studio
happens when a header file is to be included: eg #include
causes: xyz.h is not in visual studio's include folder.
sol: put xyz.h into include folder at:
"VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\"
one way to locate the "include" folder is to open visual studio 2008 cmd prompt. see pic
for vs c++ 2008 express
for vs2005
header files in Visual studio
Monday, July 27, 2009
Thursday, July 23, 2009
firefox not started ssl_error_ssl_disabled in mac
error description:
when starting firefox following error pops up:
then can not log onto gmail, youtube...
cause:
firefox user profile corrupted
fix: delete user profile folder.
Follow instruction from here to locate profile folder in Firefox:
when starting firefox following error pops up:
ssl_error_ssl_disabled in mac |
then can not log onto gmail, youtube...
cause:
firefox user profile corrupted
fix: delete user profile folder.
Follow instruction from here to locate profile folder in Firefox:
Tuesday, July 21, 2009
mssql
comman mistakes:
use ` ` around column names
use ' ' around values.
eg.
mySQL="SELECT * FROM USER where `NAME` ='michael'"
eg.
dim str,rsUser
str = CStr("michael")
mySQL="SELECT * FROM USER where `NAME`=' " &str & " ' "
otherwise you get unknow column name michael in where clause
use ` ` around column names
use ' ' around values.
eg.
mySQL="SELECT * FROM USER where `NAME` ='michael'"
eg.
dim str,rsUser
str = CStr("michael")
mySQL="SELECT * FROM USER where `NAME`=' " &str & " ' "
otherwise you get unknow column name michael in where clause
Thursday, July 16, 2009
error:mbstring PHP extension phpmyadmin was not found
Tuesday, July 7, 2009
How to compile C/C++ source code in windows
need:
when you want to compile source code
overview:
find a source code or write your own(here), then compile and run the output
step:
1 open visual studio command window
2 write simple source code in nodepad
3 compile: cl command
4 run the exe file and test
ref:
http://msdn.microsoft.com/en-us/library/ms235639(VS.80).aspx
#include
int main()
{
std::cout << "This is a native C++ program." << std::endl;
return 0;
}
when you want to compile source code
overview:
find a source code or write your own(here), then compile and run the output
step:
1 open visual studio command window
2 write simple source code in nodepad
3 compile: cl command
4 run the exe file and test
ref:
http://msdn.microsoft.com/en-us/library/ms235639(VS.80).aspx
#include
int main()
{
std::cout << "This is a native C++ program." << std::endl;
return 0;
}
Saturday, July 4, 2009
Timestamp Filename
Friday, July 3, 2009
Access FTP without "client"
Tuesday, June 23, 2009
pdf ->image->pdf->searchable pdf
Need:
Sometimes you might want to get a section of pdf and insert it into other documents, and make this section searchable
Idea:
Extract a section of PDF as image, insert image into PDF or PowerPoint, make the image searchable
How:
pdf
select the section using "Snapshot tool"
gimp:
create image in gimp
change the ppi(pixel per inch) to >= 144.
paste the file
save as 144dpi.jpeg
pdf
convert the file to pdf
run OCR
the section becomes searchable again
Example:
Available upon request
Sometimes you might want to get a section of pdf and insert it into other documents, and make this section searchable
Idea:
Extract a section of PDF as image, insert image into PDF or PowerPoint, make the image searchable
How:
select the section using "Snapshot tool"
gimp:
create image in gimp
change the ppi(pixel per inch) to >= 144.
paste the file
save as 144dpi.jpeg
convert the file to pdf
run OCR
the section becomes searchable again
Example:
Available upon request
Monday, June 8, 2009
Insert image into PDF
Saturday, June 6, 2009
Friday, June 5, 2009
Monday, June 1, 2009
Saturday, May 30, 2009
Friday, May 29, 2009
Wednesday, May 20, 2009
Run Php in command window
Monday, May 18, 2009
glut.h
Thursday, May 14, 2009
Connect to University Of Auckland Terminal Server
Wednesday, May 13, 2009
Backbone(vertical) cabling vs Horizontal Cabling
This is from Cisco:
Similarity: both connects from telecommunication room.
Difference:
Backbone = vertical: connect to equipment room(where servers are).
Horizontal: connects to work area( where individual pcs and desktops are).
Telecommunications Room:
The telecommunications room is where connections to intermediary devices take place. These rooms contain the intermediary devices - hubs, switches, routers, and data service units (DSUs) - that tie the network together. These devices provide the transitions between the backbone cabling and the horizontal cabling.
Similarity: both connects from telecommunication room.
Difference:
Backbone = vertical: connect to equipment room(where servers are).
Horizontal: connects to work area( where individual pcs and desktops are).
Telecommunications Room:
The telecommunications room is where connections to intermediary devices take place. These rooms contain the intermediary devices - hubs, switches, routers, and data service units (DSUs) - that tie the network together. These devices provide the transitions between the backbone cabling and the horizontal cabling.
Understanding University of Auckland Terminal Server
Saturday, May 9, 2009
Administrator disabled display control panel
Problem:
Screen resolution was changed by itself.
Administrator account was not able to open "screen settings" (right click->property)
Error message: "Administrator disabled display control panel"
Fix:
open group policy object editor:
start->run->gpedit.msc
then
user settings->control pannel-> displayplay-> double click "delete display control panel"->click disable.
Screen resolution was changed by itself.
Administrator account was not able to open "screen settings" (right click->property)
Error message: "Administrator disabled display control panel"
Fix:
open group policy object editor:
start->run->gpedit.msc
then
user settings->control pannel-> displayplay-> double click "delete display control panel"->click disable.
Subscribe to:
Posts (Atom)