Posts

Showing posts from April, 2010

html - CSS style for title attribute? -

this question has answer here: styling native tooltip title=“tooltip text” 5 answers i have give style title attribute of html element. how can give styles title attribute of html element? try using jquery qtip , advanced tooltip plugin ever popular jquery javascript framework.qtip provides tonnes of features rounded corners , speech bubble tips, , best of all... it's free under mit license!

.htaccess rewrite rule to change a path to a query string -

i'm working on project , need rewriting urls... we have url such http://www.example.com/page/a-c/ i need interpreted server as: http://www.example.com/file.php?source=a-c my .htaccess rewrite skills not great! this should trick: rewriteengine on rewritebase / rewriterule ^page/([^/]+)/? file.php?source=$1

java - Ant JUnit task NoClassDefFoundError when run in existing JVM -

i went junit ant task solution provide junit library through task's element: <target name="test" depends="compile-tests" description="run unit tests"> <junit printsummary="true" haltonfailure="true"> <classpath refid="test.classpath" /> <test name="com.package.testclass" /> </junit> </target> the important classpaths used are: <path id="test.compile.classpath"> <path refid="compile.classpath" /> <path refid="test.lib.classpath" /> <pathelement location="${build.classes.dir}" /> </path> <path id="test.classpath"> <path refid="test.compile.classpath" /> <pathelement path="${test.classes.dir}" /> </path> and referenced 1 junit.jar ant maven task : <artifact:dependencies pathid="test.lib.cl...

Blas DGEMV input error -

i'm having trouble figuring out why piece of blas call throwing n error. problem call last blas call. code compiles without issue , runs fine until call fails following message. ** acml error: on entry dgemv parameter number 6 had illegal value as far can tell input types correct , array has appreciate insight problem. thanks #include <stdlib.h> #include <stdio.h> #include <string.h> #include "cblas.h" #include "array_alloc.h" int main( void ) { double **a, **a; double *b, *b, *c; int *ipiv; int n, nrhs; int info; int i, j; printf( "how big matrix?\n" ); fscanf( stdin, "%i", &n ); /* allocate matrix , set random values big value on diagonal. makes sure don't accidentally singular matrix */ = alloc_2d_double( n, n ); a= alloc_2d_double( n, n ); for( = 0; < n; i++ ){ for( j = 0; j < n; j++ ){ a[ ][ j ] = ( ( double ) rand() ) / rand_max; } ...

c# - How to perform method -

i have class person , 2 child classes staff , student , interface iperson . have class database , class gateway . class database has private string name = "username"; and method public void getname() {return id;} both staff , student have getname() methods. need create request getname() student , staff classes database through gateway. class gateway has check if method getname() requested staff ( then return id ) or student ( then return "go away!" ). can please me that. thinking using gateway interface of database class, because trying learn c#, don't know how that. or maybe there's better way of doing this... please thanks here's code: public class staff : person { public staff() {} public staff(string id): base(id) {} public override string getname() { throw new notimplementedexception(); } public override void update(object o) { console.writeline(id + " notified {1}", id...

iphone - Get Facebook friends attending an event? -

how able see of friends attend facebook event? i'm able list of attendees using facebook sdk, withgraphpath:@"eventid/attending/". is want possible using graph api? read answers on how achieve fql don't know how implement in ios. option came getting friends , attendees , cross-referencing them against each other, inconvenient. so, how facebook friends attending event? this tutorial provided facebook you can check if specific user responded 'yes' event issuing http /event_id/attending/user_id. these operations require user_events or friends_events permissions non-public events , return array of objects name, id, , rsvp_status fields. when checking single user, empty data returned if user did not respond 'yes' event. you can check checking event category in link: http://developers.facebook.com/docs/reference/api/event/ use /event_id/attending/user_id see friend attending event

php - Facebook comment box is over riding -

<div class="fb-comments" data-href="https://www.facebook.com/pages/societ%c3%a0-ginnastica-triestina-nautica/149520068540338" data-width="270" data-num-posts="3"> this comment box on riding div height , going on footer solution limit comments , should not on ride add div display:block; , clear: both; if doesnt fix it, post jsfiddle code can see doing. may want implement sticky footers well.

cocoa - Is it possible to clip a child NSWindow to its parent? -

i have borderless nswindow i'm adding child window main window of app. in particular mode child window may lie partially outside frame of parent window zooms forward enclosed. if main window not full screen, looks odd child window drawn outside main window. possible clip it? no, don’t think so. on os x, windows (and thereby nswindow s) composited window server, , have own buffers. they’re opengl quads , drawing done texture (that simplification, it’s how works). you don’t explain in question why you’re using child window (as opposed to, instance, layer-backed view, or plain nsview ); often, can avoid using child windows @ all, seem straightforward solution problem in instance. (note, if you’re coming windows background, cocoa expects use views rather windows purposes; in typical application need use windows @ top level of interface hierarchy.)

c# - Can we obtain Location area code in Window phone 7.1? -

is there way or api available obtain location area code in wp 7.1? the windows phone sdk not offer capabilities let developer cell tower information. limited standard location apis .

How to get each substring in a file by Ant -

i have file contains following lines of strings separated "|", c:\temp\demo\aaa.dat | c:\test\input\aaa.dat c:\temp\build\bbb.bat | c:\test\java\bbb.bat c:\temp\test\ccc.xml | c:\apps\ftp\ccc.xml after read each line, hope extract each string separated "|", ie, after 1st line, need both c:\temp\demo\aaa.dat , c:\test\input\aaa.dat; pls how use ant it??? i use following code can each line : <loadfile property="filelist" srcfile="c:\temp\file1.txt"/> <target name="test" depends="chkinput" description="test"> <for param = "line" list="${filelist}" delimiter="${line.separator}"> <sequential> <echo>@{line}</echo> </sequential> </for> </target> not each substring separated "|", pls how each substring separated "|"? once have line, can use <pr...

Android hardware camera fire intent after onPictureTaken -

i have implemented own camera preview layout , functionality. anyway, when press button take picture calls onpicturetaken method, intent not fired. intent declared correctly in manifest file. here code , hope knows here in order fire intent . public class takepicture extends activity { private preview mpreview; private camera mcamera; private int numberofcameras; private int defaultcameraid; private context context; autofocuscallback myautofocuscallback = new autofocuscallback() { @override public void onautofocus(boolean arg0, camera arg1) { // buttontakepicture.setenabled(true); } }; picturecallback mypicturecallback_jpg = new picturecallback() { @override public void onpicturetaken(byte[] arg0, camera arg1) { //savepicture(arg0); intent ia = new intent(context, previewphoto.class); ia.putextra("groupid", 1); ia.putextra("image", arg0); startactivity(ia); } }; @override protecte...

c - Android: Problems Referencing Header File -

i trying compile doom code found here . when run ndk-build see following... jni/droid/i_video.c:45:17: fatal error: sdl.h: no such file or directory but... find ./ -name sdl.h .//sdl-1.2.13/include/sdl.h and android.mk shows... doom := apps/doom/project/jni inc := -i$(doom) -i$(doom)/include -i$(doom)/sdl-1.2.13/include local_cflags := $(doom_flags) $(opts) $(inc) anyone able see doing wrong? i believe want put of include in local_c_includes variable instead of inc variable inc unused android-ndk build system. this changes line (note removed -i ) local_c_includes := $(doom) $(doom)/include $(doom)/sdl-1.2.13/include below quoted relevant section local_c_includes local_c_includes optional list of paths, relative ndk *root* directory, appended include search path when compiling sources (c, c++ , assembly). example: local_c_includes := sources/foo or even: local_c_includes := $(local_path)/../foo t...

ios - Change font of separate strings detailTextLabel -

how can change font of 1 string in detailtextlabel of uitableviewcell? nsstring *detailstr = [nsstring stringwithformat:@"%@ %@",post.score,post.domain]; cell.detailtextlabel.text = detailstr; i want post.score string 1 color , post.domain string another. answer : nsattributedstring . try : int count1 = [post.score length]; int count2 = [post.domain length]; nsmutableattributedstring *textlabelstr = [[nsmutableattributedstring alloc] initwithstring:@"%@ %@",post.score,post.domain]; [textlabelstr setattributes:@{nsforegroundcolorattributename : [uicolor redcolor], nsfontattributename : [uifont systemfontofsize:17]} range:nsmakerange(0, count1)]; [textlabelstr setattributes:@{nsforegroundcolorattributename : [uicolor bluecolor], nsfontattributename : [uifont systemfontofsize:17]} range:nsmakerange(count1 + 1, count2)]; cell.detailtextlabel.attributedtext = textlabelstr; note : not tested, write code you.

html - CSS equivalent for Text Tint -

i'm trying export files adobe indesign basic html + css. a user can select text , change text colour. using indesign sdk can fetch rgb values colour , in css file declare color: rgb(r,g,b) works fine. you can change text tint value. upto taking tint value, converting range 0-1 , in css putting entry color: rgba(r,g,b,tint) during testing realized tint = 0 should mean white text, didn't show on html because (in rgba) = 0 means transparent!!! anyone knows how handle tint values in css? there no tint, hue,saturation or brightness in css. should "build" these properties rgb color. apply tint on rgb, use expression: when r,g,b 0..255, tint 0..1 new r = tint*r + (1-tint)*255; new g = tint*g + (1-tint)*255; new b = tint*b + (1-tint)*255; tint convex combination of color , white color. see wikipedia .

exception - Getting a NoSuchElementsException in Java? -

ok, java class's final project we're supposed implement simplified version of craps runs 10 rounds. whenever run this, nosuchelementsexception line "int b=std.nextint()". why that? opened scanner object , whatnot, wont let me enter data proceed game, throwing exception instead. same exception "system.out.println(now.tostring());" line in main method. how not have elements? public class player { private int bet;//how bet private boolean pass;//they chose pass private boolean dpass;//they chose dont pass private boolean win;//did win? private int money=20;//how have //private string continuity="initial"; //modifier methods public void newbet(int x){this.bet=x;} public void pass(boolean x){this.pass=x;} public void dpass(boolean x){this.dpass=x;} public void didyouwin(boolean x){this.win=x;} public void newmoney(int x){this.money+=x;} //public void keepplaying(string s){this.continuity=s;} //accessor methods public int getbet(){return this.b...

python - How should negative time work? -

i'm trying create time -class can handle times of format hh:mm:ss . have: class time(object): def __init__(self, h=0, m=0, s=0): #private self.__hours = 0 self.__minutes = 0 self.__seconds = 0 #public self.hours = h self.minutes = m self.seconds = s @property def hours(self): return self.__hours @hours.setter def hours(self, value): if value < 0: raise valueerror self.__hours = value @property def minutes(self): return self.__minutes @minutes.setter def minutes(self, value): if value < 0: raise valueerror self.hours += int(value / 60) self.__minutes = value % 60 @property def seconds(self): return self.__seconds @seconds.setter def seconds(self, value): if value < 0: raise valueerror self.minutes += int(value / 60) self.__...

javascript - When click on link load in PHP page in DIV. Pass info to PHP page -

i want load php page on clicking link, so: <a href="" onclick="loadpage('page.php'); return false"> create character </a> <br/>; where loadpage function loads php page in current page's div. how pass information page.php without using querystring? example setting session etc.

jquery - more less example with coffeescript -

i'm trying add basic more/less links toggle element visibility. how insert preventdefault ? also works on first toggle, after doesn't toggle out. error? $("#description-link").click -> $("#project-description").show() $(this).text("show description") , -> $("#project-description").hide() $(this).text("hide description") well, try instead: $("#description-link").click (e) -> e.preventdefault() $('#project-description').toggle() = $(this).text() = if (a == 'show details') 'hide details' else 'show details' $(this).text(a) and apparently space between click , (e) required. otherwise typeerror thrown. edit: realized why space required...as it's part of function declaration. haven't messed coffeescript before. /facepalm

neo4j - how to use two match statements in a cypher query -

i'd combine 2 requests 1 query , i'm not sure happens when 2 match statements used in single cypher query. say have list of friends , i'd see list of friends each of uncles , siblings listed in collection. can have 2 match statements job? e.g. match friends-[:childof]->parents-[:brother]->uncles , friends-[:childof]->parents<-[:childof]-siblings return friends, collect(siblings), collect(uncles) however, if query this, returns no results. since have chosen parents in first match class, can - match friends-[:childof]->parents-[:brother]->uncles friends, parents, uncles match parents<-[:childof]-siblings return friends, collect(siblings), collect(uncles)

html - End two nodes on single node in family tree -

i want end 2 nodes on single node in fiddle http://jsfiddle.net/updzx html code: <!-- create family tree using css(3) markup simple nested lists --> <div class="tree"> <ul> <li> <a href="#">parent</a> <ul> <li> <a href="#">child</a> <ul> <li> <a href="#">grand child</a> </li> </ul> </li> <li> <a href="#">child</a> <ul> <li><a href="#">grand child</a></li> <li> <a href="#">grand child</a> ...

ember.js multimodel forms: what is expected from ember-data? -

i have classic multimodel form: transport document has many transport_document_rows, stated in models: app.transportdocument = ds.model.extend number: ds.attr 'string' date: ds.attr 'string' transportdocumentrows: ds.hasmany('app.transportdocumentrow') app.transportdocumentrow = ds.model.extend productname: ds.attr 'string' quantity: ds.attr 'string' transportdocument: ds.belongsto('app.transportdocument') i write in console script: a = app.invoice.createrecord(); a.get("invoicerows").pushobject(app.invoicerow.createrecord()); a.get("store").commit(); and problem following: my transport document created correctly my transport document row created sequently (and still not problem) wrong transport_document_id (transport_document_id: 0). is behaviour expected? correct it? thanks edit: way works using embedded option: ds.restadapter.map 'app.transportdocument', { transportdo...

jQuery slideDown makes other elements jump -

i'm trying build list of elements dynamic height , number, slide , down when user clicks on them. thing is, 1 of them must revealed @ time, while others automatically slide after clicked on. i'm having issues elements located below 1 being slid down. seem jump down, again correct place, 7px (i assume it's 5px margin-top of div.text + 2px of border). the sliding div: <div class="slide"> <div class="bar"> <a href="#" class="title">slide #1</a> </div> <div class="text"> lorem ipsum dolor sit amet, consectetur adipiscing elit. vestibulum sed odio nulla. pellentesque auctor molestie ipsum, ut lobortis mauris laoreet id. praesent ut dolor sed dui euismod mattis @ nisl. etiam mi dolor, placerat eget feugiat nec, tempus id risus. ut sed lobortis arcu. fusce vestibulum enim sed quam tristique sagittis. etiam @ tempor enim. </div> </div> the ...

java - I get hit with "Comparison method violates its general contract!" exception when I create/add more than a certain number of objects -

i'm learning java @ college , assignment. task create x y grid of color squares each run in separate thread , every k ms either change it's color random 1 or average color of it's neighbours. now, if create 30 30 grid runs fine. however, if try 40 40, following exception once when app starts , once when close it. apart appears run correctly, although grid appears positioned within window wrongly (it's narrower should be). exception in thread "awt-eventqueue-0" java.lang.illegalargumentexception: comparison method violates general contract! @ java.util.timsort.mergelo(timsort.java:747) @ java.util.timsort.mergeat(timsort.java:483) @ java.util.timsort.mergecollapse(timsort.java:410) @ java.util.timsort.sort(timsort.java:214) @ java.util.timsort.sort(timsort.java:173) @ java.util.arrays.sort(arrays.java:659) @ java.util.collections.sort(collections.java:217) @ javax.swing.sortingfocustraversalpolicy.enumerateandsortcycle...

ruby on rails - New Route link_to working in one place but not in another -

i've created new action in controller, groups_controller.rb def add_member @group = group.find(params[:id]) @user = user.find(params[:user]) @group.add_member(@user) redirect_to :back end and in group.rb, add_member defined as: def add_member(user) self.working_groups.build(:user_id => user.id, :position => self.users.count, :role => 'member') self.save end i've created corresponding route: resources :groups member 'add_member' end end so when rake routes, get: add_member_group /groups/:id/add_member(.:format) groups#add_member so, works when use on show template <%= link_to "join", add_member_group_path(:user =>current_user.id, :group=> invitation.group.id) , :class => 'btn-primary' %> but when trying use same link in index template, routing error: actioncontroller::routingerror @ /groups no route matches {:action=>"add_member", :controller=>"groups", :use...

php - Distance calculation based on multiple locations (Lat,Lon) including starting/ finishing point -

i calculate total distance of driving beetween multiple locations (loop), including distance (starting point (garage) - first location sarting point) , (last location finishig point - finishing point (garage)). example: (garage + d1) + (d1 + d2) + (d2 + e1) + (e1 + e2) + e2 + garage) i'm having problem correct looping. here's simplified code: <? $driver = 5; $result2 = mysql_query("select * test id='$driver' limit 1") or die(mysql_error()); while($row2 = mysql_fetch_array( $result2 )) { $lon=$row2['lon']; $lat=$row2['lat']; echo "$lon, $lat"; } $result = mysql_query("select * test1 driver='$driver'") or die(mysql_error()); while($row = mysql_fetch_array( $result )) { $lon1=$row['lon1']; $lat1=$row['lat1']; $lon2=$row['lon2']; $lat2=$row['lat2']; ////////// distance between driver a...

html - JQuery: Operations on output value, but still keeping it printing as user types -

in html have this: <input type="text" name="earned" id="earned"> <p>you have: $<span id="amount"></span></p> and in javascript file have this: $(function(){ $('#earned').keyup(function(){ var $earned = this; $earned = $earned/100; $('#amount').text($(earned).val()+ '.00'); }); }); i wrote code simple calculator. if wanted grab user typing , change typed, how go this? how come dividing 100 doesn't work? outputs number being typed in. $('#earned').keyup(function(){ var $earned = parseint($(this).val(), 10)/100; // .val() here $('#amount').html($earned+ '.00'); // variable here }); the this refers dom input field. need jquery object of , .val() of input field. parse integer, because strings can't divided. , set output span.

html5 - Elastic Squares (CSS HTML) -

i'm trying build 'elastic' website in css , html; want there 6 squares along width of screen; have width of squares scaling screen size, want keep squares square. there way can set height of div's same size div width (which being set off of % value). see demo . basically, give element same value width , padding-bottom stay square scale page. .square { background-color: red; width:15%; height:0px; padding-bottom:15%; display: inline-block; } read more fluid squares here .

Pruning backtrace output with gdb script -

my program has 100 threads, of idle , share defined backtrace when idle. of time interested in threads not idle , therefore not have "common" backtrace. thought using gdb script way this. define backtraces thread apply bt end this script print backtraces. there way store output variable can process, prune, , display relevant backtraces? i naively tried: define backtraces set $bts = thread apply bt // whatever processing here end but fails following expected: no symbol "thread" in current context. is there better way this? or tutorials on how power script in gdb? is there better way this? you need use python scripting achieve desired result. the filtering backtrace start.

python - print scapy sniff output to file -

i have created sniffer in scapy , want packets captured scapy written onto file further analysis? def sniffer(ip): filter_str = "icmp , host " + ip packets=sniff(filter=filter_str,count=20) f = open('log.txt',"a") #f.write(packets) the last line of code not work. there way this? f.write expects character buffer, supply sniffed object result of calling sniff . can, simply, following: f.write(str(packets)) this should work. won't display information it. going have more work collecting information packets strings before write f .

adding button to android java code -

how can add button android java code? main activity java code: package com.example.pafima_trial; import android.os.bundle; import android.app.activity; import android.view.menu; public class mainactivity extends activity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(new singletoucheventview(this, null)); // setcontentview(r.layout.activity_main); } @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if present. getmenuinflater().inflate(r.menu.activity_main, menu); return true; } } it singletoucheventview.java public class singletoucheventview extends view { private paint paint = new paint(); private path path = new path(); boolean touched = false; float x =0; float y =0; float [] inputx = new float[200]; float [] inputy = new float[200]; string [] di...

apache pig - Pig Load How to mix scalar and map datatypes? -

using apache pig version 0.10.1.21 (rexported) content of data sample file: atomicnumber,elementname,symbol,atomicmass,propertymap 46,palladium,pd,106.42,[p#46,n#60,struc#cubic] 49,indium,in,114.818,[p#49,n#66,struc#tetragonal] 52,tellurium,te,127.6,[p#52,n#76,struc#hexagonal] 86,radon,222.0,rn,[p#86,n#136,struc#cubic] 38,strontium,sr,87.62,[p#38,n#50,struc#cubic] plutonium,94,pu,244.0,[p#94,n#150,struc#monoclinic] note: columns swapped intentionally (for radon , plutonium) see how pig handle datatype mismatch pig script: atomelem = load 'data/atoms.txt' using pigstorage(',') (atomicnumber:int, elementname:chararray, symbol:chararray, atomicmass:float, propertymap:map[]); dump atomelem; results: (,elementname,symbol,,) (46,palladium,pd,106.42,) (49,indium,in,114.818,) (52,tellurium,te,127.6,) (86,radon,222.0,,) (38,strontium,sr,87.62,) (,94,pu,244.0,) question1 : hoping propertymap displayed. can please show me how modify either pig script or data fi...

node.js - Why can't I connect to a connect-served site over web sharing? -

i'm using grunt, connect, , livereload serve test page (it's single flat html page) during development, , want test site on phone. using web sharing—by navigating site using mac's local url ( my-imac.local ). when serve page using python's simplehttpserver, works fine. when use grunt/connect, it's inaccessible there (though it's still accessible @ localhost). how connect configured respond these requests? my gruntfile, reference: var path = require('path'); var lrsnippet = require('grunt-contrib-livereload/lib/utils').livereloadsnippet; var foldermount = function foldermount(connect, point) { return connect.static(path.resolve(point)); }; module.exports = function(grunt) { function registerrobusttasks(name, tasks) { grunt.registertask(name, function() { // don't have stupid issues grunt crashing // every time test fails... grunt.option('force', true); grunt.task.run(tasks); }); } gr...

jquery - Post variables not set when EnableEventValidation set to 'false' -

so have jquery dialog box within asp.net webform application post content of contained controls page. problem fileupload control. when enableventvalidation set true, suppose default, error... invalid postback or callback argument. event validation enabled using <pages enableeventvalidation="true"/> in configuration or <%@ page enableeventvalidation="true" %> in page. security purposes, feature verifies arguments postback or callback events originate server control rendered them. if data valid , expected, use clientscriptmanager.registerforeventvalidation method in order register postback or callback data validation. ...and if set enableeventvalidation='false' , image set in fileupload control posted, other posted values come null. think either need disable eventvalidation just fileupload control, or validate manually somehow. i'm not sure how either. , don't know why other post values should come null if enableeventvalidat...

javascript - In a Durandal viewmodel, the view isn't always attached when viewAttached() called -

i have viewmodel in durandal has function viewattached() . according the docs supposed called after view attached dom. in function have jquery selector element in view being attached: function viewattached() { console.log( $("#myviewid").length ); } most of time correctly "1" printed console, maybe 10% of time 0. view not yet attached dom. has else had problem? viewattached gets produced dom sub tree passed in argument. so either change code along line function viewattached(view) { console.log( $(view).length ); } if want wrap whole view jquery or function viewattached(view) { console.log( $(view).find('mysubselector').length ); } if need work specific sub tree elements.

string - Java custom implode methode like in PHP -

i trying replicate php function implode() in java. this made: private string implode(string delimiter, map<string, string> map){ stringbuilder sb = new stringbuilder(); for(entry<string, string> e : map.entryset()){ sb.append(" "+delimiter+" "); sb.append(" " + e.getkey() + " = '" + e.getvalue() + "' "); } return sb.tostring(); } testing: map<string, string> mylist = new hashmap<string, string>(); mylist.put("address", "something1"); mylist.put("last_name", "something2"); mylist.put("first_name", "something3"); update_database("dummy", mylist, ""); public void update_database(string table, map<string, string> update_list, string condition){ string query = "update " + table + " set "; query += implode(",", update_list) + " " + conditio...

Send an individual attachment from Outlook to OneNote -

i use "send onenote" button in ms outlook save emails , attachments in notebooks. allows me accumulate array of different inputs (e.g. email, reports, estimates in spreadsheets, etc, etc - i'm preaching converted, think). often, i'd move single email attachment onenote page. process is: open email save attachment desktop open desired destination page in onenote drag file desktop onenote page select "insert file printout can add notes it" option i save attachment need , avoid saving contents of email , other attachments. can send individual attachment directly outlook onenote page? shortly after writing question (actually, as writing question!), found answer works me. click , drag attachment filename outlook email directly onenote page. file insert dialog pops allowing insertion of icon or printout.

java - restlet: Using Server and Client restlet Jars in same web application -

i not able use restlet server , client jars in same java web application. problem jars of server , client have same name. if try remove duplicate jars errors like java.lang.nosuchmethoderror: org.restlet.context.getclientdispatcher()lorg/restlet/restlet; org.restlet.resource.clientresource.createnext(clientresource.java:503) org.restlet.resource.clientresource.getnext(clientresource.java:829) org.restlet.resource.clientresource.handleoutbound(clientresource.java:1221) org.restlet.resource.clientresource.handle(clientresource.java:1068) org.restlet.resource.clientresource.handle(clientresource.java:1044) org.restlet.resource.clientresource.post(clientresource.java:1453) com.xxxxxx.web.restletclient.services.commonservice.sendrequest(commonservice.java:25) com.xxxxxx.web.restletclient.services.adminservice.execute(adminservice.java:24) com.xxxxxx.web.restletclient.client.adminloginclient.connect(adminloginclient.java:41) com.xxxxxx.web.action.operator.adminlogin...

emacs24 - How to remove an installed package in Emacs (ver 24+)? -

i'd remove several packages i've installed. when invoke package-list-packages , notice there ' d ' (mark deletion) command , ' x ' (execute). however, seems removes package name/description list , not actual files under ~/.emacs.d/elpa . doing wrong or missing? surely there must way remove installed packages. the command package-menu-mark-delete (key 'd') followed package-menu-execute (key 'x') worked me. also here introduction: package management in emacs - good, bad , ugly

oracle - Using PHP and oci8 to handle a query -

this past paper question database class i'm stuck with. i'm preparing exam, it's okay give away answer. consider following schema: borrow(userid: string, callnum: string, copynum: integer, checkout: date, return: date) here php function has error. function countcheckedoutbookcopies($callnum){ $sql = "select count(*) bookcount borrow return = null , callnum = '".$callnum."'"; $stid = oci_parse($this->conn, $sql); //assume $this->con correct if($row = oci_fetch_object($stid)){ return $row->bookcount; } else{ return -1; } } there 3 questions. 1.find error , fix it. 2.another error occurs, fix it. 3.despite being fixed, function return -1 time. why this? i'm familiar procedural php using mysql. tried running code , resulted $stid returning boolean time because don't know part right , part wrong. here things i've tried 1.changing '".$callnum."' '$...