Posts

Showing posts from April, 2010

OSGI Bundle using Android API is showing "java.lang.RuntimeException: Stub! at android.util.Log.d" -

in eclipse plugin project, trying use android api. showing message on logcat. in addition adding android.jar class path, prepared android.jar bundle follwing this link. did following: 1- writing manifest.txt contains following: manifest-version: 1.0 created-by: myself bundle-manifestversion: 2 bundle-name: android bundle-description: package android in osgi bundle bundle-version: 4.4.0 bundle-classpath: .,android.jar bundle-symbolicname: android export-package: android.util 2- creating bundle jar file running following command: jar cvfm android-bundle.jar manifest.txt android.jar 3- have bundle android-bundle.jar , open in eclipse file-> new -> project...-> plug-in development -> "plug-in existing jar archives" next, create bundle use android api. below activator class has log message: package osgi_android_bundle; import org.osgi.framework.bundleactivator; import org.osgi.framework.bundlecontext; import android.util.log; public class a

visual studio - XAML editor won't render the controls in my WPF window -

Image
as of visual c# 2012's xaml editor won't render controls. don't error messages or warnings , can still select controls. don't see them. here's looks in editor: the source code of xaml file can found here . oddly enough other xaml files displaying normally. @ runtime, controls in faulty xaml file render normally. can see in screenshot, error list empty. why isn't xaml file rendering in editor? removing opacity="0" window root tag makes controls show in visual studio. i tried switch opacity on in case if code running in designer this: public nfywindow() { initializecomponent(); if (system.componentmodel.designerproperties.getisindesignmode(this)) this.opacity = 1; } —but seems ignored visual studio 2010. however reverse trick helps: can remove opacity setting xaml , put constructor. worked me, visual studio version/sp may different. you may try cleaner way: public nfywindow() { initializecomponent();

html - Changing one item from float to fixed positioning, CSS -

i designing basic website , wanting change how navigation bar on left hand side acts, want remain want have fixed positioning can scroll remaining there. my question is, there anyway of changing it's position fixed without moving around , messing work in getting else positioned correctly, link image of website , included html , css. as question, can tell me why website looks different when run html through different browsers, using google chrome. thought using px values got rid of problem. edit 2 here screenshots different browsers on 2 different screens. webpage designed google chrome on laptop has resolution of 1600x900. computer comparing has resolution of 1440x900. adjustments window cause problems, never aginwill zoom. link goes gallery 8 images. http://postimg.org/gallery/908tlytw/ html code <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso10646"/> <meta http-equi

jquery - retrieve ajax posted values in servlet? -

var schedule = []; var data = { 'user_id' : '12', 'day_of_week' : 'monday', 'when' : 'start', 'modified' : 'true' } schedule.push(data); var data = { 'user_id' : '13', 'day_of_week' : 'tuesday', 'when' : 'end', 'modified' : 'false' } schedule.push(data); // schedule have 2 objects in i posting array servlet using jquery ajax post request below . data : {'mydata':schedule}, url :"./mycontroller", now how can array of objects , literate values? each array object has string, long , boolean type values. how can values iterating? one strategy use json pass kind of data , forth server , client. on client side, convert array of schedule json string using stringify function. send via ajax: e.g. var jsondata = json.stringify(schedule); your ajax object following: $.ajax({ url: &quo

immutability - Make immutable Java object -

my goal make java object immutable. have class student . coded in following way achieve immutability: public final class student { private string name; private string age; public student(string name, string age) { this.name = name; this.age = age; } public string getname() { return name; } public string getage() { return age; } } my question is, best way achieve immutability student class? your class not immutable strictly speaking, immutable. make immutable, need use final : private final string name; private final string age; although difference might seem subtle, it can make significant difference in multi-threaded context . immutable class inherently thread-safe, immutable class thread safe if safely published.

java - How to avoid if/else when using multple suppliers? -

is there way avoid using if/else statements when data can queried multiple locations , should returned on first non null instance? i'm trying load preferences user 3 different locations (user preferences, group preferences , system preferences). example: preference getpreference(user user, preference.type type) { preference preference = getuserpreferencefor(user, type); if (preference != null) { return preference; } preference = getgrouppreferencefor(user, type); if (preference != null) { return preference; } return getsystempreferencefor(user, type); } i avoid using these if checks , chain these methods behavior remain same code wouldn't have ugly duplication. i have thought of few solutions non of these strike elegant one. example, 1 way to have each of these methods provide default scatter if statements. preference getpreference(user user, preference.type type) { preference preference = getuserpreferencefo

java - iphone like voicemail listbox in android -

i'm looking iphone voicemail listview in android. possible have similar listvew.? in android have have view inflated in getview of customadapter class. in phone play button visible when users selects listview item. is possible in android if yes ideas/pointers.

ios listview index of row seems to be off -

i using listview has thumbnail image in it. using webservice retrieve info. in cellforrowatindexpath method call service retrieve record , check see if has image attached it. bool. if call service again, using different method, thumbnail. of logic seems in place , in right order images shown in wrong cells , duplicated. when step through code debug, seems fire service call each cell , rather jumping right response action goes next row/cell. once rows populated goes response. normal debugger? maybe calls service asynchronous , why? there soap "library" included doesnt seem named anywhere , doesnt seem doing async request, dumb application. inherited project 3rd party dev. also .net dev , used visual studio debugger maybe causing issues. sorry if terms arent correct new ios , obj-c. code: service call image: [service getpicturethumbnail:self action:@selector(getthumbresponse:) clientid: [appdelegate clientid] commid:[usersettings getinstance].selectedid mod:@&qu

How do you create a method with parameters for a custom object in JavaScript? -

i have real problem can't solve , i'm @ computers. building object using javascript has pushed me on edge. have 3 external js files , html file initiates call... setup 1 popup.html file code: ... <script type="text/javascript" src="methodobjects.js"></script> <script type="text/javascript" src="popup (test objects).js"></script> ... methodobject.js file code: var urldisectoro={ function urldisector(url){ //here compiler says: unexpected identifier uncaught referenceerror: //i need pass url function... //test if url has google search in var myurl = "" + url; var index = mysearch(myurl, "https://www.google.com/search?q="); if(index==-1){ document.getelementbyid('currentlink').innerhtml = myurl + "<br /><br />this url <font color='blue'><b><u><i>won't&l

regex - 500 URL rewrite error for relative URLs. Is there something wrong with my outbound IIS rewrite rule? -

i having bit of difficulty achieving outbound rewrite rule in iis 7 , wondering if able double check rules? the purpose of outbound rule rewrite href="www.domain.com" go href="/__tracking/pre_processing.php" (a script tracking before send user on way domain.com). outbound rule attempts preserve query strings domain.com?p=100&q=200 can rewritten /__tracking/pre_processing.php?p=100&q=200 <rewrite> <outboundrules> <rule name="outbound rewrite test" precondition="" enabled="false"> <match filterbytags="a" pattern="domain\.com(.*|\?.*)" /> <action type="rewrite" value="/__tracking/pre_processing.php{r:1}" /> <conditions> </conditions> </rule> </outboundrules> </rewrite> it sounded simple enough yet when enabled rul

css - display bootstrap popovers outside divs with overflow:hidden -

i've got question how bootstrap popover show above (outside) slider, has wrapper of overflow:hidden, can't seem around. i'm using slider: http://owlgraphic.com/owlcarousel/ i'm using twitter bootstrap 2.3.2 popovers: http://getbootstrap.com/2.3.2/javascript.html#popovers both work exception of overflow:hidden on carousel, similar issues this: popovers in bootstrap 2.2.1 https://github.com/twbs/bootstrap/issues/6122 my question is: has gotten work? i've done moves height , negative margin vertical height showing, if popover @ edge of wrapping dive, cut off @ edge. please let me know if need provide additional detail. thanks steph ok, figured 1 out. i changed: $('.popover-with-html').popover({ html : true, }); to: $('.popover-with-html').popover({ html : true, container: 'body'}); and it's working. container: 'body' was key, hope helps someone. thanks steph

javascript - Combining removeClass() and data() to remember which elements had the class and restore it -

so asked similar question few hours later when tried use couldn't figure out how use it. told following: $(element).removeclass('active'); $(element).data('removed-class', 'active'); further can fetched using var removeclass = $(element).data('removed-class'); so "clean" way function? so basically, if have 7 <li> rows, , randomly 3 of <li> have class "active". now, if execute function performs remove "active" classes <li> $("li").removeclass("active") example, how can restore same "active" <li> classes had class removed? cheers give shot, , see if fits bill. var $listitems = $('li','#wrapper'); function clstodata (elements, cls) { $(elements).each(function(){ var $this = $(this); if($this.hasclass(cls)){ $this.removeclass(cls).data('removed-class',cls); } }); } func

Is there a Catalog of Debian packages -

the debian site great http://www.debian.org/distrib/packages , , i'm aware of search facilities, want complete catalog of packages/files/architectures in consumable format - xml, json, csv etc. can direct me one? you may download packages list repos. http://http.debian.net/debian/dists/[release]/[main|contrib|non-free]/contents-[arch].gz example: stable main amd64 a starting point getting more informations here .

razor - ASP.Net MVC 4 Update value linked to a foreign key column -

i'm relatively new mvc 4 , asp.net in general. i'm trying create "room" properties, 1 of queries list of statuses contained in model. have classes set follows: room.cs public class room { [key] public guid roomid { get; set; } [required(errormessage = "a room name required")] public string name { get; set; } public string description { get; set; } public virtual status status { get; set; } [displayname("created on")] public datetime? created { get; set; } [displayname("last modified")] public datetime? modified { get; set; } } status.cs public class status { [key] public int statusid { get; set; } public string name { get; set; } public string description { get; set; } } when use default scaffolding create action against room, using following code, working flawlessly, , applying status of "ne

java - Specifying list parameter in HQL NOT IN clause -

i've got following code set list parameter in not in clause in hql query private static final string find_available_operators = "from domain domain domain.type = :type , domain.operators not in (:operators)"; @suppresswarnings("unchecked") @override public list<domain> findavailableoperators(domain domain) { query query = null; if (domain.getoperators().isempty()) { query = getcurrentsession().createquery(find_by_domain_type); // run query } else { query = getcurrentsession().createquery(find_available_operators); query.setparameterlist("operators", domain.getoperators()); } query.setparameter("type", domaintype.operator); return query.list(); } but sqlgrammarexception when list not empty org.hibernate.exception.sqlgrammarexception: no value specified parameter 2 am using setparameterlist() incorrectly ? the sql executed seems be hibernate: select domain0_.domain_id

python 2.7 - Is this a valid structure for voluptuous or am I missing something -

i've yaml file. i've required , optional keys , i've optional blocks, 'linux', 'http' , on. --- project: name: lolproj url: http://wiki.tld/lolproj contact: name: foobar email: foobar@gmail.com plugins: linux: settings: disk: critical: 90 warning: 80 http: ... i loading , validating way: from voluptuous import * def main(): open('mytiny.yaml', 'r') f: mon = yaml.safe_load(f) project = { required('name'): all(str, length(min=5), msg="must string!"), required('url'): all(str, length(min=5)) } contact = { required('name'): all(str, length(min=5)), required('email'): all(str, length(min=5)), } disk_settings = { 'warning': int, 'critical': int, } plugins = ['linux','http','mysql']

Storing a Date Property for an Azure Table Storage Entity with Mobile Services and Node.js -

i'm working windows azure mobile services custom apis , windows azure sdk node.js. i have simple script starts importing azure module. var azure = require('azure'); var tableservice = azure.createtableservice(); in response post custom api, insert entity azure table storage ( not azure sql database) handful of properties, 1 of timestamp (an instance of date ). var entity = { partitionkey: partitionkey rowkey: rowkey, time: new date() }; tableservice.insertorreplaceentity(tablename, entity, callback); the result time property stored entity string instead of date. example, time property stored string mon aug 12 2013 20:32:51 gmt+0000 (coordinated universal time) . i've confirmed loading table server explorer in visual studio , examining details of inserted entity. i know can store dates in azure table storage , i've done c#. however, above not work , cannot think of more canonical example test custom api written in

python - Django admin - TabularInline - display only a few objects from other model -

example models: class book(models.model): types = ( (0, 'sci-fi') (1, 'biography') ) title = models.charfield(...) book_type = models.charfield(max_length=1, choices=types) class connect(models.model): book1 = models.foreignkey(book, related_name='book_1') book2 = models.foreignkey(book, related_name='book_2') i want 1 think, display connect tabularinline in book, show connect book1__book_type = 0 i try this: class connectformset(baseinlineformset): def get_queryset(self): if not hasattr(self, '_queryset'): qs = super(connectionformset, self).get_queryset().filter('book1__book_type':0) self._queryset = qs return self._queryset class inlineconnectn(admin.tabularinline): fk_name = 'book1' model = connect = 0 formset = connectformset but it's not working want. still connections visible in list of connect in ta

proc - Linux file deleted recovery -

is there way create file in linux link specific inode? take scenario: there file in course of writing (a log maybe) , specific file deleted but link in dir /proc still pointing @ it. in case need not bare copy of hard link can have future modifications , last modification before process close , system delete it. if have inode number there way achieve goal? since there no syscall involves inode, because concept of extx fs , not practice make stove pipe make chain of responsability (as m.e.l. suggests), there no answer question because @ vfs level handle files path , names , not other internal representations. but achieve goal track last modification can use continous monitoring , duplication tail : tail -c+1 -f --pid=pid /proc/pid/fd/fd > /path/to/the/copy where pid pid of process have deleted file still opened , fd file descriptor number. -f tail open , hold file display further modification, -c+1 start "tail" first byte , --pid=pid tail informe

Magento/PHP: Add static block to end of products list(Grid) on category page? -

i basing code off similar solution displays block every 3 products: <?php if($i % 3 == 0){ ?> -- static block here -- <?php } ?> i display static block once after products vs multiple times, every 3. if you'd render static block @ bottom of product list, go list.phtml page , scroll bottom. prior bottom , call static block so: <?php echo $this->getlayout()->createblock('cms/block')->setblockid('block_identifier')->tohtml(); ?> that should trick, , outside of if/else statement list/grid render regardless of view mode you're in.

resize - Resizing a parent div with jQuery -

i'm trying set page when user clicks on 1 of letters within 3 divs, div resizes , "covers" other 2 divs on screen - hit brick wall jquery statement - know involves resize function (and css function) can't figure out life of me how it. html/css <div class="container"> <div id="home" class="group"> <span class="lettering" id="a"> </span> </div> <div id="portfolio" class="group" style="margin-left: -4px;"> <span class="lettering" id="p"> p </span> </div> <div id="contact" class="group" style="margin-left: -4px;"> <span class="lettering" id="c"> c </span> </div> </div> html, body { font-size: 1em; background: #fff; heigh

c# - How does custom serializer affect searching? -

i trying use nodatime in app. app persists data in mongodb database. consider following class public class sometype { public objectid id { get; set; } public instant instant { get; set; } [bsondatetimeoptions(kind = datetimekind.local)] public datetime datetime { get; set; } [bsondatetimeoptions(kind = datetimekind.utc)] public datetime datetimeutc { get; set; } // public zoneddatetime zoneddatetime { get; set; } // public localdatetime localdatetime { get; set; } } without adding custom serializer, instant property of class doesn't stored in db. reading document db fails. public class instantbsonserializer : bsonbaseserializer { public override object deserialize(bsonreader bsonreader, type nominaltype, ibsonserializationoptions options) { var ticks = bsonreader.readint64(); return new instant(ticks); } public override object deserialize(bsonreader bsonreader, type nominaltype, type actualtype, ibsonseriali

Why won't Visual Leak Detector report file and line number for some stack frames? -

in visual leak detector output, (not all) of frames own code comes "file , line number not available": 0x000000000079b4e8 (file , line number not available): mymodule.dll!namespace1::class1::impl::impl + 0x88 bytes a similar question suggests might missing pdb files, set environment variable dbghelp_dbgout per this thread , reported pdb files correctly resolved: dbghelp: mymodule - private symbols & lines f:\code\mycompany\myproduct\debug\x64\mymodule.pdb so why won't visual leak detector give me file , line numbers frames?

java - Using Apache LogFactory on Android -

i migrating java code android. codebase contain quite bit logfactory.getlog(xxx). logfactory comes org.apache.commons.logging.logfactory how can use in android, if not, best replacement it? thank you! you might want @ slf4j wrap android logging functions. aware jar files on site behind source held in git, , 1.6.1-rc1 jar has been 'release candidate' since 2010.

clojure - How can I add a build step to leiningen? -

so i've got application built using foundation , ring, , want able compile custom foundation css whenever run lein ring server or like. specifically, i'd able add step runs compass compile [path] . what's idiomatic way this? i say, leiningen hooks proper , idiomatic way so: hooks . you can modify behaviour of built-in tasks degree using hooks. hook functionality provided robert hooke library, included leiningen.

html - 'selected effect' on jquery tab (or other stuffs) -

the 'selector effect' orange border (can seen here: http://jqueryui.com/tabs/#default ) annoying.. come from? how rid of it? i assume you're speaking outline browser add on anchor elements. blue orange or whatever, depending on browser. this css fix. .class-name { outline: 0; } please note: removing outlines in manner can prevent visually impaired users, or users without mouse accessing content.

jquery - magnific popup background appears for full screen and closes as one clicks anywhere -

when click on link activates magnific popup ajax call, grey background appears full screen. trying see if background enough cover login form (inside pop up). wherever click inside ajax form automatically closes. need pls... <a class="simple-ajax-popup-align-top" href="result.php">try me</a><br> jquery ajax script $(document).ready(function() { $('.ajax-popup-link').magnificpopup({ type: 'ajax', aligntop: false, overflowy: 'scroll' }); }); and result.php follows: <div class="login_body"> <form id='login' name="login" method="post" action="login_process.php" accept-charset='utf-8'> <input type='hidden' name='submitted' id='submitted' value='1'/> <div class="field_container">email:</label> <input type='text' name='cust_email' id='

ruby on rails - How to show user.name associated with timesheets? -

i having issues app displaying user.name in timesheets index (shows timesheets, not current user timesheets) user model: # table name: timesheets # # id :integer not null, primary key # user_id :integer # starting :datetime # ending :datetime # approved :boolean # created_at :datetime not null # updated_at :datetime not null # class user < activerecord::base attr_accessible :name, :email, :password, :password_confirmation has_secure_password has_many :timesheets .... end timesheet model (standard user_id foreign key) # table name: timesheets # # id :integer not null, primary key # user_id :integer # starting :datetime # ending :datetime # approved :boolean # created_at :datetime not null # updated_at :datetime not null # class timesheet < activerecord::base attr_accessible :starting, :ending belongs_to :user validates :user_id, presence: true validates :

Android show single item from a list in next page -

i new android , developing mail application. in application, json string server creating list ( creating rows in table view, embedded in scroll view ). trying show single item in detail on clicking item. on click, getting id of corresponding item , load new page using following page. code looks like intent intent = new intent(firstactivity.this, secondactivity.class); bundle b = new bundle(); b.putint("id", 124); b.putint("message", "message"); intent.putextras(b); startactivity(intent); finish(); but problem listing page cleared on return page. ie, on click delete button in child page, want delete same item in list page also. after deleted item child page, using code redirect parent page. intent intent = new intent(secondactivity.this, firstactivity.class); bundle b = new bundle(); b.putint("id", 124); intent.putextras(b); startactivity(intent); finish(); how delete single item out page refresh if coming child view , load fre

mysql - Please help me in php mysq to count data by group -

i have table clicks this +-----+-----+-------+-------+ | id | time | site | +-----+-----+-------+-------+ | 1 | 8 4 2013 | site1 | | 2 | 8 4 2013 | site1 | | 3 | 9 4 2013 | site2 | | 4 | 6 4 2013 | site1 | +-----+-----+------+--------+ i want show result this date | count 8 4 2013 | 2 click 6 4 2013 | 1 click i have code $id = 'site1'; $getclk = mysql_query("select * clicks site='$id'"); $clk = mysql_num_rows($getclk); print $clk; this code show count of rows , want show count of row grouped time. group command works don't know how this. please me dont know how this, please give me full code this. i think should be: select count (id) countclicks, time date clicks [where site = ?] group time order countclicks desc also, shouldn't use mysql_* functions because deprecated.

PHP and MySQL Acces Levels -

i have been trying add simple "access" level check, , can not give me out value database, null; though same query user, pass check. anyhow, here code, might able little better done! *updated according comment public function userlogin() { $success = false; try { $con = new pdo(db_dsn, db_username, db_password); $con->setattribute(pdo::attr_errmode, pdo::errmode_exception); $sql = "select * users username = :username , password = :password limit 1"; $stmt = $con->prepare($sql); $stmt->bindvalue(":username", $this->username, pdo::param_str); $stmt->bindvalue(":password", hash("sha256", $this->password . $this->salt), pdo::param_str); // $stmt->bindvalue("access", $this->access, pdo::param_int); $stmt->execute(); $valid = $stmt->fetchcolumn(); if ($valid) { $success = true;

PHP Date diff with a difference -

please bear me try explain predicament. need somehow difference between 2 dates reversing function have add months , years? problem date add function provided php >= 5.3 not add dates in manner require. example: +3 months 30nov = 2mar solution use function below (code ref 2) produce results need. example: +3 months 30nov = 28feb however when using below (code ref 1) calculate difference based on addition function provide php >= 5.3 in 2 instead of 3 months difference between 30nov , 28feb. if come accurate date diff based on code ref 2 logic i, , i'm sure others in same boat grateful. << code ref 1 >> <?php $datetime1 = new datetime('2000-11-30'); $datetime2 = new datetime('2001-02-28'); $interval = $datetime1->diff($datetime2); echo $interval->format('%m'); // 2 $datetime1 = new datetime('2000-11-30'); $datetime2 = new datetime('2001-03-02'); $interval = $datetime1->diff($datetime2); echo $int

sql - Intersect table with different column value -

i have table: num type flag --- ---- ---- 11 1 12 1 13 1 14 1 15 1 12 b 2 13 b 2 how write query following result: num type flag --- ---- ---- 11 1 14 1 15 1 select num your_table num not in ( select num your_table type = 'b' )

eclipse - Substitute for UDC, Usage Data Collector? -

since udc no longer supported or part of eclipse, i'm wondering if there substitute. i'd more information regarding how our set of users using eclipse in order proactive , try improve environment. things i'd gather: perspectives used views used errors reported eclipse version/type used jvm used this should possible upload private server. i of course use udc , possible change code if needed, i'd rather use existing , supported plugin if there one. i think best option adopt udc code , change needs. or might want see happend this prototype . regarding error reporting there discussion going on on eclipse ide-dev mailing list might of interest: https://dev.eclipse.org/mhonarc/lists/ide-dev/msg00602.html https://dev.eclipse.org/mhonarc/lists/ide-dev/msg00596.html

javascript - How can i cache large image data using HTML5 -

i developing asp.net webapi utilizing features of html5. need cache image data improving performance. image data returned in json format web service hosted in iis in separate machine. when click on thumbnail of image in ui, call webservice seriesid input. webservice return imageid , pixel data stream. pixel data stream binding canvas. need cache image shown in canvas. image of around 70mb in size. feature of html5 can use caching huge amount of image data? i'd give manifest go: http://www.w3schools.com/html/html5_app_cache.asp worked me smaller image sizes.

Different type of anonymous users with Django -

the django project i'm working on website should accessed local network , internet. , part of content should available anonymous users if visit site local network (basically it's test on ip address), while authenticated users have access whole content. i though checking ip as described here , seems me quite bad check ip each time user loads page. is there way cleanly store user data on anonymous user ? nice able use decorator @login_required , redirect if anonymous user has external ip. actually, checking ip on every requests seems me 1 of fastest methods available. consider ip loaded in memory on every request, have simple dictionary lookup , comparison, conditional string split/additional dict lookup. compared happens on simplest page views, performance impact neglectable , comparable impact of using sessions or other mechanism save ip. you can write own decorator function using user_passes_test : from django.contrib.auth.decorators import user_passes_tes

arrays - Wordpress Query parsing only author ids -

i need array author ids loop, each 1 once if possible , out of posts in loop. suggestions? regards following code helpfull you. if(have_posts()){ $author_arr = array(); while(have_posts()){ the_post(); global $post; if(!in_array($post->post_author,$author_arr)){ $author_arr[] = $post->post_author; } } }

django - Admin shows entries of a model even though database is empty -

how following possible? i cloned django project dir, ran syncdb , check_permissions , migrate , createsuperuser , ran development server. went admin , there saw 2 entries of model though there no fixtures cause these entries. when looked @ sqlite database file, there no entries model, though shows these 2 entries in admin(i did python manage.py dumpdata > my_db , case insensitively searched within file, no result). it's not browser related because problem occurs on new installed browser. these 2 entries entries made in development server of project on location. server not running , i'm using different port. i grepped ( grep -r -n entry_name ) root folder looking names of entries, without result. when select these entries in admin , click delete, nothing happens. these 2 entries remain there. edit 1 @hedde: i did ps ffaux|grep python . there 1 django process running: /home/my_username/.virtualenvs/project_name/bin/python manage.py runserver 8044 i ga

Accessing IBOutlet of a controller in another class in COCOA -

i have controller iboutlet follow : @interface mycontroller : nsviewcontroller <nspopoverdelegate> { iboutlet nswindow *detachedwindow; } @property (retain, nonatomic) nswindow *detachedwindow; @end i want access outlet( detachedwindow ) in class is: subclass added cell view in view based table view. @interface hovertablerowview : nstablerowview<nstableviewdelegate,nspopoverdelegate> { __weak mycontroller *_delegateobject; } @implementation hovertablerowview @synthesize delegateobject = _delegateobject; - (void)awakefromnib { nslog(@"awake nib being called"); nslog(@"detached window outlet is--%@",[[self delegateobject ]detachedwindow]); } @end but detached window outlet is-- returning null . how can access outlet in `hovertablerowview' class ?

lattice - Add SD to dotplot in R -

i trying make graphs in r , have problem can't solve. use dotplot function plot mean of 16 treatments. works out pretty well, on y axis variables (treatment names) , on x axis value. want add standard deviation points , tried different things found via internet doesn't work. if me (in easy way), happy! thank reading this! i have: library(lattice) d2 <- colmeans(d, na.rm=true) var.labels <- f ### f includes names of treatments sd <- sd(d, na.rm=true) new.data <- data.frame(var.labels=factor(var.labels, levels=f), d2, sd) dotplot(var.labels~d2, data=new.data) one possible solution might be: dotplot(var.labels~d2+sd, data=new.data) a nice comparison different dot-charts (standard r, lattice , ggplot2) can found here: summarising data using dot plots hth

Adding Table rows Dynamically in Android -

i trying create layout need add table rows dynamically. below table layout xml <tablelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/displaylinear" android:background="@color/background_df" android:orientation="vertical" > <tablerow android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/display_row" android:layout_margintop="280dip" > </tablelayout> the activity file rows being added dynamically is public void init(){ menudb = new menudbadapter(this); ll = (tablelayout) findviewbyid(r.id.displaylinear); tablerow row=(tablerow)findviewbyid(r.id.display_row); (int = 0; <2; i++) { checkbox = new checkbox(this);

Obtain youtube username from google Plus api - access token scope insufficientPermissions -

i'm trying youtube username via google plus api. use php services plus ang yt api , i'm using symfony 2. obtaining access token works ok, , i'm not going put here. there no problem google plus service, after authorization i'm getting information need. in yt case, i'm getting error : insufficientpermissions error check access token scope in here: https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=access_token , scope of access token google plus, i'm not able force google api php clinet make yt scope aviable too. ideas? here code : require_once '../src/google_api_php_client/src/google_client.php'; require_once '../src/google_api_php_client/src/contrib/google_plusservice.php'; require_once '../src/google_api_php_client/src/contrib/google_youtubeservice.php'; $client = new google_client(); $client->setscopes('https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/plus'); $youtube = new google_yo

java - Check For Modal Attribute Existence In Controller Method before adding -

i have spring controller want method handle request , redirect 1 keeping value attached, use redirectattributes on first 1 , @modalattribute on second, thing not have modal attribute existing want add if exists. @requestmapping("/main") public string getmain(model model,httpsession session,@modalattribute list<loans> loanslist){ if(session.getattribute("user") != null){ if(session.getattribute("current_start")!=null){ model.addattribute("loans",loandao.findall((integer) session.getattribute("current_start"))); } else { model.addattribute("loans",loandao.findall(0)); session.setattribute("current_start",0); } model.addattribute("loan",new loan()); model.addattribute("countries",countrydao.findall()); model.addattribute("types",typedao.findall()); session.setattribute("total_loa