<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8096302487104686719</id><updated>2012-01-31T22:19:24.371+01:00</updated><category term='binaries'/><category term='glade'/><category term='gl2ps'/><category term='python'/><category term='euler'/><category term='OpenGl'/><category term='opencv android gray conversion pixel buffer'/><category term='gtkglext'/><category term='installer'/><category term='windows'/><category term='gtk'/><category term='android eclipse installation'/><category term='python script'/><category term='android app nine maths games'/><category term='android progressdialog download url'/><category term='Gentoo'/><title type='text'>Marco Bonifazi</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>52</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-1340029155325968598</id><published>2011-04-16T03:16:00.008+02:00</published><updated>2011-11-18T12:11:38.044+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android app nine maths games'/><title type='text'>NINE 1.1 released!</title><content type='html'>Here is my first public and very simple Android application!&lt;br /&gt;&lt;br /&gt;&lt;a href="https://market.android.com/details?id=bonifazi.nine"&gt;https://market.android.com/details?id=bonifazi.nine&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://market.android.com/details?id=bonifazi.nine"&gt;&lt;br /&gt;Nine 1.1&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-1340029155325968598?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/1340029155325968598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=1340029155325968598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/1340029155325968598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/1340029155325968598'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2011/04/nine-v10-released.html' title='NINE 1.1 released!'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-5697976498867053878</id><published>2010-10-21T17:37:00.003+02:00</published><updated>2010-10-21T17:46:19.218+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android progressdialog download url'/><title type='text'>Android/Java: Download a file from an URL to sdcard updating a ProgressBar/ProgressDialog</title><content type='html'>Here is a simple class for download management with ProgressDialog realtime updating&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:java"&gt;String path_to_local_file = "/mnt/sdcard/marco_bonifazi.txt";&lt;br /&gt;String url = "http://www.bonifazi.eu/marco_bonifazi.txt";&lt;br /&gt;&lt;br /&gt;DownloadManager downloader = new DownloadManager(this, url, path_to_local_file, dialog);&lt;br /&gt;&lt;br /&gt;boolean res = downloader.checkInternetConnection();&lt;br /&gt;&lt;br /&gt;if (!res ) {&lt;br /&gt;    downloader.alertMissingConnection("No internet connections available");&lt;br /&gt;} else {&lt;br /&gt;    res = downloader.download();&lt;br /&gt;&lt;br /&gt;    if (!res ) {&lt;br /&gt;        downloader.alertMissingConnection("URL not available");&lt;br /&gt;    } &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class DownloadManager extends AsyncTask&lt;String, Integer, Integer&gt;{&lt;br /&gt;&lt;br /&gt;    private URL url;&lt;br /&gt;    private String filename;&lt;br /&gt;    private ProgressDialog dialog;&lt;br /&gt;    private URLConnection ucon;&lt;br /&gt;    private Context context;&lt;br /&gt;    &lt;br /&gt;    public DownloadManager(Context context, String file_url, String filename, ProgressDialog dialog)  {&lt;br /&gt;        this.context = context;&lt;br /&gt;        this.dialog = dialog;&lt;br /&gt;&lt;br /&gt;        try {&lt;br /&gt;            this.url = new URL(file_url);&lt;br /&gt;        } catch (MalformedURLException e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;        this.filename = filename;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public boolean checkInternetConnection() {&lt;br /&gt;        ConnectivityManager cm = (ConnectivityManager) this.context.getSystemService(Context.CONNECTIVITY_SERVICE);&lt;br /&gt;        if (cm.getActiveNetworkInfo() == null){&lt;br /&gt;            return false;&lt;br /&gt;        } else {&lt;br /&gt;            return true;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void alertMissingConnection(String message) {&lt;br /&gt;        AlertDialog.Builder builder = new AlertDialog.Builder(this.context);&lt;br /&gt;        builder.setMessage(message)&lt;br /&gt;        .setCancelable(false)&lt;br /&gt;        .setPositiveButton("Ok", null);&lt;br /&gt;        AlertDialog alert = builder.create();&lt;br /&gt;        alert.show();&lt;br /&gt;        return;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    boolean download() {&lt;br /&gt;        try {&lt;br /&gt;            this.ucon = url.openConnection();&lt;br /&gt;            this.ucon.connect();&lt;br /&gt;            this.execute("");&lt;br /&gt;            return true;&lt;br /&gt;        } catch (IOException e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;            return false;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @Override&lt;br /&gt;    protected void onPreExecute() {&lt;br /&gt;        this.dialog.setTitle("Downloading...");&lt;br /&gt;        this.dialog.setIndeterminate(false);&lt;br /&gt;        this.dialog.show();&lt;br /&gt;    }&lt;br /&gt;    @Override&lt;br /&gt;    protected void onPostExecute(Integer result) {&lt;br /&gt;        this.dialog.hide();&lt;br /&gt;        this.alertMissingConnection("Download finished");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @Override&lt;br /&gt;    public void onProgressUpdate(Integer... args) {&lt;br /&gt;        this.dialog.setProgress(args[0].intValue());&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @Override&lt;br /&gt;    protected Integer doInBackground(String... params) {&lt;br /&gt;        try {&lt;br /&gt;            int n_bytes_packet = 0;&lt;br /&gt;            int current_bytes_read = 0;&lt;br /&gt;            int percent = 0;&lt;br /&gt;            int n_total_bytes = this.ucon.getContentLength();&lt;br /&gt;&lt;br /&gt;            BufferedInputStream ios = new BufferedInputStream(this.url.openStream());&lt;br /&gt;            FileOutputStream fos = new FileOutputStream(new File(this.filename));&lt;br /&gt;            byte data[] = new byte[256];&lt;br /&gt;&lt;br /&gt;            while ((n_bytes_packet = ios.read(data)) != -1) {&lt;br /&gt;                current_bytes_read += n_bytes_packet;&lt;br /&gt;                percent =  current_bytes_read * 100 / n_total_bytes;&lt;br /&gt;                fos.write(data, 0, n_bytes_packet);&lt;br /&gt;                publishProgress(percent);&lt;br /&gt;            }&lt;br /&gt;            fos.flush();&lt;br /&gt;            fos.close();&lt;br /&gt;            ios.close();&lt;br /&gt;            Log.d("fileManager", "Ok");&lt;br /&gt;        } catch (Exception e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;        return null;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-5697976498867053878?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/5697976498867053878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=5697976498867053878' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/5697976498867053878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/5697976498867053878'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2010/10/string-pathtolocalfile.html' title='Android/Java: Download a file from an URL to sdcard updating a ProgressBar/ProgressDialog'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-3524029958342683687</id><published>2010-10-08T19:04:00.002+02:00</published><updated>2010-10-21T17:38:20.434+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='opencv android gray conversion pixel buffer'/><title type='text'>OpenCV in Android, setup an image from a Bitmap pixel buffer, converting</title><content type='html'>&lt;pre class="brush:java"&gt;JNIEXPORT void JNICALL Java_com_convert(JNIEnv *env,&lt;br /&gt;                                        jobject thiz,&lt;br /&gt;                                        jobject bitmap) {&lt;br /&gt;    const int width = 2592; // You can also get them through JNI&lt;br /&gt;    const int height = 1952;&lt;br /&gt;    IplImage* image = cvCreateImage(cvSize(width, height), IPL_DEPTH_8U, 2);&lt;br /&gt;    cvInitImageHeader(image,&lt;br /&gt;                      cvSize(width, height),&lt;br /&gt;                      IPL_DEPTH_8U, 2, IPL_ORIGIN_BL, 4);&lt;br /&gt;    int *cv_data;&lt;br /&gt;    AndroidBitmap_lockPixels(env, bitmap, (void**)&amp;cv_data);&lt;br /&gt;    cvSetData(image, cv_data, width * 2);&lt;br /&gt;    IplImage* grey_img = cvCreateImage(cvGetSize(image), IPL_DEPTH_8U, 1);&lt;br /&gt;    cvCvtColor(image, grey_img, CV_BGR5652GRAY);&lt;br /&gt;    cvSetData(image, NULL, 0);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    image = grey_img;&lt;br /&gt;    DO_WHAT_YOU_WANT_WITH_YOUR_IMAGE(&amp;image);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    AndroidBitmap_unlockPixels(env, bitmap);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-3524029958342683687?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/3524029958342683687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=3524029958342683687' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/3524029958342683687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/3524029958342683687'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2010/10/opencv-in-android-setup-image-from.html' title='OpenCV in Android, setup an image from a Bitmap pixel buffer, converting'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-9202987074565698808</id><published>2010-10-04T15:23:00.009+02:00</published><updated>2010-10-04T17:24:17.320+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android eclipse installation'/><title type='text'>Releasing Android applications without going through the Market</title><content type='html'>&lt;div style="margin-bottom: 0cm;"&gt;&lt;h1 class="western"&gt;&lt;/h1&gt;It is assumed that the development framework and platform used is Eclipse, with the official Android platform plugins. It is also assumed that your are using Linux, because it's what I'm doing.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;div style="margin-bottom: 0cm;"&gt;Update  the software version in your logging mechanism;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0cm;"&gt;update  the software version in the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;AndroidManifest.xml&lt;/span&gt;  file, it has to be coherent with the version of the previous step;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0cm;"&gt;give  a &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Project-&amp;gt;Clean&lt;/span&gt; just for  the sake of being sure that all is fine;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0cm;"&gt;remember  to update the “linking” of C/C++ libraries in the Java/Android  platform (give a “refresh” with “F5” in the jni/lib  directory, copy and paste jni/lib &lt;span style="font-family: 'Times New Roman', serif;"&gt;also&lt;/span&gt;  into the root path of the project);&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0cm;"&gt;export  the package using Eclipse (with the official Android plugin) using  this package name convention: &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;YOUR_PROJECT_NAME_unaligned.apk&lt;/span&gt;.&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0cm;"&gt;The Eclipse exporter will require  for a key to be created, with security passwords: it's an operation  related to certificates which is very important if the software is  to be released to the official Android market;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol start="6"&gt;&lt;li&gt;&lt;div style="margin-bottom: 0cm;"&gt;align  the software:   &lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;zipalign  -v 4 YOUR_PROJECT_NAME_unaligned.apk YOUR_PROJECT_NAME.apk&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;/span&gt;&lt;/span&gt;It's an operation required by Android applications just before you can use them into the Android mobile phones.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0cm; margin-left: 2.5cm; text-indent: -0.64cm;"&gt;&lt;/div&gt;&lt;h1 class="western"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Installation procedures&lt;/span&gt;&lt;/h1&gt;Installing the application into the Android mobile phones WITHOUT passing through the Market is an easy task.&lt;br /&gt;&lt;h3 class="western"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Cleanup previous releases of the software&lt;/span&gt;&lt;/h3&gt;For the sake of perfection it's better that you cleanup every kind of previous data/files you could have left related to your application: previous releases, directories created, personal configurations, etc.&lt;br /&gt;Two ways to do that:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;using a file  manager/explorer which you will find easily on the Android Market  and delete the files directly from the mobile phone;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;mounting the file system  of your mobile phone onto the Linux development machine and give a&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;rm  -r DIRECTORY_TO_BE_REMOVED&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 class="western"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Upload the application package&lt;/span&gt;&lt;/h3&gt;You have just to upload &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;YOUR_PROJECT_NAME.apk&lt;/span&gt; file into a directory in the mobile phone.&lt;br /&gt;You can do that using two different methods:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;using the DDMS  perspective in the Eclipse framework (“Push a file onto the  device”);&lt;br /&gt;&lt;/li&gt;&lt;li&gt;mounting the file system  of your mobile phone as usb key and copy the project file using your  Linux shell.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 class="western"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Install your application&lt;/span&gt;&lt;/h3&gt;Once you've got you file into the file system of the mobile phone, you can use whatever Application Installer or File Explorer you will find in the Android Market, locate your file and installing it.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-9202987074565698808?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/9202987074565698808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=9202987074565698808' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/9202987074565698808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/9202987074565698808'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2010/10/releasing-android-applications-not.html' title='Releasing Android applications without going through the Market'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-6598259652830752419</id><published>2010-09-11T02:33:00.000+02:00</published><updated>2010-09-11T02:33:39.173+02:00</updated><title type='text'>Compile OpenCV for Android on Linux or Mac, high level hints</title><content type='html'>&lt;a href="http://news.cnet.com/8301-1035_3-20015799-94.html"&gt;Android's market share&lt;/a&gt; is being the most growing among the Operating Systems for smartphones.&lt;br /&gt;&lt;div class="p1"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p1"&gt;OpenCV is&lt;i&gt;&amp;nbsp;&lt;/i&gt;(&lt;a href="http://en.wikipedia.org/wiki/OpenCV"&gt;from Wikipedia&lt;/a&gt;)&amp;nbsp;&lt;i&gt;a computer vision library originally developed by Intel. It is free for use under the open source BSD license. The library is cross-platform. It focuses mainly on real-time image processing.&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="p1"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class="p1"&gt;http://sourceforge.net/projects/opencvlibrary/&lt;/div&gt;&lt;div class="p1"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p1"&gt;The initial revision of OpenCV was in C, with the latest revision C++ has been introduced in many sections of the code.&lt;/div&gt;&lt;div class="p1"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;a href="http://developer.android.com/sdk/ndk/index.html"&gt;Android NDK&lt;/a&gt; is the developer toolkit to plug C and C++ code into an Android application, whose default implementation language is Java (which works upon the Dalvik virtual machine, created for Android).&lt;/div&gt;&lt;div class="p1"&gt;It must be used together with the &lt;a href="http://developer.android.com/sdk/index.html"&gt;Android SDK&lt;/a&gt;, which is the development framework for you Android/Java applications.&lt;/div&gt;&lt;div class="p1"&gt;Your C++ code should be used as a library which communicates (through JNI, &lt;a href="http://en.wikipedia.org/wiki/Java_Native_Interface"&gt;Java Native Interface&lt;/a&gt;) to the Java layer.&lt;/div&gt;&lt;div class="p1"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p1"&gt;The main problem in order to get OpenCV compiling on Android relies on the fact that the Android NDK doesn't provide a full standard C++ ("Minimal set of headers for C++ support"), for example exceptions can't be used in the Android C++. It's probably a way to discourage people from using C++ as a native language for the Android applications. Or maybe it's because Google &lt;a href="http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml"&gt;doesn't like C++ exceptions&lt;/a&gt;, especially in an embedded system context.&lt;/div&gt;&lt;div class="p1"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p1"&gt;Luckily, there are some guys who got full C++ working for Android, you just have to download it and compile.&lt;/div&gt;&lt;div class="p1"&gt;To use that, you have to download a tweaked C++ Android NDK, from Crystax site:&lt;/div&gt;&lt;div class="p1"&gt;&lt;a href="http://www.crystax.net/android/ndk-r4.php"&gt;http://www.crystax.net/android/ndk-r4.php&lt;/a&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p1"&gt;What you finally need is also OpenCV, ported to Android&lt;/div&gt;&lt;div class="p1"&gt;&lt;a href="http://billmccord.github.com/OpenCV-Android/"&gt;http://billmccord.github.com/OpenCV-Android/&lt;/a&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;Now you have to install the "Crystax" Android NDK as it was the official one, following the related guide:&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;a href="http://developer.android.com/sdk/ndk/index.html"&gt;http://developer.android.com/sdk/ndk/index.html&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p1"&gt;You have to compile OpenCV with the Android NDK, considering it as a NDK application (check the &lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;samples&lt;/span&gt; in the ndk directory). The OpenCV for Android zip already contains the files/scripts to be compiled in that way.&lt;/div&gt;&lt;div class="p1"&gt;If you want to embed your custom C++ code in it, you can easily do that, modifying the &lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Android.mk&lt;/span&gt; file and restructuring the hierarchy of the directories in your project.&lt;/div&gt;&lt;div class="p1"&gt;In my case, I simply added a subdirectory to the OpenCV one, moved there all my source code, and compiled it together with OpenCV.&lt;/div&gt;&lt;div class="p1"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="p1"&gt;Final note: remember&amp;nbsp;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; line-height: 15px;"&gt;APP_ABI :=&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; line-height: 15px;"&gt;&lt;em style="font-style: normal; font-weight: bold;"&gt;armeabi armeabi&lt;/em&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; line-height: 15px;"&gt;-&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; line-height: 15px;"&gt;&lt;em style="font-style: normal; font-weight: bold;"&gt;v7a&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="line-height: 15px;"&gt;&lt;em style="font-style: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;in the file Applications.mk if your mobile cpu supports it; your application will run much faster!&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="p1"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-6598259652830752419?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/6598259652830752419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=6598259652830752419' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/6598259652830752419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/6598259652830752419'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2010/09/compile-opencv-for-android-on-linux-or.html' title='Compile OpenCV for Android on Linux or Mac, high level hints'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-6210672424661959249</id><published>2010-09-03T22:34:00.001+02:00</published><updated>2010-09-03T22:35:50.896+02:00</updated><title type='text'>Sapthesis, a LaTeX class for your theses</title><content type='html'>&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, sans-serif; font-size: 13px; line-height: 17px;"&gt;&lt;i&gt;&lt;b&gt;sapthesis.cls&lt;/b&gt;.&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, sans-serif; font-size: 13px; line-height: 17px;"&gt;&lt;i&gt;A class for the typesetting of the Ph.D., master and bachelor theses of the "Sapienza - University of Rome".&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, sans-serif; font-size: 13px; line-height: 17px;"&gt;&lt;i&gt;&lt;a href="http://biccari.altervista.org/c/informatica/latex/sapthesis.php"&gt;http://biccari.altervista.org/c/informatica/latex/sapthesis.php&lt;/a&gt;&lt;/i&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-6210672424661959249?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/6210672424661959249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=6210672424661959249' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/6210672424661959249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/6210672424661959249'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2010/09/sapthesis-latex-class-for-your-theses.html' title='Sapthesis, a LaTeX class for your theses'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-6966924969656478185</id><published>2010-08-27T09:44:00.002+02:00</published><updated>2010-10-12T10:07:22.875+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python script'/><title type='text'>Replace a string in a list of files</title><content type='html'>&lt;pre class="brush: python"&gt;#!/usr/bin/python&lt;br /&gt;import fileinput, glob, string, sys, os&lt;br /&gt;from os.path import join&lt;br /&gt;# replace a string in multiple files&lt;br /&gt;#filesearch.py&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if len(sys.argv) &lt; 2:&lt;br /&gt;    print "usage: %s search_text replace_text directory" % os.path.basename(sys.argv[0])&lt;br /&gt;    sys.exit(0)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;stext = sys.argv[1]&lt;br /&gt;rtext = sys.argv[2]&lt;br /&gt;if len(sys.argv) ==4:&lt;br /&gt;    path = join(sys.argv[3],"*")&lt;br /&gt;else:&lt;br /&gt;    path = "*"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;print "finding: " + stext + " replacing with: " + rtext + " in: " + path&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;files = [filename for filename in os.listdir(".") if not os.path.isdir(filename) and (filename[-4:] == ".cpp" or filename[-2:] == ".h")  ]#glob.glob(path)&lt;br /&gt;print files&lt;br /&gt;for line in fileinput.input(files,inplace=1):&lt;br /&gt;  lineno = 0&lt;br /&gt;  lineno = string.find(line, stext)&lt;br /&gt;  if lineno &gt;0:&lt;br /&gt;        line =line.replace(stext, rtext)&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-6966924969656478185?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/6966924969656478185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=6966924969656478185' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/6966924969656478185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/6966924969656478185'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2010/08/replace-string-in-list-of-files.html' title='Replace a string in a list of files'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-4096303594954661091</id><published>2010-08-27T09:39:00.004+02:00</published><updated>2010-10-12T10:08:39.381+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python script'/><title type='text'>Create a series of md5 digests from a file</title><content type='html'>You can create md5 digests from a file, each line in the file is a different digest.&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/appunti/createmd5.py"&gt;www.bonifazi.eu/appunti/createmd5.py&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: python"&gt;#!/usr/bin/python&lt;br /&gt;import hashlib&lt;br /&gt;import sys&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;f = open("my_lines.txt", "r")&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;for line in f.readlines():&lt;br /&gt;    line = line.strip()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    m = hashlib.md5()&lt;br /&gt;    m.update(line)&lt;br /&gt;    print(line + ":::" + m.hexdigest())&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;f.close()&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-4096303594954661091?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/4096303594954661091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=4096303594954661091' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/4096303594954661091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/4096303594954661091'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2010/08/create-series-of-md5-digests-from-file.html' title='Create a series of md5 digests from a file'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-878632098994764383</id><published>2010-08-23T23:55:00.001+02:00</published><updated>2010-08-25T14:33:55.277+02:00</updated><title type='text'>Discover the largest product of five consecutive digits in the 1000-digit number.</title><content type='html'>The code is a bit awful and not optimized... Python is really easier to work with in order to solve these kinds of algos!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/2010/euler/8_max_product/product.cpp"&gt;product.cpp&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/2010/euler/8_max_product/string.txt"&gt;string.txt&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;g++ -o product product.cpp&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-878632098994764383?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/878632098994764383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=878632098994764383' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/878632098994764383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/878632098994764383'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2010/08/discover-largest-product-of-five.html' title='Discover the largest product of five consecutive digits in the 1000-digit number.'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-4039872116475169825</id><published>2010-08-23T00:05:00.000+02:00</published><updated>2010-08-23T00:05:45.099+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='euler'/><title type='text'>Prime numbers generator</title><content type='html'>It's just a first C++ implementation for the &lt;a href="http://projecteuler.net/"&gt;Euler Project&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/2010/euler/7_prime_generator/primes.cpp"&gt;primes.cpp&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/2010/euler/7_prime_generator/primes.h"&gt;primes.h&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In order to compile:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;g++ -o prime primes.cpp&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-4039872116475169825?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/4039872116475169825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=4039872116475169825' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/4039872116475169825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/4039872116475169825'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2010/08/prime-numbers-generator.html' title='Prime numbers generator'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-3058589907561110699</id><published>2010-08-21T03:34:00.000+02:00</published><updated>2010-08-21T03:34:25.309+02:00</updated><title type='text'>Python, PyGtk, PyOpenGL, PyWin32 all in one installer</title><content type='html'>After Gtk+ Installer, I realized also a PyGtk all in one installer, for Python 2.6&amp;nbsp;&lt;a href="http://www.python.org/download/windows/"&gt;http://www.python.org/download/windows/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can download it from here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/appunti/pygtk_windows_installer.exe"&gt;pygtk_windows_installer.exe&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It is simply an assembling of all the different installers I previously downloaded (which are executed step by step), and you can choose.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I realized this installer using EclipseNSIS and compiling the script generated by &lt;a href="http://nsis.sourceforge.net/"&gt;NSIS.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Then, the script I created and that you can compile and modify using NSIS is the following:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/appunti/pygtk_windows_installer.nsi"&gt;pygtk_windows_installer.nsi&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.blogger.com/www.bonifazi.eu/appunti/2008/02/gtk-glade-gtkglext-all-in-one-windows.html"&gt;Gtk all in one installer&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.20/pygobject-2.20.0.win32-py2.6.exe"&gt;pygobject-2.20.0.win32-py2.6.exe&lt;/a&gt;&lt;br /&gt;&lt;a href="http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/1.8/pycairo-1.8.6.win32-py2.6.exe"&gt;pycairo-1.8.6.win32-py2.6.exe&lt;/a&gt;&lt;br /&gt;&lt;a href="http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.16/pygtk-2.16.0+glade.win32-py2.6.exe"&gt;pygtk-2.16.0+glade.win32-py2.6.exe&lt;/a&gt;&lt;br /&gt;&lt;a href="https://sourceforge.net/projects/pyopengl/files/PyOpenGL/3.0.1/PyOpenGL-3.0.1.zip/download"&gt;PyOpenGL-3.0.1.zip&lt;/a&gt;&lt;br /&gt;&lt;a href="https://sourceforge.net/projects/pywin32/files/pywin32/Build%20214/pywin32-214.win32-py2.6.exe/download"&gt;pywin32-214.win32-py2.6.exe&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I'll try to keep update this installer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-3058589907561110699?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/3058589907561110699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=3058589907561110699' title='33 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/3058589907561110699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/3058589907561110699'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2009/04/python-pygtk-pyopengl-pygtkglext.html' title='Python, PyGtk, PyOpenGL, PyWin32 all in one installer'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>33</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-4891095661179886825</id><published>2010-08-21T03:28:00.001+02:00</published><updated>2010-08-24T09:15:57.632+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gtk'/><category scheme='http://www.blogger.com/atom/ns#' term='gtkglext'/><category scheme='http://www.blogger.com/atom/ns#' term='glade'/><category scheme='http://www.blogger.com/atom/ns#' term='gl2ps'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGl'/><category scheme='http://www.blogger.com/atom/ns#' term='binaries'/><title type='text'>Gtk+ 2.20, Glade 3.7.1, GtkGlExt 1.2.0 all in one Windows installer</title><content type='html'>I created an all in one Windows installer,&lt;br /&gt;for using Gtk+ libraries,&lt;br /&gt;also with Glade 3.7.1 (GUI visual creation) and&lt;br /&gt;GtkGlExt (OpenGl embedded in a GtkDrawingArea).&lt;br /&gt;&lt;br /&gt;You can download the Gtk+, Glade, GtkGlExt global installer from this links:&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/appunti/gtk_installer.exe"&gt;Gtk+, Glade, GtkGlext all in one Windows installer&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The installer simply copies the files into a Gtk directory, updating PATH environment variable.&lt;br /&gt;&lt;br /&gt;Optionally, you can also get the different parts of the dlls which form the previous installer from the following links:&lt;br /&gt;&lt;a href="http://www.gtk.org/download-windows.html"&gt;Gtk+ for Windows&lt;/a&gt;&lt;br /&gt;&lt;a href="http://sourceforge.net/projects/gladewin/"&gt;Glade 3.7.1 zip for Windows&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/appunti/gtkglext-win32-1.2.0.exe"&gt;GtkGlExt installer for Windows&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;All the libraries are updated to the last version of today, and they seem to be perfectly useful (my project works very well).&lt;br /&gt;I'll try to mantain here the most updated files.&lt;br /&gt;&lt;br /&gt;You can view the licenses from those links.&lt;br /&gt;&lt;br /&gt;The installer was created using&lt;br /&gt;&lt;a href="http://nsis.sourceforge.net/"&gt;NSIS (Nullsoft Scriptable Install System&lt;/a&gt;&lt;br /&gt;with its &lt;a href="http://nsis.sourceforge.net/EclipseNSIS_-_NSIS_plugin_for_Eclipse"&gt;Eclipse plugin&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The script file generated and compiled to create the installer is the following&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/appunti/setup_gtk.nsi"&gt;setup_gtk.nsi&lt;/a&gt;&lt;br /&gt;which uses this one as well&lt;br /&gt;&lt;a href="http://nsis.sourceforge.net/mediawiki/images/a/ad/EnvVarUpdate.7z"&gt;EnvVarUpdate.7z&lt;/a&gt;&lt;br /&gt;(have a look at this page for path settings:&amp;nbsp;&lt;a href="http://nsis.sourceforge.net/Environmental_Variables:_append,_prepend,_and_remove_entries"&gt;/Environmental_Variables&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Updating this installer is easy!&lt;br /&gt;It is simple to maintain by everybody.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;You must only install NSIS,&lt;/li&gt;&lt;li&gt;take the Windows binaries of the different tools from the official links,&lt;/li&gt;&lt;li&gt;put them in c:\program files\GTK directory,&lt;/li&gt;&lt;li&gt;compile setup_gtk.nsi file here aboveI updated.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Updated to the date of this post with the latest libraries:&lt;br /&gt;&lt;br /&gt;Glade     3.7.1!&lt;br /&gt;Libglade  2.6.4&lt;br /&gt;GLib     2.24.0&lt;br /&gt;GTK+     2.20.0&lt;br /&gt;Pango    1.28.0&lt;br /&gt;ATK      1.30.0&lt;br /&gt;Cairo    1.8.10&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-4891095661179886825?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/4891095661179886825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=4891095661179886825' title='21 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/4891095661179886825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/4891095661179886825'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2009/11/gtk-glade-gtkglext-all-in-one-windows.html' title='Gtk+ 2.20, Glade 3.7.1, GtkGlExt 1.2.0 all in one Windows installer'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>21</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-6431546099559504855</id><published>2010-07-15T22:59:00.001+02:00</published><updated>2010-07-16T00:30:13.769+02:00</updated><title type='text'>OpenCL links</title><content type='html'>&lt;ul&gt;&lt;li&gt;http://en.wikipedia.org/wiki/OpenCL &lt;/li&gt;&lt;li&gt;Ibm: &lt;a href="http://www.alphaworks.ibm.com/tech/opencl/download"&gt;http://www.alphaworks.ibm.com/tech/opencl/download&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Amd: &lt;a href="http://developer.amd.com/zones/OpenCLZone/Pages/default.aspx"&gt;http://developer.amd.com/zones/OpenCLZone/Pages/default.aspx&lt;/a&gt;&lt;/li&gt;&lt;li&gt;NVidia: &lt;a href="http://www.nvidia.com/object/cuda_opencl_new.html"&gt;http://www.nvidia.com/object/cuda_opencl_new.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Khronos Group: &lt;a href="http://www.khronos.org/opencl/"&gt;http://www.khronos.org/opencl/&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-6431546099559504855?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/6431546099559504855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=6431546099559504855' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/6431546099559504855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/6431546099559504855'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2010/07/opencl-links.html' title='OpenCL links'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-3071555513802513724</id><published>2010-07-15T15:40:00.002+02:00</published><updated>2010-07-15T15:40:33.046+02:00</updated><title type='text'>Code optimization, C++</title><content type='html'>&lt;a href="http://www.agner.org/optimize/"&gt;http://www.agner.org/optimize/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-3071555513802513724?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/3071555513802513724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=3071555513802513724' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/3071555513802513724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/3071555513802513724'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2010/07/code-optimization-c.html' title='Code optimization, C++'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-5698099915665259263</id><published>2010-06-15T17:16:00.003+02:00</published><updated>2010-07-15T12:19:50.822+02:00</updated><title type='text'>OProfile + Gprof2Dot commands in order to get wonderful profiling graphs</title><content type='html'>opcontrol --reset&lt;br /&gt;&lt;div&gt;opcontrol --start&lt;br /&gt;[run your application]&lt;/div&gt;&lt;div&gt;opcontrol --shutdown&lt;/div&gt;&lt;div&gt;opreport -cg ./my_test /usr/lib/my_libraries | python gprof2dot.py -f oprofile | dot -Tpng -o output.png&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://oprofile.sourceforge.net/news/"&gt;http://oprofile.sourceforge.net/news/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://code.google.com/p/jrfonseca/wiki/Gprof2Dot"&gt;http://code.google.com/p/jrfonseca/wiki/Gprof2Dot&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://gprof2dot.jrfonseca.googlecode.com/hg/gprof2dot.py"&gt;http://gprof2dot.jrfonseca.googlecode.com/hg/gprof2dot.py&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-5698099915665259263?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/5698099915665259263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=5698099915665259263' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/5698099915665259263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/5698099915665259263'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2010/06/oprofile-gprof2dot-commands-in-order.html' title='OProfile + Gprof2Dot commands in order to get wonderful profiling graphs'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-6418113258144859055</id><published>2010-06-15T14:41:00.001+02:00</published><updated>2010-06-15T14:41:41.104+02:00</updated><title type='text'>Check the memory heap usage and its maximum (peak)</title><content type='html'>&lt;div class="gmail_quote"&gt;It&amp;#39;s very useful to know the memory heap usage of an application.&lt;div&gt;The Massif tool of Valgrind framework gives you back some screenshots (you can tweak their frequency quite easily) related to the amount of the memory heap used at that moment.&lt;/div&gt;  &lt;div&gt;It is very useful when you have limited memory per application/process.&lt;/div&gt;&lt;div&gt;&lt;font color="#222222" face="Arial, Verdana, Tahoma, &amp;#39;Trebuchet MS&amp;#39;, sans-serif, Georgia, Courier, &amp;#39;Times New Roman&amp;#39;, serif"&gt;&lt;span style="line-height:20px"&gt;&lt;font color="#000000" face="arial"&gt;&lt;span style="line-height:normal"&gt;&lt;a href="http://valgrind.org/docs/manual/ms-manual.html" target="_blank"&gt;http://valgrind.org/docs/manual/ms-manual.html&lt;/a&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;  &lt;div&gt;&lt;font color="#222222" face="Arial, Verdana, Tahoma, &amp;#39;Trebuchet MS&amp;#39;, sans-serif, Georgia, Courier, &amp;#39;Times New Roman&amp;#39;, serif"&gt;&lt;span style="line-height:20px"&gt;&lt;font color="#000000" face="arial"&gt;&lt;br&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#222222" face="Arial, Verdana, Tahoma, &amp;#39;Trebuchet MS&amp;#39;, sans-serif, Georgia, Courier, &amp;#39;Times New Roman&amp;#39;, serif"&gt;&lt;span style="line-height:20px"&gt;&lt;font color="#000000" face="arial"&gt;Here are the commands:&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;  &lt;div&gt;&lt;font color="#222222" face="Arial, Verdana, Tahoma, &amp;#39;Trebuchet MS&amp;#39;, sans-serif, Georgia, Courier, &amp;#39;Times New Roman&amp;#39;, serif"&gt;&lt;span style="line-height:20px"&gt;&lt;font color="#000000" face="arial"&gt;&lt;br&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#222222" face="Arial, Verdana, Tahoma, &amp;#39;Trebuchet MS&amp;#39;, sans-serif, Georgia, Courier, &amp;#39;Times New Roman&amp;#39;, serif"&gt;&lt;span style="line-height:20px"&gt;&lt;font color="#000000" face="arial"&gt;valgrind --tool=massif --detailed-freq=1 ./test_application&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;  &lt;div&gt;&lt;font color="#222222" face="Arial, Verdana, Tahoma, &amp;#39;Trebuchet MS&amp;#39;, sans-serif, Georgia, Courier, &amp;#39;Times New Roman&amp;#39;, serif"&gt;&lt;span style="line-height:20px"&gt;&lt;font color="#000000" face="arial"&gt;ms_print massif.out.xxx &amp;gt; log.txt&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-6418113258144859055?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/6418113258144859055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=6418113258144859055' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/6418113258144859055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/6418113258144859055'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2010/06/check-memory-heap-usage-and-its-maximum.html' title='Check the memory heap usage and its maximum (peak)'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-1517423286956812287</id><published>2009-12-27T16:59:00.005+01:00</published><updated>2009-12-27T17:21:06.952+01:00</updated><title type='text'>2008 -  mpydxf: Marco's Python Dxf</title><content type='html'>&lt;a href="http://www.bonifazi.eu/2008/mpydxf/"&gt;Python Library for creating Data Exchange Format (Dxf) files for AutoCad drawings&lt;/a&gt;, with many primitives &lt;br /&gt;&lt;a href="http://code.google.com/p/mpydxf/"&gt;MPyDxf Google Code&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-1517423286956812287?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/1517423286956812287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=1517423286956812287' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/1517423286956812287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/1517423286956812287'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2009/12/2008-mpydxf-marcos-python-dxf.html' title='2008 -  mpydxf: Marco&apos;s Python Dxf'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-9083542619847830779</id><published>2009-12-27T16:59:00.001+01:00</published><updated>2009-12-27T17:00:20.104+01:00</updated><title type='text'>2007 - Orthogonal graph drawings</title><content type='html'>&lt;a href="http://www.bonifazi.eu/2007/grafi/"&gt;Application for creating segments, arcs, knots, grids &lt;/a&gt;and minimize orthogonal graph drawings, area compactation &lt;br /&gt;&lt;a href="http://code.google.com/p/mago/"&gt;Mago Google Code&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-9083542619847830779?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/9083542619847830779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=9083542619847830779' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/9083542619847830779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/9083542619847830779'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2009/12/2007-orthogonal-graph-drawings.html' title='2007 - Orthogonal graph drawings'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-3378838052119194391</id><published>2009-12-27T16:58:00.003+01:00</published><updated>2009-12-27T17:00:45.247+01:00</updated><title type='text'>2006 - Cryptography</title><content type='html'>&lt;a href="http://www.bonifazi.eu/2006/crittografia/"&gt;Theory of prime numbers, RSA&lt;/a&gt;: course project at university&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-3378838052119194391?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/3378838052119194391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=3378838052119194391' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/3378838052119194391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/3378838052119194391'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2009/12/2006-cryptography.html' title='2006 - Cryptography'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-9019929789871736641</id><published>2009-12-27T16:58:00.001+01:00</published><updated>2009-12-27T16:58:16.112+01:00</updated><title type='text'>2006 - Minimal application for degrees conversion</title><content type='html'>&lt;a href="http://www.bonifazi.eu/2006/python/"&gt;PyGtk, Glade, Python used together &lt;/a&gt;for converting temperature degrees representations: Celsius, Fahreneit, Reaumur, Kelvin&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-9019929789871736641?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/9019929789871736641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=9019929789871736641' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/9019929789871736641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/9019929789871736641'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2009/12/2006-minimal-application-for-degrees.html' title='2006 - Minimal application for degrees conversion'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-341558833179867934</id><published>2009-12-27T16:57:00.001+01:00</published><updated>2009-12-27T16:57:39.646+01:00</updated><title type='text'>2005 - Computer Networks</title><content type='html'>&lt;a href="http://www.bonifazi.eu/2005/impiantielaborazione/"&gt;Analysis of the American Airlines website&lt;/a&gt;: traceroute, whois, sniffing, ping, autonomous system - Simulation of a 15 Autonomous Systems network, 25 routers with &lt;a href="http://www.netkit.org/"&gt;Netkit&lt;/a&gt;, test of BGP dampening effect&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-341558833179867934?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/341558833179867934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=341558833179867934' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/341558833179867934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/341558833179867934'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2009/12/2005-computer-networks.html' title='2005 - Computer Networks'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-1667881050431819361</id><published>2009-12-27T16:56:00.003+01:00</published><updated>2009-12-27T16:57:06.070+01:00</updated><title type='text'>2005 - Computer graphics</title><content type='html'>&lt;a href="http://www.bonifazi.eu/2005/informaticagrafica/"&gt;OpenGL: a simple room and the implementation of convex hull algorithm&lt;/a&gt;, robot and table, traversal algorithm, texture, lighting&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-1667881050431819361?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/1667881050431819361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=1667881050431819361' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/1667881050431819361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/1667881050431819361'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2009/12/2005-computer-graphics.html' title='2005 - Computer graphics'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-7007474077581537903</id><published>2009-12-27T16:56:00.001+01:00</published><updated>2009-12-27T16:56:27.828+01:00</updated><title type='text'>2005 - Databases</title><content type='html'>&lt;a href="http://www.bonifazi.eu/2005/tecnologiabasidati/"&gt;Testing queries against DB2 tables&lt;/a&gt;, from OLTP to OLAP: feeding of Datamarts, DB2 datawarehouse module&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-7007474077581537903?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/7007474077581537903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=7007474077581537903' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/7007474077581537903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/7007474077581537903'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2009/12/2005-databases.html' title='2005 - Databases'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-2361586176412914469</id><published>2009-12-27T16:55:00.003+01:00</published><updated>2009-12-27T16:55:51.657+01:00</updated><title type='text'>2005 - Concurrent programming</title><content type='html'>&lt;a href="http://www.bonifazi.eu/2005/sistemioperativi2/"&gt;Mini webserver in Linux C&lt;/a&gt;, handling of fixed pool of thread, synchonization of threads with condition variables.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-2361586176412914469?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/2361586176412914469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=2361586176412914469' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/2361586176412914469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/2361586176412914469'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2009/12/2005-concurrent-programming.html' title='2005 - Concurrent programming'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-855643784159011404</id><published>2009-12-27T16:55:00.001+01:00</published><updated>2009-12-27T16:55:17.474+01:00</updated><title type='text'>2005 - Digital processing</title><content type='html'>&amp;nbsp;&lt;a href="http://www.bonifazi.eu/2005/controllodigitale/"&gt;Created PID discrete controller&lt;/a&gt;, in Matlab&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-855643784159011404?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/855643784159011404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=855643784159011404' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/855643784159011404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/855643784159011404'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2009/12/2005-digital-processing.html' title='2005 - Digital processing'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-7239281037736852094</id><published>2009-12-27T16:54:00.001+01:00</published><updated>2009-12-27T16:54:40.021+01:00</updated><title type='text'>2004 - Bachelor's degree, Thesis</title><content type='html'>&lt;a href="http://www.bonifazi.eu/2004/tesi/"&gt;Introduction to the element finite methods&lt;/a&gt;, examples in Femlab e Catia, comparison&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-7239281037736852094?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/7239281037736852094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=7239281037736852094' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/7239281037736852094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/7239281037736852094'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2009/12/2004-bachelors-degree-thesis.html' title='2004 - Bachelor&apos;s degree, Thesis'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-4847184253415248909</id><published>2009-12-27T16:52:00.000+01:00</published><updated>2009-12-27T16:53:46.104+01:00</updated><title type='text'>2004 - Distributed systems</title><content type='html'>&lt;a href="http://www.bonifazi.eu/2004/sistemidistribuiti/"&gt;Web application&lt;/a&gt; for secretary's office: Java, JSP, servlet, Torque, Postgres, MVC&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-4847184253415248909?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/4847184253415248909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=4847184253415248909' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/4847184253415248909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/4847184253415248909'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2009/12/distributed-systems.html' title='2004 - Distributed systems'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-8675822310669026950</id><published>2009-11-01T12:45:00.000+01:00</published><updated>2009-12-27T18:38:06.015+01:00</updated><title type='text'>Glade 3.6.7 for Windows, installer</title><content type='html'>I've compiled Glade 3.6.7 for Windows.&lt;br /&gt;&lt;br /&gt;Also the new libglade 2.6.4 has been compiled for Windows and included in the package.&lt;br /&gt;&lt;br /&gt;You simply have to unzip the following file into Gtk directory:&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/appunti/glade3.zip"&gt;glade3.zip&lt;/a&gt;&lt;br /&gt;I've created an installer, but it you have to remember that Glade works only with GTK libraries properly installed.&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/appunti/Glade3_Setup.exe"&gt;Glade-3.6.7_setup.exe&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For compiling I've used the guide in this link:&lt;br /&gt;&lt;a href="http://gpz500.wordpress.com/2008/04/18/glade3-per-windows/"&gt;http://gpz500.wordpress.com/2008/04/18/glade3-per-windows/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you need an all in one installer you can use the Gtk one of mine, I've update including Glade:&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/appunti/gtk_installer.exe"&gt;GTK-2.16.5 installer&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-8675822310669026950?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/8675822310669026950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=8675822310669026950' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/8675822310669026950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/8675822310669026950'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2009/11/glade-367-for-windows-installer.html' title='Glade 3.6.7 for Windows, installer'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-2489480675177905496</id><published>2008-03-24T11:28:00.000+01:00</published><updated>2009-12-27T18:38:06.019+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gtk'/><category scheme='http://www.blogger.com/atom/ns#' term='gtkglext'/><category scheme='http://www.blogger.com/atom/ns#' term='Gentoo'/><category scheme='http://www.blogger.com/atom/ns#' term='glade'/><category scheme='http://www.blogger.com/atom/ns#' term='gl2ps'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGl'/><category scheme='http://www.blogger.com/atom/ns#' term='installer'/><category scheme='http://www.blogger.com/atom/ns#' term='binaries'/><title type='text'>Simple C Gtk Project in DevCpp</title><content type='html'>I tried to compile a simple C Gtk Project in DevCpp.&lt;br /&gt;There are many things to do, especially about Include dirs, Lib dirs.&lt;br /&gt;I updated also a new &lt;a href="http://www.bonifazi.eu/appunti/gtk_installer.exe"&gt;Gtk installer&lt;/a&gt;, because I insert new include files that there weren't before and that created errors in compiling.&lt;br /&gt;&lt;br /&gt;The fastest way to explain, I think, is to upload the &lt;a href="http://www.bonifazi.eu/appunti/Simple_gtk_project.dev"&gt;Simple_gtk_project.dev&lt;/a&gt; with the source &lt;a href="http://www.bonifazi.eu/appunti/simple_gtk_main.c"&gt;simple_gtk_main.c&lt;/a&gt;&lt;br /&gt;This file was used on my Italian Windows XP pc, then it has wrong links that you must substitute with yours.&lt;br /&gt;Then you must change, in .dev, file all "C:\Programmi\Gtk" with your Gtk home dir (for example "C:\Program files\Gtk").&lt;br /&gt;&lt;br /&gt;If you want to do by yourself I can suggest some hints:&lt;br /&gt;&lt;br /&gt;you must enter in "Project Options" menu&lt;br /&gt;&lt;br /&gt;in "Parameters" tab, you must set Compiler and Linker options:&lt;br /&gt;&lt;br /&gt;in Compiler area insert "-mms-bitfields"&lt;br /&gt;&lt;br /&gt;in Linker area you must insert all libraries (dll) which are in your "GTK\bin" dir:&lt;br /&gt;-lm&lt;br /&gt;-lbzip2&lt;br /&gt;-lcharset&lt;br /&gt;-lfreetype6&lt;br /&gt;-lglut32&lt;br /&gt;-liconv&lt;br /&gt;-lintl&lt;br /&gt;-ljpeg62&lt;br /&gt;-lart_lgpl_2-2&lt;br /&gt;-latk-1.0-0&lt;br /&gt;-lcairo-2&lt;br /&gt;-lcroco-0.6-3&lt;br /&gt;-lexpat&lt;br /&gt;-lfontconfig-1&lt;br /&gt;-lfreetype-6&lt;br /&gt;-lgdk-win32-2.0-0&lt;br /&gt;-lgdkglext-win32-1.0-0&lt;br /&gt;-lgdk_pixbuf-2.0-0&lt;br /&gt;-lgio-2.0-0&lt;br /&gt;-lglade-2.0-0&lt;br /&gt;-lgladeui-1-7&lt;br /&gt;-lglib-2.0-0&lt;br /&gt;-lgmodule-2.0-0&lt;br /&gt;-lgobject-2.0-0&lt;br /&gt;-lgsf-1-114&lt;br /&gt;-lgsf-win32-1-114&lt;br /&gt;-lgthread-2.0-0&lt;br /&gt;-lgtk-win32-2.0-0&lt;br /&gt;-lgtkglext-win32-1.0-0&lt;br /&gt;-lpango-1.0-0&lt;br /&gt;-lpangocairo-1.0-0&lt;br /&gt;-lpangoft2-1.0-0&lt;br /&gt;-lpangowin32-1.0-0&lt;br /&gt;-lpng12&lt;br /&gt;-lpng13&lt;br /&gt;-ltiff3&lt;br /&gt;-lxml2&lt;br /&gt;-lzlib1&lt;br /&gt;-l_gl2ps_sw&lt;br /&gt;&lt;br /&gt;in Files/Dirs tab you must set:&lt;br /&gt;in Library dirs subtab: your "GTK\bin" dir&lt;br /&gt;&lt;br /&gt;In my case&lt;br /&gt;c:\Programmi\Gtk\bin&lt;br /&gt;&lt;br /&gt;in Include dirs subtab you must set all the subdirs in "GTK\include"your "GTK\include" dir&lt;br /&gt;&lt;br /&gt;In my case they are:&lt;br /&gt;c:\Programmi\Gtk\include\gtk-2.0;&lt;br /&gt;c:\Programmi\Gtk\include\cairo;&lt;br /&gt;c:\Programmi\Gtk\include\glib-2.0;&lt;br /&gt;c:\Programmi\Gtk\include\atk-1.0;&lt;br /&gt;c:\Programmi\Gtk\include\libxml;&lt;br /&gt;c:\Programmi\Gtk\include\pango-1.0;&lt;br /&gt;c:\Programmi\Gtk\include\libgladeui-10&lt;br /&gt;&lt;br /&gt;Nothing else, it seems to compile and execute fine.&lt;br /&gt;&lt;br /&gt;The exe file I generated is here:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/appunti/Simple_gtk_project.exe"&gt;Simple_gtk_project.exe&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-2489480675177905496?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/2489480675177905496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=2489480675177905496' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/2489480675177905496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/2489480675177905496'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2008/03/simple-c-gtk-project-in-devcpp.html' title='Simple C Gtk Project in DevCpp'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-5288484964544080263</id><published>2008-03-18T11:50:00.000+01:00</published><updated>2009-12-27T18:38:06.020+01:00</updated><title type='text'>Stupid file list</title><content type='html'>Creates a dir.txt with the content list (files and dirs) of the current dir.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/appunti/file_list.py"&gt;file_list.py&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-5288484964544080263?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/5288484964544080263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=5288484964544080263' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/5288484964544080263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/5288484964544080263'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2008/03/stupid-file-list.html' title='Stupid file list'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-1973999777020708399</id><published>2007-05-19T03:23:00.000+02:00</published><updated>2009-12-27T18:38:06.021+01:00</updated><title type='text'>Distro Linux Time Line</title><content type='html'>&lt;a href="http://img242.imageshack.us/img242/6591/44218linuxdistrotimelingu6.png"&gt;Distro Linux Time Line&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-1973999777020708399?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/1973999777020708399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=1973999777020708399' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/1973999777020708399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/1973999777020708399'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2007/05/distro-linux-time-line.html' title='Distro Linux Time Line'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-2425351931966185130</id><published>2007-05-02T22:47:00.000+02:00</published><updated>2009-12-27T18:38:06.023+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gtk'/><category scheme='http://www.blogger.com/atom/ns#' term='gtkglext'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGl'/><category scheme='http://www.blogger.com/atom/ns#' term='binaries'/><title type='text'>PyGtkGlExt, a simple OpenGl box in a PyGtk Window</title><content type='html'>It is an example of a Python application with a Gtk GUI with an embedded OpenGl box.&lt;br /&gt;This fusion is allowed thanks to GtkGlExt library and all Python wrappers of these ones.&lt;br /&gt;&lt;br /&gt;GUI and run application &lt;a href="http://www.bonifazi.eu/appunti/Draw.py"&gt;Draw.py&lt;/a&gt;&lt;br /&gt;Glade file &lt;a href="http://www.bonifazi.eu/appunti/first_example.glade"&gt;first_example.glade&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To draw the OpenGl area is fundamental to remember the connection of expose/realize/configure events (without them I had serious troubles).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-2425351931966185130?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/2425351931966185130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=2425351931966185130' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/2425351931966185130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/2425351931966185130'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2007/05/pygtkglext-simple-opengl-box-in-pygtk.html' title='PyGtkGlExt, a simple OpenGl box in a PyGtk Window'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-1409480795330941502</id><published>2007-04-21T16:54:00.002+02:00</published><updated>2010-01-03T16:41:02.984+01:00</updated><title type='text'>Vettori in C</title><content type='html'>Gruppo di posizioni di memoria, stesso nome, stesso tipo di dato.&lt;br /&gt;Dichiarazione:&lt;br /&gt;int array[5]&lt;br /&gt;Dichiarazione e inizializzazione:&lt;br /&gt;int array[5] = { 1, 2, 3, 4, 5}&lt;br /&gt;Dichiarazione mancante ma inizializzazione:&lt;br /&gt;int array[] = { 1, 2, 3, 4, 5}&lt;br /&gt;Azzeramento automatico degli elementi del vettore quando ci sono meno inizializzatori della lunghezza dell'array (ma ne serve almeno uno).&lt;br /&gt;&lt;br /&gt;int array[5] = {1,2,3}; corrisponde a&lt;br /&gt;int array[5] = {1, 2, 3, 0, 0};&lt;br /&gt;&lt;br /&gt;Le stringhe sono array di caratteri:&lt;br /&gt;char* prova = "ciao"; corrisponde a&lt;br /&gt;const&amp;nbsp;char* prova = "ciao", che corrisponde a&lt;br /&gt;const char prova[] = {'c', 'i', 'a', 'o', '\0'}&lt;br /&gt;dove '\0' e' il carattere che termina le stringhe&lt;br /&gt;&lt;br /&gt;All'interno di funzioni, se l'array e' "static" allora viene automaticamente inizializzato dal compilatore&lt;br /&gt;&lt;br /&gt;static int a[5]; corrisponde a int a[5] = {0,0,0,0,0} ma solo la prima volta che la funzione viene chiamata (successivamente conserva i valori precedenti, static serve proprio a svincolare la "localita'" della variabile).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Passaggio di vettori a funzioni.&lt;br /&gt;&lt;br /&gt;Passaggio vettori e' per riferimento, in pratica il nome del vettore e' l'indirizzo del primo elemento&lt;br /&gt;&lt;br /&gt;char array[4] ="ciao";&lt;br /&gt;passo(array);&lt;br /&gt;corrisponde a passare&lt;br /&gt;&amp;amp;array[0] oppure&lt;br /&gt;&amp;amp;array&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;modifica_vettore(mio_array, lunghezza_mio_array);&lt;br /&gt;...&lt;br /&gt;void modifica_vettore(int array[], int lunghezza_array);&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Passaggio e' per riferimento (il vettore e' modificabile).&lt;br /&gt;Per rendere il vettore non modificabile la funzione deve essere definita avendo parametro del vettore con const&lt;br /&gt;&lt;blockquote&gt;void modifica_vettore(const int array[], int lunghezza_array);&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Array con permanenza in memoria statica e automatica&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;a href="http://www.bonifazi.eu/appunti/array.c"&gt;array.c&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-1409480795330941502?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/1409480795330941502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=1409480795330941502' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/1409480795330941502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/1409480795330941502'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2007/04/vettori-in-c.html' title='Vettori in C'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-7213882543819722168</id><published>2007-03-31T21:10:00.000+02:00</published><updated>2009-12-27T18:38:06.027+01:00</updated><title type='text'>Script vari Gentoo/Linux</title><content type='html'>HP Pavilion 8051dv, Xpress 200, Amd Turion64&lt;br /&gt;XOrg 7.2&lt;br /&gt;Ati-drivers 8.35&lt;br /&gt;Mesa 6.5.2&lt;br /&gt;Kernel 2.6.19, gentoo-sources&lt;br /&gt;&lt;br /&gt;Xgl&lt;span style="font-size:85%;"&gt;&lt;blockquote&gt;Xgl -fullscreen :1 -audit 0 -ac -accel glx:pbuffer -accel xv:pbuffer &amp; sleep 4&lt;br /&gt;LD_PRELOAD=/usr/lib/opengl/ati/lib/libGL.so LD_LIBRARY_PATH=/usr/lib/opengl/ati/lib/ DISPLAY=:1 beryl-manager&lt;br /&gt;DISPLAY=:1 heliodor &amp;amp;&lt;/blockquote&gt;&lt;/span&gt;Problema Ethernet a soli 10 Mbit&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;ethtool -s eth0 speed 10 duplex full autoneg on&lt;/span&gt;&lt;/blockquote&gt;&lt;a href="http://www.bonifazi.eu/appunti/xorg.conf"&gt;xorg.conf&lt;/a&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;a href="http://www.bonifazi.eu/appunti/fstab"&gt;fstab&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/appunti/grub.conf"&gt;grub.conf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/appunti/make.conf"&gt;make.conf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Kernel&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/appunti/config"&gt;config&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-7213882543819722168?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/7213882543819722168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=7213882543819722168' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/7213882543819722168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/7213882543819722168'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2007/03/script-vari-gentoolinux.html' title='Script vari Gentoo/Linux'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-5952131643744238445</id><published>2007-03-31T20:50:00.000+02:00</published><updated>2009-12-27T18:38:06.029+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gtk'/><category scheme='http://www.blogger.com/atom/ns#' term='gtkglext'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGl'/><category scheme='http://www.blogger.com/atom/ns#' term='binaries'/><title type='text'>GktGlExt 1.2.0 Windows</title><content type='html'>Binari GtkGlExt compilati per Windows32&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/appunti/gtkglext-win32-1.2.0.exe"&gt;gtkglext-win32-1.2.0.exe&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-5952131643744238445?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/5952131643744238445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=5952131643744238445' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/5952131643744238445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/5952131643744238445'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2007/03/gktglext-120-windows.html' title='GktGlExt 1.2.0 Windows'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-7254252959019773875</id><published>2007-03-05T17:15:00.000+01:00</published><updated>2009-12-27T18:38:06.033+01:00</updated><title type='text'>Java plugin in Firefox su Gentoo a 64 bit</title><content type='html'>Non esiste un Java Plugin per Firefox a 64 bit.&lt;br /&gt;Pertanto occorre installarsi Firefox a 32 bit (in un Gentoo a 64 bit quindi si fa "emerge mozilla-firefox-bin").&lt;br /&gt;&lt;br /&gt;Poi occorre prendersi un JRE a 32 bit e installarselo da qualche parte (supponiamo /opt/jre-1.5.11).&lt;br /&gt;&lt;br /&gt;Si va nella directory dei plugin di Firefox: /opt/firefox/plugins/.&lt;br /&gt;&lt;br /&gt;Si fa in link simbolico&lt;br /&gt;ln -s /opt/jre1.5.0_11/plugin/i386/ns7/libjavaplugin_oji.so ./&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-7254252959019773875?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/7254252959019773875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=7254252959019773875' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/7254252959019773875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/7254252959019773875'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2007/03/java-plugin-in-firefox-su-gentoo-64-bit.html' title='Java plugin in Firefox su Gentoo a 64 bit'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-1372308062830831769</id><published>2007-01-17T17:12:00.000+01:00</published><updated>2009-12-27T18:38:06.034+01:00</updated><title type='text'>Casi d'uso (use cases)</title><content type='html'>Collezione di storie delle interazioni col sistema per incontrare gli obiettivi delle parti interessate.&lt;br /&gt;&lt;br /&gt;Attore: caratterizzazione di un modo di comportarsi&lt;br /&gt;Scenario: sequenza di azioni e interazioni attori e sistema.&lt;br /&gt;&lt;br /&gt;Uno scenario e' un'istanza di un caso d'uso, una storia, una sequenza di azioni che produce un risultato osservabile ad uno o piu' attori.&lt;br /&gt;I casi d'uso quindi sono formati da scenari di successo e di fallimento, vanno considerati nel pensare alla maniera, al modo in cui il sistema cerca adempiere agli obiettivi.&lt;br /&gt;&lt;br /&gt;I casi d'uso sono requisiti (spesso quelli funzionali).&lt;br /&gt;&lt;br /&gt;Non scendere in dettagli, pensare solo al COSA, non al COME (analisi contro progettazione).&lt;br /&gt;&lt;br /&gt;Tipi di casi d'uso:&lt;br /&gt;&lt;br /&gt;Brevi, storia scritta in un paragrafo lungo.&lt;br /&gt;Informali, diversi paragrafi, eventuali casi d'uso alternativi.&lt;br /&gt;Completi, struttura formata da&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Prefazione&lt;/li&gt;&lt;li&gt;Parti interessate e relativa lista di interessi&lt;/li&gt;&lt;li&gt;Precondizioni e postcondizioni.&lt;/li&gt;&lt;li&gt;Scenario di successo (happy scenario), senza condizioni formato da interazioni tra attori, validazione del sistema o cambiamento dello stato del sistema.&lt;/li&gt;&lt;li&gt;Scenari alternativi, estensioni, formate dalla condizione e dalla gestione dello scenario. C'e' eventuale ritorno a scenario di successo. Scenari alternativi complessi potrebbero essere un altro caso d'uso&lt;/li&gt;&lt;li&gt;Requisiti speciali (non funzionali, ad es. "tecnologici")&lt;/li&gt;&lt;li&gt;Lista variabilita' tecnologiche e dati (eventuali vincoli a priori)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Livello di dettaglio: riferirsi principalmente a Elementary Business Process&lt;br /&gt;&lt;br /&gt;Task di una persona in un luogo ad un certo tempo in risposta ad un evento che aggiunge un valore misurabile lasciando i dati in stato consistente.&lt;br /&gt;Cosa fare.&lt;br /&gt;Quali sono gli obiettivi. Quale e' l'obiettivo padre, ricorsione.&lt;br /&gt;&lt;br /&gt;Sottoobiettivi vanno considerati come caso d'uso quando sono precondizioni di piu' scenari di casi d'uso.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dominio del sistema&lt;br /&gt;Attori primari e obiettivi: trovare attori primari (tra cui i "sistemi", il computer)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-1372308062830831769?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/1372308062830831769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=1372308062830831769' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/1372308062830831769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/1372308062830831769'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2007/01/casi-d-use-cases.html' title='Casi d&amp;#39;uso (use cases)'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-4292363957113354350</id><published>2007-01-17T15:03:00.000+01:00</published><updated>2009-12-27T18:38:06.036+01:00</updated><title type='text'>Analisi e progettazione</title><content type='html'>Analisi: capire problema e requisiti&lt;br /&gt;Progetto: soddisfare requisiti, soluzione concettuale, non implementazione&lt;br /&gt;&lt;br /&gt;Fare le cose giuste (analisi) e farle correttamente (progetto).&lt;br /&gt;&lt;br /&gt;Analisi a oggetti: trovare e descrivere gli oggetti.&lt;br /&gt;Progetto a oggetti: capire come oggetti software collaborano per soddisfare i requisiti.&lt;br /&gt;&lt;br /&gt;UML:&lt;br /&gt;&lt;br /&gt;linguaggio per specificare, visualizzare, costruire, documentare artefatti di sistemi software.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-4292363957113354350?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/4292363957113354350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=4292363957113354350' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/4292363957113354350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/4292363957113354350'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2007/01/analisi-e-progettazione.html' title='Analisi e progettazione'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-8480700230841849130</id><published>2007-01-15T01:01:00.000+01:00</published><updated>2009-12-27T18:38:06.037+01:00</updated><title type='text'>C, OpenGl: glCallList, Quads</title><content type='html'>&lt;a href="http://www.bonifazi.eu/appunti/gl2.c.html"&gt;gl2.c.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-8480700230841849130?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/8480700230841849130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=8480700230841849130' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/8480700230841849130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/8480700230841849130'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2007/01/c-opengl-glcalllist-quads.html' title='C, OpenGl: glCallList, Quads'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-6428252947092867253</id><published>2007-01-06T12:23:00.000+01:00</published><updated>2009-12-27T18:38:06.038+01:00</updated><title type='text'>C - OpenGl, create a stupid Window</title><content type='html'>This is a segment in an example OpenGl window.&lt;br /&gt;It is written to remember all the steps to create a window and give an Ortho perspective, and managing coordinates system.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/appunti/gl.c.html"&gt;gl.c.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To compile in Linux:&lt;br /&gt;&lt;br /&gt;cc -o gl gl.c -lglut -lGL -lGLU -lm  -L/usr/X11R6/lib&lt;br /&gt;&lt;br /&gt;In WIndows it is important to compile and link with math, gl, glu, glut library.&lt;br /&gt;For example in DevC++ we must insert -lm, -lglu, -lgl, -lglut in linker options.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-6428252947092867253?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/6428252947092867253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=6428252947092867253' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/6428252947092867253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/6428252947092867253'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2007/01/c-opengl-create-stupid-window.html' title='C - OpenGl, create a stupid Window'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-2156891659003243483</id><published>2006-12-13T10:42:00.000+01:00</published><updated>2009-12-27T18:38:06.040+01:00</updated><title type='text'>PyInstaller: creare un eseguibile per Windows (ma il procedimento dovrebbe esser simile per altri Sistemi Operativi)</title><content type='html'>Sito ufficiale (nuovo) di&lt;br /&gt;&lt;a href="http://pyinstaller.python-hosting.com/"&gt;PyInstaller&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;PyInstaller trasforma programmi scritti in Python in eseguibili a se stanti, la cui esecuzione diventa indipendente dall'interprete Python.&lt;br /&gt;&lt;br /&gt;La mia applicazione prevede uso di PyGtk.&lt;br /&gt;&lt;br /&gt;Passi da compiere:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Scompattare lo zip scaricabile dal sito in una directory a piacere, da console ("cmd.exe") mettere python.exe nel PATH di Windows ("SET PATH=$PATH;C:\Python25\")&lt;/li&gt;&lt;li&gt;Solo per comodita' conviene spostare la cartella appena scompattata nella cartella genitore del nostro progetto (ad es. se il progetto e' in C:\Padre\Progetto, conviene che PyInstaller sia nella cartella C:\Padre\PyInstaller)&lt;/li&gt;&lt;li&gt;Creare un file di tipo .spec, che "imposta" la configurazione del progetto, al seguente modo:&lt;blockquote&gt;python Makespec.py -w ..\Progetto\programma.py&lt;/blockquote&gt;&lt;br /&gt;Cosi' facendo verra' creata nella directory di PyInstaller una directory "programma" con all'interno altre directory e il file spec appena creato.&lt;/li&gt;&lt;li&gt;Per creare infine l'eseguibile:Python Build.py Progetto\programma.spec Verra' quindi creata la directory "distProgramma" in cui all'interno si avra' il file exe con tutti i dll a cui si  appoggia eventualmente il nostro programma Python.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-2156891659003243483?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/2156891659003243483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=2156891659003243483' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/2156891659003243483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/2156891659003243483'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2006/12/pyinstaller-creare-un-eseguibile-per.html' title='PyInstaller: creare un eseguibile per Windows (ma il procedimento dovrebbe esser simile per altri Sistemi Operativi)'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-946641499810310171</id><published>2006-04-27T16:48:00.000+02:00</published><updated>2009-12-27T18:38:06.042+01:00</updated><title type='text'>Makefile di esempio</title><content type='html'>&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;&lt;span style="font-family: courier new;"&gt;OBJS=params_main.o params_print.o&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;EXE=params&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new; color: rgb(102, 102, 102);font-size:85%;" &gt;$(EXE): $(OBJS)&lt;br /&gt;$(CC) -o $@ $^&lt;br /&gt;@echo "Obiettivo "$@   # $@ Rappresenta l'obiettivo (in questo caso params)&lt;br /&gt;@echo "Dipendenze "$^  # $^ e' una macro che rappresenta tutte le dipendenze dell'obiettivo, in questo caso params_main.o eparams_print.o&lt;br /&gt;@echo "Dipendenze recenti " $?  # $? Rappresenta l'elenco di quelle dipendenze che sono state cambiate recentemente (calcolate automaticamente)&lt;br /&gt;@echo "boh "$&lt;   # $&lt;&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-946641499810310171?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/946641499810310171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=946641499810310171' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/946641499810310171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/946641499810310171'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2006/04/makefile-di-esempio.html' title='Makefile di esempio'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-220450461008725933</id><published>2006-04-26T00:44:00.000+02:00</published><updated>2009-12-27T18:38:06.043+01:00</updated><title type='text'>Linux Scripting: CUT</title><content type='html'>cat /etc/passwd |cut -d ':' -f1|tr "\n" ","&lt;br /&gt;&lt;br /&gt;Mette la lista utenti in una lista con virgole.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-220450461008725933?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/220450461008725933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=220450461008725933' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/220450461008725933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/220450461008725933'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2006/04/linux-scripting-cut.html' title='Linux Scripting: CUT'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-9014249165500224493</id><published>2006-03-30T15:51:00.000+02:00</published><updated>2009-12-27T18:38:06.045+01:00</updated><title type='text'>Creare gl2ps in Python con Swig (in Windows)</title><content type='html'>&lt;ul style="color: rgb(0, 0, 0);"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Scaricare gl2ps dal sito &lt;a href="http://www.geuz.org/gl2ps/"&gt;www.geuz.org/&lt;b&gt;gl2ps&lt;/b&gt;/&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=""&gt;&lt;span style="font-size:100%;"&gt;Scaricare Swig dal sito &lt;a href="http://www.swig.org"&gt;www.swig.org&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=""&gt;&lt;span style="font-size:100%;"&gt;Creare il file interfaccia gl2ps.i, e' possibile scaricare e usare &lt;a href="http://www.bonifazi.eu/appunti/gl2ps/gl2ps.i"&gt;questo&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=""&gt;&lt;span style="font-size:100%;"&gt;Digitare i comandi di Swig &lt;span style="color: rgb(204, 0, 0);"&gt;swig -python gl2ps.i&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=""&gt;&lt;span style="font-size:100%;"&gt;Verrà creato un file gl2ps_wrap.c e un file gl2ps.py, immergere gl2ps_wrap.c nei sorgenti scaricati di gl2ps, creare un progetto (ad esempio con Dev). Ecco il file del progetto dev:&lt;a href="http://www.bonifazi.eu/appunti/gl2ps/gl2ps_sw.dev"&gt;gl2ps_sw.dev&lt;/a&gt;. Il file gl2ps.py va usato nel progetto Python&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=""&gt;&lt;span style="font-size:100%;"&gt;Compilare il progetto gl2ps con gl2ps_wrap.c, prendere il dll e metterlo in %PYTHON_DIR%\Dlls&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=""&gt;&lt;span style="font-size:100%;"&gt;Usare gl2ps.py in Python&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Nel mio progetto il file gl2ps_wrap.c deve essere rinominato in gl2ps_sw.c per far funzionare il gl2ps_sw.dev.&lt;br /&gt;Occorre far coincidere il nome del file .dll e il nome del file Python importato all'interno del modulo creato (ossia all'inizio di gl2ps.py c'e' un import: verificare che sia uguale al dll)&lt;br /&gt;Per usarlo si devono usare fopen e fclose (e fput) classici del C.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-9014249165500224493?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/9014249165500224493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=9014249165500224493' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/9014249165500224493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/9014249165500224493'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2006/03/creare-gl2ps-in-python-con-swig-in.html' title='Creare gl2ps in Python con Swig (in Windows)'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-5257569002453052206</id><published>2006-03-19T02:15:00.000+01:00</published><updated>2009-12-27T18:38:06.047+01:00</updated><title type='text'>Pattern Observer (Publish/Subscribe)</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;i style=""&gt;&lt;span style="font-style: italic;"&gt;GoF : singleton, strategy, observer, facade, composite&lt;/span&gt;&lt;br /&gt;&lt;/i&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;i style=""&gt;Modello non deve conoscere la presentazione&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Problema&lt;/span&gt;: Differenti oggetti subscriber sono interessati a cambiamenti di stato o eventi per reagire eventualmente, mantenendo basso accoppiamento con publisher&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Soluzione:&lt;/b&gt; interfaccia Subscriber/Listener implementata da tutti gli interessati&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;Observer (Property Listener) ha un metodo &lt;span style="font-weight: bold;font-family:courier new;" &gt;Update &lt;/span&gt;che poi viene implementato dalle classi della Presentazione figlie ,&lt;/li&gt;&lt;li&gt;il Subject (Modello) può inserirsi e togliersi i riferimenti di Observer di ogni figlia e ad ogni notifica li scansiona, i metodi della classe Subject hanno la stessa implementazione per tutte le istanze, per cui Subject viene ovviamente derivata,&lt;/li&gt;&lt;li&gt;l’istanza vista (ConcreteObserver), usando l’evento aggiorna la propria Presentazione.&lt;/li&gt;&lt;/ul&gt;      &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-weight: bold;"&gt;Inizializzazione&lt;/span&gt;:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Il programma principale crea il Modello e &lt;st1:personname productid="la Vista" st="on"&gt;la Vista&lt;/st1:personname&gt; (passando ad essa il Modello), &lt;st1:personname productid="la Vista" st="on"&gt;&lt;/st1:personname&gt;&lt;/li&gt;&lt;li&gt;&lt;st1:personname productid="la Vista" st="on"&gt;la Vista&lt;/st1:personname&gt; fa attaccare (tramite il riferimento appena passato) se stessa al Modello,&lt;br /&gt;&lt;/li&gt;&lt;li&gt;chiama un metodo creaController e gli passa il Modello e &lt;st1:personname productid="la Vista" st="on"&gt;la Vista&lt;/st1:personname&gt;,&lt;br /&gt;&lt;/li&gt;&lt;li&gt;il Controller tramite il riferimento al Modello passa al Modello se stesso.&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype id="_x0000_t75" coordsize="21600,21600" spt="75" preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;  &lt;v:stroke joinstyle="miter"&gt;  &lt;v:formulas&gt;   &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;   &lt;v:f eqn="sum @0 1 0"&gt;   &lt;v:f eqn="sum 0 0 @1"&gt;   &lt;v:f eqn="prod @2 1 2"&gt;   &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;   &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @0 0 1"&gt;   &lt;v:f eqn="prod @6 1 2"&gt;   &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;   &lt;v:f eqn="sum @8 21600 0"&gt;   &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @10 21600 0"&gt;  &lt;/v:formulas&gt;  &lt;v:path extrusionok="f" gradientshapeok="t" connecttype="rect"&gt;  &lt;o:lock ext="edit" aspectratio="t"&gt; &lt;/v:shapetype&gt;&lt;v:shape id="_x0000_i1025" type="#_x0000_t75" style="'width:310.5pt;"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\IMPOST~1\Temp\msohtml1\01\clip_image001.jpg" title="observer"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;img src="http://www.bonifazi.eu/appunti/immagini/observer.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/131499"&gt;Esempio: Python Observer&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-5257569002453052206?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/5257569002453052206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=5257569002453052206' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/5257569002453052206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/5257569002453052206'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2006/03/pattern-observer-publishsubscribe.html' title='Pattern Observer (Publish/Subscribe)'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-7646649570623130739</id><published>2006-03-12T00:46:00.000+01:00</published><updated>2009-12-27T18:38:06.049+01:00</updated><title type='text'>Linux Scripting: Standard error, output</title><content type='html'>cat marco&gt;prova 2&gt;&amp;1&lt;br /&gt;&lt;br /&gt;Redirige lo standard error verso lo standard output (al posto di &amp;amp;1 puo' esserci un file)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-7646649570623130739?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/7646649570623130739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=7646649570623130739' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/7646649570623130739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/7646649570623130739'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2006/03/linux-scripting-standard-error-output.html' title='Linux Scripting: Standard error, output'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-6311054648291504743</id><published>2006-03-12T00:40:00.000+01:00</published><updated>2009-12-27T18:38:06.051+01:00</updated><title type='text'>Scripting Linux: Control</title><content type='html'>Nella console la pressione di Control insieme a un carattere provoca diverse reazioni:&lt;br /&gt;&lt;br /&gt;B sinistra&lt;br /&gt;F destra&lt;br /&gt;P comando precedente, sopra&lt;br /&gt;N successivo, sotto&lt;br /&gt;A inizio riga&lt;br /&gt;E fine riga&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;W cancella parola precedente&lt;/span&gt;&lt;br /&gt;U cancella intera riga&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-6311054648291504743?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/6311054648291504743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=6311054648291504743' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/6311054648291504743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/6311054648291504743'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2006/03/scripting-linux-control.html' title='Scripting Linux: Control'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-3407725356166404434</id><published>2006-03-12T00:30:00.000+01:00</published><updated>2009-12-27T18:38:06.052+01:00</updated><title type='text'>Scripting Linux: variabili ambiente e shell</title><content type='html'>Differenza: quelle di ambiente sono accedibili ai programmi (che le usano per le loro comodita', ad esempio un CLASSPATH di Java)&lt;br /&gt;&lt;br /&gt;PROVA=ciao&lt;br /&gt;export PROVA&lt;br /&gt;&lt;br /&gt;export trasferisce a spazio memoria per variabili ambiente&lt;br /&gt;&lt;br /&gt;Esempio&lt;br /&gt;Creando una variabile di shell e poi avviare una subconsole e una di ambiente con subconsole, la variabile di ambiente "passa", quella di shell no (provare con un echo)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Nella prima console&lt;/span&gt;&lt;br /&gt;MARCO=io&lt;br /&gt;GINO=tu&lt;br /&gt;export GINO&lt;br /&gt;&lt;br /&gt;konsole&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Nella seconda&lt;/span&gt;&lt;br /&gt;echo MARCO&lt;br /&gt;&lt;br /&gt;echo GINO&lt;br /&gt;tu&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-3407725356166404434?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/3407725356166404434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=3407725356166404434' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/3407725356166404434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/3407725356166404434'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2006/03/scripting-linux-variabili-ambiente-e.html' title='Scripting Linux: variabili ambiente e shell'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-817316272804708186</id><published>2006-03-12T00:08:00.000+01:00</published><updated>2009-12-27T18:38:06.054+01:00</updated><title type='text'>Linux Scripting: LS</title><content type='html'>&lt;pre&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;ilgenio@ZemanLandia Desktop $ ls -ltFira&lt;br /&gt;totale 167&lt;br /&gt;2317 -rw-r--r--   1 ilgenio users   4298 21 dic  2004 Home.desktop&lt;br /&gt;6042 -rw-r--r--   1 ilgenio users     69 21 dic  2004 .directory&lt;br /&gt;16421 drwxr-xr-x   2 ilgenio users    216 30 gen 20:35 Python/&lt;br /&gt; 112 drwxr-xr-x   3 ilgenio users    192 30 gen 20:35 Altro/&lt;br /&gt;3343 drwxr-xr-x   2 ilgenio users    168  7 feb 17:43 Banca/&lt;br /&gt; 194 drwxr-xr-x   2 ilgenio users    456  7 feb 17:43 calcoloparallelo/&lt;br /&gt; 772 drwxr-xr-x  11 ilgenio users    656  7 feb 17:44 DisCo/&lt;br /&gt;16325 drwxr-xr-x   5 ilgenio users    152 21 feb 22:29 Universita'/&lt;br /&gt;57864 -rw-r--r--   1 ilgenio users 155389 22 feb 00:27 prospetto_spese_commissioni_hb.pdf&lt;br /&gt;59190 drwxr-xr-x   2 ilgenio users    336 11 mar 14:43 Sistemi operativi/&lt;br /&gt;  52 drwx------   9 ilgenio root     368 11 mar 14:44 ./&lt;br /&gt;   4 drwxr-xr-x  50 ilgenio root    2784 12 mar 00:20 ../&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Primo carattere dei dieci dopo l'inode:&lt;br /&gt;      The file types are as follows: - for an ordinary file, d  for  a&lt;br /&gt;        directory,  b for a block special device, c for a character spe-&lt;br /&gt;        cial device, l for a symbolic link,  p  for  a  fifo,  s  for  a&lt;br /&gt;        socket.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Opzioni&lt;/span&gt;&lt;br /&gt;l: lista dettagliata&lt;br /&gt;t: ordina per timestamp&lt;br /&gt;F: aggiunge / per le directory, | per le pipe, * per gli eseguibili&lt;br /&gt;i: inode&lt;br /&gt;r: ordine inverso&lt;br /&gt;a: file dot&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-817316272804708186?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/817316272804708186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=817316272804708186' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/817316272804708186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/817316272804708186'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2006/03/linux-scripting-ls.html' title='Linux Scripting: LS'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-407673966087839619</id><published>2006-03-04T20:43:00.000+01:00</published><updated>2009-12-27T18:38:14.640+01:00</updated><title type='text'>Problema 1: PyGtkGlext per Windows</title><content type='html'>&lt;h3 class="post-title"&gt;&lt;br /&gt;  &lt;/h3&gt;                 &lt;div class="post-body"&gt;  &lt;div&gt;       &lt;span style="font-weight: bold;"&gt;Problema&lt;/span&gt;&lt;br /&gt;Dove trovare PyGtkGlExt per Windows e Python 2.4?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Soluzione&lt;/span&gt;&lt;br /&gt;Ho chiesto nella relativa mailing list e mi e' stato fornito il file, che credo possa mettere tranquillamente qui.&lt;br /&gt;&lt;a href="http://www.bonifazi.eu/appunti/pygtkglext-1.0.1.win32-py2.4.exe"&gt;PyGtkGlExt 1.01 per Python 2.4 in Windows&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;C'e' voluto un po' per trovare PyGtkGlExt per Windows: intanto spiego cos'e'.&lt;br /&gt;PyOpengl permette di aprirti una finestra e gestire il tuo mondo OpenGl li'.&lt;br /&gt;A me serve gestire OpenGl in un riquadro di una piu' generica finestra GTK, nella quale vi siano contemporaneamente molti widget, menu', icone, ecc.&lt;br /&gt;GtkGlExt permette (c'era anche GtkGlArea ma e' caduto in disuso) questa immersione all'interno di una finestra (gtk.Window), tramite i widget posso quindi interagire convenientemente e istantaneamente sul disegno.&lt;br /&gt;&lt;br /&gt;GtkGlExt e PyGtkGlExt sono realizzati fondamentalmente per Linux, ma molti stanno cominciando a interagire anche con Windows, per cui ho speranze che queste librerie vengano aggiornate continuamente (per ora lo sono, ma comunque non e' necessario questo aggiornamento continuo).&lt;br /&gt;In questo caso, poiche' il Python 2.4 e' abbastanza recente e il mantenitore ufficiale di PyGtkGlExt si e' un po' dileguato (ma nella mailing list c'e' qualcuno che continua ad aggiornare) ho dovuto cercare qualcuno che trovasse il modo di compilare in Windows e Visual Studio tali sorgenti (comunque sempre disponibili), ho cercato io stesso di compilare tali sorgenti.&lt;br /&gt;&lt;br /&gt;Non riuscivo a compilarlo (non avendo Visual Studio usavo &lt;a href="http://www.bloodshed.net/devcpp.html"&gt;DevC++&lt;/a&gt;) in quanto mi restituiva un errore di compatibilita': Python e PyGtkGlExt dovevano essere stati compilati con lo stesso compilatore.&lt;br /&gt;Credo che sbattendoci la testa il problema si sarebbe potuto comunque risolvere, ma perche' perderci tempo?&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;     &lt;/div&gt;     &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-407673966087839619?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/407673966087839619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=407673966087839619' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/407673966087839619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/407673966087839619'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2006/03/problema-1-pygtkglext-per-windows.html' title='Problema 1: PyGtkGlext per Windows'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-2918616058275272730</id><published>2006-03-04T20:42:00.000+01:00</published><updated>2009-12-27T18:38:14.642+01:00</updated><title type='text'>Documentazione</title><content type='html'>Innanzitutto mi suggerisco la &lt;span style="font-weight: bold;"&gt;documentazione ufficiale&lt;/span&gt;: la trovo agevolmente sul sito di Python.&lt;br /&gt;&lt;div class="post-body"&gt;&lt;div&gt;&lt;br /&gt;DECISIVI sono poi i newsgroup, nei quali ci sono programmatori che rispondono volontariamente alle domande e senza i quali non andrei da nessuna parte (magari piu' avanti daro' un contributo a qualcuno!).&lt;br /&gt;I newsgroup che uso sono:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://groups.google.com/group/it.comp.lang.python"&gt;it.comp.lang.python&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://groups.google.com/group/comp.lang.python"&gt;comp.lang.python&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://groups.google.com/group/comp.graphics.api.opengl"&gt;comp.graphics.api.opengl&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Prima di fare una domanda sarebbe d'uopo, secondo me,&lt;br /&gt;&lt;ul&gt;&lt;li&gt;aver cercato prima con Google&lt;/li&gt;&lt;li&gt;aver cercato una domanda simile sul newsgroup (a tal proposito il servizio Google Groups e' strepitoso)&lt;/li&gt;&lt;/ul&gt;In genere comunque qualcuno che risponde anche alle domande piu' balzane c'e' sempre, a volte si discute a livelli che vanno oltre alle tecnicita' del Python&lt;br /&gt;&lt;br /&gt;Poi devo dire che mi piace &lt;a style="font-weight: bold;" href="http://it.diveintopython.org/"&gt;Dive into Python&lt;/a&gt; che rimanda spesso alla giusta pagina della documentazione ufficiale e spiega passo passo: e' un buon tutorial.&lt;br /&gt;&lt;br /&gt;Poi per le &lt;span style="font-weight: bold;"&gt;PyGtk &lt;/span&gt;mi piace &lt;a href="http://www.parafernalia.org/pygtk/"&gt;http://www.parafernalia.org/pygtk/&lt;/a&gt; che e' stato molto utile per realizzarele prime interfacce, che poi comunque costruisco piu' velocemente con Glade.&lt;br /&gt;Conoscere un minimo le Pygtk e', secondo me (e molti altri a quanto leggo in giro), necessario, per capire come funzionano considerando che se poi con Glade servono comunque, per sapere come interagire con i widget "caricati" da libglade.&lt;br /&gt;&lt;br /&gt;Per quanto riguarda le &lt;span style="font-weight: bold;"&gt;PyGtkGlExt &lt;/span&gt;mi sono stati utili gli &lt;span style="font-weight: bold;"&gt;esempi&lt;/span&gt;, coi quali si puo' capire subito come usare le relative API e farsi l'area da disegno sull'interfaccia.&lt;br /&gt;&lt;br /&gt;Per quanto riguarda &lt;span style="font-weight: bold;"&gt;OpenGl&lt;/span&gt;, punto di riferimento che ho in questo momento e' &lt;span style="font-style: italic;"&gt;OpenGl A primer&lt;/span&gt;, di Edward Angel (Second Edition), utile soprattutto per capire bene come usare il glOrtho o il gluPerspective, per capire le trasformazioni, le curve.&lt;br /&gt;Credo pero' che alcuni dettagli manchino (ad esempio, come renderizzare in diversi riquadri contemporaneamente? La cosa mi servira' per creare un output ad alta definizione). &lt;/div&gt;     &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-2918616058275272730?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/2918616058275272730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=2918616058275272730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/2918616058275272730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/2918616058275272730'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2006/03/documentazione.html' title='Documentazione'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8096302487104686719.post-2332427788647364183</id><published>2006-03-04T20:41:00.000+01:00</published><updated>2009-12-27T18:38:14.644+01:00</updated><title type='text'>Collegare l'interfaccia al modello in PyGtk, con retroazione da parte dell'interfaccia</title><content type='html'>&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;span style="font-size: 100%;"&gt;Tale appunto nasce con lo scopo di ricordarmi i passaggi per collegare l'interfaccia al modello, considerando che l'interfaccia assume funzioni di input e output allo stesso tempo.&lt;br /&gt;Faccio riferimento ad un programmino che mi converte i gradi di temperatura nelle diverse rappresentazioni.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-size: 100%;"&gt;Costruire l'interfaccia con Glade&lt;/span&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: 100%;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5523/2043/1600/albero.5.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/5523/2043/320/albero.5.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: 100%;"&gt;Ricordarsi di impostare il segnale nei widget interessati (value_changed&gt;on_numero_cambiato)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-size: 100%;"&gt;Creare il dizionario che traduce i segnali in funzioni&lt;/span&gt;&lt;span style="font-size: 100%;"&gt;&lt;br /&gt;segnali={"on_numero_cambiato": self.numero_cambiato}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-size: 100%;"&gt;Connettere la parte grafica al modello tramite il dizionario&lt;/span&gt;&lt;span style="font-size: 100%;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;applicazione.signal_autoconnect (segnali)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-size: 100%;"&gt;Impostare il caricamento dell'interfaccia dal file&lt;/span&gt;&lt;span style="font-size: 100%;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;file_interfaccia="Gradi.glade"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;applicazione=gtk.glade.XML(file_interfaccia)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;main=applicazione.get_widget('main')&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-size: 100%;"&gt;Definire attributi e metodi accessori del modello,&lt;/span&gt;&lt;span style="font-size: 100%;"&gt; ricordando di usare un protocollo stabilito che colleghi i nomi dei widget ai nomi dei metodi accessori, nel mio caso kelvin e' il nome del widget che gestisce il cambiamento dei gradi kelvin e nella classe ModelloGrado avro' i metodi &lt;span style="font-family: courier new;"&gt;get_kelvin&lt;/span&gt; e &lt;span style="font-family: courier new;"&gt;set_kelvin&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-size: 100%;"&gt;Definire l'accesso dinamico usando funzione getattr&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-size: 100%;"&gt;, che permette di chiamare un metodo senza sapere a priori, ma solo a tempo d'esecuzione, in base al nome del widget&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5523/2043/1600/finestra.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/5523/2043/320/finestra.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size: 85%;"&gt;&lt;span style="font-size: 100%;"&gt;&lt;br /&gt;Codice del mio esempio&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-size: 100%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;pre&gt;import gtk.glade&lt;br /&gt;import gtk&lt;br /&gt;from gtk.gtkgl import *&lt;br /&gt;from ModelloGrado import *&lt;br /&gt;from InterfacciaGrado import *&lt;br /&gt;class Controllo:&lt;br /&gt;  """ Ha il compito di gestire, qui e' implementato velocemente&lt;br /&gt;  (avrebbe dovuto gestire l'elemento corrente e passarlo all'interfaccia)"""&lt;br /&gt;  def __init__(self):&lt;br /&gt;      elemento=ModelloGrado()&lt;br /&gt;      interfaccia=InterfacciaGrado()&lt;br /&gt;      interfaccia.carica_dati(elemento)&lt;br /&gt;      gtk.main()&lt;br /&gt;Controllo()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import gtk.glade&lt;br /&gt;import gtk&lt;br /&gt;from gtk.gtkgl import *&lt;br /&gt;from ModelloGrado import *&lt;br /&gt;class InterfacciaGrado:&lt;br /&gt;  def __init__(self):&lt;br /&gt;      """Carica l'interfaccia da file Glade e vi imposta gli attributi"""&lt;br /&gt;      file_interfaccia="Gradi.glade"                  # Nome del file&lt;br /&gt;      applicazione=gtk.glade.XML(file_interfaccia)    # Carica l'interfaccia&lt;br /&gt;      main=applicazione.get_widget('main')            # Carica la finestra principale&lt;br /&gt;&lt;br /&gt;      self.__celsius   = applicazione.get_widget('celsius') # Carica gli spinbutton&lt;br /&gt;      self.__reaumur   = applicazione.get_widget('reaumur')&lt;br /&gt;      self.__kelvin    = applicazione.get_widget('kelvin')&lt;br /&gt;      self.__fahreneit = applicazione.get_widget('fahreneit')&lt;br /&gt;&lt;br /&gt;      segnali={"on_numero_cambiato": self.numero_cambiato}&lt;br /&gt;      applicazione.signal_autoconnect (segnali)&lt;br /&gt;      main.show_all()&lt;br /&gt;    &lt;br /&gt;  def carica_dati(self,elemento):&lt;br /&gt;      """ Ha lo scopo di caricare i valori dell'elementi del modello negli widget dell'interfaccia"""&lt;br /&gt;      self.__elemento_corrente=elemento&lt;br /&gt;      self.__semaforo=False                   # Evita che il segnale che i set_value generano&lt;br /&gt;                                              #   non vada a modificare il modello&lt;br /&gt;                                              #   creando un ciclo infinito&lt;br /&gt;      self.__celsius  .set_value(elemento.get_celsius())  # Imposta il valore degli spinbutton&lt;br /&gt;      self.__reaumur  .set_value(elemento.get_reaumur())&lt;br /&gt;      self.__kelvin   .set_value(elemento.get_kelvin())&lt;br /&gt;      self.__fahreneit.set_value(elemento.get_fahreneit())&lt;br /&gt;      self.__semaforo=True&lt;br /&gt;  def numero_cambiato(self,widget):&lt;br /&gt;      nome_widget=widget.get_name()&lt;br /&gt;      testo=widget.get_text().replace(",",".")&lt;br /&gt;    &lt;br /&gt;      if self.__semaforo:                     # Se il segnale non e' dovuto a un set_value&lt;br /&gt;                                              #   vuol dire che viene dall'utente&lt;br /&gt;                                              #   quindi modifica l-attributo del modello&lt;br /&gt;          getattr(self.__elemento_corrente,"set_"+nome_widget)(float(testo))&lt;br /&gt;          self.carica_dati(self.__elemento_corrente)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class ModelloGrado:&lt;br /&gt;  """ Non ha altre funzioni se non la gestione dei propri attributi"""&lt;br /&gt;  def __init__(self):&lt;br /&gt;      self.__grado=0&lt;br /&gt;  def get_celsius(self):&lt;br /&gt;      return self.__grado&lt;br /&gt;  def set_celsius(self,grado):&lt;br /&gt;      self.__grado=grado&lt;br /&gt;  def get_reaumur(self):&lt;br /&gt;      return self.__grado*80/100&lt;br /&gt;  def set_reaumur(self,reaumur):&lt;br /&gt;      self.__grado=reaumur*100/80&lt;br /&gt;  def get_fahreneit(self):&lt;br /&gt;      return 32+(self.__grado*180/100)&lt;br /&gt;  def set_fahreneit(self,fahreneit):&lt;br /&gt;      self.__grado=(fahreneit-32)*100/180&lt;br /&gt;  def get_kelvin(self):&lt;br /&gt;      return self.__grado+273.15&lt;br /&gt;  def set_kelvin(self,kelvin):&lt;br /&gt;      self.__grado=kelvin-273.15&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8096302487104686719-2332427788647364183?l=bonifazi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bonifazi.blogspot.com/feeds/2332427788647364183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8096302487104686719&amp;postID=2332427788647364183' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/2332427788647364183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8096302487104686719/posts/default/2332427788647364183'/><link rel='alternate' type='text/html' href='http://bonifazi.blogspot.com/2006/03/collegare-l-al-modello-in-pygtk-con.html' title='Collegare l&amp;#39;interfaccia al modello in PyGtk, con retroazione da parte dell&amp;#39;interfaccia'/><author><name>TipsBySteps</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://3.bp.blogspot.com/_B6gATJF9xtw/TD85j8Ha-WI/AAAAAAAAEC4/4ZyLLnd6c-4/S220/28940_394940104203_611274203_3879719_1859406_n.jpg'/></author><thr:total>0</thr:total></entry></feed>
