Posts

Showing posts from August, 2012

3dsmax - 3D Max generate objects from animation frames, copy frames to viewport -

is possible copy animation frames separate objects in viewport? i using path deformation , array tools, cannot (as far know) animate materials. also, output cannot edited curve editor?? example: have 30 frame animation of rotating box moving along path. instead 30 boxes in viewport. each one, copy of respective keyframe. sort of classic video technique of creating trails moving objects. know can done in after effects, want actual 3d models own custom animation frames, in scene , not results path deformation , array. can work on them still image. select object , use maxscript code: for = 1 30 @ time snapshot $ it create collapsed copy of mesh @ each frame.

php - Zend - changing image URL path for deployment -

the title might confusing i'm not sure myself on how explain this. i'm sure pretty simple solution. i'm moving static images,css,js s3 - can accessed via egs: http://files.xyz.com/images/logo.gif http://files.xyz.com/images/submit_button.gif http://files.xyz.com/style/style.css http://files.xyz.com/js/jquery.js files.xyz.com cname pointing files.xyz.com.s3.amazonaws.com now in zend layout , views - i'm accessing these full url egs <img src="http://files.xyz.com/images/logo.gif"/> my concern when i'm testing on localhost - dont want data fetched s3 local hard disk so want this. in application.ini - should able specify resources.frontcontroller.imageurl = http://localhost and when i'm deploying - change to resources.frontcontroller.imageurl = http://files.xyz.com , access in view <img src="<?php echo $this->imageurl;?>/images/logo.gif"/> what best approach handling thanks create v...

c - The difference between ~(x-1) and ~x+1 when x=0x80000000 -

the language use c. type of x , n int. i have 1 line code following printf("x=%x,n=%d,first=%x,second=%x\n",x,n,((~(x+0xffffffff))>>n),((~x+1)>>n)); it shows value of x,n , 2 methods of shifting n bits of complement number of x. when x=0x80000000,~(x+0xffffffff)=0x8000000,~x+1=0x80000000, yet when shift these 2 n bits, results different. btw, if changed 0xffffffff ~1+1(that means ~(x+(~1+1)), result same ~x+1 i wonder why happened. thanks. the deleted answer pavan manjunath had correct answer 1 case, assuming int usual 32-bit type. integer constant 0xffffffff has value 2^32 - 1 , isn't representable int , representable unsigned int . type unsigned int (6.4.4.1). hence x converted unsigned int addition, and ((~(x+0xffffffff))>>n) evaluates as ((~(0x80000000u + 0xffffffffu)) >> n) ((~0x7fffffffu) >> n) (0x80000000u >> n) with value 2^(31-n) if 0 <= n < 32 (it's undefined behaviour if n...

Spring's RestTemplate and prefix in JSON body -

i'd use resttemplate obtain response server , process response in android app, server answers prefix (or variable) in json body, response looks similar this: response={"foo":"bar"} is possible omit "response=" part som simple way, or need reimplement mappingjacksonhttpmessageconverter class? thanks in advance edit: it works now , following code based on newest springandroid (1.0.0 release). restteplate(true) constructor adds required convertors , request.tomap() builds multivaluemap, body type formhttpmessageconverter accepts. httpheaders requestheaders = new httpheaders(); requestheaders.setcontenttype(new mediatype("application", "x-www-form-urlencoded")); resttemplate resttemplate = new resttemplate(true); resttemplate.setrequestfactory(new httpcomponentsclienthttprequestfactory()); final string url = "http://www.dummy.org/herp/getderp"; string result = resttemplate.postforobject(url, request.tomap(), st...

draw - drawing a diagram with text in php/python -

i'm looking way create : http://goo.gl/pnj45 with php or python using data fetched user input. know connection s , text s. it's not practically possible use google chart api in case. any insights? the tool may find useful graphviz

bypass specific web address in an Android emulator -

is there anyway bypass specific server in android emulator -http-proxy command line parameters? maybe answer can you: proxy requires authentication android emulator or one: how setup android emulator proxy settings? more info: http://developer.android.com/guide/developing/tools/emulator.html#startup-options

java - How to tell Digester to stop parsing XML? -

i use apache digester parse big xml file. need gracefully stop parsing xml when particular tag value found. in case it's kind of metadata @ beginning of xml. the solution i've found far create rule throws exception. feel rather hack proper solution. can tell digester stop processing , skip rest of xml? you looking way short-circuit normal processing when terminating condition encountered. exception, catch in driver, way go.

git - Kdiff3 won't open with mergetool command -

i have conflicts, type: git mergetool i message saying: hit return start merge resolution tool normally when this, open kdiff3 can merge differences. now when it, continues next file, , kdiff3 doesn't open @ all. i triple cheched git config , system path , seems perfect. config file follows: [merge] tool = kdiff3 [mergetool "kdiff3"] path = c:/program files (x86)/kdiff3/kdiff3.exe [diff] guitool = kdiff3 [difftool "kdiff3"] path = c:/program files (x86)/kdiff3/kdiff3.exe [core] editor = \"c:/program files (x86)/gitextensions/gitextensions.exe\" fileeditor autocrlf = true [user] name = james farrell email = info@jamespfarrell.com [github] user = whygosystems token = 87d00c2e613b3a7c8c1be817b75b8a33 [diff] external = c:/program files (x86)/git/cmd/git-diff-wrapper.sh anyone have ideas might wrong? i have feeling (though wrong, has been problem, since installed new github windows ...

python - Unable to encode/decode pprint output -

this question based on side-effect of that one . my .py files have # -*- coding: utf-8 -*- encoding definer on first line, api.py as mention on related question, use httpresponse return api documentation. since defined encoding by: httpresponse(cy_content, content_type='text/plain; charset=utf-8') everything ok, , when call api service, there no encoding problems except the string formed dictionary pprint since using turkish characters in values in dict, pprint converts them unichr equivalents, like: api_status = { 1: 'müşteri', 2: 'some other status message' } my_str = 'here documentation part contains turkish chars işüğçö' my_str += pprint.pformat(api_status, indent=4, width=1) return httprespopnse(my_str, content_type='text/plain; charset=utf-8') and plain text output like: here documentation part contains turkish chars işüğçö { 1: 'm\xc3\xbc\xc5\x9fteri', 2: 'some other status message...

google maps - How to Change the position of the instruments of Street View -

i using google maps api v3, know how can change position of elements (shown in picture http://www.pikky.net/uploads/d6964cfad0bb97cc3ada7852df260a715234d69a.png ) when user inside street view. thanks, mirko you achieve defining streetviewpanoramaoptions streetviewpanorama object initialize map variable when declaring map options. it's in streetviewpanoramaoptions can determine positions of controls when you're in street view. (refer document more info https://developers.google.com/maps/documentation/javascript/reference#streetviewpanoramaoptions ). here snippet on how approach this. (note: should done in initialize() function prior initializing map variable). first declare variable streetviewpanoramaoptions , change options desire: var panoramaoptions = { addresscontroloptions : { position : google.maps.controlposition.bottom_center }, zoomcontroloptions : { position : google.maps.controlposition.top_right}, enableclosebutton : tru...

ios - login session facebook / upload photo -

i have question, try integrate facebook inside application, follow a tutorial i login in way _facebook = [[facebook alloc] initwithappid:kappid]; [_facebook authorize:_permissions delegate:self]; my question is, there way maintain login session? every time want post on fb wall have login , post. last question is, can post local image inside web image on wall post? since each time creating _facebook object. after calling following method. [_facebook authorize:_permissions delegate:self]; so solving problem maintain session after successful login call code this, if(session) // write code here post wall else // write code authentication for better understanding can follow tutorial easy integration of facebook in ios app

perl - Where to start to learning Mojolicious? -

i new mojo framework... went through of wiki pages on mojolicious website , couldn't comprehend many things. documentation seemed has background mojo framework. so, i'm wondering whether there place newbie start? thanks in advance. the mojocasts cited tempire start, find docs bit fragmentary, , prefer dig code of other projects... here can find code read here https://github.com/kraih/mojo/wiki/example-applications 1 pretty good: https://github.com/tempire/mojoexample

javascript - jQuery AJAX call doesn't execute success block -

i have javascript function ajax rest call spring controller grab stuff database , plot on map. reason success area of ajax call isn't executing, request returning status of 'success'. there reason why success block wouldn't execute complete block would? query: $j.ajax({ url: url, type: 'get', datatype: 'json', sucess: function(json) { console.log("gettestdata successful"); boxes = parsejsonfortestdata(json); //console.log(">> boxes = '" + boxes + "' <<"); }, error: function(jqxhr, textstatus, errorthrown) { console.log("gettestdata failed textstatus '" + textstatus + "' errorthrown '" + errorthrown + "'"); }, complete: function(jqxhr, textstatus){ console.log("gettestdata complete textstatus='" + texts...

Getting wrong gps location using locationMangager android -

i making little android app using mapview , locationmanager. locationmanager should listen location , notify if location changes on user's defined tolerance. if locationmanager notice location changing should send sms. lm = (locationmanager) getsystemservice(context.location_service); lm.requestlocationupdates(locationmanager.gps_provider, 1000l, float.parsefloat(txttoleranz.gettext().tostring()), this); here not sure if method requestlocationupdates takes current value of textfield or given start value...? also application should show position in mapview, position totally wrong...why? running app on real device. double lat = location.getlatitude(); double lng = location.getlongitude(); string currentlocation = " lat: " + lat + " lng: " + lng + " tol: " + toleranz; point = new geopoint((int) lat * 1000000, (int) lng * 1000000); mapcontroller.animateto(point); ...

Dynamically checking two checkboxes to select one radio button using javascript -

i've been trying weekend solve problem may overcomplicating it. simplfied code i'm working below. appreciated - i'm racking brains long while now. problem : upon checking of 2 checkboxes, respective radio button selected. selecting earth , wind checkboxes select 'earth , wind' radio button. <input name="single" type="checkbox" id="earth"/>earth<br> <input name="single" type="checkbox" id="wind"/>wind<br> <input name="single" type="checkbox" id="emotion"/>emotion<br> <input name="single" type="checkbox" id="grass"/>grass<br> <input name="single" type="checkbox" id="good"/>good<br> <hr> <input name="pair" type="radio" class="earth wind"/>earth , wind<br> <input name="pair" type="radio...

php - A library database -

Image
so me , colleague have been assigned making library database lesson's assignement , make html database interface able perform tasks within database such inserting rows, deleting rows, finding rows etc. we have created database, imported , problem in inserting elements it. well example books table has many-to-many relationship authors table (where primary keys of each table isbn , authors id respectively) when want insert book it's authors in our db don't know how because in different tables. confused how put data single form in multiple tables different primary keys. we have been trying find examples no avail. even links tutorials , whatnot welcome. server side code php. thank much. i have suggestions you, use drop down box subject names , populate thru subject table ,so select subject name in db. upon entering book details (all values in table , plus subject name),manually insert isbn authors table. on book user interface use dropdownbox pub...

ios - Scale UIView using UISlider -

i'm trying scale uiview using uislider result not approach: - (void)setscale:(float)scale { cgaffinetransform transform = cgaffinetransformscale(myview.transform, scale, scale); myview.transform = transform; } thanks you want change scale based on identity transform (which represents object without changes). code works: - (void)sliderdidchangevalue:(id)sender { // slider uislider *slider = sender; // view or use ivar if have in 1 uiview *view = [self.view viewwithtag:12]; cgaffinetransform transform = cgaffinetransformscale(cgaffinetransformidentity, slider.value, slider.value); view.transform = transform; } when create slider may want start value @ 1 if view starting @ full size.

c++ - friending istream operator with class -

hello i'm trying overload operator >> class ecnouter error in eclipse. code: friend istream& operator>>(const istream& is, const rangle& ra){ return >> ra.x >> ra.y; } code2: friend istream& operator>>(const istream& is, const rangle& ra) { >> ra.x; >> ra.y; return } both crash , don't know why, please help. edit: ra.x & ra.y both 2 private ints of class; full error: error: ..\/rightangle.h: in function 'std::istream& operator>>(std::istream&, const rangle&)': ..\/rightangle.h:65:12: error: ambiguous overload 'operator>>' in 'is >> ra.rangle::x' ..\/rightangle.h:65:12: note: candidates are: c:\mingw\bin\../lib/gcc/mingw32/4.6.1/include/c++/istream:122:7: note: std::basic_istream<_chart, _traits>::__istream_type& std::basic_istream<_chart, _traits>::operator>>(std::basic_istream...

silverlight - Load operation failed for query 'Login'. Base 64 string error -

i had error load operation failed query 'login'. details connected base 64 string error. on fresh db, single user. if have such error on webcontext.current.authentication.login(...), check if aspnet_membership row user error has proper values. in case problem passwordsalt generated mssql newid() - wasn't proper passwordsalt value. hope can :)

iphone - UIScrollView with a UITableView mechanism -

i looking third party library allow me use uiscrollview uitableview mechanism, have viewforrowatindexpath, numberofrowsatindexpath.. reusing views. know uitableview subclass of uiscrollview, want more customization kind of hard when using uitableview. since uitableviewcell subclass of uiview , use custom uitableviewcell , adding view uitableviewcell 's subview. assuming views of same size. (in table view controller's init method, remember set self.tableview.rowheight value accommodate heights of views.) see customizing cells section of apple's table view programming guide ios more info.

ASP.Net Web API - How can I make it so that prefixes are not required when model binding from the query string? -

in asp.net web api (rc) have test model class so: [modelbinder] public class testrequest { public string foo { get; set; } public string bar { get; set; } } my controller looks this: public class testcontroller : apicontroller { public testrequest get(testrequest model) { return model; } } now if invoke action via: http://.../test?foo=abc&bar=xyz neither values bind, because model binder expecting model prefixes, such need call: http://.../test?model.foo=abc&model.bar=xyz i can understand other action parameters can bind correctly, in case model clean way of encapsulating possible action parameters don't need have nasty action method signature whole lot of optional parameters. allows easy model validation. is there easy way cause model binding behave same way in mvc, or in post request? removing modelbinder attribute model class should work in example you've posted. you'll run issues more complex method sig...

jsf 2 - How to edit data in Primefaces DataTable without in-cell editing? -

Image
i have 2 pages. add page add new item list page show items when click on edit icon on list page, want show selected data on add page editing , update data if click on save button. how this? pass row identifier parameter button. example, assuming #{item} iterated item , has long id property uniquely identifies item. <p:button icon="ui-icon-pencil" outcome="edit.xhtml"> <f:param name="id" value="#{item.id}" /> </p:button> in target page, edit.xhtml , can use <f:viewparam> convert, validate , set bean property. <f:metadata> <f:viewparam name="id" value="#{bean.item}" required="true" converter="itemconverter" /> </f:metadata> ... <p:inputtext value="#{bean.item.name}" /> <p:inputtext value="#{bean.item.shortname}" /> see also: what can <f:metadata>, <f:viewparam> , <f:viewaction...

javascript - JQuery UI .sortable('toArray') returning HTMLUListElement instead of array of id's -

i'm trying create sorted array out of sortable elements 'toarray' method not work. here's sortable html code: <div class="control-group" style="cursor:pointer;"> <label class="control-label" for="input-sort">preferences</label> <div class="controls"> <ul id= "sortable"> <li class="ui-state-default" id="item1"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>item 1</li> <li class="ui-state-default" id="item2"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>item 2</li> <li class="ui-state-default" id="item3"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>item 3</li> <li class="ui-state-d...

Selenium function selectFrame not working in Xebium -

i recieved following error when trying type in input field during xebium test: element belongs different frme current 1 - switch containing frame use it so tried using selectframe command: | | selectframe | on | id=iframe0 | i received error: unable locate frame: id=iframe0 my test runs in selenium ide (with , without selectframe command) no errors. tried using different locators no improvement in xebium. doing wrong? xebium's problem? other method can use getting correct frame enter data? i had similar issue discovered works when running tests using selenium rc instead of webdriver. i think problem isn't xebium itself. it's more of problem selectframe() method when using selenium->webdriver compatibility mode. anyway, if start own webdriver-server instance (selenium rc included in it) , set xebium test point it, using iframes should work.

Git and log order -

Image
i trying create linear order "git log" output, attempts failed. need map commit next release contains commit. cannot run git tag --contains <commit> for each commit, our repository contains extremely large amount of commits (more 300,000). first tried using git log --pretty=format:"%ct%h" | sort --key=1,10 to obtain linear order based on commit time. however, not seem produce 100% accurate result. leads first question: q1) how git store commit times, when commits pushed main repository? store current machine time each commit, in utc? i looked @ "git log", , documentation states default, git log lists commits in chronological order. in project, checked whether introducing error, far can tell, code correct, , chronological order given git log not linear order. finally, question is? q2) how can 1 obtain linear order "git log", given git not store revision numbers? thanks :) #1: how git store commit times, when c...

java - Installed application list doesn't show icon in the list in android -

i trying list of installed application in android device. here code in launcher app: package com.powergroupbd.appfilter; import java.util.arraylist; import java.util.iterator; import java.util.list; import android.app.activity; import android.content.pm.packageinfo; import android.content.pm.packagemanager; import android.graphics.drawable.drawable; import android.os.bundle; import android.util.log; import android.widget.arrayadapter; import android.widget.listview; public class applicationfilteractivity extends activity { /** called when activity first created. */ listview appfilter; // arrayadapter<applications> adapter; packagemanager pck; private arraylist<applications> results = new arraylist<applications>(); @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); appfilter = (listview) findviewbyid(r.id.lvapp); packagem...

c# - Adding rows to <table> dynamically -

i have following table in asp.net: <table style="width: 98%" id="tblotherdoc"> <tr> <td style="width: 10; text-align: left;"> <span">documents:</span> </td> </tr> <tr> <td> <asp:hiddenfield id="hidotherpath" runat="server" value='<%# bind("uploadlocationother") %>' /> <a href="#" style="font-size: 12px; color: #2014ff; float: left; vertical-align: middle" onclick="uploadnew(this)">add other</a> <span style="float: left;"> <asp:checkbox id="cbother" runat="server" onclick="otherdocsclicked(this)" checked='<%# bind("otherattached") %>' /></span> <a href="#" style="font-size: 12px; color: #2014ff; float: left; vertical-align...

xcode - Expiring Enterprise Distribution Profile Cannot Be Renewed -

on organizer library have list of provisioning profiles. here have enterprise distribution profile expire (2 days) , has button says "renew" next it. when click on button, next error message: the given provisioning profile has no associated devices , cannot renewed. please add devices provisioning profile before attempting renew “enterprise”, or create new provisioning profile. i have tried add random devices profile right clicking on them , selecting "add device provisional portal", doesn't seem work. adds device on developer ios provisioning portal devices list. profile associated device not distribution profile, it's 1 called: ios team provisioning profile:* xcode: ios wildcard appid and cannot modify through adp change profile. don't think answer. now, thing have 1 thousand users , prefer not create new profile recompile apps , ask them download them again. is there way can renew profile without pain? the error get...

c# - Find out results of httpwebrequest POST -

please refer below code. how can test/debug, whether below code worked correctly or not. runs , there no compilation/runtime errors. the end result of below code set 1 of controls in page, hold post data below code. haven't come far yet. protected override void oninit(eventargs e) { asciiencoding encoding = new asciiencoding(); string postdata = "http://s.com/is/image/scom/2peel"; byte[] data = encoding.getbytes(postdata); // prepare web request... httpwebrequest myrequest = (httpwebrequest)webrequest.create("http://m.com/confirm.aspx?id=175"); myrequest.method = "post"; myrequest.contenttype = "application/x-www-form-urlencoded"; myrequest.contentlength = data.length; stream newstream = myrequest.getrequeststream(); // send data. newstream.write(data, 0, data.length); newstream.close(); } update 1: tried find out response using below code, page doesn't load @ all. httpwe...

security - jarsigner error: java.lang.RuntimeException: keystore load: Keystore was tampered with, or password was incorrect -

i trying sign .wgt file(widget jar file) using jarsigner of java 6. when try sign, gives me following error, after asking enter passphrase keystore. jarsigner error: java.lang.runtimeexception: keystore load: keystore tampered with, or password incorrect i tried newly created key store, sure entering correct password. there else have been gone wrong? in advance! if you're quoting password, try removing quotes. experienced error when using jarsigner in 1.7.0_25-b17 jdk on windows 7. typically use earlier versions of jarsigner on solaris , linux , have quoted password using single quotes because contains characters interpreted shell. i haven't verified, i'm guessing shell interpreter on *nix trims quotes before passing parameters jarsigner, windows command prompt doesn't. for example, instead of jarsigner -keystore /my/cert/file -storepass 'password' /my/jar/file my_alias try jarsigner -keystore /my/cert/file -storepass password /my/j...

php - How to check if a mysql column is not NULL? -

i track if 'an artist' mysql. if user artist artist column goes null y, have part sorted. however, cannot work out how check if artist column user y can disable features user. site uses cookies logins need have query check y username , password equal cookie. when artist = y content should shown. here's have far: $username = $_cookie['username']; $pass = $_cookie['password']; include ("../database.php"); if (mysql_query("select artist members username='$username' , artist = 'y'")) { //artist specific content goes here echo '<div class="bubble"><h1>artist</h1><div class="innerbubble">some text</div></div>'; } no idea now. //artists if $username = $_cookie['username']; $pass = $_cookie['password']; include ("../database.php"); $result = mysql_query("select artist members username=...

objective c - Understanding Instruments and Memory Management -

i'm in need of understanding how memory managed in objective c. know basics, if create , own it, must release yourself. however, when gets code such as: self.storedict = [nsmutabledictionary dictionarywithcontentsoffile:plistpath2]; do own this? must release memory? self.storedict = [nsmutabledictionary dictionarywithcontentsoffile:plistpath2]; //73.3% leak totalcharacters = [storedict count]; tagcounter = 1; dictkeyarray = [[storedict allkeys] mutablecopy]; //13.3% leak when instruments puts bunch of percentages next highlighted leaks, tell me? tell me size of leak relative total amount of memory leaked? , 1 last thing.. normal amount of allocated memory continuously rise? or should stabilize somewhere? help! appreciated! in cases, own objects returned methods names begin "alloc", "new", "copy", or "mutablecopy". of course, own send -retain . exceptions these rules should called out in documentation non-conforming...

javascript - How can I get cursor position in a textbox as a pixel value? -

Image
i'm trying that: when use enter "#" in textbox, colorpicker div must opened in bottom of cursor position. can order of cursor element.selectionstart it's not reliable way that. must pixel value. suggestion? if you're sure textfield never scroll, can replicate font , box sizing of textfield in div positioned out of view, , measure size of span same contents textfield.

postgresql - SQL query for join table and multiple values -

so have 3 tables involved in problem, 2 regular tables , join table has many , belongs many relationship. this: table1 --id --data table2 --id --data table1_table2 --table1_id --table2_id so, question how query (using join) have 1 or more values in table1_table2 1 item in table1. instance: table 1 +----------+ |id | data | +----------+ |1 | none | +----------+ |4 | match| +----------+ table 2 +----------+ |id | data | +----------+ |1 | 1 | +----------+ |2 | 2 | +----------+ table1_table2 +----------------------+ |table1_id | table2_id | +----------------------+ |1 | 1 | +----------------------+ |4 | 1 | +----------------------+ |4 | 2 | +----------------------+ i need query match table 1 row id 4 because has link via join both row 1 , 2 table 2. if confusing please ask anything. maybe bit unclear, using table1_table2 join not from. need make sure matches 1 , 2 both table 2. here query far... select distinct tab...

exception - I'm getting Java.io.notserializableException error -

i'm getting java.io.notserializableexception error after trying write object server in class extending jpanel , implementing serializable worked if extending jframe. here code: //to send server objectoutputstream out = new objectoutputstream(socket.getoutputstream()); out.writeobject(myobject); //to receive in server objectinputstream in = new objectinputstream(socket.getinputstream()); in.readobject(); thanks help. from jpanel (java 2 platform se v1.4.2) , says: warning: serialized objects of class not compatible future swing releases. current serialization support appropriate short term storage or rmi between applications running same version of swing. of 1.4, support long term storage of javabeans tm has been added java.beans package. please see xmlencoder .

neo4j: How to Switch Database? -

hi created neo4j database custom java application , tried change path in configuration file in order connect created database. while trying check data in webadmin console node 0 visible (seems database empty). tried import same database gephi , it's not empty. furthermore when tried switch original database, wasn't empty, in webadmin node 0 appeared. i tried modify neo4j-server.propertied file following way: #***************************************************************** # administration client configuration #***************************************************************** # location of servers round-robin database directory. possible values: # - absolute path /var/rrd # - path relative server working directory data/rrd # - commented out, default database data directory. org.neo4j.server.webadmin.rrdb.location=data/rrd # rest endpoint data api # note / in end mandatory #org.neo4j.server.webadmin.data.uri=/db/data/ #original database org.neo4j.server.webadmin.d...

git - gitosis vs gitolite? -

i looking installing git server share projects team. don't want create user account on server ssh access each developer needs git access. seems there 2 concurrent solutions cover issue : gitosis & gitolite. i not find comparison between both solutions. main differences between them? there other similar solution? i looking installing git server share projects team. you can just use git. to have git server thing need on remote server git. if don't require fine-grained permissions (sharing team suggests that's possibility) or features, don't need gitolite, or similar. the no-install solution if git available on remote server, can you're asking right now, without doing anything ssh [user@]server cd repos/are/here/ mkdir project.git cd project.git git init --bare locally: cd projects/are/here/project git remote add origin [user@]server:repos/are/here/project.git git push -u origin master setting git server easy. if want things de...

c# - Attribute is not updating using LINQ TO XML? -

i load xml file xelement. an element named r via: xelement elem = xmltemplate.descendants().where(x => x.name.localname == "r").firstordefault(); i search attributes ef , ex via: elem.attribute("ef").setvalue(txteffective.text); elem.attribute("ex").setvalue(txtexpire.text); but when call xtemplate.save(...), not save udpated attributes. have tried: elem.attribute("ef").value = txteffective.text; elem.attribute("ex").value = txtexpire.text; i found out problem, not sure how avoid it. when load xml, loading 2 attributes in 2 text boxes on form. when change values in text box update attributes, updating xml original values in text box , not new ones. wonder if has fact text boxes loaded on page load , when click button, loads xml again , overwrites new values original values. after did not load values in text box, save worked fine.

objective c - IBOutletCollection of UIButtons - changing selected state of buttons -

i'm having issue multiple uibuttons in view. i'd buttons selected individually, multiple selected @ time (example: 10 buttons, buttons 1, 4, 5, 9 selected). in header have property iboutletcollection: @property (retain, nonatomic) iboutletcollection(uibutton) nsmutablearray *buttontostayselected; in implementation, have ibaction: -(ibaction)selectedbutton:(id)sender{ (uibutton *b in self.buttontostayselected) { if (b.isselected == 0){ [b setselected:yes]; } else [b setselected:no]; } } the issue i'm having when select of buttons tied collection, change selected. know problem (almost certain) lies in loop, every condition i've tried stipulate breaks code , leaves none of buttons able "change" state. updated to have them selectable, change state , check off multiple, used final code: -(ibaction)selectedbutton:(id)sender { (uibutton *b in self.buttontostayselected) { if (sender == b) { [b setselected...

sql - Get the highest odds from the last update -

i have these tables in postgresql database: bookmakers ----------------------- | id | name | ----------------------- | 1 | unibet | ----------------------- | 2 | 888 | ----------------------- odds --------------------------------------------------------------------- | id | odds_type | odds_index | bookmaker_id | created_at | --------------------------------------------------------------------- | 1 | 1 | 1.55 | 1 | 2012-06-02 10:30 | --------------------------------------------------------------------- | 2 | 2 | 3.22 | 2 | 2012-06-02 10:30 | --------------------------------------------------------------------- | 3 | x | 3.00 | 1 | 2012-06-02 10:30 | --------------------------------------------------------------------- | 4 | 2 | 1.25 | 1 | 2012-05-27 09:30 | ------------------------------------------------------------...

shell - What is a good workaround for "sort" command's limitation to 65535 characters per line? -

here snippet sort command's functionality: /rec[ord_maximum] characters specifies maximum number of characters in record (default 4096, maximum 65535). here error when try sort file long lines: c:\users\heqin\pim2>cat artist_input.tsv | sort /rec 65535 input record exceeds maximum length. specify larger maximum. short of writing custom script (in python, example) handle case, workaround sorting files lines longer 65535? as clarification, using unix utils version of "sort", running on windows.

mysql - SQL / Limit (another query) -

i have 2 tables. 1 of them holds limit numbers. and trying run sql like select * table x='1' limit (another query) the select top clause limit number of rows. can put expression in it http://msdn.microsoft.com/en-us/library/ms189463.aspx

Automating SSL client-side certificates in Firefox and Selenium testing -

is possible test client side ssl certificates selenium , browser? e.g. can create web driver , give dummy certificates it? or use prepared firefox profile? creating selenium firefox test profile ssl client-side certificates you need prepare selenium's webdriver firefox profile whichh has client certificates imported in. first launch webdriver following configuration in test code: # pre-seeded firefox profile directory profile_diretory = os.path.join(os.path.dirname(__file__), "..", "..", "certs", "firefox-client-ssl-profile") self.asserttrue(os.path.exists(profile_diretory)) profile = firefoxprofile(profile_diretory) # make sure client side cert seletion not interrupt test # xxx: happens in other language versions? profile.set_preference("security.default_personal_cert", "select automatically") self.driver = webdriver(firefox_profile=profile) self.selenium_helper = seleniumhelper(self, self.driver) se...

html - Overriding an article output in Drupal 7 using a template.php theme -

i want modify output of articles, putting between each article listed on page. i have overridden other functions in themes template.php follows function mytheme_preprocess_html(&$variables) { drupal_add_css('http://fonts.googleapis.com/css?family=gudea', array('type' => 'external')); } i looking similar articles? copy theme's node.tpl.php file called node--article.tpl.php , add &lt;hr&gt; @ bottom of file.

javascript - How to remove JS logging calls in our prod build of our mvc3 web app? -

we've got lot of calls our logging methods (that wrap console.log) throughout our js in our mvc3 web app , i'd remove them javascript when build our test , production builds. currently we're using bundling , minification nuget package bundle , minify our js 1 big minified file i'd have rip out calls logging methods well. we have mechanism in place replaces logging methods empty functions won't work in production, still called , various arguments passed in. on top of this, there "large" strings passed , removed, reducing filesize. the ideal solution in mind somehow parse javascript , detect / remove calls methods. preferably in sort of javascript engine , not regular expression. either way, want calls logging methods removed in final javascript served in production. know how i'd accomplish additional minification? yep, ibundletransform interface designed scenario. in rc bits here's envisioned: new bundle("~/bundle...

matlab - Simple example/use-case for a BNT gaussian_CPD? -

Image
i attempting implement naive bayes classifier using bnt , matlab. far have been sticking simple tabular_cpd variables , "guesstimating" probabilities variables. prototype net far consists of following: dag = false(5); dag(1, 2:5) = true; bnet = mk_bnet(dag, [2 3 4 3 3]); bnet.cpd{1} = tabular_cpd(bnet, 1, [.5 .5]); bnet.cpd{2} = tabular_cpd(bnet, 2, [.1 .345 .45 .355 .45 .3]); bnet.cpd{3} = tabular_cpd(bnet, 3, [.2 .02 .59 .2 .2 .39 .01 .39]); bnet.cpd{4} = tabular_cpd(bnet, 4, [.4 .33333 .5 .33333 .1 .33333]); bnet.cpd{5} = tabular_cpd(bnet, 5, [.5 .33333 .4 .33333 .1 .33333]); engine = jtree_inf_engine(bnet); here variable 1 desired output variable, set assign .5 probability either output class. variables 2-5 define cpds features measure: 2 cluster size, ranging 1 dozen or more 3 ratio real value >= 1 4 , 5 standard deviation (real) values (x , y scatter) in order classify candidate cluster break of feature measurements 3-4 rang...

How can I find PlayStation memory card specs? -

much time ago, tried find on internet specs play station (1 , 2) memory card save game's specs no result and today searched again, can't find them. far know, every savegame inside memory card have common headers: image (i don't know image format use), text savegame, , possibly size. can see browsing playstation (1 or 2) memory card , have list of savegames. anyone can point me in right direction look? p.s. library want code handle that, important, yet curious enough. thanks

matlab - logical array more than one dimension -

adc.nv 789 x 2 array in = ~isnan(adc.nv); nv = adc.nv(in); after getting 1576 x 1 array instead of 788 x 2 array this behaviour explained here: http://www.mathworks.nl/help/techdoc/math/f1-85462.html#bq7egb6-1 because in = ~isnan(adc.nv); in can have different number of true/false element in each row and/or column, possible resulting matrix adc.nv(in) has different number of elements per row/column , cannot constructed a matrix matlab throws in 1 vector.

c# - The Web Application Project [...] is configured to use IIS. The Web server [...] could not be found. -

i have web project in solution file "unavailable" when open solution. when right-click on web project , reload project, following error: web application project mycompany.myapp.mywebproject configured use iis. web server 'http://localhost/mywebapp not found. i have not manually set virtual directories web application. per colleagues, visual studio should prompt me create virtual directories not getting prompted. i installed vs2010 before installing iis on dev machine. here development machine setup: windows 7 enterprise service pack 1 64 bit os visual studio 2010 enterprise service pack 1 iis version 7.5 when happens easiest solution make virtual directory manually. first of all, need make sure have right version of asp.net installed , have installed iis extensions. to this, go relevant .net version's folder in c:\(windows)\microsoft.net\(dotnetver)\ (substituting bracketed folders right folders on pc) , run command aspnet_regiis...

php - Google Checkout Accessing Merchant Calculations Callback -

i'm implementing google checkout service web service using xml api. have cart request , of setup, , using merchant calculations api shipping (my service shipping calculations) i'm having difficulties figuring out how access response sent server buyer's address / other personal data order , determining shipping request. is being sent in header? posts value? get? how access it. i'm developing using php the merchant calculations request in xml format in body of http post. some useful links below: format of merchant calculations request / response: https://developers.google.com/checkout/developer/google_checkout_xml_api#merchant_calculations_api https://developers.google.com/checkout/developer/google_checkout_xml_api_merchant_calculations_api#handling_merchant_calculation_callbacks how configure web service respond callbacks: http://support.google.com/checkout/sell/bin/answer.py?hl=en-gb&answer=70647 php library - @ responsehandlerdemo.php...

sql - Is it possible to create a private stored proc in Firebird? -

i know can set permissions on stored procs users can call them. there way mark procedure "private" (in encapsulation sense) no user can call directly, can still called other procedures called user? in firebird 3 (in development), can have packaged-private procedures , functions.

osx - NSTextView: Get text changes (insertions and deletions) -

i've got nstextview , -textdidchange: notification. that, can current string value of whole textview, can't figure out how tell what's been deleted , added. for example, if string in text view this string , user deleted g , how can made aware of change? is there way achieve this, preferably without subclassing? there several delegate methods should looking for: – textview:shouldchangetextinrange:replacementstring: – textview:shouldchangetextinranges:replacementstrings: – textview:shouldchangetypingattributes:toattributes: – textviewdidchangetypingattributes:

javascript - Where does jQuery do animations/timers in `$.queue()`? -

i looking through source of jquery (specifically queue() function) , saw in puts function .data() object associated element: queue: function( elem, type, data ) { var q; if ( elem ) { type = ( type || "fx" ) + "queue"; q = jquery._data( elem, type ); // speed dequeue getting out if lookup if ( data ) { if ( !q || jquery.isarray(data) ) { q = jquery._data( elem, type, jquery.makearray(data) ); } else { q.push( data ); } } return q || []; } } now looking @ ._data .data() fourth argument of true, timers or animations being set? or function calls matter: data: function( elem, name, data, pvt /* internal use */ ) { if ( !jquery.acceptdata( elem ) ) { return; } var privatecache, thiscache, ret, internalkey = jquery.expando, getbyname = typeof name === "string", // have handle ...