Cocos2dx cross-platform engine is really interesting. I recently decided to transfer the game written by oC to cocos2dx.
However, Multi-Resolution on the androd platform is a big problem, which is not called in IOS. 480*320*960*640*1024*768 can be well solved based on pixels.
Fortunately, the setdesignresolutionsize provided on cocos2dx supports multi-resolution, but you will know after using it. If the screen ratio is not 480*
The content of {code...} $ json is like this: {code ...}
$ Json content is like this:
{"pagination":{},"meta":{"code":200},"data":[{"attribution":null,"tags":[],"type":"image","location":null,"comments":{"count":0},"filter":"Normal","created_time":"1453516817","link":"https:\/\/www.instagram.com\/p\/BA3XjWMP4ye\/","likes":{"count":0},"images":{"low_resolution":{"url":"https:\/\/scontent.cdninstagram.com\/hphotos-xpf1\/t51.2885-15\/s320x320\/e35\/12547507_218933238449715_1618422633_n.jpg","wi
Today, when collecting images from the Momo website, the resolution of the images will be changed to 320*480, and the original images contain pixel information. For example, the clear cottage wallpaper (320*480) is the last one I want to leave. what should I do? First we should... SyntaxHighlighter. all ();
Today, when collecting images from the Momo website, the resolution of the images will be changed to
Apache
Tar zxvf httpd-2.2.11.tar.gz
CD httpd-2.2.11
./Configure -- prefix =/usr/local/apache2 -- enable-Rewrite -- enable-SSL
Make
Make install
After installation, run the following command to start Apache/usr/local/apache2/bin/apachectl start.
Install PHP
Tar zxvf php-5.2.6.tar.gz
CD php-5-2.6
. /Configure -- prefix =/usr/local/PHP -- with-apxs2 =/usr/local/apache2/bin/apxs -- With-mysql =/usr/local/MySQL -- With-config- file-Path =/usr/local/PHP/etc -- With-JPEG-Dir =/usr/local/defaults 6/--
Environment:Windows R2 Standard 中文版, ready to install NW 7.5 Java32GB MemorySUSE Linux, HANA 1.0 SP11
Get ready:Modify the Hana, Windows time zone, to ensure consistent timingModify host name to Miix
Disable ipv6, fixed IP, modify hosts, you can ping mii15 hostanmeTo completely disable the IPV6 protocol, you must change the registry (the IPV6 protocol cannot be uninstalled by Windows Server version 2008).In the registry, locate Hkey_local_machine\sy
))
Basically eight centers
Memory consumption: (each node is about 5.8 GB), about 50 GB in total.
Memory analysis:
20 GB of raw data and 20 GB of map output
Iterations
Time
1
108 S
2
0.93 s
12/06/05 11:11:08 info spark. cachetracker: Looking for RDD Partition
12/06/05 11:11:08 info spark. cachetracker: Found partition in cache! Test on 20 GB of data (more iterations)
Root @ master:/opt/spark #./run sp
Previously, I used a horizontal game, and then generally used the following code to adapt to multiple resolutions:
typedef struct tagResource{ CCSize sizeInPixel; CCSize sizeDesign; char directory[100];}Resource;static Resource resPhone = { CCSizeMake(480, 320), CCSizeMake(480, 320), "iphone" };static Resource resPhoneRetina = { CCSizeMake(960, 640), CCSizeMake(480,
Basic mobile phone resolution knowledge (DPI, DIP computing)
1. terms and concepts
Terms
Description
Remarks
Screen size)
It refers to the actual physical size of the mobile phone, such as the commonly used 2.8 inch, 3.2 inch, 3.5 inch, 3.7 inch
Motorola's milestone mobile phone is 3.7 inch
Aspect Ratio (width/height Ratio)
Refers to the actual physical size width/height ratio, divided into long and nolong
Milestone is and belongs to long
Res
DP (DIP): device independent pixels (unit independent pixels). Different devices have different display effects, this is related to the device hardware, generally we support WVGA, HVGA and QVGA recommend this, do not rely on pixels.DP is also a dip, which is basically similar to SP.You can use a DP or SP if you set properties that represent length, height, and so on. However, if you set the font, you need to use the SP. The DP is not density-independent, and the SP is not related to scale, excep
= @ "Uiinterfaceorientationportraitupsidedown";BreakDefaultOrientationdes = @ "";Break}NSLog (@ "System ver:%@, \rorientaion:%@, \rwindow bounds:%@",[Uidevice Currentdevice].systemversion,Orientationdes,Nsstringfromcgrect (self.window.bounds));}
The sample code is simple, create a new project, and then add the above code directly in the delegate.The results on IOS 8 run as follows:
Copy Code code as follows:
2014-06-04 09:26:32.016 svios8[4143:61114] System ver:8.0,
Or
Google's recommendation, pixels uniformly use the dip, the font unified use SPFor example, the difference between PX and dip:px pixels, if using PX, will be used to draw the actual pixel, than a bar, with a line length of 240px, in the 480 wide simulator is half the screen width, and in the 320 wide simulator is 2/3 of the screen width. Dip, that is, the height of the screen is divided into 480 points, the width divided into
from://http://blog.csdn.net/ithomer/article/details/6688883Android to get the screen longer than the width, referring to the internet has a lot of code, but the results are inconsistent with the actual, such as my phone is i9000, the screen size is 480*800px, the results are 320*533The results are very unreliable, so I wrote a few lines of code, pro-TestTest parameters:Test environment: i9000 (Samsung)Physical screen: 480*800pxdensity:1.5Test code:[Ja
Mobile devices are big and small, so how to adapt to different screens, which has caused us programmers a lot of confusion.I also suddenly think of these issues, and then go online search related things, organized as follows. First, you must understand the following length units. Length units in Android (DP, SP, PX, in, PT, mm) see a lot of netizens do not understand the difference between DP, SP and PX: Now introduce the DP and SP. DP is also dip. This is basically similar to SP. You can use a
It's just a little prep work. In order to display the string, you need to call interrupt: int 0x10 (ah=0x13). Specific parameter settings, refer to my summary of the following:INT ten (AH = 0)-----------------Function: Set display modeCall Parameters:AL = 00:40 * 25 black and white Way01:40 * 25 Color mode02:80 * 25 black and white Way03:80 * 25 Color mode04:320 * 200 Color graphic mode05:320 * 200 Black an
screen area . So, for example, we say that a cell phone is 3.2 feet, that is, the diagonal length of its viewable area is: 3.2*2.54 = 8.128cm.Resolution : It refers to the number of pixels in the vertical and horizontal direction of the screen. For example, the resolution is: 480*320, that is to say: Horizontal direction (width) has 320 pixels. The vertical direction (high) has 480 pixel points.dpi: pixel
that was added from Android 2.3 (API level 9).DPI is the abbreviation for "dot per inch" and the number of pixels per inch.General screen: LDPI is 120,mdpi is 160,hdpi is 240,xhdpi is 320.Third, how to achieve adaptive screen size?1) Interface layout aspectIt is necessary to prepare 5 sets of layouts according to the size of the physical size, layout (put some common layout XML files, such as the top and bottom layouts in the interface, will not chan
Learning notes: App transduction-Details Android and iOS platformsReprinted from: http://www.woofeng.cn/articles/168.html Copyright belongs to the original author allYa Ru has leeOriginal address: http://blog.boocss.com/app-android-ios/One. Android versionIn the Android version of the design, there are many sizes, then we want to use a size as the benchmark, then the benchmark size is 480px*800px, after the completion of the plan to start cutting diagramTo be aware of:A:android mainly has 3 kind
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.