Posts

display text on hovering mouse over a button in gwt -

display text on hovering mouse over a button in gwt - i using gwt 2.4. , not using uibinder. have button has background image. when place mouse on button should display text saying "submit" . kind of text says button does. button uiobject , can utilize settitle method on button set tooltip. or if want else on mouse over. create utilize of mouse handlers. read button documentation more details. button gwt

c# - How can i change in Graphics DrawString the text font size? -

c# - How can i change in Graphics DrawString the text font size? - i'm using method draw text on form1: private bool drawtext(bool draw, string texttodraw) { graphics g = this.creategraphics(); sizef size = g.measurestring(texttodraw, systemfonts.defaultfont,14); g.drawstring(texttodraw, font, brushes.red, picturebox1.location.x + (picturebox1.width / 2) - (size.width / 2), picturebox1.location.y - 30); homecoming draw; } i tried set width 14 on sizef size lline didn't alter dize , thing did moving bit text it's location . how can alter font size of text, , maintain perspective(if right word use) of text location ? this how when not using width 14 @ text in center above picturebox1. want when alter text size kept in center now. the text in reddish , it's in hebrew in case. try using bigger font: using (fon...

node.js - Installing node with homebrew on OSX. Npm not found -

node.js - Installing node with homebrew on OSX. Npm not found - i had working install of node , npm on osx, when updating npm went wrong. messed things more using homebrew seek , link, uninstall, , reinstall node. somewhere along way original node install, used installer nodejs.com, , brew usage on node conflicted. got node reinstall homebrew, when seek running npm npm command not found. here message when running brew install node. $ brew install node ==> downloading https://downloads.sf.net/project/machomebrew/bottles/node-0.10.3 downloaded: /library/caches/homebrew/node-0.10.32.mavericks.bottle.tar.gz ==> pouring node-0.10.32.mavericks.bottle.tar.gz ==> caveats bash completion has been installed to: /usr/local/etc/bash_completion.d ==> create install npm err! npm err! additional logging details can found in: npm err! /usr/local/lib/node_modules/npm/npm-debug.log npm err! not ok code 0 make: *** [install] error 3 warning: post-install step did not finish ...

Ruby on Rails Association with model many-to-many -

Ruby on Rails Association with model many-to-many - i`m beginner ror , trying handle many-many association i handled relationship between models , migration trip model class trip < activerecord::base has_many :relationships has_many :topics, through: :relationships end user model class user < activerecord::base has_many :relationships has_many :trips, through: :relationships end relationship model class relationship < activerecord::base belongs_to :user belongs_to :trip end my migration class createrelationships < activerecord::migration def alter create_table :relationships |t| t.belongs_to :user t.belongs_to :trip t.timestamps end add_index :relationships, :user_id add_index :relationships, :trip_id end end user_controller class userscontroller < applicationcontroller before_action :set_user, only: [:show, :edit, :update, :destroy] def trips @user = user.find(params[:id]) @trips = @user.trips end def index @user...

java - Count Down Timer? -

java - Count Down Timer? - i create simple application contain quiz questions , user select reply need help in adding count downwards timer in app 20 sec when time transfer straight next question , when user reply in time transfer next question thank import java.awt.borderlayout; import java.awt.event.actionevent; import java.awt.event.actionlistener; import javax.swing.jframe; import javax.swing.jlabel; import javax.swing.timer; import javax.swing.windowconstants; public class countdown extends jframe { // countdown 42 seconds public static int countervalue = 42; public static timer timer; public static jlabel label; public countdown() { initgui(); } private void initgui(){ borderlayout thislayout = new borderlayout(); this.setdefaultcloseoperation(windowconstants.dispose_on_close); this.getcontentpane().setlayout(thislayout); label = new jlabel(); label.settext(string.valueof(countervalue)); this...

c - Move a pointer location around to write a recursively allocated buffer -

c - Move a pointer location around to write a recursively allocated buffer - apologies if title doesn't create sense, i've been staring @ monitor 15 minutes trying come one. i'm using library function c api (in 64-bit xubuntu 14.04) move set number of int16_t values buffer , repeat set number of times, described here in (sort of) pseudo-code: int16_t *buffer = calloc(total_values_to_receive, 2 * sizeof(samples[0])); while (!done){ receive_into_buffer(buffer, num_values_to_receive_per_pass); fwrite(buffer, 2 * sizeof(samples[0]), num_values_to_receive_per_pass, file); values_received += num_values_to_receive_per_pass; if (values_received == total_values_to_receive){ done = true; } } basically receive set number of values on each pass , writes values file, note same file appended each time. e.g. if total_values_to_receive = 100 , num_values_to_receive_per_pass = 10 , there 10 passes in total. what do, increment speed, have wr...

Nintex Workflow 2007 - global settings / variables -

Nintex Workflow 2007 - global settings / variables - the problem: when create workflow on uat/stage environment need import production environment. need alter environment urls (web service calls , such) , email addresses. is possible: store urls , emails in global configuration nintex workflow pick whenever deploy workflow 1 time again production wouldn't need go each step , edit settings? got email nintex support: dear jakub, thank e-mail. the suggestion have utilize workflow constants. can configure workflow constants in central administration > application management > manage workflow constants. in workflow utilize lookup reference points appropriate workflow constant. long workflow constant name same in both environments workflow pick workflow constant contain relevant url environment. hope helps. kind regards simon muntz software back upwards engineer - team lead nintex workflow everyone® | nin...