Posts

Showing posts from March, 2012

javascript - Toggle menu active -

hey doing menu , want when click item enter in active position , when item clicked changes clicked active , remove state last one, doing not working... appreciate if can me. html <div id="nav-ppal"> <ul class="nav-ppal"> <li><a class="btns-nav" id="0" href="#block-intro">01</a></li> <li><a class="btns-nav" id="1" href="#block-pq-zolfunza">02</a></li> <li><a class="btns-nav" id="2" href="#block-modulos-zolfunza">03</a></li> <li><a class="btns-nav" id="3" href="#block-seguridad">04</a></li> <li><a class="btns-nav" id="4" href="#block-desarrollo">05</a></li> <li><a class="btns-nav" id="5" href="#block-nuestra-ubic">06

.net - MSBuild File to Run Code Analysis Without Overlap -

i creating msbuild file combine tasks of things need on build server 1 step. part of process requires running code analysis. problem have running code analysis multiple top level projects each have same dependencies on other projects our utility library. means each run of code analysis duplicates code analysis run of utility library. here msbuild file: <project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" defaulttargets="build" toolsversion="4.0"> <propertygroup> <configuration condition=" '$(configuration)' == '' ">dev</configuration> <platform condition=" '$(platform)' == '' ">anycpu</platform> <runcodeanalysis>true</runcodeanalysis> <codeanalysistargets>c:\program files (x86)\msbuild\microsoft\visualstudio\v11.0\codeanalysis\microsoft.codeanalysis.targets</codeanalysistargets> &l

load testing - Handling jmeter concurrent users with if statements. Good or Bad? Why? -

what best practice handling users workflow , action path? i wondering how should handle concurrent users in jmeter , best way. main question is, if example shown below considered performance testing? if not, better way? my test: csv data config (list of users , passwords) thread group (30 users) once controller login if controller (action 1) - checks if username csv file matches loop controller load page action finish action if controller (action 2) - checks if username csv file matches loop controller load page action finish action pretty if controllers check if username matches, action else keep going until next match. reason isolate specific users specific action. after many different experiences , test cases, realized functional/regression testing it's ok use if statements, load testing, better if use single login many privileges of users. this way

php - how to post value of 3 input field posting in arry into database -

i posting values og dynamically created input fields in array fromat <form method='post' action='<?php echo site_url('a3_bus_system/output')?>'> <div class="_25"> <strong>route name/number</strong> <br/> <input type="text" name=""></input> </div> <p>&nbsp;<p>&nbsp;</p></p> <p>&nbsp;<p>&nbsp;</p></p> <div id="div"> </div> <p>&nbsp;</p><div class="_25"> <p><input type="button" name="button" class="button red" id="button" value="add" onclick="generaterow() "/></a></p> </div> <input type='button' value='remove button' id='removebutton'> <p>&nbsp;</p><p>&nbsp;</p></div> <input type="submit&quo

javascript - Angular JS: binding in ng-show not working -

i have directive , controller: app.directive('responsebox', function(){ return { restrict: 'e', transclude: true, templateurl: 'responsebox.html', link: function(scope, element, attrs) { element.bind("click", function () { scope.toggle(); }) } }}); and controller: app.controller('responseboxctrl', function($scope) { $scope.opened = false; $scope.toggle = function() { $scope.opened = !$scope.opened; console.log($scope.opened); }}); responsebox.html: <div class="promptblockresponse" ng-transclude> <div class="btn-toolbar" style="text-align: right;"> <div class="btn-group" ng-show="opened"> <a class="btn btn-link" href="#"><i class="icon-pencil icon-white"></i></a> <a class="btn btn-link" href="#"><i class=&quo

objective c - Calling NSMutableArray:addObject is resulting in an unrecognized selector exception -

i'm getting unrecognized selector exception attempting call addobject on array. array nsmutablearray, not nsarray. don't understand why happening. i have following classes: @interface : nsobject @property (nonatomic, copy) nsmutablearray* children; - (id) init; - (void) addchild: (a*) child; @end @interface b : - (id) init; @end @implementation - (id) init { self = [super init]; return self; } - (void) addchild: (a*) child { [self.children addobject:child]; } @end @implementation b -(id) init { self = [super init]; if (self != nil) { self.children = [[nsmutablearray alloc] init]; } return (self); } then if create object of type b , call [b addchild: anobject] i'm getting unrecognized selector , don't understand why. the output is: 2013-04-08 14:31:08.046 otest[13381:7e03] -[__nsarrayi addobject:]: unrecognized selector sent instance 0x17759c0 what problem? tia (please focus on actual code , proble

ios - Make CPPickerView scroll faster with large data sources -

i'm using cppickerview in app accomplish horizontal uipickerview, , works great, large data sources (dozens of items) scrolls makes navigation before (especially considering normal uipickerview can go fast through them). i don't mean performance-wise, way, mean view decelerates quickly, making traversal difficult. it's subclass of uiscrollview pagingenabled set yes . can do? i looked in source, , seems cppickerview using scroll view. scroll views have decelerationrate property. play , see value makes best result.

Move jQuery dialog popup anywhere outside of the parent window -

i have jquery ui dialog popup done, , issue have unable move outside of containing window. want able move dialog popup window create using javascript's window.open method (which can moved anywhere in screen) any suggestions, or ideas? have tried containment property buy still not going outside of parent screen. code: <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.9.1.js" type="text/javascript"></script> <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js" type="text/javascript"></script> <script type=&

isabelle - How to get a typedef type to inherit operators from its mother type for type classes -

post answer follow question brian provided answer suggested solution being use lifting , transfer. however, can't find enough tutorial information on lifting , transfer know how tweak answer finish off need do. here, work in dark, , use answer given plug'n'play template ask follow question. the command in initial code, typedef trivalg = "{x::st. x = ems}" gives me new type subset of mother type st . i have membership operator consts inp :: "st => st => bool" , , in naive view of lifting , transfer, since monoid_add 0 has been defined being constant ems::st , , can make statement, (ems::st) inp ems , want this: theorem "~((0::trivalg) inp 0)" so, try use lifting operator inp work type trivalg this: lift_definition inp_trivalg :: "trivalg => trivalg => bool" "% x y. (x inp y)" simp theorem "~((0::trivalg) inp 0)" theorem "(ems::trivalg) = ems" however, type clashes

pad - mathematica: PadRight[] and \[PlusMinus] -

is there way padright[a \[plusminus] b,2,""] returns {a \[plusminus] b,""} instead of \[plusminus] b \[plusminus] "" ? i believe need somehow deactivate operator properties of [plusminus]. why need this? i'm creating program display tables physical quantities. me, means tables entries (value of a) [plusminus] (uncertainty of a) when have several columns different heights, i'm stuffing shorter ones "", can use transpose numeric part of table. if column has more 1 entrie, there's no problem: padright[{a \[plusminus] b,c \[plusminus] d},4,""] gives want: {a \[plusminus] b,c \[plusminus] d,"",""} it when column has 1 entrie problem appears. this code constructs body stuffed "": if[tested[sbody],1, body = padright[body, {length[a], max[map[length, body]] with tested[a__] := if[length[deleteduplicates[map[dimensions, {a}]]] != 1, false, true

windows - VBA: Microsoft Word process does not exit after combining many Word files into one -

i'm trying merge many word files one. doing inside vba routine in ms excel. word files in folder named "files" , want create new file "combinedfile.docx" in folder one-level above that. problem i'm facing regarding how word process behaves after merging files (whether or not exits after execution of vba function). on machines, process works fine (except has page 2 , last page blank), while on others, merged document contains blank page , process manager shows word process started vba function still running. i not used vba programming , can see in code below, don't know right way close open document , exit open word process. if @ i've done , suggest way solve problem, helpful. i interested know if right way merge several word files. if there's better way, please let me know. 'the flow: ' start word process create blank file "combinedfile.docx" ' loop on documents in "files" folder , followi

latitude longitude - Calculate distance in (x, y) between two GPS-Points -

i'm looking smooth way calculate distance between 2 gps points, result like: "you have go x meters , y meters left - can work 2d-coordinate system, have position (0,0) , other positions showing distance in (x, y) in meters position. my idea calculate distance between points using haversine formula. (this returns hypotenuse) in addition that, i'm calculating bearing between 2 points. alpha. with 2 values, wanted use basic trigonometry functions resolve problem. so tried calculate: catheti_1 = sin(alpha) * hypotenuse, catheti_2 = cos(alpha) * hypotenuse . maybe i'm doing wrong, results useless @ moment. so question is: how can calculate distance in x , y direction between 2 gps points? i'm calculating alpha in following procedure: public static double bearingto(gpsbean point1, gpsbean point2) { double lat1 = math.toradians(point1.latitude); double lat2 = math.toradians(point2.latitude); double lon1 = math.toradians(point1.longitude);

Get file permissions in Android (root) -

after play around rooted devices, got stuck on files. let's have file somewhere in root folder want read/write application. way found far changing file permission like string [] cmd = { "su", "-c", "chmod", "777", path}; process process = new processbuilder(cmd).start(); process.waitfor(); this works fine, problem want return original file permissions after i'm done it. can me getting file/directory current permissions? do ls -l on file/directory , parse output edit op: solution in this thread . answer pushed me in right direction.

java - Persisting a member variable in JPA, when only the type is important -

problem: how store field when type important. description: have simplified problem description highlight issue. class dragon has behavior, roar , stored member variable. roar typically has no state , doesn't need saved. however, dragon needs know specific type of roar has when recreated. @entity public class dragon implements serializable { @id @generatedvalue(strategy = generationtype.auto) private long id; private double height; private roar roar; public string roar() { return roar.roar(); } } public interface roar { string roar(); } public class quietroar implements roar { public string roar() { return "grr.."; // in real scenario, lots of logic occurs here. } public class loudroar implements roar { public string roar() { return "ahhhgrrrr"; // more logic here. } possible solution: make roar field transient , store additional field of type class holds class type of roar

3d - Three.js morphAnimMesh animation doesn't update -

recently i've spent time digging three.js. created 3d model in blender , import three.js. works fine, data inside morphanimmesh currentkeyframe , lastkeyframe both updating, doesn't render animation, static 3d object. can give me help? thanks. this url of work: http://www.dustedge.com/mathspace/three_test2.html all codes here: var scene = new three.scene(); var camera = new three.perspectivecamera(75, window.innerwidth/window.innerheight, 0.1, 1000); var histlookvector = new three.vector3(1,1,1); var currentlookvector = new three.vector3(1,1,1); var xaxis = new three.vector3(1,0,0); var yaxis = new three.vector3(0,1,1); var renderer = new three.webglrenderer(); var mesh; var time; var oldtime; var delta; renderer.setsize(window.innerwidth, window.innerheight); document.body.appendchild(renderer.domelement); camera.position.x = -20; camera.position.y = 20; camera.position.z = 20; camera.lookat(currentlookvector); var x=0; var loader = new three.jsonloader(); loader.lo

database schema - Using PostgreSQL's money type instead of numeric -

i'm thinking of converting numeric columns of pg 9.2 database schema money , because of benefits see (or imagine?) in having rounding , formatting handled @ db level, instead of application level. there downsides decision? stick numeric: it faster have heard output consistent. means consistent. questions of whether enforce rounding @ storage or @ retrieval (or in application) left you. there many cases in fact may want store fractional cents , numeric lets safely. the other thing if ever want add multicurrency support, find numeric far better @ money is. because currency symbol depends on locale can insert $100, change locale , have show 100¥ not same amount barring massive economic shakeup. i financial accounting software. made decision stick numeric , have been happy it.

c++ - FBX model's faces (some) are not rendering properly -

Image
i've created basic sphere in maya , loaded opengl project. problem i'm having shown below: as can see, sphere triangulated. but when model loaded project, of faces aren't rendering properly. these maya fbx export settings (checked): general options - default file extensions - preserve references current preset - user defined geometry - smooth mesh convert nurbs surface to: - software render mesh - referenced containers content embed media - embed media units - automatic axis conversion - axis: y ui - show warning manager - generate log data fbx file format - type: binary - version: fbx 2013 any ideas why happening? i'm using fbx sdk 2013. edit: didn't realize @ time of posting white triangles (labeled "bad triangles") appear due simple light rendering. extended bar on right actual problem. saw question on youtube video. it looks me of triangles being culled out on extended bar. maybe

emacs - How to enable automatic spell check by default? -

i can't find can added init file enable automatic spell check default. automatic spell checking (flyspell) can enabled menu -- may there way learn how menu entry work? i have following in init.el: (add-hook 'text-mode-hook 'flyspell-mode) (add-hook 'prog-mode-hook 'flyspell-prog-mode) that covers editing needs fine. hooks 'events' or observer pattern if you're used oop: they're lists of functions run @ points. 1 of main ways customise emacs adding own functions these hooks. most modes in emacs call hook when they're enabled. prog-mode mode programming modes derived, adding functions prog-mode-hook customises programming modes. the best reference stuff built-in emacs lisp manual ( c-h r or m-x info-emacs-manual ). has sections on emacs lisp programming, including chapter on hooks.

c++ - Class Template Object cannot be created -

i using templates in 1 of classes, reason, when create object, error getting following: argument list class template "test" missing. template <class t> class test { private: t variable; public: test(){cout << "constructor called" << endl;} }; in main.cpp test object; compiler displays following: 'test' : use of class template requires template argument list. template <class t> test<t>::test() { cout << "constructor called" << endl; } that did not work you have specify type want instantiate class template . example: test<int> object; think how use class templates std library vectors , have specify type such int , e.g. vector<int> . same rationale that. for constructor definition, should work, however, 1 point have put declaration , definition in same header file, otherwise, compiler cannot find definition. (there techniques can separate declarat

python - Allowing Module/package customization with command line paramters without interfering with its users -

i'm curious how in python. imagine have module spam.py i'd control spamminess option -‍-‍spam_more . how go using argparse or other parsing library still allow main ham.py file optionally use command line arguments while using spam module.? you can put argument handling stuff inside ' if __name__ == "__main__": ' code inside if block run when script run command line or whatever, not if imported module. e.g. typing $ python spam.py in command line cause block executed. here example using optparse (because haven't used argparse before): spam.py: def do_stuff(spammy=false): if spammy: print "wow, spammy." else: print "i've seen spammier." if __name__ == "__main__": optparse import optionparser p = optionparser() p.add_option("--spam_more", action="store_true", dest="spammy") (options, args) = p.parse_args() do_stuff(options.s

javascript - Two if statements are always linked even if it's not true -

i have 2 separate if else statements. if think 1 true, other gets called , vice versa. here is the first one if (pension < 0 ) { alert("pension value error. try again."); } else if (pension > income) { alert("rrsp contribution cannot exceed income."); } the second one if (uniondues < 0 ) { alert("union dues value error. try again."); } else if (uniondues > (income - pension)) { alert("union dues cannot exceed income less rrsp contribution"); } the if(pension > income) , if(uniondues > (income - pension)) call each other. the variable income prompted before hand , checks after check if values valid. if income 100, , pension 50 , uniondues 60, think should call second if else statement calls both. if income 1, , pension 2, , uniondues 0, both alerts alerted well. know issue is? edit: fix simple, parsefloat() , worked. first off, should make sure 3 of values numbers, not strings bec

synchronization - Synchronizing data between server and client -

when comes mobile applications lot of time client going offline. right when user submits data on client saved locally , when press sync button pushed , pulled between client , server. what best practices when comes synchronization of data? server side have large ms sql server , client side have sqlite @ hands. you might find this (this microsoft application architecture guide v2.0, oct 2009) useful. facing same problem here @ work, , i did find these guidelines useful in process of thinking. to share experience, think major decision comes problem trying solve. if you're facing single, fixed, mature business domain (i.e, changing db schema , face 1 or 2 clients) can build own data synchronization framework. far better using commercial or non-commercial frameworks in terms of ease-of-use , adjustment + performance. + store-and-forward feature can overcome connectivity issues. however, if facing changing (not expanding) business domain, or maybe different cli

html - One Page Navigation using Jquery -

anybody can me on how create navigation on wordpress theme http://teothemes.com/wp/scrn/ it seems when got on top navigation stick below slider , when scroll down page navigation attached here show simple example make stiky element: html snippet codes : <nav class="sticky"> <ul> <li> <a href="#intro">home</a> </li> ... <li> <a href="#contact">contact</a> </li> </ul> css snippet codes : nav { background: #f5f5f5; height: 40px; position: relative; text-align: center; width: 100%; z-index: 1000; nav.fixed{ position: fixed; top: 0px; } jquery codes: if ($('nav').hasclass('sticky')) { var top = $('.sticky').offset().top - parsefloat($('.sticky').css('margin-top').replace(/auto/, 0)); $(window).scroll(function

jquery - Regular expression to change function into another function in netbeans -

the project working wants upgrade jquery 1.6.4 1.9.1...who can use regular expression change: "$(".btnprint").live("click", function() {" into "$('body').delegate(".btnprint", "click", function() {" with netbeans... don't use .delegate either. use .on . /\$\((["'])(.*?)\1)\.live\((["'])(.*?)\3/$("body").on("\2", "\4"

html - Activate tabs with jQuery -

i have system create, delete , rename tabs using jquery. trying set when new tab created activates tab nothing seems working. have tried tab api on twitter bootstrap page not seem work. jsfiddle: http://jsfiddle.net/benedictlewis/eyepa/ what have tried: $('#mytab a[href="#profile"]').tab('show'); // select tab name $('#mytab a:first').tab('show'); // select first tab $('#mytab a:last').tab('show'); // select last tab $('#mytab li:eq(2) a').tab('show'); // select third tab (0-indexed) short version - forgot add id link. why $('#tab' + tabcount).tab('show'); doesn't work. if change line 5 to .append($('<li><a href="#tab' + tabcount + '" id="tablnk' + tabcount + '" data-toggle="tab">new page ' + tabcount + ' <i class="icon-remove tab-remove"></i></a></li>')); and

concurrency - MPI Barrier and Printing -

this question has answer here: ordering output in mpi 4 answers i working on simple mpi assignment row wise matrix multiplication. i trying output matrix , reason order of prints out of order. 1 process designated print @ time, output if flushed, , mpi_barrier used. confused how prints being reordered. void print_matrix(int id, int p, int pn, int n, double **row, double *shared_col_data, double *resdata){ int i,j, k; for(i=0; i<p; i++){ for(k=0; k < pn; k++){ int row_pos=((i*pn)+k); if(id==i){ if( row_pos <n){ printf("[row: %10d][id: %3d]\t",row_pos,id); printf("|"); for(j=0; j<n; j++){ printf("%.4f ",row[k][j]); } if(row_pos == (n/2)){

c++ - why cstdio undef gets or other functions -

when read libstdc++-v3/include/c/cstdio ,i'm quite confused lines below: //get rid of macros defined in <stdio.h> in lieu of real functions. #undef getc #undef gets i think getc macro gets function in fact, why undef function? may in system it's implemented in macro? update: try put understanding <stdio.h> , <cstdio> here <stdio.h>= __begin_namespace_std extern int fgetc (file *__stream); extern int getc (file *__stream); __end_namespace_std #define getc(_fp) _io_getc (_fp) <cstdio>= #undef getc macro may have side effect leads not use,but can't putforward such occasion getc(_fp) above. for safety,maybe can involke fgetc rather getc or undef macro getc manually. getc weak alias io_getc ,when macro getc not taken effect,the alias function work(eg,in c++ implicitly ). the comment implies in <stdio.h> , both getc , gets are (function-like) macros. c standard allows this. c++ compiler library cod

rest - FatSecret API - food.get method invalid signature -

hi new fatsecret platform api , developed php script access food details using foods.search method here foods.search method api call example,used curl , works perfect. <?php $consumer_key = "xxxxxxx"; $secret_key = "xxxxxxx"; //signature base string //<http method>&<request url>&<normalized parameters> $base = rawurlencode("get")."&"; $base .= "http%3a%2f%2fplatform.fatsecret.com%2frest%2fserver. api&"; //sort params abc....necessary build correct unique signature $params = "method=foods.search&"; $params .= "oauth_consumer_key=$consumer_key&"; // ur consumer key $params .= "oauth_nonce=123&"; $params .= "oauth_signature_method=hmac-sha1&"; $params .= "oauth_timestamp=".time()."&"; $params .= "oauth_version=1.0&"; $params .= "search_expression=".urlencode($_get['

iphone - Crop an image to make a process on the result -

i want recognise text written in image, want crop image make process on desired part not image. idea how can ? here code using on image: nsstring*ret= [self doprocess:capturedimage]; here want crop captured image make process on it. you can define cgrect part of image want extract , use below method: cgrect croprect = ...; uiimage *cropped = [uiimage imagewithcgimage:cgimagecreatewithimageinrect([fullimage cgimage], croprect) scale:fullimage.scale orientation:fullimage.imageorientation];

android - How to detect expanding of status bar? -

my application allows launching of other application mine. none of activity shows status bar.but when launching other applications camera user can access status bar .so tried following code snippet collapsing status bar inside service(so collapse every time , code running always). int currentapiversion = android.os.build.version.sdk_int; object service = getsystemservice("statusbar"); class<?> statusbarmanager = class.forname("android.app.statusbarmanager"); method collapse = null; if(currentapiversion <= 16){ collapse = statusbarmanager.getmethod("collapse"); }else{ collapse = statusbarmanager.getmethod("collapsepanels"); } collapse.setaccessible(true); collapse.invoke(service); now want collapse status bar if user try expand this.is there intent or intent filter exist detect expanding of status bar ? thanks in advance there no callback of kind when notification bar dragged down on android. this because

Java LISP implementation almost working -

package pj2; import java.util.*; public class simplelispexpressionevaluator { // current input lisp expression private string inputexpr; // main expression stack & current operation stack, see algorithm in evaluate() private stack<object> exprstack; private stack<double> currentopstack; // default constructor // set inputexpr "" // create stack objects public simplelispexpressionevaluator() { // add statements inputexpr = ""; exprstack = new stack<object>(); currentopstack = new stack<double>(); } // default constructor // set inputexpr inputexpression // create stack objects public simplelispexpressionevaluator(string inputexpression) { // add statements if(inputexpression == null) { throw new simplelispexpressionevaluatorexception(); } inputexpr = inputexpression; exprstack = ne

html - How to store returned string from php file to Javascript variable through Ajax -

i want call php function ajax , have contents returned webpage. say have file called latest.php returns simple html. $result = "<div> text </div>"; echo $result; how can write ajax script calls php file, returns html , stores in javascript variable? javascript variable: var myvar; $.get("latest.php", function(data) { myvar = data; }); insert document: $.get("latest.php", function(data) { $("#myelement").html(data); }); or $("#myelement").load("latest.php");

c# - What is the most effective way to 'align' two separate lists by ordinal in a single ItemsControl? -

over-simplifying our model purposes of example, let's have 2 lists of data, lista , listb, both of of type list<string> . data perspective, not related. lista , listb can added to, removed from, or otherwise updated independently. what we're trying display them both @ same time in same list, aligned ordinal position. our first approach create new listmapping object follows: public class listmapping { public int index{ get; set; } public string stringa{ get; set; } public string stringb{ get; set; } } then create list<listmapping> relating strings @ ordinal position 'x' of lista , listb , we'd initialize this: var mappedlist = new list<listmapping>(); var maxitems = math.max(lista.count, listb.count); for(int index = 0; index < maxitems; index++) { var lm = new listmapping(){ index = index, stringa = (index < lista.count) ? lista[index] : null; stringb = (index < listb.count) ? list

c# - How can I maintain a few mostly identical software products but based on the same codebase? -

please bear me , let me explain. work vehicle insurance company , trying develop online portal our customers can purchase insurance policies . let's offer 3 insurance products car insurance (ci), motorcycle insurance (mi) , truck insurance (ti). , shall 90% of these products similar in terms of how implement them differ in remaining 10%. let me use c# example demonstrate (below code rough idea demonstrate problem not real code). public class carinsurancepolicy { //common properties among 3 insurance products public decimal madeyear {get;set} public decimal purcahseprice {get;set} //specific particular product public bool hascentrallocking {get;set} public datetime specialdatetodowithcar {get;set} } public class motorcycleinsurancepolicy { //common properties among 3 insurance products public decimal madeyear {get;set} public decimal purcahseprice {get;set} //specific particular product public int enginestroke {get;set} pub

ibm mq - Websphere MQ server configuration -

somebody can me in configuring websphere mq server in 8.5?i got below error while creating mq server. error: websphere mq server mqserver connection test failed websphere mq queue manager mqserver. cwsjp0050e: attempt connect websphere mq queue manager or queue sharing group mqserver failed. websphere mq reason code unknown (2538).. mqrc 2538 means "host not available". check host name , port name have specified , pointing machine mq queue manager "mqserver" running. check on port queue manager listening. can using mqexplorer or runmqsc command shell on machine queue manager running. in command prompt, run following command runmqsc mqserver once runmqsc shell opens run following command list tcp listener. dis listener(system.default.listener.tcp) check port number displayed. default 0. need change port number. change port number run following command. alter listner(system.default.listener.tcp) port(1414) once done need start liste

javascript - Ajax Add/Delete Database Store string -

http://snipt.org/zime8 | http://snipt.org/zimg1 i wrote basic add string app in ajax. i'm having hard time it. what i'm trying able delete string if add one. how can wire submit button able delete string text? is possible post string , have stored when refresh page stays on page? html <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> <script type="text/javascript" src="database.js"></script> <style type="text/css"> label { text-align:center; } body { background:#fff; font-size:18px; font-family:georgia;} #datanumber { float:right; width:300px; margin:0 200px 0 0; } ul { margin: 15px 0 0 100px; font-style:italic; font-decoration:underline; } li { padding:10px;} </style> </head> <body> <div id="datanumber"> <i

php - jquery.keypad.js not working for dynamically added text box -

i'm using jquery.keypad.js show special characters(ÁÃÅÀ...) in text box user can select. working fine first field of text box, when add same text field clicking on "add more" button not workin. i'm calling function once again after clicking "add more" though not working. issue? $(function () { $('.keypadactive').keypad({keypadclass: 'flatkeypad',keypadonly: false, layout: [<? echo utf8_encode("'ÁÃÅÀÂÄááåàâäÆæßÇçÐÉËÈÊéëèê', 'ÌÎÍÏìîíïÑñÒÔÖØÓÕðòôöøóõÚÜÙ' ,'ÛùûúüÝýÿÿ¡,°¹²³º¼½¾±µ', '£¥\$¢þ§©®¯·¨¬«»¦ª¶'");?> ], prompt: '',showon: 'button', buttonimageonly: true, buttonimage: 'images/spl.jpg'}); }); $('.add_more').live('click',function(){ $(this).parent().parent().parent().parent().append($('#add_me_next').html()); $(this).parent().html('<label class="w50">&nbsp;</label><input type=&qu

java - UDFRowSequence not working -

i trying use auto increment udf ( http://svn.apache.org/repos/asf/hive/trunk/contrib/src/java/org/apache/hadoop/hive/contrib/udf/udfrowsequence.java ) i getting error when used udf. error : on hive console - exception in thread 60 - java nullpointer exception on hadoop web ui - error in configuring object .....caused java,reflect.invocation.. does used udf? wondering if udf runs in map phase how able give unique numbers each row? it worked fine me . how executing ? as can see launches single mapper process, why can give unique numbers each row.

html - Replacing innerhtml for a specific div that shares the same id as other divs? -

so i've done quite bit of research , still haven't got work. trying replace innerhtml of div. have got work following code: <script type="text/javascript"> var embedcode = 'new html goes here'; </script> <div id="videocontainer"> <img class="playbutton" onclick="document.getelementbyid(videocontainer).innerhtml = embedcode;return false;" src=""/> </div> this post template copy , paste , change images/embedcode. works if have 1 post. once add post, both not work since both sharing same embedcod name , same div id. there solution around without using jquery? i've tried using document.getelementbyid(this.id).innerhtml = embedcode instead of document.getelementbyid(videocontainer).innerhtml = embedcode but still not working. thanks. id supposed unique. increment counter or use post id part of id attribute. for ease of styling, add class them well,

Javascript/Jquery - Detect keypress except when file select dialog is showing -

i have modal box overlay user edits information in. 1 of ways close overlay pressing esc. have no problem working. however, within modal box section uploading file. while user selecting file, if user presses esc, closes 'select file' dialog box, keypress detected 'modal box close' script. have confirmation dialog ask user if they're sure want close box, still don't want action triggered if they're trying close 'file select' dialog. what best approach here? there way determine whether browser's focus on 'file select' dialog versus part of actual page? update: first 3 answers same, , solution simple i'm embarrassed asked. help. i'd accept answer since 3 same i'm not sure how choose favorite. guess i'll pick one. doesn't make other 2 less acceptable, though. all. what best approach here? there way determine whether browser's focus on 'file select' dialog versus part of actual

php - Display Order number in Paypal -

i using standard paypal method multiple product. want display order number in paypal widget each transaction. order number must visible buyers in paypal widget.can how display order number buyers? you can attach custom field , pass order number. '&lt input type="hidden" name="custom" value="#your order number#" &gt'

java ee - DropDown selected value to be transfered in spring -

from jsp need transfer value selected in drop down when user click on search button submitting form. <form:form modelattribute="firstvo" method="post"> <form:select path="secondvo.status" id="status" > <form : option value="all" label="all" /> <form : option value="new" label="new" /> </form:select> <input type="button" name="search" value="search" onclick="filterdata();" /> </form:form> function filterdata(){ document.forms[0].action = path+"/filter.do"; document.forms[0].submit(); } ------------------------------------------------- public class firstvo { private secondvo secondvo; } public class secondvo { private string status; } public class dpscontroller { @requestmapping(value = "/