Posts

Showing posts from June, 2015

jboss - JasperReports Server: drawText doesn't work in Linux System -

i have used barbecue barcode in report drawtext property checked. came fine in local server - jboss 5 + windows . but, when invoked same report in jboss 5 + linux , barcode proper text missing (draw text). finding pretty hard find out issue is. have come across similar kind of issue.

C# Arrays - Using them to store game level -

i'm making 2d tile based game. use 2d jagged array store integer, , renderer draws image depending on integer is. have part of code working, i've come point i'm not sure how proceed next. as player goes on through game, need able store information every cell in 2d array, such light level, or number of times user has clicked cell, or rotation value of image in cell, or alpha level image, etc etc. the way can think of doing create 2d array have done previously, each piece of information i'm using. example: alphalevel[][] numberoftimesclicked[][] and if needed (for example) check number of times user has clicked cell 5,5 can numberoftimesclicked[5][5] or if needed set rotation setrotation[5][5] = 90. the thing i'm not sure how efficient is, having array each piece of information doesn't seem memory efficient. is idea have solution, or there better way haven't thought about? any advice great! thanks make tile object has information, a

Spring Data Neo4j does not recognize externally inserted nodes -

i using small clojure script batch-inserts nodes neo4j instance. show these nodes, using spring-based webapp spring data neo4j. created small domain object represents node. when insert node utilizing webapp, loaded , showed right out of box. when try load node has been inserted external script, cannot found. compatible, thought sufficient enough add _ type _ attribute fqn of domain class. seems me, there's more do. i using neo4j 1.8.2 server , sdn 2.2.2 can give me hint? thanks in advance. best, markus spring data neo4j (sdn) uses typerepresentationstrategy . if sdn not configured explicitely, uses indexingnodetyperepresentationstrategy , indexingrelationshiptyperepresentationstrategy per default. these strategies keep index named "__types__" node entities , 1 named "__rel_types__" relationship entities. node or relationship entities created sdn added corresponding index. if you're using repository infrastructure of sdn , call y

Speed of VB.net Regex? -

is regex code in vb.net known slow? i took on code cleaning large amounts of text data. code ran slow, looking ways speed up. found couple functions got run lot thought might part of problem. here's original code cleaning phone number: dim strarray() char = strphonenum.tochararray dim strnewphone string = "" dim integer = 0 strarray.length - 1 if strarray.length = 11 , strarray(0) = "1" , = 0 continue end if if isnumeric(strarray(i)) strnewphone = strnewphone & strarray(i) end if next if len(strnewphone) = 7 or len(strnewphone) = 10 return strnewphone end if i rewrote code eliminate array , looping using regex. dim strnewphone string = "" strnewphone = regex.replace(strphonenum, "\d", "") if strnewphone = "" orelse strnewphone.substr

bash - Output in 2 columns -

i'm trying make this: /mnt/hector/data/benign/binary/benign-pete/ af86df6737cf43a6bf5ab0f822791450 0 s040pdfv02 data.pdf pdf document /mnt/hector/data/benign/binary/benign-pete/ afd53ab9b77ffa1dd8ad365577bec497 0 s040pdfv02 data.pdf pdf document /mnt/hector/data/benign/binary/benign-pete/ b024027f366a3c7e567b3fdd94b892f2 0 s040pdfv02 data.pdf pdf document look this: s036gdlv02 3 s040pdfv02 2 s043guiv02 23 s046conv02 1 i want have display each unique file, have output count of file type right next in 2 neat columns. what have far cut -f 4 input.txt|sort| uniq | sed 2d;; but that's outputting data this: s036gdlv02 s040pdfv02 s043guiv02 s046conv02 try uniq -c instead of uniq , remove sed .

java - HttpClient follow redirect -

i working on little project. aim of project log in website , get/handle information on site. moreover, open links , search through them well. the server side looks this: you need login php site. when sucessfully login session , redirected foo.username.bar.php (changed). with code: bufferedreader in = null; string data = null; try { list<namevaluepair> namevaluepairs = new arraylist<namevaluepair>(2); namevaluepairs.add(new basicnamevaluepair("username", user)); namevaluepairs.add(new basicnamevaluepair("passwort", pass)); httpclient client = new defaulthttpclient(); httppost request = new httppost(website); request.setentity(new urlencodedformentity(namevaluepairs)); httpresponse response = client.execute(request); in = new bufferedreader(new inputstreamreader(response.getentity() .getcontent())); stringbuffer sb = new stringbuffer("")

html - Add Visibility:Hidden effect and keep <a href> download ability -

my situation bit tricky , hard explain, can clearly. on website need click on , downloads image, object click on must allow :hover psuedo class change image on :hover . how i've set follows: http://jsfiddle.net/6nutv/ if remove visibility:hidden html, image appears , browsers' download function becomes available. can choose image img src= is, adding visibilty:hidden disable download ability. to reiterate - need you hover on prof_wl_btn , downloads <a> 's href=... image , on hover/mouseover prof_wl_btn changes it's background position (so far using psuedo class). possible methods 1: use javascript onmouseover , z-index, can't z-index work here... 2: tried using css attribute clip:rect(xpx,xpx,xpx,xpx); crops everything. if unclear i'm sorry, hard explain! can't find other post this. ok rewrite, since op clarified in comments. you can either have background image shifts on :hover, or if image must in html can in

c++ - Arguments parsing error -

this question has answer here: c string — using equality operator == comparing 2 strings equality 9 answers i trying parse run-arguments within console application code: int _tmain(int argc, _tchar* argv[]) { if(argv[1] == _t("arg1")) cout<<"argument1 passed"; _getch(); return 0; } my code doesn't work. mean, runs, console empty. compiling use unicode character set option in visual studio 2012 (on windows 7). mistake?! use strcmp compare char arrays if(strcmp(argv[1], "arg1") == 0) use of == compares pointers 2 different strings. see darius kucinskas' answer comparing _tchar arrays

string - PHP str_replace replace space with dash, but too many dash -

i have string here photo of day - 2011 , need photo-of-the-day-2011 when str_replace, output: photo-of-the-day---2011 can fix this? here code: $albumname = 'photo of day - 2011'; (this comes db , cannot change it) $albumname = str_replace(" ", "-", $albumname); you can use more powerful preg_replace , instructing replace runs of dashes and/or spaces single dash: $name = preg_replace('/[\s-]+/', '-', $name); [\s-]+ regular expression matches "one or more of: whitespace , dashes".

css - Html inline div alignment issue -

Image
<div style="display:inline; margin-left:10%;"> <input type="radio"> <span></span> </div> <div style="display:inline; margin-left:10%;"> <input type="radio"> <span></span> </div> <div style="display:inline; margin-left:10%;"> <input type="radio"> <span></span> </div> hello have layout similar 1 above. have other things in php file, irrelevant. example every new 5th element causes new line (br), make sense when see pictures. here image representation of outcome: this need : how can possibly this, appreciate idea. cheers. note: span tags contain text next radio buttons. iyi akÅŸamlar :) can remove div's, create class inside radio buttons , put them altogether container each row. live demo here <div class="container"> <input type="radio"

tsql - How to pass multiple values to a single parameter in a Reporting Services report -

i have report in reporting services text box field in table has go report action. need parameter specific values able pass report. in (@parameter) not work multiple values. have 2 tables similar data. 1 has data countries , 1 has data canada. have 1 report want jump each table. when field in countries table clicked, want pass values parameter in dataset. when field on canada table clicked, want pass values canada dataset. can work 1 value, not multiple values. how can accomplish this?

wamp - How do you show people the status of a website if you're building it locally? -

i'm making website brother (first time). installed wamp , i'm building locally on computer wordpress , everything. there's database involved. how go showing him looks without him being next me? if on same local network you, can tell him ip address , can visit in browser. for example, if ip address 192.168.1.111 can visit: http://192.168.1.111 in browser. of course, depending on how you've setup wamp, might see wamp install , need click on correct directory see wordpress installation. here's random website instructs on how view ip address in windows if not on same network you, setup ip address dmz (or port forward port 80) in router. on internet can go ip address of home router , see site.

extjs4.2 - How to change required field asterisk in ExtJs 4.2 -

Image
i need change position of asterisk indicator of required field ( allowblank: false ) before field label. imagem bellow: i can't find proper way in sencha docs. there similar question here, not work on extjs 4.2. the bellow code snippet worked wanted to. beforelabeltexttpl: [ '<tpl if="allowblank == false">', '<span class="' + ext.basecssprefix + 'required">*</span>', '</tpl>' ]

c++ - A Visual Studio 2010 Bug? -

i think found bug in vs2010 (c / c++), seems obvious, cannot believe it. (in vein of select isn't broken ). please let me know if bug, or if i'm missing something: int main(void) { int x; // declare variable x; for(int i=0, x = 10; i<5; ++i) // initialize x 10. no way around this. { printf("i %d\n", i); } if (x == 10) // warning c4700: uninitialized local variable 'x' used { printf("x ten\n"); } } int i=0, x = 10; you declared second x variable scoped for loop. the outer x variable not affected.

android - java - access incremented static variable from another class -

i have static variable , updating it's value in class. when access variable class , shows unupdated value. class a public static int postid = 1; public static string creator() { string message = "post id="+postid; return message; } void updatepostid() { postid++; //this function being called each 10 seconds } @override public void start() { handler.post(show); } handler handler = new handler(); private final runnable show = new runnable(){ public void run(){ ... updatepostid(); handler.postdelayed(this, 10000); } }; class b string message = a.creator(); //this prints postid 1 time i need global variable can access each class , update value. waiting (i using android service) this tested code . public class { public static int id = 0; public static int increment(){ return a.id++; } } public class b { public static void m

knockout.js - Toggle / trigger display of a message with a button click -

i have button called fact. want display message when clicks it. html looks this: <div id="option"> <button data-bind="click: displaymessage">fact</button> <div data-bind="if: displaymessage">you right.</div> my javascript this: ko.applybindings({ displaymessage: ko.observable(false) }); however, not working. can please help? you should pass function click binding sets displaymessage true , should use visible binding . <div id="option"> <button data-bind="click: function() { displaymessage(true); }">fact</button> <div data-bind="visible: displaymessage">you right.</div>

linux - Set PATH for all users AND processes -

how set path variable users , processes? have path set in /etc/profile not loaded when run process remotely. running saltstack , minion process, when called master not have right path. there way set path in single place users , processes? it depends on distribution using. on debian/ubuntu default path variables at: /etc/login.defs also, every process has process calls , inherit path process. doesn't make sense set global process path distinct user path.

php - Login Script Difficulties? -

i'm hoping can me login script. code works when run wamp localhost when goes live on server returns blank page when try , login can tell me why? code follows. <?php session_start(); //login script if(isset($_request['ch']) && $_request['ch'] == 'login'){ //give login credentials here if($_request['uname'] == 'zipbuzz' && $_request['pass'] == 'sewilt') $_session['login_user'] = 1; else $_session['login_msg'] = 1; } //get page name redirect if(isset($_request['pagename'])) $pagename = $_request['pagename']; //logout script if(isset($_request['ch']) && $_request['ch'] == 'logout'){ unset($_session['login_user']); header('location:login.php'); } if(isset($_session['login_user'])){ if(isset($_request['pagename'])) header('location:'.$pagename.'.php'); else header('location:admin.php');

algorithm - Checking if A is a part of binary tree B -

let's have binary trees , b , want know if "part" of b. not talking subtrees. want know if b has nodes , edges does. my thoughts since tree graph, , view question subgraph isomorphism problem (i.e. checking see if subgraph of b). according wikipedia np-complete problem. http://en.wikipedia.org/wiki/subgraph_isomorphism_problem i know can check if subtree of b or not o(n) algorithms (e.g. using preorder , inorder traversals flatten trees strings , checking substrings). trying modify little see if can test "parts" well, no avail. i'm stuck. are there other ways view problem other using subgraph isomorphism? i'm thinking there must faster methods since binary trees more restricted , simpler versions of graphs. thanks in advance! edit: realized worst case brute force method question take o(m * n), polynomial. guess isn't np-complete problem after all. next question is, there algorithm faster o(m*n)? i approach problem in 2 steps:

jquery - Create a trendline via flot? -

i have gone through flot examples , have searched via google how create trendline in flot. there doesn't seem option available adding trendline. hints or information on great. here trend line plugin flot, may need additional work: flot issue 270 (download link after first post)

Can't make regex work with Python -

i need extract date in format of: dd month yyyy (20 august 2013). tried following regex: \d{2} (january|february|march|april|may|june|july|august|september|october|november|december) \d{4} it works regex testers (chcked several text - monday, 19 august 2013), seems python doesn't understand it. output is: >>> ['august'] >>> can please understand me why happening ? thank ! did use re.findall ? default, if there's @ least 1 capture group in pattern, re.findall return captured parts of expression. you can avoid removing every capture group, causing re.findall return entire match: \d{2} (?:january|february|...|december) \d{4} or making single big capture group: (\d{2} (?:january|february|...|december) \d{4}) or, possibly more conveniently, making every component capture group: (\d{2}) (january|february|...|december) (\d{4}) this latter form more useful if need process individual day/month/year components.

amazon web services - Detecting bad AWS instances -

what of common practices in detecting bad instances in large cluster of instances. example of bad instance: instance has high cpu usage when compared other instances in cluster, though amount of work (number of http requests processed) done instance same work done other instances.

html - Multiple different submit buttons in one form -

i've tried implementing option explained in this article. public class httpparamactionattribute : actionnameselectorattribute { public override bool isvalidname(controllercontext controllercontext, string actionname, methodinfo methodinfo) { if (actionname.equals(methodinfo.name, stringcomparison.invariantcultureignorecase)) return true; if (!actionname.equals("action", stringcomparison.invariantcultureignorecase)) return false; var request = controllercontext.requestcontext.httpcontext.request; return request[methodinfo.name] != null; } } my controller actions: [httpparamaction] [httppost] public virtual actionresult editaccouncement(_accouncementpostviewmodel m) [httpparamaction] [httppost] public virtual partialviewresult deleteannouncement(int id) my form: @using (ajax.beginform("action", ajaxoptions: new ajaxoptions() { httpmethod = "post",

c# - Passing object of anonymous type as parameter to a method -

i need this: public class carros { public int id { get; set; } public string nome { get; set; } } public void listar_carros() { list<carros> cars = new list<carros>(); cars.add(new carros{ id= 1, nome = "fusca" }); cars.add(new carros{ id= 2, nome = "gol" }); cars.add(new carros{ id= 3, nome = "fiesta" }); var queryresult = q in cars q.nome.tolower().contains("eco") orderby q.nome select new { q.nome, q.id }; dosomething(queryresult) } i need pass queryresult variable function dosomething() . tried use dynamic type, list<t> object, nothing works public void dosomething(???? queryresult) { foreach (carros ca in queryresult) { response.write(ca.nome); response.write(" - "); response.write(ca.id); } } in general, it's bad idea pass anonymous types between met

Javascript and regex: split string and keep the separator -

i have string: var string = "aaaaaa<br />&dagger; bbbb<br />&dagger; cccc" and split string delimiter <br /> followed special character. to that, using this: string.split(/<br \/>&#?[a-za-z0-9]+;/g); i getting need, except losing delimiter. here example: http://jsfiddle.net/jwrz6/1/ how can keep delimiter? use positive lookahead regular expression asserts special character exists, not match it: string.split(/<br \/>(?=&#?[a-za-z0-9]+;)/g); see in action . update: fixed typo (moved literal ; inside lookahead parens)

Can't get ExtJS to write to console -

i'm trying started extjs, documentation isn't helpful. i literally have copy&pasted 1 of examples, , won't invoke controller's init function. followed there recommended directory layout project organization: my_app |-- // node.js stuff |--public |--app | |--controller | |--users.js | |--ext-4 | |--extjs | |--app.js | |--index.html | |--app.js app.js ext.application({ requires: ['ext.container.viewport'], name: 'am', appfolder: 'app', controllers: [ 'users' ], launch: function() { ext.create('ext.container.viewport', { layout: 'fit', items: [ { xtype: 'panel', title: 'users', html : 'list of users go here' } ] });

ruby on rails - Accessing attributes by relative :id in the view -

i have sidebar displays :users :shopping_lists . upon clicking on link list, user directed view address of: "/shopping_lists/1", 1 represents :id of shopping list. want display list items belong list in new view. i'm struggling figure out how display list items correspond relative shopping list. rails method use accomplish this? associations in place. if associations in place, in controller can do: @list_items = shoppinglist.find(params[:id]).list_items then can render @list_items template like, using collections instance. this assuming have defined belongs_to :shopping_list association in model called listitem , has_many :list_items in shoppinglist model.

SQLITE database Manipulating error with java (IDE:Netbeans) -

i facing problem sqlite database in java ide netbeans. i have 4 tables in database , 3 tables of them working last 1 table not working! suppose when want insert data in jtable , database shows values in jtable but inserts , not insert values database! below action performed on button through data inserted jtable , database! private void jbutton17actionperformed(java.awt.event.actionevent evt) { preparedstatement pst = null; connection conn = null; try { string sql = "insert month (no,description,sale,expense,total) values (?,?,?,?,?)"; pst = conn.preparestatement(sql); pst.setstring(1, txt_srm.gettext()); pst.setstring(2, txt_datem.gettext()); pst.setstring(3, txt_tsalem.gettext()); pst.setstring(4, txt_texpm.gettext()); pst.setstring(5, txt_subtm.gettext()); pst.execute(); joptionpane.showmessagedialog(null, "saved!"); } catch (exception e) {

Hide default Android Soft-input in EditText doesn't works -

i have try hide default soft-input keyboard with getwindow().setsoftinputmode(windowmanager.layoutparams.soft_input_state_hidden); but when click edittext keyboard appears again i have tried also input.setimeoptions(editorinfo.ime_flag_no_extract_ui); and android:imeoptions="flagnoextractui" with no result, keyboard appears when click edittext. if set inputtype null, keybard doesn't appear edittext became unusable since cannot select or move cursor anymore nor copy-paste anything any solution? if don't want keyboard appears ever, use code: getwindow().setflags(windowmanager.layoutparams.flag_alt_focusable_im, windowmanager.layoutparams.flag_alt_focusable_im); in way android soft keyboard hidden, , can use cursor, selection copy-paste etc. normally.

ios - Use MPMoviePlayerController as container for UIView -

working on ios6 app receives rtsp stream via ffmpeg. currently getting stream frames in uiimage , passing uiimage uiview displayed user. working great far, toggle full screen while viewing stream. i wondering if possible use mpmovieplayercontroller purpose? since receiving frames in uiimage object don't have url pass mpmovieplayercontroller , hence have not been able concept work. i use mpmovieplayercontroller container uiview handling frames currently. seem possibility? was unable work, may not possible. ended using following answer toggle uiview in , out of full screen. works great! toggle fullscreen action double tap

vb6 - understanding this VB code -

can try wrap brain around one? thought ensuring there 2 bytes in hex byte , ensuring values between 0 -9 , a-f no. a snippet of program infrared controller/blaster. subroutine send actual signals (or other codes) out serial port controller finish job. sample call: sendcode ("04241001") the vb6 code says: public sub sendcode(byval strout string) ' **************************** ' sub sends hex codes ' **************************** dim numb1 integer, numb2 integer dim strrs string dim long dim newline(200) string, outline(200) string debug.print "sending ir - " & strout strrs = vbnullstring = 1 len(strout) newline(i) = mid(strout, i, 1) next = 1 len(strout) step 2 if asc(newline(i)) < 64 numb1 = (asc(newline(i)) - 48) * 16 strrs = strrs + format(hex(numb1 / 16), "0") else numb1 = (asc(newline(i)) - 55) * 16 strrs = strrs + format(hex

gwt - Google Wallet - SSL / https handled completely by Google? -

for google wallet, i'm wondering if ssl certificate https needs setup on serverside, or if https access done on google's servers? in wallet tutorial, notice https addresses google - https://developers.google.com/commerce/wallet/digital/docs/tutorial an ssl certificate not required on server side. postback call google mirrors original transaction data plus order id. if using sellerdata field, depending on particular situation, may consider encrypting information. also see related discussion: does google wallet api digital goods require ssl certificate?

android - How can I trace the path of an SQLite database created in an application -

how can trace path of sqlite database created in application in android? can have better suggestion? use getdatabasepath(databasehelper.dbname) absolute path on filesystem database created see docs example log.i("data base path",getdatabasepath("name_of_yourdb.db").tostring());

cocos2d x - Cocos2dx sublayers -

i developing 2d games cocos2dx, in still new... inside game, there's number of ui elements i'd group 1 (i intend group them cclayer s). example few text labels , sprites form cstatbar cclayer . cstatbar included in various other cclayer how do that? created cstatbar class , then, inside containing class's init() function, cstatbar::create() , call this->addchild(pstatbar) however, statbar did not appear... there obvious thing missed? positions correct. thanks! edit: notes: 1. cctouchesbegan of sublayer called, not rendered/seen 2. how resize sublayer cover partial area of parent layer? supposedly cstatbar should cover 10% of top area of screen, not whole screen... inside cparent::init() function, can initialize csublayer so: // create , initialize csublayer csublayer* psublayer= csublayer::create(); float fwidth = psublayer->getcontentsize().width; float fheight = psublayer->getcontentsize().height; psublayer-&g

java - Access Modifiers on methods obtained from Interfaces -

interface ursus { public void eat(); } class grizzly implements ursus { public void eat() //line 1 { system.out.println("grizzly eats salmon "); } } class polar implements ursus { public void eat() //line 2 { system.out.println("polar eats seals "); } } class ursus_test { public static void main(string args[]) { grizzly g = new grizzly(); polar p = new polar(); p.eat(); g.eat(); } } when remove access modifier "public" line1/line 2, compiler complains applying weaker access privileges methods "eat()" obtained ursus interface. does mean methods obtained interfaces should "public" on classes implement interface ? as per docs the public access specifier in interface indicates interface can used class in package. if not specify interface public, interface accessible classes defined in same package interface. all methods declared in interface implicitly public, public modifier ca

if we have 5 different array how to merge them in single array in php -

i have 5 different array structure :- array ( [0] => http://www.php.net/200 ) array ( [0] => http://www.php.net/?setbeta=1&beta=1302 ) array ( [0] => http://www.php.net/downloads.php200 ) array ( [0] => http://www.php.net/docs.php200 ) array ( [0] => http://www.php.net/faq.php302 ) i need merge these in single array structure like:- array ( [0] => http://www.php.net/200 [1] => http://www.php.net/?setbeta=1&beta=1302 [2] => http://www.php.net/downloads.php200 [3] => http://www.php.net/docs.php200 [4] => http://www.php.net/faq.php302 ) one thing want confirm these arrays forming inside loop function , of number , have single name i.e $array use array_merge . $arr = array_merge($arr1,$arr2,$arr3,$arr4,$arr5); edit after seeing comment, having multidimensional array. $arr = array(); for($i = 0; $i < $old_arr; $i++) { $arr[] = $old_arr[$i][0]; }

Scrapy dynamic file name based on timestamp for the logfile -

i using scrapy , logging results log file using log_file= in settings.py. want each time run spider should log different filename based on timestamp. possible achieve doing setting in settings.py? try: import time log_file = str(int(time.time())) settings.py python script, can write python code in it.

database - Unable to login to MYSQL getting error ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) -

i not able connect mysql server getting error error 2002 (hy000): can't connect local mysql server through socket '/var/lib/mysql/mysql.sock' (2) i have checked log :- innodb: apply batch completed 130820 5:19:41 innodb: error: os said file flush did not succeed 130820 5:19:41 innodb: operating system error number 5 in file operation. innodb: error number 5 means 'input/output error'. innodb: operating system error numbers described @ innodb: http://dev.mysql.com/doc/refman/5.0/en/operating-system-error-codes.html innodb: file operation call: 'flush'. innodb: cannot continue operation. 130820 05:19:42 mysqld ended due not able restart or start mysql [root@opx-vpc-db-report-slave-2 ~]# service mysqld status mysqld stopped [root@opx-vpc-db-report-slave-2 ~]# /etc/init.d/mysqld start timeout error occurred trying start mysql daemon. starting mysql: [failed] [root@opx-vpc-db-report-slave-2 ~]# i hav

c# - LinearGradientBrush convertor -

how convert lineargradientbrush value string value or color value .? have method returns lineargradientbrush value private lineargradientbrush setbackground(string color1, string color2) { lineargradientbrush brush = new lineargradientbrush(); brush.startpoint = new point(0, 0); brush.endpoint = new point(0, 1); gradientstop gra1 = new gradientstop(); gra1.color = (color)colorconverter.convertfromstring(color1); gra1.offset = 1; gradientstop gra2 = new gradientstop(); gra2.color = (color)colorconverter.convertfromstring(color2); gra2.offset = 0; brush.gradientstops.add(gra1); brush.gradientstops.add(gra2); return brush; } i need convert return value string type or hexadecimal value such "ffff00" representation , possible ,if yes , how ? in advance a relatively simple way of doing output various properties string. working brain compiler here, wouldn

ssh - How to make git push work with Cygwin? -

after lot of googling , troubleshooting, believe i've determined cygwin doesn't send ssh private key when sshing unless explicitly tell to. can in ssh config file line identityfile, don't know how when using git too. this time, i'm trying push github. ssh key has been added. previously, couldn't ssh in until set config file , added identityfile line. can ssh github, can't git push. anyone know how around this? thanks ton! edit: clear, when try git push, following error: $ git push permission denied (publickey). fatal: remote end hung unexpectedly but can ssh fine: $ ssh github hi ______! you've authenticated, github not provide shell access. connection github.com closed. edit2 solution: user 'cupcake' suggested adding key ssh-agent. ran: $ ssh-add <private key path> and works. thanks! i use puttycyg putty directly cygwin installation. has benefit of giving me access putty's ssh implementation, putty'

android - Parsing xml only getting CDATA within Tag -

i trying text xml file looks so: <description> <p> <strong>last updated:</strong> mon, 19 aug 2013 23:52:31</p> <p>incident 53% contained.</p> <![cdata[<p>the american fire burning in heavy fuels on extreme slopes 10 air miles northeast of community of foresthill, california, , 8 air miles south of interstate 80 has grown 14,765 acres.</p> <p><strong>the public invited american fire update meeting @ foresthill veteran's memorial hall @ 24601 harrison street in foresthill beginning @ 7 p.m. tonight.</strong></p> <p>heavy smoke shaded fire yesterday, moderating fire behavior. backing fire single , group tree torching observed. on northeast corner spot fire contained firefighters made progress hand lines , dozer lines. along eastern portion of fire last night, firefighters conducted firing operation, meaning used fire reduce unburned fuel between fire line , main fire. center portion of east

c# - Is WSSF wise to use today on a new WCF service layer? -

i'm @ customer developed , deployed wcf service layer (compiled against .net 4.5). works , dandy. however, got additional requirement - i'm supposed rebuild (or @ least redesign) layer incorporate wssf. there's no old functionality we'd need integrate , operations in services based on executing sps in db. should or wiser argue against it? i'm not because i've never worked using wssf , got virtually no explanation why should @ particular workplace (which don't want know don't know themselves). my worries based on, not limited to, following. the latest release august 2010. there's nothing listed in documentation section . the license seems in conflict commercial activities. wssf isn't used technology today (or it?!). the purpose of wssf wcf-fy old service layer (or isn't it?!) only. especially #4 , #5 not strongest statements in arsenal @ moment i'll gladly stand corrected, should have few wise words contribute on subj

html - Inserting new row in table from Ajax dynamically -

i getting json string web service , want display in html page. have used ajax dynamically displaying row in table. problem record present in single row. code: function showall(){ var user = document.getelementbyid("user_name").value; alert(user); var row = $("<tr>"); var nextrow = $("</tr>"); $.ajax({ type: "post", url: "webresources/hello/showrequests", data : user, success : function(data){ console.log(data); $.each(data, function(index, store){ $.each(store, function(key,value){ row.append($("<td>").html(value)); }); $('#requests').append(row); $('#requests').append(nextrow); }); }, error: function(e){

github - git credential osxkeychain cannot execute binary file -

hi following github guide . after executing curl command, following when run git credential-osxkeychain : /usr/bin/git-credential-osxkeychain: /usr/bin/git-credential-osxkeychain: cannot execute binary file any ideas on how solve this? that right issue, if didn't execute the: chmod u+x git-credential-osxkeychain note need download file in directory in $path (which should case here, /usr/bin ). try chmod bit more large: chmod 775 git-credential-osxkeychain

C and C# file encryption method and particular solution -

i have small system on windows 7 os consists of 2 application (c , c# applications) , database text or binary file in fact. c application read database, c# application read , write. defend database file outward impacts. i tend use public-key cryptography method, rsa example. offer better 1 method or better particular solution. suggest need open source, commercial-friendly licensed libraries (like openssl) c , c# languages. own implementation choice too. upd : change both applications code , want encrypt entire file. you should use standard symmetric encryption. ms has provided article subject. http://support.microsoft.com/kb/307010/en-us . writing own encryption method results insecure , errorness algorithm. example of initialization using password , salt: var enc = new rijndaelmanaged(); rfc2898derivebytes key = new rfc2898derivebytes(pw, encoding.ascii.getbytes(salt)); enc.key = key.getbytes(encryption.keysize / 8); enc.iv = key.getbytes(encryption.blocksize /

Ember.js when use action want to render page current tap as well as new tap -

edit, calling function edit , pass id , details render edit page in same tab.now, problem unable open in new tap when try open in new tab using clrl+click not open. want open edit page current tab new tap also.. if want ctrl+click open link in new tab link needs have href set. happen automattically if use {{linkto}} handlebars helper instead of {{action}} . if reason need use action instead need manually bindattr href attribute set. have @ source linkto tag see how can done: https://github.com/emberjs/ember.js/blob/v1.0.0-rc.7/packages/ember-routing/lib/helpers/link_to.js#l323

javascript - Div Layer shows on map, but corresponding NAME, is not displaying -

i can't believe here again, thought had page sorted. i have taken geocodezip's page ( http://www.geocodezip.com/v3_fusiontables_geocoder_pointinpolygonchicago.html ), , modified (well thought had done all). i trying use table instead of original chicago neighborhoods, can't find missing have return 'name' column table, original does i have looked @ fusion table in original page, ensure table had same column headings, one's thought used. map displays geometry layers not returning corresponding ' name ' can't find in code needs changed have small table @ moment, once working, able functional. my table: https://www.google.com/fusiontables/datasource?docid=1oglrsle3rfqwrt3g7exhtqjxkdwuhh97xdqhtuw here code: <!doctype html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/> <meta http-equiv="content-type" content="text/html; charset=utf-8"

asp.net - Paging for Gridview doesn't work correct -

i have search page. in list search results displayed. when select page page numbers, search result disappeared , show list page refreshed. should do? tried onselectedindexchanged , onselectedindexchanging. , didn't work. thank you. <asp:gridview id="gridview1" runat="server" allowpaging="true" autogeneratecolumns="false" cellpadding="4" datasourceid="ahsun" forecolor="#333333" gridlines="none" width="100%" datakeynames="sicil_no" onselectedindexchanged="linkbutton1_click" cssclass="icerik" o > <footerstyle backcolor="#507cd1" font-bold="true" forecolor="white" /> <columns> <asp:templatefield showheader="false"> <itemtemplate>

selenium - How to run build.gradle with Sikuli integrated into the project? -

i using sikuli in project handle flash buttons. it's working fine while running scripts locally. issue when need run build.gradle, need have sikuli dependency in build.gradle. how have written build.gradle. when run build, error: what went wrong: not resolve dependencies configuration ':compile'. could not find com.googlecode.javacpp:javacpp:0.1. required by: :new_qa_automation:1.0 > org.sikuli:sikuli-api:1.0.2 > org.sikuli:sikuli-c ore:1.0.1 not find com.googlecode.javacv:javacv:0.1. required by: :new_qa_automation:1.0 > org.sikuli:sikuli-api:1.0.2 > org.sikuli:sikuli-c ore:1.0.1 try: run --stacktrace option stack trace. run --info or --debug option more log output. build failed. here build.gradle file apply plugin: 'java' version = '1.0' apply plugin: 'project-report' repositories { mavencentral() maven { url " http://repo.springsource.org/release

jquery mobile - Listview with many items is too slow when create -

i work on mobile app using , phonegap , app have jquerymobile listview many items (more 20 items li ) , every li have textbox , 3 radio buttons , when try create , refresh listview using code : $("#listview").trigger('create').listview().listview("refresh"); it takes 15 second create listview . any 1 know how can speed create of listview many items? below handelbar template used populate listview: <ul data-role="listview" data-inset="true" id="lstquestions"> {{#each data}} <li data-role="fieldcontain" > <label >{{dorder}} - {{title}}</label> <fieldset data-role="controlgroup" data-type="horizontal" > <input type="radio" name="rdo-{{id}}" id="rdo-{{inspectionid}}-{{id}}-3" value="3" data-theme="c" /> <label for="rdo-{{i

asp.net - update panel , add function that works after updating -

i use jquery datepicker i have input in updatepanel <input id="datemask" type="text" /> and js code: function setd() { alert(1); } $(document).ready(function () { setd(); $("#datepicker").datepicker({ changemonth: true, changeyear: true }); }); but problem when post form server refresh update panel $(document).ready(function () doesn't work after refreshing ,so can execute function from? you need rebind in sys.webforms.pagerequestmanager.add_endrequest event. see similar post jquery $(document).ready , updatepanels?

xamarin - MvvmCross iOS SelectedCommand for a custom TableViewCell -

i'm working on mvvmcross app ios in need use custom tableviewcell. know how implement selectedcommand event on mvxsimpletableviewsource. got work mvxstandardtableviewsource , found this solution on youtube. problem solution stuart uses mvxstandardtableviewsource. other problem model want bind selectedchangedcommand not same model bind source to. i have been searching internet while find answer problem, hope can me this. in advance. here's code: mainviewmodel.cs namespace myapp.core.viewmodels { public class mainviewmodel : baseviewmodel { private navigationlistviewmodel _navigationmenu; public navigationlistviewmodel navigationmenu { { return _navigationmenu; } set { _navigationmenu = value; raisepropertychanged(() => navigationmenu); } } public void init() { navigationmenu = new navigationlistviewmodel(); navigationmenu.init(); } } navigationlistviewmodel.cs namespace myapp

osx - How to prevent a document-based cocoa application to open ANY document? -

recently, document saved caused crash whenever start app. there way prevent doc-based app opening any document, including new empty or last active document(s)? i'd not using osx functionality (outside scope of app), within program. i think should done through nsdocumentcontroller somehow, cannot figure out , have had no luck finding answers elsewhere. so, how tell osx app (through nsdocumentcontroller ) not open documents @ startup? you're looking functionality defined in nsapplicationdelegate-protocol. following 2 methods give control on happens on app start: - (bool)applicationshouldhandlereopen:(nsapplication *)theapplication hasvisiblewindows:(bool)flag - (bool)applicationshouldopenuntitledfile:(nsapplication *)sender see the documentation more.