Posts

Showing posts with the label apple

Swig Tutorial example Mac Os Lion

This tutorial is based on Leopard Tutorial but still works, thou some warnings. First, we create an example.c file with this content: /* File : example.c */ #include <time.h> double My_variable = 10.0; int fact(int n) { if (n Second, we create the interface between C and Python with the following file: /* example.i */ %module example %{ /* Put header files here or function declarations like below */ extern double My_variable; extern int fact(int n); extern int my_mod(int x, int y); extern char *get_time(); %} extern double My_variable; extern int fact(int n); extern int my_mod(int x, int y); extern char *get_time(); Now that we have all the source files we need, we compile them in this way: $ swig -python example.i $ cc -c `python-config --cflags` example.c example_wrap.c $ cc -bundle `python-config --ldflags` example.o example_wrap.o -o _example.so if you have problems with this step check this other post So, everything looks nice, but how do we use ...

timeit example

An example of how to time a statement >>> import numpy as np >>> arr1 = np.random.randint(0,1600,(3000,3000)) >>> timeit arr1.argmin() 10 loops, best of 3: 34.2 ms per loop Tested under Mac Lion Os proc i7 and Python 2.7.1 r271:86832

What's the iPad resolution?

iPad has a 1024 by 768 resolution. Just that.

Alternative to istat menu

Image
MenuMeters is  a set of CPU, memory, disk, and network monitoring tools for Mac OS X. Although there are numerous other programs which do the same thing, none had quite the feature set I was looking for. Most were windows that sat in a corner or on the desktop, which are inevitably obscured by document windows on a laptop's small screen.  MenuMeters at the topmenu Requirements: Mac OS X 10.4 or later (10.7 supported) PowerPC or Intel based Macintosh (Universal Binary) Website

Tethering in Iphone 4 - Movistar Argentina

General → Network → Cellular Data Network Under "Internet Tethering" we write: APN:internet.gprs.unifon.com.ar Username: internet Password: internet Turn on and off General → Network → Personal Hotspot and swipe to on Select a password and you're done!

Change Iphone 4 voicemail number

Dial: *5005*86* "voicemail number" # This will record the number for the voicemail

Show hidden files in Mac Os Lion

Open Terminal and run: $ defaults write com.apple.Finder AppleShowAllFiles YES Relaunch Finder (hold alt key and right click on Finder, then Relaunch) To hide this files again run in Terminal: $ defaults write com.apple.Finder AppleShowAllFiles NO and also relaunch Finder as above. source

How to uninstall XCode4 from Mac OS X Lion

So i had an old version of XCode on my computer, and i tried upgrading it with the new mac app store, and it didn’t work. I wanted to uninstall it and then reinstall it using the app store, but they of course don’t have an option to UNINSTALL apps using the app store Google tells me to just delete the app and then you can click ‘install’ again on the purchases tab in the app store, but since this is xcode, you can’t just drag an application to the trash. You have to run a command using Terminal. So, open terminal and type: sudo /Developer/Library/uninstall-devtools –mode=all The directory MIGHT be different, but for me it installed it to /Developer . Anyway, it should list all the packages and then say it deleted them. I restarted my mac just to be safe. THEN, if it STILL says that xcode is installed, you need to delete the installer from /Applications (different from the Applications folder in your home folder). Go Macintosh HD/Applications and there should be a file called ...

Set (or change ) the hostname - Mac Os Lion

Open " System Preferences " Click on " Sharing " icon Edit the field " Computer Name " with your new hostname Actually this is very useful, because now you can see your device listed in the DHCP list at the router configuration.

How to download Iphone's photos - Mac Os X Snow Leopard

We can use Preview Import function, File -> Import Image

Sync iPhone apps with iTunes without deleting them

Warning: This is only for  apps! Music and other things will not be saved! Question I have a few apps on my iPhone, and would like to sync them with iTunes without erasing them from my phone. Is this possible without downloading them all again? Answer   secondary click the iPod/iPhone on the left  click "transfer purchases"   Afterwards, you can sync, and "everything" will be erased and rewritten to the Device. source

Resize images with Preview (Snow Leopard)

Image
Alternative 1 A Quick way to resize images in batches could be find that Preview has that functionality. Open the whole batch of images in Preview; the images will all open in the same window with thumbnails visible in the sidebar. Select all of the thumbnails in the sidebar (with Command-A, or click the first and then click the last while holding Shift). Next, from the Tools menu, choose Adjust Size. You’ll be presented with a dialog containing options to resize to all the common 4:3 and 16:9 screen sizes, as well as the option to define custom dimensions. Images are scaled proportionately and resampled by default. snow leopard preview image resize Save the resized images, and you’re done! Preview will prompt you to save any changes if you attempt to close the window. Alternative 2 You can also use sips on the command line: sips -Z 1024 *.jpg will resample to a max of 1024 px for the long edge. Note that sips rewrites images in place, so you should do this on a copy if you care. s...

Could not activate celullar data network - Iphone - Movistar

If you get this error message, try editing the APN data under Settings->General->Network->Cellular Network (in spanish: Ajustes->General->Red->Red de datos móviles ) Alternative 1: APN: internet.gprs.unifon.com.ar Username: internet Password: internet Alternative 2: APN: wap.gprs.unifon.com.ar Username: wap Password: wap CLARO APN's Alternative 1: APN: igprs.claro.com.ar Username: clarogprs Password: clarogprs999 Alternative 2 (old but still works): APN: internet.ctimovil.com.ar Username: ctigprs Password: ctigprs Alternative 3: APN: wap.ctimovil.com.ar Username: ctigprs Contraseña: ctigprs999 from source 1 and source 2

Ipod home screen...

Image
downloaded from Ifans