Posts

Showing posts from January, 2011

java ee - EclipseLink @OneToMany relationship size JPQL exception -

i try deploy java ee application has been working fine on wildly/hibernate glassfish/eclipselink , i'm getting such error: problem compiling [delete providerservice ps :work_station member of ps.workstations , ps.workstations.size = 1]. [81, 101] state field path 'ps.workstations.size' cannot resolved valid type. 81, 101] state field path 'ps.workstations.size' cannot resolved valid type. is there possibility run glass fish hibernate? , if how configure such thing in build.gradle. i'am using in build.gradle conditional selection of wildfly remote/wildfly embedded testing arquillian (works ok), , adding glassfish remote/glassfish embedded here couldn't compile there such error above. receive this: arquillianservletrunner not found. not determine contextroot protocolmetadata, please contact deployablecontainer developer. java.lang.illegalargumentexception: arquillianservletrunner not found. not determine contextroot protocolmetadata, please co

sql - Postgresql select and subselect in same table -

i have following tables: table person: id | name | ---------------+ 1 | adam | 2 | chris | 3 | nancy | 4 | nathalie | 5 | holy | table relation: id | person | parent | ---+--------+--------+ 1 | 2 | 1 | 2 | 2 | 3 | 3 | 1 | 4 | 4 | 5 | 2 | i have query produces similar this: person | parent | -------+----------+ chris | adam | chris | nancy | adam | nathalie | holy | chris | i'm not sure how achieve desired result. the relation table shows people's parents are. need join person tables (twice) translate ids names: select p1.name, p2.name relation r join person p1 on p1.id = r.person join person p2 on p2.id = r.parent

javascript - WP post contains only a url, how to turn it into a link? -

so using 1 of them cool new wp templates come editor , (enfold, project). i use built-in enfold (avia layout builder) components list blog posts in area on site. these posts contain url, want accomplish keep using built-in components listing posts (links) once user clicks 1 of post titles, should taken url of post body instead of page displaying url in plain text. i using setup in order users able create these posts wordpress "publish emailing" feature, otherwise have used link plug-in instead. speaking of that, sick of updating 1 million plugins time, don't want bloat wp install plugin purpose, , don't want pay writing such plugin well. , in experience wp plugins have been major security risk well. none of that. my solution hijack link clicks in list. created 2 arrays containing post titles , corresponding urls. i started adding script block right before tag (in header.php): <script> //newsredirecter news_redirector_title = new array();

c++ - Qt not getting text from lineedit -

qstring username = ui->lineedit->text(); qstring password = ui->lineedit_2->text(); qmessagebox failed; failed.setwindowflags(qt::framelesswindowhint); if(username == "jon" && password == "12345") { failed.settext("login failed. try again."); failed.exec(); } else { failed.settext(password); failed.exec(); } using qt. sorry if has been asked before i'm quite new , couldn't find answer. don't understand i'm doing wrong. set username , password text inside line edits on ui. everytime click button function output of dialog text blank. how can the text read? alright, ran tests , found got: if set sort of signal slot connection calls function containg if/else statmentsthe program work. following program made: dialog.h: #ifndef dialog_h #define dialog_h #include "ui_dialog.h" #include <qdialog> class dialogclass : public qdialog, public ui::dialog

ios - Custom Twitter login with Swift and Parse -

i've been stuck on how implement custom twitter login parse swift app while now. resources i've seen twitter login ios objective-c, , i've tried changing suggested solutions swift, no luck far. current code: @ibaction func twitterlogin(sender: anyobject) { pftwitterutils.loginwithblock( { (user: pfuser?, error: nserror?) -> void in // apparently both user , currentuser nil... if pftwitterutils.islinkedwithuser(pfuser.currentuser()) { var info: nsurl! = nsurl(string: "https://api.twitter.com/1.1/account/settings.json") var request: nsmutableurlrequest = nsmutableurlrequest(url: info) nsurlconnection.sendasynchronousrequest(request, queue: nsoperationqueue.mainqueue(), completionhandler: { (response: nsurlresponse!, data: nsdata!, connectionerror: nserror!) -> void in if let d = data { var dict: nsdictionary = nsjsonserialization.jsonobjectwithdata(d, options: nsj

reactjs - browserify.require does not work with jsx files in from version 9 -

i have little bundle program using browserify api: var browserify = require('browserify') var b = browserify() b.transform('reactify') b.require('./my-component.jsx') b.bundle(function (e, val) { console.log(e == null) }) this work in browserify versions < 9 not above. problem react component , error looks this: <div></div> ^ parseerror: unexpected token is there explanation this? seems work commande line using: browserify -r ./my-component.jsx -t reactify use api.

html - CSS Z-Index layering issue -

i got nice idea webpage layout , started design code it. , when done menu, thought yiha! after few moments noticed .menu-item going top of page going behind .logo class if has higher z-index. here sass cutout: li.menu-item list-style: none position: absolute z-index: 200 &:hover > background-color: #a82929 box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.5) margin-right: 0px text-decoration: none color: #ffffff box-sizing: border-box padding: 0px 8px 0px 8px margin-right: 22px transition: 0.4s ease-in-out position: relative z-index: 300 link codepen tried watch videos z-index, amongst them 1 css-tricks, still don't work want. me stackoverflooooow, hope... i guess problem this: .menu-box has z-index of 20. .logo-box has z-index of 40. and both have position: relative; therefore, inside 2 "layered" inside two, individually

mysql - Join integration query involving multiple associations -

i posted on dba not getting responses added here. here sqlfiddle i'd assistance in fixing query. problem simple i'm not able solve it. let me explain background on does, , need integrate. first, here current tables. users (performers) table the users table lists users. going assume query users selected type performers. users ----------- id hash first_name last_name here dump of users table: id hash first_name last_name 1 092ee63c6698851ba72183388bff1b3b jonathan kushner 2 2d234affe1d08c3394cd499f297d7380 dustin kushner aliases table the aliases table lists aliases. connect table performers in further table. aliases ---------- id hash title here dump of aliases table: id hash title 1 436etgfgdggdd greatness 2 54645655gggdgdg mr.darkness 3 ffsafsdsfdfdssf mr.shadow performers_aliases table the performers_aliases table connects users of type performers aliases in

swift - Setting delegate of another class with screen view to self -

i'm new @ ios programming. have setup: viewcontroller view on ib, class viewcontroller secondcontroller view on ib, class secondcontroller i have protocol: protocol secondcontrollerdelegate { func getsomething() -> string } and have delegate variable on secondcontroller: class secondcontroller: uiviewcontroller { var delegate: secondcontrollerdelegate? @iboutlet weak var labelstatus: uilabel! override func viewdidload() { super.viewdidload() } @ibaction func buttontouch(sender: anyobject) { labelstatus.text = delegate?.getsomething() } func try () { labelstatus.text = "testing" } } now, according hints everywhere, in order can call delegate?.getsomething() @ secondcontroller.buttontouch() , need set on viewcontroller: class viewcontroller: uiviewcontroller, secondcontrollerdelegate { override func viewdidload () { super.viewdidload() secondcontroller.delegate = sel

android - fragment transaction back stack not working? -

so main activity contains 2 fragments. in activity_main.xml layout file have 1 (list)fragment , frame layout act container second fragment. each time item clicked on list fragments list view, details corresponding item clicked should displayed in second fragment contained in frame layout. that fine, works. when used fragment transaction reference create backstack, backstack not work expected. what expected: 1) user clicks on item in list view, details corresponding itemclicked displayed on second fragment (with in frame layout). 2) user clicks on item in list view, details corresponding item replace details corresponding previous click. 3) user clicks button , previous item clicked on list view displayed along details corresponding item in second fragment. what occurs: i repeat steps 1 , 2 above. on step 3, app exits, in onstop method called followed ondestroy method. this main activity. import android.app.fragmenttransaction; import android.support.v7.a

spring - How to send Array & Set datatype data in AJAX call? -

i have spring api @requestmapping(value="setentry/{userid}/{columnname}", method = requestmethod.post) public responseentity<?> updateusersettypefields(@pathvariable string userid, @pathvariable string columnname, @requestbody collectionrequestparams entries , httpservletrequest request) { here collectionrequestparams public class collectionrequestparams { private string[] arr; private set set; // setter & getter i trying call api : $.ajax({ url:"setentry/123/111", headers:{"x-accesskey":"token","x-deviceid":"123"}, data:{"arr":['111','222']}, type:"post",contenttype:"application/json" }) this throwing http status 400 question how can pass arguments arr & set i.e sending string[] & set datatype data ? when use @request

mysql - PHP function only working once -

i'm trying encrypt 3 sets of data insert mysql database. first 1 working ($email). firstly post data form, make several checks (does user exist etc...). @ point encrypt email check database (already exists). if data doesn't exist, encrypt first names , surnames , insert them database. encrypt first name , surname, not correctly. email encryption works. (checked decrypting data on script). thanks jonathan <?php $email = $_post['emailreg']; $firstna = $_post['firstna']; $surna = $_post['surna']; $password = $_post['passreg']; $passconfirm = $_post['passconfirm']; $userpass = $email . $password; $emailsep = explode("@", $email); $domain = $emailsep[1]; $key = md5('united'); $salt = md5('united'); function encrypt($string, $key) { $string = rtrim(base64_encode(mcrypt_encrypt(mcrypt_rijndael_256, $key, $string, mcrypt_mode_ecb))); return $string; } $link = mysql_connect('xxxxxxx', &

javascript - what does the error “Exception in template helper: Error: Handler with name 'pathFinder' already exists.” mean? -

my code is template.homeitem.helpers({ 'sharedata': function() { return { title: this.title, author:meteor.users.findone(this.createdby),//createdby stores author's userid url: router.map(function(){ router.route('/content/:_id',{ name:'pathfinder', template:'pathfinder', data: function(){ var currentroute= this.params._id; return contentslist.findone({_id: currentroute}); }});})}} i not know correct way pass url in sharedata of shareit. thanking everyone first of all, please indent code. it's unreadable , contains error due poor indentation. to question; means have created route name. it's hard tell you're trying achieve think trying to this: template.homeitem.helpers({ 'sharedata': function() { return { title: this.title, author: meteor.users.findone(this.createdby), url: '/content/' + this._id } } })

c# - Xamarin Forms on iOS, while debugging elements turns to null -

i have xamarin forms app, works fine, on click events doesn't work, tried debug , noticed gui objects turned null, don't know why, tried compare null , re-initialize then, if-statement ignored mono! heck? here class: http://pastebin.com/jdufj9sb activityindicator turn null don't know when, when check on 224 line, , debugger shows null, if-statement doesn't run properly you're using async method views initialization: private async task load(profile profile) there're places call function (eg. line 70): without await (so fire , forget) without using device.begininvokeonmainthread. remember: all operations on ui must done ui thread.

javascript - Multiple admins in Firebase - is it possible? -

i'm trying create client-side application using firebase database service , i'm experiencing difficulties defining security rules allow multiple 'admin' users access data. my data schema looks this: { admins: { simplelogin:1 : true, facebook:1234 : true }, mydata: { simplelogin:1 : { ..... }, google:1234 : { ..... }, facebook:1234 : { ..... } } } i'm trying allow logged in user write place inside 'data' object (i'm writing ref.child('mydata').child(auth.uid).set(...) , to prevent user access other users data . in addition, user uid defined in 'admins' data should able read/ write 'mydata' object. my security json defined this: { "rules": { "admins": { ".write": false, ".read": true }, "mydata": { "$user_id": { ".read": "$user_id =

java ee - EJB3 - Self Remote Injection / EJB Plugins -

i want implement kind of "plugin mechanism" using ejb3. have two+ war's, each containing own bean types using remote interfaces defined in separate project. basically, want main bean (product) deployed , provide mechanism other beans (n different project beans) register against. important arbitrary beans may register, long have knowledge of product's remote interface. sample code: product bean @singleton @concurrencymanagement(bean) public class productbean implements productremote, serializable { private static final long serialversionuid = 4686943363874502919l; private projectremote project; public void registerproject(projectremote project) { this.project = project; } public void something() { if(project != null) project.dosomething(); } } project bean @concurrencymanagement(bean) @singleton @startup public class projectbean implements projectremote, serializable { private static final long ser

python - tastypie obj_delete method does not work -

i have following code in tastypie. "obj_delete" method not work (will not invoked) 'contextresource' class. problem? class contextresource(modelresource): created_by = fields.foreignkey(userresource, 'created_by', full=true, null=true) class meta: queryset = context.objects.all() resource_name = 'context' authorization = djangoauthorization() authentication = multiauthentication(basicauthentication(), sessionauthentication()) always_return_data = true list_allowed_methods = ['get', 'post', 'put', 'delete'] filtering = { "name": all, "id": all, "query": } def obj_create(self, bundle, **kwargs): print '&& create context' bundle.data['created_by'] = bundle.request.user bundle = super(contextresource, self).obj_create(bundle, **k

ruby on rails - Trying to hide some Twitter API credentials in a Yaml file, getting uninitialized constant EnvironmentVariables::Application::YAML -

i have initializer environment_variables.rb : module environmentvariables class application < rails::application config.before_configuration env_file = rails.root.join("config", 'environment_variables.yml').to_s if file.exists?(env_file) yaml.load_file(env_file)[rails.env].each |key, value| env[key.to_s] = value end # end yaml.load_file end # end if file.exists? end # end config.before_configuration end # end class end which i've checked finding file called environment_variables.yml in config: test: twitter_consumer_key: "" twitter_consumer_secret: "" twitter_access_token: "" twitter_access_token_secret: "" development: twitter_consumer_key: "" twitter_consumer_secret: "" twitter_access_token: "" twitter_access_token_secret: "" production: twi

java - Server doesn't work with more than one connection -

i've got working simple client-server app. problem works fine 1 started client, not 2 or more. establish connection, when try enter text in first or second, server breakes. think problem may @ function broadcast() in server.java . server.java public class server { final int port = 5000; private arraylist<newclient> al = new arraylist<newclient>(); private scanner in; private printwriter out; private simpledateformat sdf; private int uniqueid = 0; private void go(){ try{ serversocket serversocket = new serversocket(port); system.out.println("waiting clients..."); while(true) { socket s = serversocket.accept(); newclient chat = new newclient(s); system.out.println("client number " + chat.getid() + " connected from: " + s.getlocaladdress().gethostname()); al.add(chat); thread t = ne

html - How do I make my navigation link have a box around it upon hover? -

Image
sorry odd title, didn't know call it. i'm new designing, stick back-end friend suggested give go. i'm trying to this my current css follows. #main-nav { margin-top:70px; } #main-nav ul { list-style-type: none; } #main-nav li { display:inline-block; position:relative; } #main-nav { text-transform: uppercase; text-decoration: none; color: #ffffff; } #main-nav a:hover { background-color: #2c3e50; } i have no clue i'm doing when comes designing , may easy solution don't have slightest idea. thanks in advance. you need add padding , border css: padding: 10px; border: 1px solid #333; the complete css might need is: #main-nav { text-transform: uppercase; text-decoration: none; color: #ffffff; padding: 10px; display: block; } #main-nav a:hover { background-color: #2c3e50; border: 1px solid #333; }

javascript - Is it possible to practice AJAX using the Brackets web editor with local files only? -

what i'm trying accomplish: making site allows browse through videos , add/remove them ajax-controlled playlist. far, website has been created through brackets using local web files, , i'm curious how i'll need change work environment if want begin using ajax website. i've never used ajax before, if isn't obvious.... you have use local server wamp ( http://www.wampserver.com/en/ ), mamp( https://www.mamp.info/en/ ), or lamp

ios: uiscrollview and uiview autolayout -

i have uiscrollview , uiview . when uitextview touched, uitextview size large size , uiscrollview size small size , there problem because of autolayout. how can set constraints of uiscrollview , uiview ? may try it: below constraint: uiscrollview top, left, right equal self.view top, left, right uiscrollview bottom equal uiview bottom uiview left, right, bottom equal self.view left, right, bottom uiview height equal 200(you set it) ok, when uitextview touched, set uiview height constraint want(maybe 300) i think works!

Having some errors, learning c (Euclidean Algorithm) -

so have done programming in python before, , trying hands out old solutions/methods used there. having syntax/compiler errors , feel im missing something. dumb here code. //euclidian algorithm in c //a=bq+r gcd(a,b)=gcd(b,r) //recursive solution //devin martin #define _crt_secure_no_warnings // avoid scanf warning or error #include <stdio.h> int main() { int a, b = 0; int gcd(a, b); { if (b == 0); return a; return gcd(b, % b); //a%b = r } } errors severity code description project file line error lnk2019 unresolved external symbol _gcd referenced in function _main euclidianalgorithm d:\documents\visual studio 2015\projects\euclidianalgorithm\euclidianalg.obj 1 warning c4700 uninitialized local variable 'a' used euclidianalgorithm d:\documents\visual studio 2015\projects\euclidianalgorithm\euclidianalg.c 14 error lnk1120 1 unresolved externals euclidianalgorithm d:\documents\visual

mediaelement - Dispaly time current position media in TextBlock - Windows Phone 8.0 Silverlight -

i develop application in windows phone 8.0 silverlight play media mediaelement. so, want display time current position media in textblock during media playing, how do? thanks. you can use dispatchertimer update textblock. this: dispatchertimer timer = new dispatchertimer(); timer.interval = new timespan(0, 0, 1); timer.tick += timer_tick; timer.start(); to current position, in timer_tick function, use yourplayer.position.tostring() : void timer_tick(object sender, eventargs e) { textblock.text = yourplayer.position.tostring(); }

creating a larger matrix from smaller matrices in R -

i have series of text files in folder called "disintegration t1" this: > 1.txt 0 0 0 0 1 1 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 1 1 1 0 > 2.txt 0 1 1 0 1 0 0 1 1 1 1 1 0 1 1 1 1 1 0 1 0 0 0 0 1 > 3.txt 0 1 1 1 1 0 0 0 0 0 0 0 1 0 0 0 the files either 4x4 or 5x5. must read in matrices, data social network analyses. goal automate process of putting these matrices larger matrix, these matrices directly diagonal each other, , 0s inputted in blank spaces within larger matrix. in case final result like: > mega_matrix 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0

javascript - Sorting not working with Knockout and Isotope -

update: forgot 1 question per question rule. cut second question out of one. trying make list of users sortable different criteria animation. using knockout this demo seemed direction take. switched isotope 2.0 fork of integration code here . sometimes sorting doesn't update properly, shown in version - http://codepen.io/matelich/pen/ppoqdz - medal , component should have #0 , #1 switched each other, ui doesn't update. switch (content) { case 'alphabettab': viewmodel.users.sort(function (u1, u2) { return u1.username.localecompare(u2.username); }); break; case 'medaltab': viewmodel.users.sort(function(u1, u2) { return u1.medalscore < u2.medalscore ? 1 : (u1.medalscore > u2.medalscore ? -1 : 0); }); break; case 'componenttab': viewmodel.users.sort(function(u1, u2) {

cypher - Limit Subnodes Performance in Neo4j -

i writing cypher output of 5 product per category cypher: match (s:supplier)-[:post]->(p:product)-[:belong_to]->(c:category) * match r = (c)<-[:belong_to*0..5]-(p) c, collect(tail(nodes(r))) allcatproducts return c, reduce(outputproducts=allcatproducts[..0] , catproduct in allcatproducts | outputproducts + catproduct)[..5]; however, performance of cypher poor. there did wrong here? also, trying understand part: [:belong_to*0..5] and (catproduct)[..5] any appreciated. you seem overcomplicate query, query should job : match (s:supplier)-[:post]->(p:product)-[:belong_to]->(c:category) return c.name, collect(p)[..5] products concerning other question : (x)-[r:belong_to*0..5]->(y) is variable length path query, here should aware if no y node found, x returned y http://neo4j.com/docs/stable/query-match.html#_relationships_in_depth http://graphaware.com/graphaware/2015/05/19/neo4j-cypher-variable-length-relationships-by-example.htm

sql - msg 175, The isnull function requires 2 arguments(s) -

after looking @ similar issues i'm no wiser. have value returning has 2 sets of numbers name i.e. (xxxx;xxxx;name). i'm trying return name. original code i've written (below) works if name value/name present. select substring(field_value,75, len (field_value)) [rwadmin].[rv_activity_fields] p join [rwadmin].[rw_association] on p.activity_id = a.activitya_id however breaks report if value blank returns "null", so i've thought work, above error. select isnull(substring(field_value,75, len (field_value))) [rwadmin].[rv_activity_fields] p join [rwadmin].[rw_association] on p.activity_id = a.activitya_id help please. isnull takes expression , value replace null values. check expression value, if null returns value provided nulls , if not returns expression value, if want return blank when null should use way: isnull(substring(field_value,75, len (field_value)), '')

Nested Form Rails UPDATING -

i hope good, need nested forms profile of user , respective car. each user has own profile: class perfilcontroller < applicationcontroller before_filter :authenticate_user! def index end def show @usuario = current_user @usuario.perfil ||= perfil.new @perfil = @usuario.perfil end def update @usuario = current_user @perfil = @usuario.perfil respond_to |format| if @usuario.perfil.update_attributes(perfil_params) format.html {redirect_to @usuario, notice: "datos actualizados" } else format.html {render action: "show"} end end end private def perfil_params params.require(:perfil).permit(:nombre, :apellido, :rut) end end i want fund ensure each time user posts car, can update profile. deputy nested form <%= simple_form_for(@auto) |f| %> <%= f.error_notification %> <%=f.fields_for @perfil |perfil_bui

ios - Is it possible to limits google places to one or two places like restaurants or coffeeshops? -

i'm building app in swift can filter places 1 or 2 types of locations e.g restaurants or coffeeshops possible , how done ? the app fetch data these places. yes can search via types in google places in example https://maps.googleapis.com/maps/api/place/textsearch/json?query=mexican+restaurant&sensor=true&location=40.846,-73.938&radius=20&key=yourkeyhere explanation: this give result in radius of 20km types of restaurants in mexico. can check documentation lot of different variation. https://developers.google.com/places/?csw=1#placesearchresults

How to Develop WebAPI to be used in Android App by using existing Asp.net C# project functions -

my company using portal , working develop android app of same.how can develop webapi of existing functions , events can used in android application. i using below technology. 1-sharepoint 2007,visual studio 2008,asp.net 2-in current project asp.net user control used , deployed on sharepoint webapplication. wepapi not possible visual studio 2008. using sharepoint 2007,i have created web service , exposed current functions , hosted on sharepoint.below posts helped me https://malikhan.wordpress.com/2009/08/07/creating-custom-webservice-in-sharepoint-2007/ http://adrianandroid.blogspot.in/2012/05/access-c-net-web-service-in.html https://msdn.microsoft.com/en-us/library/ms464040%28v=office.12%29.aspx?f=255&mspperror=-2147217396

javascript - d3 limit zoom level for time axis -

my code below zooming on time x-axis. want set limit in between time should zoom in or out i.e. upper limit , lower limit of time. i've tried put boundaries value in zoomed function suggested in d3 graph limited zoom thread. isn't working. var x = d3.time.scale() .domain([(start_date), (end_date)]) .range([0, width]); var zoom = d3.behavior.zoom() .x(x) .on("zoom", zoomed); svg = d3.select('#chart'+k) .append("svg:svg") .attr('width', width + margin.left + margin.right) .attr('height', height + margin.top + margin.bottom) .append("svg:g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")") .call(zoom); function zoomed() {

c# - DataTable Select Query with daterange -

i have datatable in there 4 columns username,value,startdate,enddate has values below format.when select between these date range it's count 0 datatable has values. pls me . username | value |startdate |enddate joe | 4 |28-08-2015 12:12:26 am|30-08-2015 12:29:26 pm| datarow[] drdocdetails = dtdlcd.select("username =\'" + susername + "\' , value =\'" + value + "\' , startdate >= #" + convert.todatetime(sprocessstart).tostring("yyyy-mm-dd hh:mm:ss tt") + "# , enddate < #" + convert.todatetime(sprocessend).tostring("yyyy-mm-dd hh:mm:ss tt") + "#"); your code working me, check code string susername ="joe"; string value ="4"; string sprocessstart = "28-08-2015 12:12:26 am"; string sprocessend

cors - Options method not allowed for _users database in CouchDB -

i'm trying change user's password within application connects couchdb domain. code more or less same example in couchdb docs , i.e. document, change data, send put request changes. issue occurring put request - because of cors browser tries options request before sending put request, options request returning 405 method not allowed. does have idea of how around this? here's request headers in case it's helpful: options /_users/org.couchdb.user:clinic_admin http/1.1 host: localhost:15984 connection: keep-alive pragma: no-cache cache-control: no-cache access-control-request-method: put origin: https://localhost:15000 user-agent: mozilla/5.0 (macintosh; intel mac os x 10_10_5) applewebkit/537.36 (khtml, gecko) chrome/44.0.2403.157 safari/537.36 access-control-request-headers: content-type, if-match accept: */* referer: https://localhost:15000/webapp/ accept-encoding: gzip, deflate, sdch accept-language: en-us,en;q=0.8,ja;q=0.6,sv;q=0.4,zh-cn;q=0.2 there

php - use memcache for fragment cache -

how use memcache fragment cache? use zend framework libraries. see exapmle. require_once 'zend/cache.php'; $frontendoptions = array( 'lifetime' => 300, 'automatic_serialization' => false ); $backendoptions = array('cache_dir' => './zendcache/'); $cache = zend_cache::factory('output', 'file', $frontendoptions, $backendoptions); if (!$cache->start('rightcolumn')) { // html , cached in file. $cache->end(); } now want use memcache fragment cache. require_once 'zend/cache.php'; $frontend = array('caching' => true, 'lifetime' => 1800, 'automatic_serialization' => true); $backendoptions = array('cache_dir' => './zendcache/'); $backend = array( 'servers' => array( array('host' => '127.0.0.1', 'port' => 11211) ), 'compression' => false ); $cache = zend_cache

Compiling Error in Maven -

seeing compilation error in maven. checked , tried workarounds got google , stack* sites. still couldnt resolve. installed maven 3.3.3 , supported version of java 1.7. please note haven't set java_home, m2 , m2_home environment variables. still takes path. apache maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22t07:57:37-04:00) maven home: /usr/local/apache-maven-3.3.3 java version: 1.7.0_85, vendor: oracle corporation java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85.x86_64/jre default locale: en_us, platform encoding: utf-8 os name: "linux", version: "2.6.32-573.3.1.el6.x86_64", arch: "amd64", family: "unix" errors are [info] ------------------------------------------------------------- [error] compilation error : [info] ------------------------------------------------------------- [error] /home/sdiuser/build-release/hg-artifactid/src/main/java/hg-groupid/app.java:[1,11] ';' expected [info] 1 error [inf