<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>blemidon's Feed - Programmer's Heaven</title>
    <link>http://www.programmersheaven.com/feed/User/113475/RSS.aspx</link>
    <description>Events at Programmer's Heaven related to the user blemidon.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Wed, 22 May 2013 08:08:09 -0700</pubDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <item>
      <title>Re: Multidimensional arrays</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the Beginner C/C++ forum.&lt;/p&gt;The tree result are the same for me.&lt;br /&gt;
&lt;br /&gt;
intarr is a pointer of type int[2], because you have 2 ints in a row. int has a 4 bytes length on my system (fedora 64bit), so one row is 8 bytes.&lt;br /&gt;
&lt;br /&gt;
intarr is the address of the array&lt;br /&gt;
intarr + 1 is the base address + one row: the result is base+8&lt;br /&gt;
intarr[0] + 1 is the same, intarr[0] = intarr with the same type of int[2], so the result is base+8&lt;br /&gt;
intarr[0][0] + 2 is the first _int element_ of the array, not a _row (int[2])_. so the +2 means 2 * sizeof(int) not 2 * sizeof(int[2]), and it's 8 too, the result is the same: base+8&lt;br /&gt;
&lt;br /&gt;
Imre Horvath</description>
      <pubDate>Sun, 29 Aug 2010 08:57:18 -0700</pubDate>
    </item>
    <item>
      <title>Re: import csv and then be able to add year revenue</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the Python forum.&lt;/p&gt;You have to split the row:&lt;br /&gt;
&lt;br /&gt;
values = row.split('|')&lt;br /&gt;
&lt;br /&gt;
this create a tuple of the values:&lt;br /&gt;
&lt;br /&gt;
('2009', '1', '22', '56.23')&lt;br /&gt;
&lt;br /&gt;
You can then access the columns by&lt;br /&gt;
values[0] etc.&lt;br /&gt;
Be aware that this values are strs.&lt;br /&gt;
You need to convert them to float if you want to make a sum.&lt;br /&gt;
&lt;br /&gt;
v = float(values[3].strip())&lt;br /&gt;
&lt;br /&gt;
Here v will be 56.23&lt;br /&gt;
strip() removes whitespaces, just to be sure.&lt;br /&gt;
&lt;br /&gt;
Hope it helps:&lt;br /&gt;
Imre Horvath</description>
      <pubDate>Sun, 29 Aug 2010 08:34:52 -0700</pubDate>
    </item>
    <item>
      <title>Re: Pyhton Basics.</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the Python forum.&lt;/p&gt;There are some good books for beginners: e.g Learning Python and Programming Python&lt;br /&gt;
I think the best way is to start to write a program, and if you have difficulties, ask the forums.&lt;br /&gt;
(I've always write a CD/DVD catalog program in every programming language I have to learn:)&lt;br /&gt;
&lt;br /&gt;
Imre Horvath</description>
      <pubDate>Sun, 29 Aug 2010 08:29:03 -0700</pubDate>
    </item>
    <item>
      <title>Re: What the heck is this?</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C and C++ forum.&lt;/p&gt;This post has been deleted.</description>
      <pubDate>Sat, 03 Jul 2010 04:34:17 -0700</pubDate>
    </item>
    <item>
      <title>Re: How can I use gtkmm with MinGW (g++) without MSYS?</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C and C++ forum.&lt;/p&gt;I can solve this problem by the following 2 scripts:&lt;br /&gt;
1st create a batch file to run your program:&lt;br /&gt;
hidden.bat:&lt;br /&gt;
&lt;br /&gt;
base.exe&lt;br /&gt;
&lt;br /&gt;
and a vbsctipt file:&lt;br /&gt;
hidden.vbs:&lt;br /&gt;
&lt;br /&gt;
Set WshShell = CreateObject("WScript.Shell")&lt;br /&gt;
WshShell.Run chr(34) &amp;amp; "hidden.bat" &amp;amp; Chr(34), 0&lt;br /&gt;
Set WshShell = Nothing&lt;br /&gt;
&lt;br /&gt;
This executes the batch file without command window, and the batch file executes your app.&lt;br /&gt;
&lt;br /&gt;
Not a nice solution, but works:)&lt;br /&gt;
&lt;br /&gt;
i've also found a software for this:&lt;br /&gt;
hstart by NTWind (Google it)&lt;br /&gt;
&lt;br /&gt;
Regards:&lt;br /&gt;
Imre Horvath</description>
      <pubDate>Mon, 31 May 2010 05:02:23 -0700</pubDate>
    </item>
    <item>
      <title>Re: I seem to be missing a crucial piece here.</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the Python forum.&lt;/p&gt;This post has been deleted.</description>
      <pubDate>Sun, 30 May 2010 02:24:50 -0700</pubDate>
    </item>
    <item>
      <title>Re: How can I use gtkmm with MinGW (g++) without MSYS?</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C and C++ forum.&lt;/p&gt;So, i've installed gtkmm-win32-devel-2.20.0-1.exe and MinGW-5.1.6.exe (with MinGW Base Tools, g++ and MinGW Make).&lt;br /&gt;
Add c:\mingw\bin to the path (gtkmm puts itself into path during install)&lt;br /&gt;
&lt;br /&gt;
Then I can compile your program:&lt;br /&gt;
get pkg-config output:&lt;br /&gt;
&lt;br /&gt;
C:\Documents and Settings\warden\Asztal\mingw&amp;gt;pkg-config gtkmm-2.4  --libs --cfl&lt;br /&gt;
ags&lt;br /&gt;
-mms-bitfields -IC:/gtkmm/include/gtkmm-2.4 -IC:/gtkmm/lib/gtkmm-2.4/include -IC&lt;br /&gt;
:/gtkmm/include/giomm-2.4 -IC:/gtkmm/lib/giomm-2.4/include -IC:/gtkmm/include/pa&lt;br /&gt;
ngomm-1.4 -IC:/gtkmm/lib/pangomm-1.4/include -IC:/gtkmm/include/gtk-2.0 -IC:/gtk&lt;br /&gt;
mm/include/atkmm-1.6 -IC:/gtkmm/include/gdkmm-2.4 -IC:/gtkmm/lib/gdkmm-2.4/inclu&lt;br /&gt;
de -IC:/gtkmm/include/glibmm-2.4 -IC:/gtkmm/lib/glibmm-2.4/include -IC:/gtkmm/in&lt;br /&gt;
clude/glib-2.0 -IC:/gtkmm/lib/glib-2.0/include -IC:/gtkmm/include/sigc++-2.0 -IC&lt;br /&gt;
:/gtkmm/lib/sigc++-2.0/include -IC:/gtkmm/include/cairomm-1.0 -IC:/gtkmm/lib/cai&lt;br /&gt;
romm-1.0/include -IC:/gtkmm/include/pango-1.0 -IC:/gtkmm/include/cairo -IC:/gtkm&lt;br /&gt;
m/include/freetype2 -IC:/gtkmm/include -IC:/gtkmm/include/libpng14 -IC:/gtkmm/li&lt;br /&gt;
b/gtk-2.0/include -IC:/gtkmm/include/atk-1.0  -LC:/gtkmm/lib -lgtkmm-2.4 -latkmm&lt;br /&gt;
-1.6 -lgdkmm-2.4 -lgiomm-2.4 -lpangomm-1.4 -lgtk-win32-2.0 -lglibmm-2.4 -lcairom&lt;br /&gt;
m-1.0 -lsigc-2.0 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangowin&lt;br /&gt;
32-1.0 -lgdi32 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0&lt;br /&gt;
-lgthread-2.0 -lglib-2.0 -lintl&lt;br /&gt;
&lt;br /&gt;
Append it after g++:&lt;br /&gt;
&lt;br /&gt;
g++ base.cc -o base -mms-bitfields -IC:/gtkmm/include/gtkmm-2.4 -IC:/gtkmm/lib/gtkmm-2.4/include -IC:/gtkmm/include/giomm-2.4 -IC:/gtkmm/lib/giomm-2.4/include -IC:/gtkmm/include/pangomm-1.4 -IC:/gtkmm/lib/pangomm-1.4/include -IC:/gtkmm/include/gtk-2.0 -IC:/gtkmm/include/atkmm-1.6 -IC:/gtkmm/include/gdkmm-2.4 -IC:/gtkmm/lib/gdkmm-2.4/include -IC:/gtkmm/include/glibmm-2.4 -IC:/gtkmm/lib/glibmm-2.4/include -IC:/gtkmm/include/glib-2.0 -IC:/gtkmm/lib/glib-2.0/include -IC:/gtkmm/include/sigc++-2.0 -IC:/gtkmm/lib/sigc++-2.0/include -IC:/gtkmm/include/cairomm-1.0 -IC:/gtkmm/lib/cairomm-1.0/include -IC:/gtkmm/include/pango-1.0 -IC:/gtkmm/include/cairo -IC:/gtkmm/include/freetype2 -IC:/gtkmm/include -IC:/gtkmm/include/libpng14 -IC:/gtkmm/lib/gtk-2.0/include -IC:/gtkmm/include/atk-1.0  -LC:/gtkmm/lib -lgtkmm-2.4 -latkmm-1.6 -lgdkmm-2.4 -lgiomm-2.4 -lpangomm-1.4 -lgtk-win32-2.0 -lglibmm-2.4 -lcairomm-1.0 -lsigc-2.0 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl &lt;br /&gt;
&lt;br /&gt;
It compiled without errors...&lt;br /&gt;
&lt;br /&gt;
You have to add these options manually, bacause windows doesn't understand ``. It's what MSYS for.&lt;br /&gt;
&lt;br /&gt;
I've tried your command line, it doesn't work. As I can remember, I faced a problem like this some years ago, then i've got 2 pkg-config. One in c:\gtkmm\bin and one in mingw (maybe in MSYS). Make sure you use the one in c:\gtkmm\bin&lt;br /&gt;
&lt;br /&gt;
Regards:&lt;br /&gt;
Imre Horvath</description>
      <pubDate>Sun, 30 May 2010 01:36:42 -0700</pubDate>
    </item>
    <item>
      <title>Re: problem with string compare</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the Beginner C/C++ forum.&lt;/p&gt;In the first case foo[] and bar[] are pointers (Like foo * and bar *). They're holding 2 different memory address. On both addresses in memory is the same data "hello".&lt;br /&gt;
With foo==bar, you compare the TWO MEMORY ADDRESS, and they're different.&lt;br /&gt;
&lt;br /&gt;
With string, foo and bar is a std::string object. String objects have their own compare function.&lt;br /&gt;
With foo==bar you invoke the string's compare function, which compares THE DATA IN THE STRINGS, and they are the same ("hello")&lt;br /&gt;
&lt;br /&gt;
Hope it helps:&lt;br /&gt;
Imre Horvath&lt;br /&gt;</description>
      <pubDate>Sun, 30 May 2010 00:16:46 -0700</pubDate>
    </item>
    <item>
      <title>Re: Array and string</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C and C++ forum.&lt;/p&gt;In c, they are basically the same:&lt;br /&gt;
String is an array of chars:&lt;br /&gt;
&lt;br /&gt;
char * string = 'foo';&lt;br /&gt;
char[] chararray = 'bar';&lt;br /&gt;
&lt;br /&gt;
You can use a string as array:&lt;br /&gt;
&lt;br /&gt;
printf("%c", string[1]); // prints 'o'&lt;br /&gt;
&lt;br /&gt;
And an array as string:&lt;br /&gt;
&lt;br /&gt;
printf("%s", chararray); // prints 'bar'&lt;br /&gt;
&lt;br /&gt;
(Basically, the [] and * operators are 'equivalent':&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char **argv);&lt;br /&gt;
int main(int argc, char* argv[]);&lt;br /&gt;
&lt;br /&gt;
are the same...)&lt;br /&gt;
&lt;br /&gt;
Regards:&lt;br /&gt;
Imre Horvath&lt;br /&gt;
Regards: -blemidon-</description>
      <pubDate>Sat, 29 May 2010 12:34:46 -0700</pubDate>
    </item>
    <item>
      <title>Re: How can I use gtkmm with MinGW (g++) without MSYS?</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the C and C++ forum.&lt;/p&gt;Hi!&lt;br /&gt;
&lt;br /&gt;
What was the error message without MSYS?&lt;br /&gt;
&lt;br /&gt;
It was long time ago, but as I can remember, I add the command line options to g++ manually.&lt;br /&gt;
I mean, see the pkg-config output, and add it manually after g++. It worked for me.&lt;br /&gt;
(I'll try it again tomorrow)&lt;br /&gt;
&lt;br /&gt;
Now I'm using Fedora, it includes the win32 mingw binaries, so you can generate win32 executables without windows :) I think it's the better solution:)&lt;br /&gt;
&lt;br /&gt;
Regards:&lt;br /&gt;
Imre Horvath&lt;br /&gt;
Regards: -blemidon-</description>
      <pubDate>Sat, 29 May 2010 12:07:34 -0700</pubDate>
    </item>
    <item>
      <title>Re: I seem to be missing a crucial piece here.</title>
      <link />
      <description>&lt;p&gt;Posted a 'reply on the Python forum.&lt;/p&gt;You can declare a variable with None value (It's the same as NULL in c), it means 'Nothing':&lt;br /&gt;
name = None&lt;br /&gt;
for tuples, dirs, arrays you can do this:&lt;br /&gt;
t = ()&lt;br /&gt;
d = {}&lt;br /&gt;
a = []&lt;br /&gt;
&lt;br /&gt;
If you want to change a global var from function, use global:&lt;br /&gt;
&lt;br /&gt;
name = None # it's empty, but declared&lt;br /&gt;
def getUsrName():&lt;br /&gt;
  global name&lt;br /&gt;
  name = 'someone'&lt;br /&gt;
&lt;br /&gt;
This changes the global name to 'someone'&lt;br /&gt;
&lt;br /&gt;
Hope this helps:&lt;br /&gt;
Imre Horvath&lt;br /&gt;
Regards: -blemidon-</description>
      <pubDate>Sat, 29 May 2010 11:51:13 -0700</pubDate>
    </item>
  </channel>
</rss>