Posts

Showing posts from March, 2012

c# - File.Move Not Working, No Error -

i'm running issues trying move flat html files around on server. in short, process says should take whatever file in newpath (if there one) , move backup folder. take file in old path , move new path. checks see if successful (i.e. newpath exist) , if wasn't, replaces backup. i've pasted method below viewing pleasure. public bool movecontent(string oldpath, string newpath, string backupdirectorypath, out string backuppath) { backuppath = string.empty; var oldfilepath = httpcontext.current.server.mappath(oldpath); var newfilepath = httpcontext.current.server.mappath(newpath); var newdirectory = path.getdirectoryname(newfilepath); // if file we're moving doesn't exist, fail. if (!file.exists(oldfilepath)) throw new invalidpathexception(oldfilepath); // if no destination found, fail. if (string.isnullorwhitespace(newdirectory)) throw new invalidpathexception(newfil

ibm - Databean to fetch CATENTDESCOVR -

i need fetch data of catentdescovr using databean. is there databean provided ibm data? i using ibm websphere commerce v7.0 feature pack 8 this question , here below explanation how catentdescovr works , answer based on wcs 7.0 , fep 7 . believe fep 8 have same api , don't think ibm enhanced in fep8! the information of catentdescovr indexed , stored in solr, reason indexing searching , spellcheck, can see how copying these info defultsearch , spellcheck make these values searchable , part of spellcheck (end of schema.xml). if @ how these data indexed , stored in solr in schema.xml find following line <!-- catentry's description override: map table catentdescovr --> <field name="nameoverride" type="wc_text" indexed="true" stored="true" multivalued="true"/> <field name="shortdescriptionoverride" type="wc_text" indexed="true" stored="true&quo

winforms - Dynamically add components to windows form C# -

i trying add list of strings used text component of labels on windows form. below code using this. have generating message box show me being created, when add them form, first string ever shown on form, despite message box popping each string indicating list populated correctly. great. list<label> labellist; public void showdialog(list<string> columns) { labellist = new list<label>(); form updatedialog = new form(); updatedialog.width = 500; updatedialog.height = 500; (int = 0; < columns.count(); i++ ) { //label label = new label() {text=columns[i].tostring() }; labellist.add(new label() {text=columns[i].tostring()}); } (int j = 0; j < labellist.count(); j++ ) { updatedialog.controls.add(labellist[j]); messagebox.show(labellist[j].text.tostring()); } you need set location of created labels. positioned on top

javascript - Long load times on website when running R script -

i'm attempting query mysql database on webpage. within r script, have 4 different "query" functions along multiple calculations display statistical graphs webpage, dependent on "n" variable. i'm using php (using shell_exec) call r , send "n". i'm using rmysql & ggplot2 libraries in r. running r script 1 basic query function (includes dbconnect(), dbgetquery , on.exit(dbdisconnect()), using png(), plot(), , dev.off() takes ~15 seconds display graph on website. with 2 functions , 2 plots, haven't had patience wait out see if works since load time long. queries rather lengthy (could made easier through looping), i've tested them work through mysql , i'm not sure how avoid loop errors sql. could long loading time due having dbconnect/dbdisconnect in each individual function? should once in script (i.e. create new "connect" function , call other functions here)? is fact i'm running multiple , lengthy que

point of sale - Verifone vx520 change printer font -

i want change verifone vx520 internal printer font. have written program in c , used font designer tool creating printer font. have used <esc>m<s><t> command download font table still can't change printer's font. how can it? rather using straight escape sequences, may consider using "p3700_" functions on 520. specifically, want p3700_dnld_font_file() , p3700_select_font(). according documentation: #include <printer.h> short p3700_dnld_font_file(short handle, //the open printer handle short h_font_file, //the open file handle short font_table //font table select ); short p3700_select_font(short h_comm_port, // open printer handle short font_size, // size of font short font_table // font table select ); the documentation has part of example program (modified slightly): //variable declarations int handle; // file handle printer open_block_t parm; // structure fill comm parameters com port int h_font_file; // handle font fi

numpy - Putting multiple columns into callable sub arrays python -

i have set of data in columns, first column x values. how read in? if want store both, x , y values can do ydat = np.zeros((data.shape[1]-1,data.shape[0],2)) # write x data ydat[:,:,0] = data[:,0] # write y data ydat[:,:,1] = data[:,1:].t edit : if want store y-data in sub arrays can do ydat = data[:,1:].t working example: t = np.array([[ 0., 0., 1., 2.], [ 1., 0., 1., 2.], [ 2., 0., 1., 2.], [ 3., 0., 1., 2.], [ 4., 0., 1., 2.]]) = t[:,1:].t array([[ 0., 0., 0., 0., 0.], [ 1., 1., 1., 1., 1.], [ 2., 2., 2., 2., 2.]])

xcode - iOS Today Widget will not install on iPhone 4 running iOS 7.1, but works on other devices -

just created today widget using xcode 6.3.1 , have working on mini running ios 8.3. when try , install on iphone 4 running ios 7.1, not install or run , xcode reports "finished running" no errors etc. we checking out log, etc, wanted see if else has seen this. that's because widgets work on ios 8 or macos 10.10 & newer versions of os'es. which documented in first paragraph of apple documentation .

php - Sharing login between mobile application and web site -

i'm trying figure out if there's way perform sort of single sign on, sharing login between mobile site product , native application implementation. basically, user perform login on mobile site , become logged in mobile application (if installed) , vice versa, assuming he's using same device. possible? if yes, same concept can applied same user surfing different devices? thanks!

swift - UIButton button titles changes by itself on click of another button to its title -

i have 12 buttons in app. last button title changes title of other button press. example, if button 3's title joe, last button ( tag 12 ) automatically changes joe (even though there no code change title. weird! ps: set title in code: func btnseticon(btnnumber: int){ println("in btnseticon btnnumber = \(btnnumber)") btn.titlelabel?.numberoflines = 2 btn.titlelabel?.textalignment = nstextalignment.center btn.titlelabel?.adjustsfontsizetofitwidth = true detail1.keyboardtype = uikeyboardtype.asciicapable detail1.rightviewmode = uitextfieldviewmode.never switch btnnumber { case 1: btn.settitle("bucket\nlist", forstate: .normal) case 2: btn.settitle("shop\nlist", forstate: .normal) case 3: btn.settitle("grocery\nlist", forstate: .normal) case 4: btn.settitle("to do\nlist", forstate: .normal) case 5: btn.settitle("notes\nto self", forstate: .norma

angular ui router - Pre-render sticky states -

i trying build tabbed application using sticky states ui-router extras. the contents of tabs contain directives "register" service. have, on initialization, full registration service knows directives. means rendering states in background, without displaying them, if user manually clicked on tabs before starting use application. is there way can ? thank you.

mysql - SQL Select - Where search term contains '.' -

i'm trying mysql select query on table looks bit this: ------------------------------- | id | domain | etc... |------+--------------+-------- | 1 | dev.howmuch | |------+--------------+-------- | 2 | devhowmuch | at moment i'm trying simple select * `tbl_swad_apps` `domain` = 'devhowmuch' which works fine, try select * `tbl_swad_apps` `domain` = 'dev.howmuch' it returns no results, guessing it's trying treat fullstop wildcard or table reference ( table . field ). how can query purely string? thanks edit: appreciate guys none of these working: there no trailing or leading spaces. if try like '%howmuch%' both results turn up, if like '%.howmuch%' nothing comes up. hex(domain) result requested: 1 dev.howmuch 646576a9686f776d756368 2 devhowmuch 646576686f776d756368 the cell contains this: d e v . h o w m u c h 64 65 76 a9 68 6f 77 6d 75 63 68 full stop should 2e (it's 7-bi

javascript - Google Maps API infowindows all have the same content -

i have old infowindows in loop problem content last loop showing in infowindows. yes know there several questions on stack overflow none of them seem work me. this javascript: var map; var geocoder; $(function () { var mapoptions = { zoom: startzoom, center: new google.maps.latlng(startlat, startlng) } var marker, i; $('#map-canvas').height($('#map-canvas').width() / 2); var mapoptions = { zoom: startzoom, center: new google.maps.latlng(startlat, startlng) } map = new google.maps.map(document.getelementbyid('map-canvas'), mapoptions); if ( ! isaddress && $('#country').val() > 0) { geocoder = new google.maps.geocoder(); geocoder.geocode({'address': $('#country').find('option:selected').text()}, function(results, status) { if (status == google.maps.geocoderstatus.ok) { map.setcenter(results[0].geometry.l

javascript - Scalatest PlusPlay Selenium not able to resize a window -

been digging @ while, , can't seem find way resize window using scalatest plus. the method i've found searching online or documentation @ http://doc.scalatest.org/2.1.5/index.html#org.scalatest.selenium.webbrowser is executescript("window.resizeto(700,700);") but has been unresponsive me (no errors, no nothing). there method covers missing? brief sample of code: import java.util.concurrent.timeunit import org.scalatestplus.play._ import org.openqa.selenium._ import com.sun.xml.internal.bind.v2.todo import scala.collection.javaconverters._ import controllers.application import models.{item, itemprioritybucket} import play.api.test._ import org.scalatest.time._ class webspec extends playspec oneserverpersuite allbrowserspertest { implicit override val patienceconfig = patienceconfig(timeout = scaled(span(5, seconds)), interval = scaled(span(20, millis))) override lazy val browsers = vector( // firefoxinfo(firefoxprofile), chromeinfo

angularjs - Alter $resource default methods -

how can alter , add default $resource return object methods? the return object defaults in question (from docs ): a resource "class" object methods default set of resource actions optionally extended custom actions. default set contains these actions: { 'get': {method:'get'}, 'save': {method:'post'}, 'query': {method:'get', isarray:true}, 'remove': {method:'delete'}, 'delete': {method:'delete'} }; as understand, not follow restful principles in regard when use post , put. perhaps better have following methods: { 'get': {method:'get'}, 'save': {method:'put'}, 'create': {method:'post'}, 'query': {method:'get', isarray:true}, 'remove': {method:'delete'}, 'delete': {method:'delete'} }; is there way change default object $resource creates, not need alter each re

python - Wait until process in remote server finishes using Fabric -

setup i using fabric kick off process on remote server. local server executes python file runs 3 functions in sequence: 1st , 3rd in local server , 2nd in remote server, follows. local_file.py local_function_1() remote_function() local_function_2() the remote function 1 specified in local fabfile , follows. fabfile.py from fabric.api import * @hosts(remote_server) def remote_function(): run('python function_on_remote_server.py') question local_function_2 should run after remote_function has finished running, unsure how accomplish this. i have considered (1) waiting fixed number of seconds before local_function_2 runs , (2) adding intermediary local function checks existence of output remote_function before running local_function_2 . how can delay execution of function on local server until after function on remote server has finished running? one way change way you're calling remote_function, , use fabric execute instead. from fa

Locking a signed PDF using iTextSharp after Long Term Validation(LTV) has been added using LtvTimestamp -

is possible stop annotations , / or signatures being added after pdf has had ltv added using ltvtimestamp? i've tried adding pdfsignatureappearance.certified_no_changes_allowed on initial signing adding ltv invalidates signature. any appreciated. in general first of all, no, not possible stop annotations , / or signatures being added after pdf has had ltv added in general because 1 can program utility adding annotations or signature fields ignoring permissions. so let's assume talking tools respecting permissions. in case question according specification permissions interpreted. permissions in iso 32000-1 what changes or not allowed in iso 32000-1, has been described in this answer . iso 32000-1 not know pades-4 ltv information or document time stamps. sees latter normal signatures using non-interoperable format , has no interpretation former. thus, if initial signature certification signature "with form fill-in , digital signatures allowed&qu

c# - How do i save and load with streamwriter and streamreader -

i have 3 forms, main form month calendar , panel shows appointment, , 2 others,form2 , form3 opening button main form. want have save button in form2 , form3 , when pressed, save information enter in textboxes , selected combobox , when application close , open again, information should load , show in panel.(with streamwriter , streamreader) i tried xml method can't find out hope method me! here xml solution using system; using system.collections.generic; using system.componentmodel; using system.data; using system.drawing; using system.linq; using system.text; using system.windows.forms; using system.xml; using system.xml.serialization; using system.io; namespace windowsformsapplication6 { public partial class form1 : form { const string filename = @"c:\temp\test.txt"; list<textbox> boxes = null; list<combobox> cboxes = null; public form1() { initializecom

arduino - Upload sensor data to xively using GPRS+GPS shield -

i´m using arduino uno , gprs+gps shield cooking hakcs ( http://www.cooking-hacks.com/gprs-gps-quadband-module-for-arduino-sim908 ). have upload sensor data xively can´t. code have used: int8_t answer; int onmodulepin = 2; char aux_str[50]; char server[] = "api.xively.com"; char port[] = "8081"; string temperature = "2"; string tcp_message = "{\"method\": \"put\",\"resource\": \"/feeds/**********/\",\"params\": {},\"headers\": {\"x-apikey\": \"*******************************\"},\"body\": {\"version\": \"1.0.0\",\"datastreams\": [{\"id\": \"temperature\",\"current_value\": \"" + temperature + "\"}]}}"; void setup() { pinmode(onmodulepin, output); serial . begin(9600); serial . println("starting..."); power_on(); delay(3000);

excel - Why does write(), write both the open workbook, and to outputstream, and how can i only write to existing workbook? -

if following: path originalpath = paths.get("src/test/resources/original.xlsm"); file originalfile = copypath.tofile() workbook workbook = workbookfactory.create(originalfile); //populate values fileoutputstream fileout = new fileoutputstream("src/test/resources/test.xlsm"); workbook.write(fileout); then both test.xlsm , original.xlsm populated values if don't use write() , of course no test.xlsm created, nothing updated in original.xlsm however if do workbook.write(system.out); then original.xlsm updated why write write workbook, says nothing in documentation that? javadoc: "write out workbook outputstream." is there other way of only updating original.xlsm?

vba - SSRS - Median by Group - Jagged Array? -

i'm faced challenge in 2 parts. i've been requested replace 3 columns in matrix aggregates on name in row group. 3 columns outside of column group. challenge 1 - matrices want summarize data pane. there seems no way show raw data (and hide it, in order these rows during runtime populate array). challenge 2 - need calculate median name. means either, during runtime, need calculate 1 median each name @ time, reset array, , start fresh next name value, or, need multi-dimensional array each ordinal array corresponding name. i'm total code monkey @ vb. here's i've borrowed online post calculating median in ssrs. dim values system.collections.arraylist function addvalue(byval newvalue decimal) if (values nothing) values = new system.collections.arraylist() end if values.add(newvalue) end function function getmedian() decimal dim count integer = values.count if (count > 0) va

c# - Apparently nondeterministic behavior in this code calling out to an external process -

we have following class in infrastructure code. part of msbuild task execute powershell. git commands available me in powershell environment; not git problem. public class git { public static string getcurrentbranch() { console.writeline("trying find current git branch..."); string branch = null; /* git rev-parse --abbrev-ref head */ var processstartinfo = new processstartinfo("git", "rev-parse --abbrev-ref head") { redirectstandardoutput = true, redirectstandarderror = true, useshellexecute = false }; var process = new process(); process.errordatareceived += (sender, args) => { branch += args.data; }; process.outputdatareceived += (sender, args) => { branch += args.data; }; process.startinfo = processstartinfo; process.start(); process.beginerrorreadline(); process.beginoutputreadline(); pr

javascript - "getDate().toJSON()" loses a day -

i'm using pikaday date picker plugin (through angular directive , momentjs ) , sending value server. converting json seems lose day though: var d = mypikaobject.getdate(); console.log(d); // thu apr 30 2015 00:00:00 gmt+0200 (sast) console.log(d.tojson()); // 2015-04-29t22:00:00.000z i think momentjs problem have no idea what's going wrong. giving you're getting time momentjs , can try moment.utc() method. docs say: as of version 2.0.0, locale key can passed third parameter moment() , moment.utc() moment('2012 juillet', 'yyyy mmm', 'fr'); moment('2012 july', 'yyyy mmm', 'en'); you can lot more utc() method. moment.utc(); moment.utc(number); moment.utc(number[]); moment.utc(string); moment.utc(string, string); moment.utc(string, string[]); moment.utc(string, string, string); moment.utc(moment); moment.utc(date);

Magento Templates - Can extensions be bundled with a theme? -

i have real noob magento question. i'm helping friend change template store using worried losing functionality of of extensions such ajaxsearch. don't know if it's extension or part of template. can't seem figure out if of extensions built theme or if separate extensions. there easy way tell? to give example ajaxsearch js file's path seems in template path e.g http://www.example.com/skin/frontend/default/templatename/js/ajaxsearch.js , if go system > configuration can see listed in sidebar under templates-master (which think brand name). in case extension , how file paths work extensions? fact skin in file path throwing me off. thanks! fast way: each magento extension provided archive (.tgz). unpack folder outside magento , check have next path or not: unpacked_folder/skin/frontend/default/templatename/js/ajaxsearch.js (another trick in first lines of ajaxsearch.js file, authors write extension or theme names in it). long way: find file

html - Inner DIV fixed on Scrollable outer DIV -

Image
red box - container blue box - left fixed table column image description: blue box: div contains table, contains columns wanted fixed. red box: container of whole table. basically wanted have fixed right columns, porting plugin in jquery. but im gonna make static 1 first html , css the problem: seen in image, fixed div seems overlap scrollable container resides, wanted relative scroll port or can scrolled vertically , fixed horizontally why wouldn't using other plugin?.. data putting complicated when using plugin. tailoring time consuming.. maybe if have time can tailor open source one.. please see source below view file <div class="row table-wrapper"> <div class="pinned-column"> <table class="table table-bordered"> <thead> <tr> <th colspan="4"> <div align="right"> fixed data he

regular language - How does "δ:Q×Σ→Q" read in the definition of a DFA (deterministic finite automaton)? -

how δ: q × Σ → q in english? describing × , → mean help. δ a mathematical function called transition function . like. z = f(x, y) a function in mathematical defines mapping of elements in 1 set set. in function set of input arguments called domain of function , output rage. [answer]    in expression "δ:q×Σ → q" , × means cartesian product (that set), , → mapping . "δ:q×Σ → q" says δ transition function defined mapping q×Σ q . where, domain of δ q × Σ , range q . note: cartesian product mathematical possible order pair (mapping) between 2 sets. you can say: δ transition function defined mapping between(or associates) cartesian product of set of states q , language symbols Σ set of state q . abbreviated δ: q×Σ → q here, q finite set of states , Σ finite set of language symbols. additionally in automated can represent transition function in tree ways. 1. transition table 2. transition gr

reactjs - Facebook flux deficiency -

Image
in flux-chat example, messagesection listens both threadstore , messagestore renders when threadstore store changes , once again when messagestore changes. however, since state depends on both, first render done when state not complete. unless i'm missing not good, no? this 1 example pattern repeating. update: after long discussion thread here conclusions: react makes sure render fires once @ end if setstate called multiple times. the getter functions build state called multiple times since these pure functions not cause bugs 'small' overhead. my suggestion use maximum of 1 store per react component gathers state other stores coordinating them using waitfor , notifies component when state ready. way there no overhead , no reliance on react's internal magic. similar having 'view model' there no 2 way binding , data flows in 1 direction store component. in general, not problem long each store internally consistent. if there data depen

java - Getting null from getters method -

i getting null getters method when trying save in list , calling list in servlet. please me out rid of this. in advance. adding first getters , setters method code dao code , servlet code. package com.vechile.model; public class driversearchresult { private string id; private string name; private string address; private string city; private string contact; private string country; public string getid() { return id; } public void setid(string id) { id = id; } public string getname() { return name; } public void setname(string name) { name = name; } public string getaddress() { return address; } public void setaddress(string address) { address = address; } public string getcity() { return city; } public void setcity(string city) { city = city; } public string getcontact() { return contact; } public void setcont

c# - how to add arguments to button click that will only change part of cmd -

i'm trying build first c# program , got stuck @ changing part of button click arguments. i need ssid , key able changed: strcmdtext = "/c netsh wlan set hostednetwork mode=allow ssid=changeme key=changeme keyusage=persistent & netsh wlan start hostednetwork"; here code: using system; using system.collections.generic; using system.componentmodel; using system.data; using system.drawing; using system.linq; using system.text; using system.windows.forms; using system.diagnostics; namespace wifion { public partial class form1 : form { public form1() { initializecomponent(); } private void button1_click(object sender, eventargs e) { string strcmdtext; strcmdtext = "/c netsh wlan set hostednetwork mode=allow ssid=changeme key=123123123 keyusage=persistent & netsh wlan start hostednetwork"; system.diagnostics.process.start("cmd.exe", strc

php - MySqli multiple queries how to handle result faster way -

i have insert thousand of records. use msqli::multi_query() in loop , want 'multi_query' block of n query (where 'n' parameter). first insert goes ok, second goes wrong because have manage result : while($mysqli->more_results()) { $mysqli->next_result(); if($res = $mysqli->store_result()) // added closing bracket { $res->free(); } } the problem chek slow. question : how can optimize bulk insert makeing faster manage of result ? if inserting in 1 table use batch mod in insert. example: insert table (field1,field2,field3) values (value1,value2,value3),(value4,value5,value6) use for or foreach in php make query , use mysqli_query . judging errors mentioned in comment section, violating ket restrictions meaning trying insert same value twice. if inserting in different tables, can use multi_query interface. prepare 1 query insert1;insert2; , use multi_query $con->multi_query($query); while

ios - xcglogger via cocoapods results in No Such Module -

Image
caveat: new cocoapods... have swift xcode project , i'm trying use xcglogger pod, after adding podfile, (with use_frameworks! ), pod install -- looks good: but when put import xcglogger in appdelegate, compiler tells me no such module: xcglogger. import uikit import crashlytics import xcglogger what have done wrong (this time:) ? thanks! according to: https://github.com/davewoodcom/xcglogger how use add xcglogger project subproject project, , add either ios or os x library dependancy of target(s). under general tab of target, add xcglogger.framework embedded binaries. then, in each source file: import xcglogger you don't need cocoapods this. download .zip link above. unzip , use .xcodeproj located in library directory step 1... add xcglogger project subproject: add ios library dependency of target: under general tab, add xcglogger.framework embedded binaries: then... import xcglogger func application(application: uiapplication, didf

Positioning buttons in menu header polymer -

Image
how place paper-icon-button in right corner of application header ? icon floats under title , it's not looking good. screenshot below my element code: <polymer-element name="sidebar-layout" attributes="selected" noscript> <template> <link rel="stylesheet" href="/assets/css/sidebar-layout.css"> <core-scaffold> <core-header-panel navigation flex mode="seamed"> <core-toolbar>menu</core-toolbar> <core menu theme="core-light-theme"> <core-item icon="info-outline" label="notes" active?="{{selected == 'notes-page'}}"><a is="pushstate-anchor" href="/notes"></a></core-item> <core-item icon="key" label="logowanie" active?="{{selected == 'login-page'}}}}"><

actionscript 3 - Is that possible to access the cam and mic of remote user in video chat using actionscript3.? -

i working on actionscript3. here using av-chat module video chat.i add recording functionality in it.now want record remote user video in it. possibility in action script access cam , mic of remote user.?? in advance. when use camera.get() or microphone.get() methods, flash player displays privacy dialog box, in user can allow or deny access camera , microphone. hope work.

abap - How to get value range of system-variable sy-dbsys -

in abap can use system variable sy-dbsys find out database running underneath abap system, e.g. 'hdb' hana or 'oracle'. is there list of potential database systems used? want define mapping of common values of sy-dbsys in coding, since can generate native sql on fly depending on db system. thanks the data element dbsys_type_selector refers domain of same name covers possible values of sy-dbsys . used in class cl_db_sys .

windows - How to replace with percent character in cmd.exe? -

in windows command prompt, trying replace space in set string=hello world string %20 . naively trying use string literal %20 this: set string=%string: =%20% results in helloworld20% . trying use escape character ^ this: set string=%string: =^%20% also results in helloworld20% . trying escape % doubling this: set string=%string: =%%20% results in helloworld%20% . tried use variable replacement this: set r=%20 set string=%string: =%r%% which results in helloworldr%% . i found this , handles escaping of percent characters in variables. found this , handles escaped input of percent characters. neither 1 seems apply string replacing. a tutorial/docu page windows cmd.exe found online tells me have correct syntax, not cover replacing percent characters. after reading of those, tried: setlocal enabledelayedexpansion set string=!string: =%20! which results in !string: =%20! . i out of ideas, can help? you need delayed expansion in case: set "

c# - Why KeyDown event wont fire? -

my original intention in make enter event text box run btnok_click event, after several try can't make happen, tried way , try keypress key still didn't work, made these 2 simple code, still didn't work either; private void textbox2_keydown(object sender, keyeventargs e) { if (e.keycode == keys.enter) { //enter key down //btnok_click(this, e); system.windows.forms.messagebox.show("my message here"); } } private void textbox2_keypress(object sender, keypresseventargs e) { if (e.keychar == (char)keys.return) { //enter key down //btnok_click(this, e); system.windows.forms.messagebox.show(((char)keys.return).tostring()); } } any suggestion? read similar questions , said set isinputkey property true can't find anywhere. use visual studio 2008 two options : 1) use key event as public void txt_keyup(object

java - Activity messed after playing YUV video use opengles on Android -

i use opengl es jni play yuv video, video ok. but when close glsurfaceview , return main activity. the characters , images display in main activity become messed. all icons becomes black solid rectangle. characters becomes white solid rectangle. the code likes come webrtc , modified else. i'm c programmer , not familiar opengl. it's big problem me solve problem. i create handle in jni this: bool isattached = false; jnienv* env = null; if (_jvm->getenv((void**) &env, jni_version_1_4) != jni_ok) { // try attach thread , env // attach thread jvm jint res = _jvm->attachcurrentthread(&env, null); // jni env thread if ((res < 0) || !env) { loge("%s: not attach thread jvm (%d, %p)", __function__, res, env); return -1; } isattached = true; } // vieandroidgles20 class jclass javarenderclasslocal = reinterpret_cast<jclass> (env->findclass("com/wg/rgc/library/gl/vieandroi

c# - Expression Trees with dynamic parameter -

i want convert this: func<dynamic, object> myfunc = t => return t.name + " " + t.surname; into expression tree. what have came with, this: parameterexpression target = expressionparameter(typeof(dynamic), "target"); parameterexpression result = expressionparameter(typeof(object), "result"); blockexpression block = expression.block( new [] { result }, expression.assign( result, expression.add( expression.add( expression.property(target, "name"), expression.constant(" ", typeof(string)) ), expression.property(target, "surname") ) ) ); func<dynamic, object> myfunc = expression.lambda<dynamic, object>>(block, target).compile(); however, compiler doesn't typeof(dynamic) , , kind of it. dynamic isn't type, object in essence. so proceeded chang

Have a texbox with "tag" like behavior in wpf? -

Image
lets have textbox control user can type in, want textbox control behave similiar "tags" textbox appears right below, type in textbox, show list of suggestions, when user selects suggestion pop in textbox , display small button. i have wired textbox, listbox showing in popup suggestions , go selection of suggestions working, strugglinh making button appear , dissapear when user backspaces etc. requirements: need have 1 tag. problems: want button inside texbox, appears outside right now. do guys have suggestions? my xaml: <grid> <grid.columndefinitions> <columndefinition width="30"></columndefinition> <columndefinition width="*"></columndefinition> <columndefinition width="8"></columndefinition> <columndefinition width=&q

How to read Jenkins console SVN output in the Maven MOJO -

i have jenkins job first update code svn repository , need work on updated files svn in maven plugin. so, how can updated files list jenkins mojo (extends org.apache.maven.plugin.abstractmojo) class? i think 1 way read jenkins console where, svn log printed , parse console output , updated files list. think there better way this. thanks. so need record state of files , afterwards need check files have changed. problem here is: called on rev 3 , next time called rev 7, update (picking changed / new files) has being done (for example) jenkins , need know files have been changed/added? can being done using supplemental information stored in target folder (for example fingerprints of files) checked maven-compiler-plugin does. reading svn brings same problem? state have been called first time? you need store information last update...so store revision number somewhere? next time called compare stored , can make decision do... better such things on file base independen

javascript - How animate the height of the background image -

i have tried following scenario need animate background image filling bottom top on hover of div. whereas animation not filling bottom instead sliding bottom top. can 1 suggest me right way how can achieve result. ok jquery animation , css3 keyframe animation. below code fiddle .bg { background: url("https://9887c7297bf844d024e4cccb28a722f62dbe3d73.googledrive.com/host/0b6jeeghp1bpxfkszmfvrcdzbdgf4d012d0hjas0xwtrvrkh6sdneufhub2petzlsywztbza/work_home.png") no-repeat center; height: 250px; position: relative; } span { background: url(https://9887c7297bf844d024e4cccb28a722f62dbe3d73.googledrive.com/host/0b6jeeghp1bpxfkszmfvrcdzbdgf4d012d0hjas0xwtrvrkh6sdneufhub2petzlsywztbza/work_home_animate.png) no-repeat top 32px center; bottom: 0px; height: 0; transition: height 0.5s; position: absolute; right: 0; left: 0; } .bg:hover span { height: 184px; } <div class="bg"><span></span> </div> fi