Posts

Showing posts from May, 2011

c# - Multple Composite PrimaryKey reference as foreign key map in Fluent nHibernate -

this legacy table structure hence no schema modification possible. patient ------- code - pk hospitalcode - pk - fk hospital.code hospitalgroup - pk - fk hospital.hospitalgroup other fields hospital ------- code - pk hospitalgroup - pk - fk hospitalgroup.code other fields department ------- code - pk hospitalcode - pk - fk hospital.code hospitalgroup - pk - fk hospitalgroup.code other fields diagnose ------- patientcode - pk - fk patient.code hospitalcode - pk - fk hospital.code hospitalgroup - pk - fk hospital.hospitalgroup departmentcode - pk - fk department.code other fields the mapping looks following public class patientmap : classmap<patient> { public patientmap() { compositeid() .keyproperty(x => x.id, "id") .keyreference(x => x.hospital, "hospital_id", "hospitalgroup_id") .keyreference(x => x.hospitalgroup, "hospitalgroup_id"); map(x => x.name);

java - Get signature and certification path from PFX -

i have soap message <soapenv:envelope xmlns:soapenv = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:v = "http://www.something.com"> <soapenv:header/> <soapenv:body> <v:auth> <v:userid>xxxxxxxxxx</v:userid> <v:password>xxxxxxxxxx</v:password> <v:certchain>xxxxxxxxxx</v:certchain> <v:signature>xxxxxxxxxx</v:signature> </v:auth> </soapenv:body> </soapenv:envelope> after generating java source code wsdl, auth, setting value this. (all below 4 fields string datatype) auth authinfo = new auth(); authinfo.setuserid(userid); authinfo.setpassword(password); authinfo.setcertchain(""); authinfo.setsignature(""); the following piece of code using signature, digest value, certificate chain. when populate values , submit soap message digital signature invalid error. verifie

c++ - MinGW Always Changing Directories -

just nooby question, wondering every time use g++ mingw on windows 8.1 command prompt, have change directories compile it? gets tedious me @ least because keep different assignments in folders, , cd'ing of address kind of gets me little annoyed. i've seen professor on linux machine doesn't need change directories , compiles program finishes writing program. right environment variables set ...;c:\mingw\bin;%path% need add more or have move files destination? i've tried cygwin, keeps giving me errors , other answers on site confusing. in fact every answer on site has been kind of hard comprehend... there dictionary should looking before read 1 of posts? sorry!

javascript - dynamic highcharts with json data -

i m trying figure out possible make json data fetched dynamically database of php , mysql , can plotted highcharts dynamic auto updating? appreciated. following code have tried , not working , want implement the website 10 lines. <html> <head> <title>highchart example</title> <script type="text/javascript"src="http://code.jquery.com/jquery-1.10.1.min.js"></script> <script src="http://code.highcharts.com/highcharts.js"></script> <script src="http://code.highcharts.com/modules/exporting.js"></script> <script type="text/javascript"> var chart; function requestdata() { $.ajax({ url: 'live-server-data.php', success: function(point) { var series = chart.series[0], shift = series.data.length > 20; // shift if series // longer 2 // add point

.net - How to print on network printer in C# -

i need print raw data network label printer. have used printing using local/network printer installed driver before. writing server application, , 1 of task print on many (windows) network label printers. know can install printer network printer locally on server , use same way of printing before. is there native protocol or "low level way" of printing network printer without need of installation 50+ printers on server? need send raw data, because label printer , print page generated in dpl. if there possibility monitor printer state (paper, tape), nice.

asynchronous - node.js: confusion with order of callbacks -

i have started node.js. find asynchronous coding style uses impressive indeed. however, of used java , python take time used it. i know following code works fine. verified several questions on forum. have tried on own. var http = require('http'), fs = require('fs'); fs.readfile('./index.html', function (err, html) { if (err) { //throw err; } http.createserver(function(request, response) { console.log("server started"); response.writeheader(200, {"content-type": "text/html"}); response.write(html); response.write("other things"); response.end(); }).listen(3000); }); the way interpretting follows: 1. try reading html file i. when done create server ii. send on client 2. else. however, can have chain of thoughts follows: 1. create server 2. try reading file i. when done. send on client 3. in meanwhile else server might aske

odbc - connecting to DB2 database:[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed -

odbc.ini: [default] driver = db2 [abc] driver = db2 [dsn_test1] description = connection db2 driver = db2 odbcinst.ini: [db2] description = db2 driver driver = /home/user/sqllib/lib/libdb2.so fileusage=1 dontdlclose=1 [odbc] trace=1 tracefile=/home/user/sqllib/trace.out db2cli.ini [abc] hostname="hostname" pwd="passwd" port="port" protocol=tcpip database="dbname" uid="uid" $ ./isql abc +---------------------------------------+ | connected! | | | | sql-statement | | [tablename] | | quit | | | +---------------------------------------+ while connecting db2 driver,below error coming: connection attempt data source name "abc": ===============================================================================

angularjs - Parse JSON to JSONP on the fly without using third parties -

i trying access codeforces api , providing json(but not jsonp) i'm making cross domain request, should jsonp. so, i'm using third party json2jsonp , , works. var cfurl = "http://json2jsonp.com/?url=http://codeforces.com/api/user.info?handles="; var runuserrequest = function(handle){ return $http({ method: 'jsonp', url: cfurl + handle + "&callback=cfhandle" }) } finally, doubt is there elegant way without using third parties json2jsonp thanks in advance is there elegant way without using third parties json2jsonp use 1 of following options: a reverse proxy server a greasemonkey script browser settings references long polling options: nginx, php, node.js cross-domain post greasemonkey? how can deactivate cross-site scripting defense on own browser? how disable access denied message when trying cross scripting iframe?

html - Make grid of divs move depending on surrounding elements -

i trying grid of div elements dynamic grid system. when width , height of elements static (and importantly same) works setting float:left on element desired effect. html: <div id="main"> <div class="somediv">1 - text</div> <div class="somediv">2 - text</div> <div class="somediv">3 - text</div> <div class="somediv">4 - lot longer text.</div> <div class="somediv">5 - text</div> <div class="somediv">6 - text</div> <div class="somediv">7 - text</div> <div class="somediv">8 - text</div> <div class="somediv">9 - text</div> <div class="somediv">10 - text</div> </div> css: div.somediv { float:left; margin: 10px; padding:5px; width:150px; display:inline-block; } if have 1 element has larger

objective c - How to pass an HTTP as a header in with NSURLSession -

i'm trying submit request web service , want pass json argument parameter in http header. have following code performs request without json argument. how add json argument in http body pass json parameter? heres code works without json argument: -(void) getreposbydate:(void (^)(nsmutablearray *))handler { //get credentials nsdictionary *credentials = [keychainuserpass load:@"app name"]; nsstring *username = [credentials allkeys][0]; nsstring *password = credentials[username]; //create request nsstring *requeststring = @"some web service url"; nsurl *url = [nsurl urlwithstring:requeststring]; nsurlrequest *req = [nsurlrequest requestwithurl:url]; nsdata *userpassworddata = [[nsstring stringwithformat:@"%@:%@", username, password] datausingencoding:nsutf8stringencoding]; nsstring *base64encodedcredential = [userpassworddata base64encodedstringwithoptions:0]; nsstring *authstring = [nsstring stringwit

java - JLabel MouseEvent not excecuting after compiling my program to a jar -

i working on program. in 1 of panels there jlabel , can click , dialog open. far good, if compile program jar , run it, label unclickable , of events ignored, no exceptions, nothing. in ide, label , events fine , components work properly. problem is: don't know how fix this. i don't know if should post code, think not code causes bug. ideas? here abstract form of code: public class tasklistpanel extends javax.swing.jpanel { private javax.swing.jlabel lbladdtask; /** * creates new form tasklistpanel */ public tasklistpanel() { initcomponents(); } private void initcomponents() { lbladdtask.seticon(new javax.swing.imageicon(getclass().getresource("/path/to/my/icon.png"))); // noi18n lbladdtask.addmouselistener(new java.awt.event.mouseadapter() { public void mouseclicked(java.awt.event.mouseevent evt) { lbladdtaskmouseclicked(evt); } public void mouseentered(java.awt.event.mouseevent evt) {

sql - Get Match Data On top -

i have multiple operator on different columns below: select d.id ,d.dealercode,d.affiliationcode,d.legalname,d.shippercode,d.primaryuserid,d.primarycontactid, dealer d left join country c on c.id=d.countryid left join [user] u on u.id=d.primaryuserid left join registrationsource rs on rs.id=d.registrationsourceid d.tenantid='4c0a42de-6ce5-4faa-8b5d-da4d7c3294b4' , ( u.username '%aq%' or d.dealercode '%aq%' or d.legalname '%aq%' or d.shippercode '%aq%' ) order d.dealercode asc is possible find row set first(on top) have exact match value 1 of these column value try union - should allow list 2 sets of data 1 after other (untested): select d.id ,d.dealercode,d.affiliationcode,d.legalname, ... dealer d left join country c on c.id=d.countryid

oracle11g - Unexpected token Error while creating view that uses pivot -

i'm not able create view in oracle through select query uses pivot function gives following error.i'm not able understand what's problem.please refer image @ following address error snapshot.the error can seen @ following address" https://www.dropbox.com/s/sq98mvfourobo7w/error.png " i can't see item work (dropbox blocked), ran across issue using create view wizard in sql developer: throw out error unexpected token ! pivot. the workaround use create or replace force view sql worksheet , avoid wizard.

app store - Get version number of other ios application -

Image
is there way check version number of other application installed appstore ? note: 1. not in jail broken devices 2. out using third party library. not possible. control upto level of app sandbox. what sandbox? for security reasons, ios places each app (including preferences , data) in sandbox @ install time. sandbox set of fine-grained controls limit app’s access files, preferences, network resources, hardware, , on. part of sandboxing process, system installs each app in own sandbox directory, acts home app , data.

javascript - How to determine geolocation on mobile devices from browser -

i've managed determine location using html5 geolocation getviahtml5 = function(done) { if(navigator.geolocation) { navigator.geolocation.getcurrentposition(function(position) { vicinity.lat = position.coords.latitude; vicinity.lng = position.coords.longitude; done(); }, function(e) { console.warn('error(' + e.code + '): ' + e.message); }); } else { console.warn("browser doesn't support geolocation"); } }; will work on blackberry, samsung, , iphones? or each phone or browser have different way determine location? browser , not native app.

java - How integrate vpn connector into phonegap apps in android? -

for now, users of our apps have download vpn connector apps , login vpn server before utilizing resources inside our private network, want lessen steps before users begin interact our service. and wonder if there's solution integrate vpn server connector phonegap apps in android, when want support android platform without vpn service api? are there libs or framework available usage this? do have dig source of phonegap implements vpn connector? thank you~

rails : displaying error messages on a form -

i have 'modif' action, activated link, loads data database, displays form via 'modif' view. form linked @newaut. on form, link leads 'modifvalid' action. operates tests on data entered , may return error message. in case of error, if redirect 'modif' action display error, data come original values, changes on form lost, , error displayed. so, render 'modif view. @newaut doesn't exist anymore, must reload params data. result ok. there way display error message without reloading data entered on form. thanks. def modif @zgtitre="modification d'un auteur" @newaut=auteur.find(params[:id]) end def modifvalid @newaut=auteur.find(params[:auteur][:id]) @newaut[:autabr]= params[:auteur][:autabr].upcase @newaut[:autnom]= params[:auteur][:autnom] inderr=0 flash[:meserr]="" if ..... flash[:meserr]="xxxxx" inderr=1 end if inderr==1

d3.js - d3 - dashed line from a datapoint to an axis (seen in dimplejs.org) -

Image
i draw dashed line datapoints x/y axis (on mouseover). thus, value can read better on axis , looks awesome (seen in dimple ). i'm looking solution how can achieve or example.... grateful tip!! update 1 it works , can draw lines. want draw more animated - possible svg:line ? var dpx = d3.select(this).attr('x'); var dpy = d3.select(this).attr('y'); var myline = d3chart.append("svg:line") .attr("class", 'd3-dp-line') .attr("x1", dpx) .attr("y1", dpy) .attr("x2", 0) .attr("y2", dpy) .style("stroke-dasharray", ("3, 3")) .style("stroke-opacity", 0.9) .style("stroke", dpchannel.color); you can plot lines 2 points each: the horizontal line have 1 point coordinates (0

Find out where stored proc is called from - [Oracle] -

how can find out stored procedure foo called (names of calling procedures)? i'm trying find out in type of situations foo called, , seems cumbersome query select * user_source because there string literals contain foo . regards, robotron you can use all_dependencies view: select * all_dependencies referenced_owner = <username> , referenced_name = 'foo'; this return objects directly use procedure foo . if procedure uses foo inside dynamic sql statement, however, you'll either have parse source, or try adding logging call stack inside foo procedure (in real application, logged table instead of dbms_output ): create or replace procedure foo begin dbms_output.put_line('foo'); dbms_output.put_line(dbms_utility.format_call_stack()); end; create procedure bar begin dbms_output.put_line('bar'); foo(); end; begin bar(); end; output: bar foo ----- pl/sql call stack ----- object line object handle n

android - oauth 2 implementation in mobile SDK -

i have created sdk , want integrate oauth authentication process. want same facebook sdk do, if client app installed , login, switch app ask permission , switch app wants authorise it. if client app not there open webpage , on login ask permission , redirect app after login. we have implemented oauth on server not sure grant_type use achieve above functionality. can not store password in client app. let me know if has idea how achieve functionality , implementing same flow other sdks(facebook, twitter) does. for mobile based apps use following url authentication: post https://api.example.com/token grant_type=authorization_code& code=auth_code_here& redirect_uri=redirect_uri& client_id=client_id pass authentication code app if user login else if user not login first navigate login page, on successful login authorization page come as-usual. note: might unsecure sending code in query param, doing in request on ssl enhanced security. for browser authent

Firefox webfont not working on one of two domains -

i implemented webfont on our website. website available through 2 domains: http://blog.von-der-see.de / http://www.vds-blog.de the webfont implemented way: @font-face { font-family: quattrocento-sans; src: url('./style/quattrocento sans.woff'); } @font-face { font-family: quattrocento-sans-bold; src: url('./style/quattrocento sans bold.woff'); } if view website in firefox through both domains, see font not working on 1 of 2 domains. the website wordpress , if switch home-url other domain, not working on on, on other domain. whats problem? have tried adding font mime types in htaccess? out of interest why using woff? no true type etc?

javascript - getElementById().value gives blank for a text box -

i trying show value entered in text box javascript alert() . have form on onsubmit() , calling function checklogin() in alerting value entered in #test_user text box. below html code: <form id="login_form" name="login_form" method="post" action="verifylogin.php" onsubmit="checklogin()"> <input type="text" id="test_user" name="username" class="inputbox" placeholder="username" value=""/> <input type="password" id="password" name="password" class="inputbox" placeholder="password" /> <input type="submit" id="login" name="submit" value="log in"> <a href="#" class="login_facebook">login facebook</a> </form> and below checklogin() function in js: function checklogin() { var uname = document.geteleme

Escape <?php ... ?> on javascript file -

i'm busy doing server side , client side validation magento. validation works fine on server side (php) on client side using javasrcript. when started on this. had javascript embedded on phtml file , working expected. because using magento decided inject javascript file via page.xml when added javascript code instead of getting message pulled php is. here javascript: function defaultaddresserrorchangenotallowedmessage() { alert("<?php echo mage::helper('invent_general')->getdefaultaddresserrorchangenotallowedmessage();?>"); return; } i run when user hit onclick point function defaultaddresserrorchangenotallowedmessage() , the <?php echo mage::helper('invent_general')->getdefaultaddresserrorchangenotallowedmessage();?> will populated is. but when embed directly phtml file pull correct message. i there way javasrcipt can use escape php , correct message pulled config.xml php rendered server side

My Custom CursorAdapter doesn't update my ListView -

i'm having troubles custom cursoradapter , listview , fact is, can save data in sqlite database in custom contentprovider listview not populated. i know db operations heavy long operations, therefore in thread , furthermore cursorloader subclass of asynctaskloader , should prepared that. with simplecursoradapter works fine custom cursoradapter not. can tell me wrong , how solve it? thanks in advance. my code following public class textnoteadapter extends cursoradapter { /*********** declare used variables *********/ private cursor mcursor; private context mcontext; private static layoutinflater minflater=null; /************* textnoteadapter constructor *****************/ public textnoteadapter (context context, cursor cursor, int flags) { super(context, cursor,flags); minflater =(layoutinflater)context.getsystemservice(context.layout_inflater_service); mcontext = con

PHP difference between time() and getTimestamp() object [Year 2038 bug] -

what difference between: $now = time(); and $now = new datetime(); $now->gettimestamp(); by taking account 32-bit int limitations (a.k.a year 2038 bug) safe use gettimestamp() in 32-bit system ? edit: for further information problem, check link: what unix timestamp , why use it? what have tried? have done, confirm question? simple enough: $datetime = new datetime('5000-01-01'); var_dump($datetime->format('d.m.y')); var_dump($datetime->gettimestamp()); output: string(10) "01.01.5000" bool(false) so: no, not save in using timestamp datetime. anyway: question might reference, can easy found out testing. the sence datetime not unix timestamp. avoiding unix timestamp. see answer own link comments: what unix timestamp , why use it?

how to answer incoming call in twilio API -

how answer in twilio api using answer button, m unable pick call on browser, want know how answer or reject call while connecting device on answer button click, plz me my snippet is twilio.device.setup('<?=$token?>'); twilio.device.ready(function(device) { }); twilio.device.incoming(function(conn) { $("#number").val(conn.parameters.from); var ss= "incomging call:\n"+conn.parameters.from; $("#log").text("incoming connection " + conn.parameters.from); // accept incoming connection , start two-way audio conn.accept(); }); twilio.device.error(function(conn) { alert("error:\n"+data); }); function call() { // phone number or client connect call // params = {"phonenumber": $("#number").val()}; // twilio.device.connect(params); twilio.device.connect(); } function hangup() { twilio.device.disconnectall(); } <input type="text" id="number"

jquery - how to create a pointed triangle on the left div -

Image
i ask how create pointed div display comments of users. pointed div should : do have idea? thanks it should appear this put triangle on left side not on top. #pointed { position: relative; margin: 0 auto; width: 50px; height: 50px; padding: 4px; color: white; background-color: rgba(0,0,0,.8); } #pointed:after, #pointed::after { position: absolute; top: -5px; left: 22px; content: ''; width: 0; height: 0; border-bottom: solid 5px rgba(0,0,0,.8); border-left: solid 5px transparent; border-right: solid 5px transparent; } the triangle generated border properties, make point left need change css to: #pointed:after, #pointed::after { position: absolute; top: 5px; left: -5px; content: ''; width: 0; height: 0; border-right: solid 5px rgba(0,0,0,.8); border-bottom: solid 5px transparent; border-top: solid 5px transparent; } http://jsfiddle.net/ln6zg/ for more information on how triangles generated take here http://c

javascript - how to live populate div using dynamically generated html input types -

i'm trying populate div select option don't start... i have code live edit "title" of div, want add specific div option... here's code have now: var rooms = $("#howmanyrooms").val(); var roomcounter = 1; $(".design-your-system-page-playground-container").show(); (var = 0; < rooms; i++) { // $("<div class='appendeddiv'>room-" + roomcounter++ + "</div>").appendto(".housecontainer"); // $("<span>room-" + roomcounter + " name</span>&nbsp;<input type='text' placeholder='name' id='room-" + roomcounter + "-id'></div></br>").appendto(".infoncontainer"); // $("<div class='design-your-system-page-rooms targetdiv_" + roomcounter + "'>room-" + roomcounter + &q

ios - NSRange exception error to a nsmutablearray -

i new ios . need create array of specific size , set elements 0. need add array in nsuserdefaults . i did following: //declare , initialize array nsstring *name=@"test"; int y=5; nsmutablearray *testarray = [[nsmutablearray alloc] initwithcapacity:100]; (int i=0; i< [testarray count];i++) [testarray addobject:0]; //initialize elements 0 [[nsuserdefaults standarduserdefaults] setobject:testarray forkey:name]; //read array form nsuserdefaults nsmutablearray *testarray = [[[nsuserdefaults standarduserdefaults] objectforkey:name] mutablecopy]; [testarray replaceobjectatindex:y withobject:[nsnumber numberwithint:1]]; //here nsrangeexception index beyound bounds. this should work you: //declare , initialize array nsstring *name=@"test"; int y=5; nsmutablearray *testarray = [[nsmutablearray alloc] init]; (int i=0; i< 100;i++) [testarray addobject:@"0"]; [[nsuserdefaults standarduserdefaults] setobject:testarray forkey:name]; /

c# - How to draw only selected borders on a control -

i building custom control , need paint top border. how can done? edit: using code: protected override void onpaint(painteventargs e) { if (!this.designmode) { rectangle bounds = this.clientrectangle; graphicspath topedge = new graphicspath(); topedge.startfigure(); topedge.addline(bounds.x, bounds.y, bounds.x + bounds.width, bounds.y); topedge.closefigure(); e.graphics.drawpath(new pen(systemcolors.activeborder, 1), topedge); } base.onpaint(e); } this works when there no nested controls inside custom control. once start add controls, seem over-draw border line. use controlpaint.drawborder method . article draw border around c# winform control : following adds border around control: protected override void onpaint(painteventargs e) { base.onpaint(e); controlpaint.drawborder(e.graphics, clientrectangle, color.black, border_size, buttonborderstyle.inset,

java - EHCache issue with localCacheEnabled and Cache replicated between apps -

i'm getting exception when trying access app making me crazy. tried many variants none of them worked. exception is: [2014-06-27t09:57:07.058+0200] [glassfish 4.0] [info] [] [] [tid: _threadid=44 _threadname=thread-3] [timemillis: 1403855827058] [levelvalue: 800] [[ error 27/06/2014 09:57:07.055 [jk-connector(2)] find failed: net.sf.ehcache.cacheexception: uncaught exception in setpinned() - pinning not supported when local cache disabled]] [2014-06-27t09:57:07.081+0200] [glassfish 4.0] [severe] [] [] [tid: _threadid=44 _threadname=thread-4] [timemillis: 1403855827081] [levelvalue: 1000] [[ org.hibernate.cache.cacheexception: net.sf.ehcache.cacheexception: uncaught exception in setpinned() - pinning not supported when local cache disabled @ net.sf.ehcache.hibernate.regions.ehcachetransactionaldataregion.put(ehcachetransactionaldataregion.java:151) @ net.sf.ehcache.hibernate.regions.ehcachetransactionaldataregion.put(ehcachetransactionaldataregion.java:126)

shell - Unix-Echo -n is not working -

for(( i=0;i<=5;i++)) ((j=1;j<=i;j++)) echo -n "$j" done echo " " done outputs: -n 1 -n 1 -n 2 -n 1 -n 2 -n 3 -n 1 -n 2 -n 3 -n 4 -n 1 -n 2 -n 3 -n 4 -n 5 my os: sunos sun4v sparc sun4v i want output be: 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 according the manual , -n option echo not portable. on solaris system -n supported bsd emulation of echo in /usr/ucb/echo , not default echo . result: ksh88 's , ksh 's echo not have -n option. csh 's echo , /usr/ucb/echo , on other hand, have -n option, not understand back-slashed escape characters. sh , ksh88 determine whether /usr/ucb/echo found first in path and, if so, adapt behavior of echo builtin match /usr/ucb/echo . to fix problem, have several options: switch printf %s "$j" portably print string without newline. (i recommend doing this.) switch \c escapes, i.e. replace echo -n "$j" echo "$j\c" . (not rec

javascript - match an item in an array instead of doing a for loop -

here code for(y=0;y<json.parse(sessionstorage.getitem("url")).length;y++){ if(json.parse(sessionstorage.getitem("url"))[y] != olistitem.get_item('privacystatementurls').get_url()){ listurl.push(olistitem.get_item('privacystatementurls').get_url()); } } it goes through array see if there match item in list. there inbuilt function in javascript can use match if identical. he match he not hel hell hello etc

jquery - Auto sum for horizontal numeric boxes not working -

i trying use auto sum functionality 3 horizontal boxes, neither auto sum working , not sure has gone wrong readonly property also, not working me. below code. <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("#t3").prop('readonly',true); var sum=0; for(var i=1;i<=2;i++) { $("#t"+i).keyup(function(){ sum=sum+parseint(this.val()); }); } $("#t3").val(sum); }); </script> </head> <body> <table> <tr> <td id="t1"><input type="text"></td> <td id="t2"><input type="text"></td> <td id="t3"><input type="text"></td> </tr> </table> </body> </html> bind event on

pickle - Get Python to output a .py file from a dictionary? -

how can python output , save .py file has been generated dictionary? for example want produce file dynamically: file.py : import time project_name = "your_project_name" user = "test user" from following dictionary: {'project_name': 'your_project_name', 'user': 'test'} this have tried: open('file.py', 'wb') handle: pickle.dump(values, handle) but gave: (dp0 s'project_name' p1 s'user' p2 try this with open('file.py', 'wb') handle: handle.write("{") k,v in your_dict.iteritems(): handle.write("'%s' : '%s'," % (k,v)) handle.write("}\n")

How to mark maven plugin threadSafe -

i want mark maven-clean-plugin threadsafe using @threadsafe annotation. give example? edit: after upgraded maven 3.0.5, build got below warnings: (building using teamcity) [18:51:10][com.dir.hay.straw:straw-parent] [warning] *****************************************************************agent time: 14:21:10 [18:51:10][com.dir.hay.straw:straw-parent] [warning] * build requesting parallel execution, project *agent time: 14:21:10 [18:51:10][com.dir.hay.straw:straw-parent] [warning] * contains following plugin(s) not marked *agent time: 14:21:10 [18:51:10][com.dir.hay.straw:straw-parent] [warning] * @threadsafe support parallel building. *agent time: 14:21:10 [18:51:10][com.dir.hay.straw:straw-parent] [warning] * while /may/ work fine, please plugin updates *agent time: 14:21:10 [18:51:10][com.dir.hay.straw:straw-parent] [warning] * and/or request plugins made thread-safe. *agent time: 14:21:10 [18:51:10][com.dir.hay.s