Adjust Brightness of External Display Mac Programmatically - objective-c

Does anyone know of a way to change the brightness of an external display connected to a mac through Objective-C? (Like an Apple Thunderbolt Display or LED Cinema Display?) I have seen answers for adjusting the primary screen's brightness, but not a secondary screen.
Thanks.

Related

Detecting motion gestures with siri remote tvOS

I am developing an app for tvOS and I want when the user shakes the remote, or moves it in a downward slash, that an event gets triggerred. But apple's documentation mostly focuses on registering button presses and the focus engine.
Can anyone help me with how I can access the accelometer?
Thank you for your help
To use the motion sensing aspects of the Siri Remote, you need to treat it as a game controller. See Working with Game Controllers in App Programming Guide for tvOS and the GCMotion class.
While it's fairly easy to port an ios game to tvos, note the following limitation that did slow me down as originaly I was using the rotation feature and expected to be the same on the remote, I had overlooked it in the doc but it says "Although the remote supports motion data (and the GCMotion profile), the remote cannot determine the attitude or rotation of the remote. The corresponding properties always return constant values."
And the constant values as per the tvOS header GCMotion.h are:
#note Remotes can not determine a stable rotation rate so the values will be (0,0,0) at all times.
#note Remotes can not determine a stable attitude so the values will be (0,0,0,1) at all times.

How to change dynamic video resolution during a call (in hangout WebRTC)

I'm find hangout's dynamic resolution in google hangout webrtc version.
How to change dynamic video resolution during a call.
[Situation]
- There were three users in room.
- When switching main speaker it is changed same video's resolution (.videoWidth .videoHeight)
I would like to know how it is implemented for many peer connection.
The change your resolution you can use the Hangout Toolstrip at top center of the Hangout interface to change the quality slider from Auto to a lower resolution, but there's a part of me that thinks you might be asking about aspect ratio instead... different devices (webcam, mobile device camera, etc) present in different aspect ratio (16:9 or 4:3). Some webcams allow you to change the aspect ratio, but it's a dependent on the software provided with the camera.
I hope that some part of this was helpful.

Cocos2d - 4inch screen displace the game

i developed a game for the iphone4. Now i got problems with the iphone5 and the 4inch screen. My game is on the left side of the 4inch screen and i have a big black border on the right side. But the buttons from the game are in the middle of screen, they have same position like on the iphone4. I checked everythin but i dont know why the background-images and the sprites are on the left side and the buttons are in the middle. I want that everything is in the middle or on the left side. It would be great if anybody could help me!! Thanks!!
COCOS2d-iPhone:
If you're using the latest beta, the only change you should need to
make is export all your images at twice the size and use the "-hd"
suffix, similar to Apple's "#2x". The documentation also says you need
to set the content scale factor of the director.
You can find the documentation here.
and more detail here.
COCS2d-X:
Cocos2D-x has a very easy solution for multi-resolution problem.
In fact you just need to set your DesignResolution and then just imagine your target device will has this resolution.
If target device really has this resolution ( or some other but with same ratio) cocos2d will handle to fix screen and your game looks same in all devices.
And when ratio of target device is different, you have many option ( as cocos2d language, policy) to manage that.
For example if you use Exact fit policy, cocos2d will force your game ( and design) to fit target device screen (without that black boarder).
Exact fit
The entire application is visible in the specified area without trying
to preserve the original aspect ratio. Distortion can occur, and the
application may appear stretched or compressed.
For more detail just take a look at this link : http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Multi_resolution_support

Display and select supported resolutions in objective-c?

I'm a bit annoyed that the display menulet in Mountain Lion no longer lets you adjust the screen resolution.
So I'm working on a simple menulet using NSStatusItem, but I've never really delved into the world of adjusting the display resolution.
How can I create a simple menu which will list a screen's supported resolutions and change to that one when you select it?

iPhone iOS open source gyroscope based spherical coordinate system viewer, like 360 panorama or tour wrist

I'm looking for an iPhone based, preferably iOS5 with ARC project that uses the iPhone4's gyro to look around in spherical coordinate system. The phone is at the center of a sphere, and by looking at the sensor output, it can understand where the camera is pointing in spherical coordinates.
I'm not sure if what I'm thinking of can be accomplished with iOS5 CMAttitude which blends sensors of iPhone4 can it?
I intend to use the project to control a robotic turret and make it be able to "look" at a particular point within a spherical coordinate system.
What comes to mind is that a 360 panorama or a tour wrist like app would be a good starting point for such a project. Is there something that is similar, open source and uses native iOS Core Motion framework?
Thank you!
If you would like to license the TourWrist technology, please let me know. For example, we license the TourWrist capture and viewer APIs/SDKs.
Dan Smigrod
via: support#TourWrist.com