Search Results

Search found 269 results on 11 pages for 'pp'.

Page 5/11 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • How do the young start programming nowadays

    - by PP
    Back in the late 80s/early 90s I learned GWBasic on MS-DOS. Then Turbo Pascal. Then Turbo C/Asm. Later I stumbled into PHP and finally made a career out of Perl programming. I'm curious how actual under-25s found their way into programming. There is a lot of discussion about what path you would steer your children if you wanted them to learn programming, but I would like to hear from the newer generation to find out their more modern experiences about becoming a programmer. Note: no stories from people who first discovered programming at university.

    Read the article

  • Gtk, Setting GtkWindow Background from gtkrc file.

    - by PP
    I am trying to set background image to GtkWindow through gtkrc file using pixmap engine but it is not working out following is the rc file. style "theme-window" = "default" { xthickness = 1 ythickness = 1 GtkButton::inner-border = {10, 10, 10, 10} text[NORMAL] = "#FFFFFF" text[ACTIVE] = "#000000" text[PRELIGHT] = "#FFFFFF" text[INSENSITIVE] = "#787878" text[SELECTED] = "#FFFFFF" engine "pixmap" { image { function = FLAT_BOX state = NORMAL recolorable = TRUE file = "NarrowVideo.png" border = { 0, 0, 0, 0 } stretch = TRUE } image { function = FLAT_BOX state = ACTIVE recolorable = TRUE file = "NarrowVideo.png" border = { 0, 0, 0, 0 } stretch = TRUE } } } class "GtkWindow" style "theme-window"

    Read the article

  • cant get connexion using MongoTor

    - by Abdelouahab Pp
    i was trying to change my code to make it asynchronous using MongoTor here is my simple code: class BaseHandler(tornado.web.RequestHandler): @property def db(self): if not hasattr(self,"_db"): _db = Database.connect('localhost:27017', 'essog') return _db @property def fs(self): if not hasattr(BaseHandler,"_fs"): _fs = gridfs.GridFS(self.db) return _fs class LoginHandler(BaseHandler): @tornado.web.asynchronous @tornado.gen.engine def post(self): email = self.get_argument("email") password = self.get_argument("pass1") try: search = yield tornado.gen.Task(self.db.users.find, {"prs.mail":email}) .... i got this error: Traceback (most recent call last): File "C:\Python27\lib\site-packages\tornado-2.4.post1-py2.7.egg\tornado\web.py", line 1043, in _stack_context_handle_exception raise_exc_info((type, value, traceback)) File "C:\Python27\lib\site-packages\tornado-2.4.post1-py2.7.egg\tornado\web.py", line 1162, in wrapper return method(self, *args, **kwargs) File "C:\Python27\lib\site-packages\tornado-2.4.post1-py2.7.egg\tornado\gen.py", line 122, in wrapper runner.run() File "C:\Python27\lib\site-packages\tornado-2.4.post1-py2.7.egg\tornado\gen.py", line 365, in run yielded = self.gen.send(next) File "G:\Mon projet\essog\handlers.py", line 92, in post search = yield tornado.gen.Task(self.db.users.find, {"prs.mail":email}) File "G:\Mon projet\essog\handlers.py", line 62, in db _db = Database.connect('localhost:27017', 'essog') File "build\bdist.win-amd64\egg\mongotor\database.py", line 131, in connect database.init(addresses, dbname, read_preference, **kwargs) File "build\bdist.win-amd64\egg\mongotor\database.py", line 62, in init ioloop_is_running = IOLoop.instance().running() AttributeError: 'SelectIOLoop' object has no attribute 'running' ERROR:tornado.access:500 POST /login (::1) 3.00ms and, excuse me for this other question, but how do i make distinct in this case? here is what worked in blocking mode: search = self.db.users.find({"prs.mail":email}).distinct("prs.mail")[0] Update: it seems that this error happenes when there is no Tornado running! it's the same error raised when using only the module in console. test = Database.connect("localhost:27017", "essog") --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in () ---- 1 test = Database.connect("localhost:27017", "essog") C:\Python27\lib\site-packages\mongotor-0.0.10-py2.7.egg\mongotor\database.pyc in connect(cls, addresses, dbname, read_preference, **kwargs) 131 132 database = Database() -- 133 database.init(addresses, dbname, read_preference, **kwargs) 134 135 return database C:\Python27\lib\site-packages\mongotor-0.0.10-py2.7.egg\mongotor\database.pyc in init(self, addresses, dbname, read_preference, **kwargs) 60 self._nodes.append(node) 61 --- 62 ioloop_is_running = IOLoop.instance().running() 63 self._config_nodes(callback=partial(self._on_config_node, ioloop_is_running)) 64 AttributeError: 'SelectIOLoop' object has no attribute 'running'

    Read the article

  • Why can't I overwrite style specified in one gtkrc file?

    - by PP
    In my Gtk+ application i am having two gtkrc files. Which i have added using: gchar *rcfile; rcfile = g_build_filename( "user", "themes", "xyz", "gtk-2.0", "gtkrc", NULL); gtk_rc_parse( rcfile ); g_free( rcfile ); rcfile = g_build_filename( "my_rc_foler", "gtkrc", NULL); gtk_rc_add_default_file( rcfile ); g_free( rcfile ); I tried to overwrite some of the styles provided by default rc file. but i fails to do so. like i have over written GtkLable style as follows In My rc file: style "my-theme-label" { xthickness = 1 ythickness = 1 bg[NORMAL] = "#FFFFFF" bg[ACTIVE] = "#FFFFFF" bg[PRELIGHT] = "#FFFFFF" bg[SELECTED] = "#FFFFFF" bg[INSENSITIVE] = "#FFFFFF" fg[NORMAL] = "#FFFFFF" fg[INSENSITIVE] = "#FFFFFF" fg[PRELIGHT] = "#FFFFFF" fg[SELECTED] = "#FFFFFF" fg[ACTIVE] = "#FFFFFF" text[NORMAL] = "#FFFFFF" text[INSENSITIVE] = "#434346" text[PRELIGHT] = "#FFFFFF" text[SELECTED] = "#FFFFFF" text[ACTIVE] = "#FFFFFF" base[NORMAL] = "#000000" base[INSENSITIVE] = "#00FF00" base[PRELIGHT] = "#0000ff" base[SELECTED] = "#FF00FF" base[ACTIVE] = "#F39638" } class "GtkLabel" style "tc-theme-label" but still it does not show any effect on GtkLables that i am using in my app.

    Read the article

  • How to add padding on left and right side of GtkImage?

    - by PP
    How to add padding on left and right side of GtkImage which is in GtkHBox. I am having a GtkWindow - GtkVBox - GtkHBox (With 3 Columns) In HBox in first i have put GtkImage Widget but it is very close to borders of HBox, i ned to add some padding in between, on left and right side of image not on top and bottom. can we do this using glade or we have to do this from code? thanks.

    Read the article

  • Gtk, Trying to set bg to GtkEventBox but it fails.

    - by PP
    I am trying to set bg image to an event box but i am getting error as window GDK_IS_WINDOW (window)' failed what am i doing wrong in it? int main() { GtkWidget *g_winMain; GError *error = NULL; gtk_init(&argc, &argv); g_winMain = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_set_size_request(g_winMain, 300, 300); g_signal_connect(G_OBJECT(g_winMain), "destroy", G_CALLBACK(gtk_main_quit), NULL); GtkWidget *event_box; event_box = gtk_event_box_new(); gtk_event_box_set_visible_window( GTK_EVENT_BOX(event_box), TRUE ); GtkWidget *image; GdkPixmap *pixmap; GdkPixbuf *pixbuf; GdkBitmap *bitmap; pixbuf = gdk_pixbuf_new_from_file("test.jpg", &error); gdk_pixbuf_render_pixmap_and_mask(pixbuf, &pixmap, &bitmap, 0); gdk_window_set_back_pixmap( event_box->window, pixmap, true); //Error On this Line******** gtk_container_add( GTK_CONTAINER(g_winMain), event_box); gtk_widget_show(g_winMain); gtk_main(); }

    Read the article

  • Really want to know how to set bg image to GtkEventBox.

    - by PP
    I want to set background image to GtkEventBox using style/rc file. The reason i want to do this, I want to put some widgets in that event box so that they will be displayed with the background. I am using GTk+ and C. ptomato: I know previously I had posted same question but there was not satisfactory answer so please don't prompt for that.

    Read the article

  • Unable to access any widgets in an window.

    - by PP
    I have one GtkWindow with one GtkVBox and GtkEntry. Some times it happens that i am unable to access buttons Buttons, lists, entries. But i am able to add widgets to GtkVBox and it gets updated with new widgets too. Looks like it loses Focus. i tries with setting focus but it does not helps. What might be wrong.

    Read the article

  • gtk-button-images setting not working.

    - by PP
    When i try to set this property I am getting run time error, GtkSettings *settings; settings = gtk_settings_get_default(); g_object_set(G_OBJECT(settings), "gtk-button-images", TRUE, NULL); Error: (App:5191): GLib-GObject-WARNING **: IA__g_object_set_valist: object class `GtkSettings' has no property named `gtk-button-images' Why this might be happening? i am also using rc file with this.

    Read the article

  • Gtk GtkScrolledWindow Size.

    - by PP
    Actually i want o hide/remove scroll bars from GtkScrolledWindow but i think it is not possible so is there any way that i can set size of scrolling bar to 0 so that it will not be visible, using style or something like that.

    Read the article

  • Stuck on scrolling GtkViewPort to end.

    - by PP
    I am adding one GtkVBox to GtkViewPort. And I am doing scrolling for GtkViewPort based on two Up/Down Buttons. I need to display last item in VBox as we do in Message Chat Screens (Message Chat list displays/adds newest chat message at bottom of the list) i doing exact thing. so for scrolling at the bottom of the GtkViewPort i am doing in the map event call back. GtkAdjustment* adjustment; adjustment = gtk_viewport_get_vadjustment(GTK_VIEWPORT(viewport_list)); gtk_adjustment_set_value(adjustment, gtk_adjustment_get_upper(adjustment)); So this works perfectly fine. it displays newest added widget in Vbox at the end. on some external events I add new Widgets to my VBox and call above code again to display these newly added widgets. on first add it does not scroll at all but on 2nd add to VBOX it scroll upto 2nd last Widget in the list. Why this might be happening. It there another way of scrolling GtkViewPort to the end? Thanks for reading :)

    Read the article

  • Gtk how to remove scroll bar.

    - by PP
    GTK how to remove scroll bar from GtkScrolledWindow. I want to keep scrolling but don't want the visual scrolling bar on right side i just want to hide it. using GTK + C. I Tried gtk_widget_hide_all(gtk_scrolled_window_get_vscrollbar(GTK_SCROLLED_WINDOW(scrolled_window))); but it does not work.

    Read the article

  • Gtk Scrollbar Less Scrolling Window with GtkViewPort

    - by PP
    I am totally stuck on this, i want to implement Scroll Bar Less Scrolling Window. can some one provide me some hint on how to implement scrolling window using GtkViewport. I want to implement something as displayed follows: When user clicks on the ScrollUp or ScrollDown button list will scroll up or down. Is it easy to implement or it is very very complected?

    Read the article

  • Gtk, How to scroll at bottom of viewport list?

    - by PP
    I have created one list with GtkVBox and GtkViewPort. and i am doing the scroll by two up/down GtkButtons. GtkAdjustment* adjustment; adjustment = gtk_viewport_get_vadjustment(GTK_VIEWPORT(viewport_ptr)); gtk_adjustment_set_value(adjustment, gtk_adjustment_get_value(adjustment)+(gdouble)SCROLL_SIZE); gtk_widget_show_all(viewport_ptr); But when I add the widget to VBox it gets added at the end of the VBox as I am using gtk_box_pack_start. So i want to scroll viewport up to this newly added last widget which is at bottom of the list.

    Read the article

  • Using `g_object_set_data` for passing user name.

    - by PP
    I am using g_object_set_data to set user name with event_box so in call back i can get it with in event_box pointer. g_object_set_data(G_OBJECT(event_box), "user_name", (gpointer)(user_name) ); but problem is that i am setting user_name which is not an pointer allocated string. It is an local string (not allocated on hip) which gets destroyed. So is it necessary to allocated and then use the pointer, i just want to associate one name with this event_box.

    Read the article

  • Gtk, How to update GtkViewPort with GtkVBox.

    - by PP
    I am having one GtkVbox and I am adding it to GtkViewPort. View port is created from Glade file. Now the problem is that my vbox keeps updating on every second (I keep adding widgets to vbox on every second) this vbox but my screen did not get updated as add widgets to my vbox. I can't create new vbox every time as I need to keep previously added widgets in vbox. How can I tell GtkViewPort to refresh list when I add new widgets to my GtkVBox?

    Read the article

  • Totally fed-up with get Gtk widget height and width.

    - by PP
    Trying to get Height and Width of GtkEventBox. Tried following Things. GtkRequisition requisition; gtk_widget_get_child_requisition(widget, &requisition); // Getting requisition.height 0 ---------------------------------------------------------- widget->allocation-x //getting 0 widget->allocation-height //getting -1 ---------------------------------------------------------- gtk_widget_get_size_request( widget, &height, &width); // Again getting 0 -------------------------------------------------------------------------- It is really bad that Gtk has not provided simple function that will give you the actual displayed height and with of the widget. Anyone tried to get height and with of GtkWidget?

    Read the article

  • How to set default name to GtkComboBox?

    - by PP
    I want to set my GtkComboBox to have some default value/name, on it as follows: +---------------+---+ | Image Options | X | +---------------+---+ | Image Option 1 | +-------------------+ | Image Option 2 | +-------------------+ | Image Option 3 | +-------------------+ "Image Options" will be just a Title and it will disappear once user selects any option from list. when user click on the list and selects "Image Option 3" then it will display selected value insted of "Image Options". "Image Options" will not be a part of option list.

    Read the article

  • vagrant up command very slow on OS X Lion

    - by Andy Hume
    When I run vagrant up to provision a new VM on Lion it takes an extremely long time, during which the entire Mac is very laggy and unresponsive. The output is as follows, the key point being the "notice: Finished catalog run in 754.28 seconds" > vagrant up [default] Importing base box 'lucid64'... [default] The guest additions on this VM do not match the install version of VirtualBox! This may cause things such as forwarded ports, shared folders, and more to not work properly. If any of those things fail on this machine, please update the guest additions and repackage the box. Guest Additions Version: 4.1.0 VirtualBox Version: 4.1.6 [default] Matching MAC address for NAT networking... [default] Clearing any previously set forwarded ports... [default] Forwarding ports... [default] -- ssh: 22 => 2222 (adapter 1) [default] -- web: 80 => 4567 (adapter 1) [default] Creating shared folders metadata... [default] Running any VM customizations... [default] Booting VM... [default] Waiting for VM to boot. This can take a few minutes. [default] VM booted and ready for use! [default] Mounting shared folders... [default] -- v-root: /vagrant [default] -- v-data: /var/www [default] -- manifests: /tmp/vagrant-puppet/manifests [default] Running provisioner: Vagrant::Provisioners::Puppet... [default] Running Puppet with lucid64.pp... [default] stdin: is not a tty [default] notice: /Stage[main]/Lucid64/Exec[apt-update]/returns: executed successfully [default] [default] notice: /Stage[main]/Lucid64/Package[apache2]/ensure: ensure changed 'purged' to 'present' [default] [default] notice: /Stage[main]/Lucid64/File[/etc/motd]/ensure: defined content as '{md5}a25e31ba9b8489da9cd5751c447a1741' [default] [default] notice: Finished catalog run in 754.28 seconds [default] [default] err: /File[/var/lib/puppet/rrd]/ensure: change from absent to directory failed: Could not find group puppet [default] [default] err: Could not send report: Got 1 failure(s) while initializing: change from absent to directory failed: Could not find group puppet [default] [default] Running provisioner: Vagrant::Provisioners::Puppet... [default] Running Puppet with lucid64.pp... [default] stdin: is not a tty [default] notice: /Stage[main]/Lucid64/Exec[apt-update]/returns: executed successfully [default] [default] notice: Finished catalog run in 2.05 seconds [default] [default] err: /File[/var/lib/puppet/rrd]: Could not evaluate: Could not find group puppet [default] [default] err: Could not send report: Got 1 failure(s) while initializing: Could not evaluate: Could not find group puppet [default] [default] Running provisioner: Vagrant::Provisioners::Puppet... [default] Running Puppet with lucid64.pp... [default] stdin: is not a tty [default] notice: /Stage[main]/Lucid64/Exec[apt-update]/returns: executed successfully [default] [default] notice: Finished catalog run in 1.36 seconds [default] [default] err: /File[/var/lib/puppet/rrd]: Could not evaluate: Could not find group puppet [default] [default] err: Could not send report: Got 1 failure(s) while initializing: Could not evaluate: Could not find group puppet [default] >

    Read the article

  • Import a puppet manifest from the node itself?

    - by bobinabottle
    I have a somewhat unique situation. Our systems team manages our main puppet master, and the development team is fine with everything however they are thinking of using it to control some elements on their desktop machines, whilst still being connected to our central puppet master. Since we don't want the changes they make to go into our puppet master.. is there a way of puppet importing a manifest from the node directly? As in.. on the developer machine, they put a file "/root/development.pp" or something, and then on our puppet master we put something like node { "developermachine": # Do the majority of normal things # import "/root/development.pp" } We have a few different options we can take about security of write access to the puppet manifests, but if puppet were to support something like this it would probably be the cleanest for us. Any help is appreciated :)

    Read the article

  • puppet service not stopping service

    - by Gregg Leventhal
    notice ("This should be echoed") service { "iptables": ensure => "stopped", } This does not stop iptables, I am not sure why. service iptables stop works fine. Puppet 2.6.17 on CentOS 6.3. UPDATE: /etc/puppet/manifests/nodes.pp node 'linux-dev' { include mycompany::install::apache::init include mycompany::config::services::init } /etc/puppet/modules/mycompany/manifests/config/services/init.pp class mycompany::config::services::init { if ($::id == "root") { service { 'iptables': #name => '/sbin/iptables', #enable => false, #hasstatus => true, ensure => stopped } notice ("IPTABLES is now being stopped...") file { '/tmp/puppet_still_works': ensure => 'present', owner => root } else { err("Error: this manifest must be run as the root user!") } }

    Read the article

  • Puppet: Conditional file source based on naming convention

    - by thinice
    I'm getting the ball rolling on puppet for my environment - and I'd like to have a conditional file resource based on whether or not the module itself contains a file based on a naming convention. So visually, assume a module named 'mysql' and it's layout: mysql/ /files /etc/ my.cnf my.hostname1.cnf my.hostname2.cnf /manifests init.pp ... So I'd like the block to verify if the resource for the module exists or not, and take action accordingly, in pseudo-terms: file { '/etc/my.cnf': if -f 'puppet:///mysql/etc/my.$hostname.cnf' { source => 'puppet:///mysql/etc/my.$hostname.cnf' } else { source => 'puppet:///mysql/etc/my.cnf' } } This way one wouldn't have to manage a csv file or the .pp file with a host specific case statement - is this possible?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >