Posts

Bug in a Scroll of DataGrid - WPF? -

Image
i hope can me this: i have datagrid 20 rows , every time check checkbox in 1 of columns, label value increasing 100 each time or decreasing if unchecked. so, once i've checked rows value of label 2000. see below: when reduce height of datagrid vertical scroll appear , when i'm checking checkboxes procedure seem similar can see: but if scroll vertical bar downwards, other checkboxes appear enabled or checked, idea why? in case i've checked first 6 checkboxes , value of label 600, fine, why other ones appear checked ? thanks.. here code i've used: <stackpanel name="spuno" width="auto " lostkeyboardfocus="spuno_lostkeyboardfocus" > <button name="btn_accion" margin="5" width="100" height="30" content="accion" click="btn_accion_click"> </button> <label name="lbl_muestra" width="300" margin="5"/...

java - Platform specific cut paste mnemonics swing. -

i'm developing own text-like jcomponent. isn't subclass of jtextcomponent, because isn't using document model. i'd still support standard mnemonics of cut/copy/paste, know keystrokes depend on platform. ultimately, i'll let user edit keybindings themselves, now, i'd @ least default sensible. is possible lookandfeel somehow? or need detect platform myself , have mapping per platform? i'm using java 8 if makes difference. there no laf property i'm aware of purpose. however might able use information inputmap of laf. following works windows 8: import java.awt.*; import javax.swing.*; public class platformmnemonics { public static void main(string[] args) { keystroke copykeystroke = null; keystroke cutkeystroke = null; keystroke pastekeystroke = null; inputmap im = (inputmap) uimanager.get("textfield.focusinputmap"); (keystroke keystroke: im.keys()) { b...

Android GCM registration / device id for push notification is getting changed everytime -

i used code gcm registration id. ( earlier ) // make sure device has proper dependencies. gcmregistrar.checkdevice(this); // make sure manifest set - comment out line // while developing app, uncomment when it's ready. gcmregistrar.checkmanifest(this); // registerreceiver(mhandlemessagereceiver, new intentfilter( // commonutilities.display_message_action)); // gcm registration id final string regid = gcmregistrar.getregistrationid(this); // check if regid presents if (regid.equals("")) { // registration not present, register gcm gcmregistrar.register(this, commonutilities.sender_id); } else { appsharedpreferences.savedeviceidpreference(ctx, regid); // device registered on gcm if (gcmregistrar.isregisteredonserver(this)) { // skips registration. // ...

usb - Arduino Serial Monitor shows strange ASCII characters -

Image
i connected arduimu v3+ via ftdi-cable mac (os x 10.10) (latest vc ftdi driver installed , loaded). inside arduino-software serial monitor (monitoring /dev/cu.usbserial-aj038nz3) shows lot of weird ascii characters. reason problem? instead of using arduino serial monitor, use os x's ability determine baud rate automatically. whenever, use ftdi cable, monitor input using screen command. in case can grep name of device: ls /dev | grep tty\.[uu]sb | awk '{print "/dev/"$1}' | xargs screen check out man screen bit more background. or use simple version finding name of port in /dev folder using screen <name_of_ftdi>

python - How can I hide sensitive data before commiting to GitHub (or any other Git repo)? -

i'm creating code demonstrate how consume rest service in python, don't want api keys visible people when push changes github. how can hide such information? if you’re using python, might consider using keyring module . allows store secret information in system keychain, , there’s no risk accidentally checked git. here’s simple example storing , retrieving api key, based on docs: >>> import keyring >>> keyring.set_password("my_api_key", "username", "abc1234sekrit") >>> keyring.get_password("my_api_key", "username") 'abc1234sekrit'

Import {} from location is not found in VS Code using TypeScript and Angular 2 -

i trying out new angular 2 forms. import statements follows: import {bootstrap, onchange, ngif, component, directive, view, ancestor} 'angular2/angular2'; import {formdirectives, ngcontrol, validators, ngform} 'angular2/forms'; import {regexpwrapper, print, ispresent} 'angular2/src/facade/lang'; import {reflector} 'angular2/src/reflection/reflection'; import {reflectioncapabilities} 'angular2/src/reflection/reflection_capabilities'; the 'angular2/angular2' resolves fine, none of other " from " locations resolve. error is: cannot find module 'angular2/forms'. all of these components in node_modules directory. if put in full path: import {formdirectives, controldirective, validators, templatedrivenformdirective} 'c:/users/deb/node_modules/angular2/forms'; then works. however, should not need use full path. missing when set tsconfig or there else wrong? problem example application did...

php - Zend Form getValues() doesn't work -

i'm trying create simple form zend, need use form in part, create default form in controller modify occurrence private function. have 2 problems: the form getvalues() doesn't take value of text element. i put render @ end of form action, doesn't render right page. the form consists of text field , sumbit button here code of controller: that customize form private function getsearchform($action = '', $name, $type, $placeholder) { $urlhelper = $this->_helper->gethelper('url'); $this->_searchform = new application_form_admin_search_search(); $this->_searchform->setname($name); $text = $this->_searchform->getelement('ricerca'); $text->setlabel('ricerca '.$type); $text->setname($type); $text->setattrib('placeholder', $placeholder); $this->_searchform->setaction($urlhelper->url(array( 'controller' => 'admin', 'actio...