Posts

Showing posts from August, 2011

WordPress Shortcode - Change Layout Based On Attribute -

i have following custom shortcode displays custom post type of staff members in defined taxonomy of "type". i'm trying add second attribute allow user define layout style of output, example columns or rows. here envision shortcode looking like: [staff type="international" style="rows"] i think have coding getting attributes, including setting default values, can't seem figure out how if statement in there alter output. seems should go right before first "$output .=" line. function get_staff($atts) { extract( shortcode_atts( array( 'type' => 'international', 'style' => 'rows' ), $atts ) ); add_filter( 'posts_orderby' , 'posts_orderby_lastname' ); $loop = new wp_query( array ( 'post_type' => 'staff', 'orderby' => 'title', 'staff-type' => $type,

vb.net - Printing Windows Form into A4 size page -

i creating billing software.i need print invoice.size of invoice a4.i printing using printform1.print(me, powerpacks.printing.printform.printoption.scrollable) now problem is:when printing, not printing full windows form.instead printing visible area of windows form.kindly me out. in these situations need use crystal report in case of .net , use jasperreport in case of java.

XML comment of C# DLL not showing in VB.Net project -

i'm using visual studio 2012. have solution "historic" vb.net projects in (too big, no time convert now) , rest of solution c#. xml comments of c# dll projects not showing in vb.net projects. is there way make work other creating xml documentation file when building (as seen in this question )? i tried on 1 dll project , works, can't use dlls. classes autogenerated linq sql don't have xml comments , throwing tons of warnings. if disable treat warnings errors can't stay 280 warnings.

Tabris Local Storage -

i use different functions favorites , appointments 1 user. need login data in app. possible use local storage in tabris framework? tabris has client service called clientstore (rwt.getclient().getservice( clientstore.class) ) save information on device. anyway, it's not recommended save data on device. recommended way store token clientstore identify user when opens app next time. token can store data e.g. in data base on server. clientstore can compared cookies web browser. never save data in cookie.

java - Why doesn't dtruss show me the select system call in this JNI code? -

while investigating jdk bug on mac os, ran system call trace output don't understand: tomcat startup fails due 'java.net.socketexception invalid argument' on mac os x the short version: on mac os, jdk uses select() instead of poll() . so, if more 1024 file descriptors allocated, deduced select() call in net_timeout fails resulting in socketexception 'invalid argument' message. however, when traced system calls, saw no evidence of select() system call, or call fails , sets einval, discounted potential cause. i don't see call reduced test case i've created understand problem: import java.io.*; import java.net.*; public class selecttest { public static void main(string[] args) throws exception { for(int = 0; < 1024; i++) { new fileinputstream("/dev/null"); } serversocket socket = new serversocket(8080); socket.accept(); } } results in exception on mac os w/ jdk 1.7u5 , later: exception in thread "

sublimetext2 - SublimeLinter for PHP -

i cannot sublimelinter work sublime text 2. have node.js installed , wamp installed , user settings sublimelinter follows: { "sublimelinter_executable_map": { "javascript":"c:/program files/nodejs/node.exe", "css":"c:/program files/nodejs/node.exe", "php":"c:/wamp/bin/php/php5.3.13/php.exe" } } i have created file on desktop called 'cool.php' following code: <?php function hel() { error-> } ?> but nothing shows tell me 'error->' incorrect. doing wrong? side note: in readme of sublimelinter says '* php - syntax check via php -l '. mean? i had similar issue on linux caused st2 opening php files different file type. to fix it, open .php file click view > syntax > open current extension as... > php . it might need use double backslash instead of forward slashes: { "sublimelinter_executable_map&qu

hibernate - Spring roo: Cannot update user data which was inserted by PhpMyAdmin -

i use spring roo build cms webapp. this app of course, has user management function. my problem if use phpmyadmin insert user information database , goto app modified thoes information, error orcur. (if insert user info app , edit app, works fine) can of explain me why happend , how resolve it? thank much. addition info: error orcur user table, table (such news or product) has no problem. below few of code. enduser.java (entity) public class enduser { @notnull @size(min = 1, max = 20) @column(name = "user_id", unique = true, nullable = false) private string userid; @column(name = "user_name") private string name; @notnull @size(min = 1, max = 40) @column(name = "password", nullable = false) private string password; @column(name = "first_name") private string firstname; @column(name = "last_name") private string lastname; @column(name = "gender"

MySQL sum results into a table grid format -

Image
i have following sql code: select distinct members_main.membership_type, payment_method,sum(amount_paid) members_main, members_payments members_main.contact_id=members_payments.contact_id group members_main.membership_type,payment_method that returns following: i want able return results in following table grid format: does know if or how can within mysql? thanks, john depending on data complexity either go bluefeet's way or if payment_method amount dynamic sounds need pivot table. try looking @ this .

asp.net web api - Multiple GET actions in webApi Controller -

i know question have been asked many times before. have different problem. single controller multiple methods in asp.net web api i have followed steps provided in post on above link, api link in format of api/servicename/controller. and routes given in post api/controller format. 1 please in getting sorted out. replced routes exact name of service of no use. i got solution, instead of writing routes api/controller/action, wrote in way given below. got code block link http://lonetechie.com/2013/03/04/fixing-multiple-actions-were-found-that-match-the-request-aspnet-webapi/ points link have given in original post. config.routes.maphttproute("defaultapiwithaction", "{controller}/{action}", new { action = "get" }); config.routes.maphttproute("defaultapi", "{controller}/{id}", new { id = routeparameter.optional }, new { id = @"\d+" }); config.routes.maphttproute("defaultapiget", "{controller}&quo

Sharepoint 2013 - Can't change theme using change the look -

i have been working on creating custom .spcolor file update our company color scheme our sharepoint site. have noticed when try use change feature change theme 1 of default themes, doesn't change when hit try out link. after researching further, noticed issue occurs seattle site layout , not oslo. i tried @ seattle masterpages , css files associated, didn't see unusual. novice @ sharepoint, maybe easy not finding. i found solution. difference between seattle , oslo masterpages cssregistration control : <sharepoint:cssregistration name="themable/corev15.css" runat="server" enablecsstheming="true" /> so seattle masterpage missing enablecsstheming="true" attribute fix everyting.

ios - Change OpenEars pitch dynamically (on the fly) -

i have ios app reads text using openears api. using latest version (1.2.5). can not figure out how change pitch while words being read ("on fly"). created slider control pitch. delegate fired slider changed. in delegate function, flitecontroller target_mean changed. intent have pitch change target_mean value changed. code follows: -(void)saythemessage:(nsstring *)message { // if there nothing there, don't try if (message == nil) return; [self.oeeo setdelegate:self]; // going in label... @try { // set pitch, etc... self.flite.target_mean = pitchvalue; // change pitch self.flite.target_stddev = variencevalue; // change variance self.flite.duration_stretch = speedvalue; // change speed // it! [self.flite say:message withvoice:self.slt]; } @catch (nsexception *exception) { if ([delegate respondstoselector:@selector(messageerror)]) [delegate messageerror]

How to handle visibility changes for a custom android view/widget -

i have written custom view in android. need processing when visibility of view changed. there listener called when visibility of view/widget changed ? edit: i know how change visibility, know if there listener called when setvisibility on view! do want processing within custom view class? if so, why not override setvisibility() method, call super(), , custom processing?

Pictos font icon for searchfield repeating on Android 4.0.4 with Sencha Touch 2.2 -

Image
i upgraded android project st 2.2 , using new pictos fonts icons instead of images , webkit masks. having issue icon searchfield repeats in searchfield. how can fix this? see below icon , css. fixed this: .x-field-search .x-field-input::before { background-color: white; background-repeat: no-repeat; }

javascript - Is assignment simultaneous to indexing valid? -

i discovered line , i'm wondering if it's valid code. please note don't wonder - that's obvious. want know if it's ok code, academically speaking (and mean validity lies in compliance standard or @ least accepted practice). know works in browsers needs to. target.src = urls[index = ++index % urls.length]; yes (more characters validator)

java - Make a Table from a TimeSeriesCollection -

i have of data stored in timeseriescollection, , instead of making graph data, want have option of presenting data in table. goal make this: name 5/1/2013 5/2/2013 5/3/2013 ------------------------------------------- rick 12 0 82 dale 1 0 0 shane 0 0 159 how should go this? how data want out of timeseriescollection? i need make column every possible x value in series. 5/2/2013 needs show up, though there no data it. you can build tablemodel around timeseriescollection , although might more practical transpose table, identifying rows longer dimension. implementation of getvalueat() can fill in missing data needed. reference, related example extends abstracttablemodel return values map<string, string> .

php - Cannot save associated data with hasMany through (Join Model) -

hi, new cakephp , doing project on cakephp 2.3.4. have associate product metal class through has many through association . doesn't seem working. model code class metal extends appmodel { public $hasmany = array( 'metalproduct' ); } class product extends appmodel { public $hasmany = array( 'metalproduct' ); } app::uses('appmodel', 'model'); class metalproduct extends appmodel { public $belongsto = array( 'metal' => array( 'classname' => 'metal', 'foreignkey' => 'metal_id' ), 'product' => array( 'classname' => 'product', 'foreignkey' => 'product_id' ) );} my database table names metal , products , metal_products i have multiple select option selecting more 1 metal type. how the list of metals $metals=$this->metal->find('list'); $this->set(compact(

oracle - Doing two different batch queries and a delete query in one transaction (Java) -

i want ask best way of optimizing these 3 queries. function going used millions of users in national project , want optimized(fast) possible. please add helpful comment or answer :) , thank in advance. try { //so don't execute empty batches boolean flag=false; conn = datasource.getconnection(); autocommitvalue = conn.getautocommit(); conn.setautocommit(false); stmt = conn.preparestatement("delete table1 input = ?"); stmt.setlong(1, input); stmt.executeupdate(); stmt = conn .preparestatement("insert table1 (c1) values (?)"); (object info : info list) { if (info .gettype() == 0) { flag=true; stmt.setint(1, info.getc1()); stmt.addbatch(); } } if(flag){ result = stmt.executebatch(); flag=false; } stmt = conn.preparestatement("insert table1 (c1,c2,c3) values (?,?,?)"); (object info : info list) { if (info .

Using Parse to make an iOS Social Network App? -

i want make ios scocial network, facebook. test objective c programming skills wont massive facebook (though have features facebook has). want ask is: can use objective c knowledge build front-end app , use parse services (parse.com) build back-end? or need tools, knowledge etc...? again, not make very big ios social network app facebook smaller 1 has features facebook has. any advice appreciated. yes, can use objective-c create app , use parse.com host data. can use parse sdk allow app access backend data. work (depending on how design parse data storage) , won't need write (or much) backend code.

facebook - Getting the right access token -

i'd application read posts group. to it, got access token in following url: https://developers.facebook.com/tools/explorer?method=get&path=404425692946289%2ffeed and call que following url: https://graph.facebook.com/404425692946289/feed?access_token=debug_token_generated_from_above_url and works charm. but can't results when call url above token generated using application id , secret: https://graph.facebook.com/oauth/access_token?client_id=myid&client_secret=mysecret&grant_type=client_credentials <--- token generated url not work! =( i receiving following data: { "data": [ ] } i supposedly have read_stream extended permission configured on application. one way check self permissions token in api explorer has, call /me/permissions in addition grant_type=client_credentials app tokens. need user token likely. please review documentation got information from.

Target IE7/IE8 in css (less) -

i'm using .less compile css. is there way target ie7/ie8 in less file particular rules? thanks absolutely use conditional classes paul irish posted about if can, because it's slick, easy write , maintain styles for, , limits hackery 1 place. that said, if want target 1 rule @ version of old ie, can use favorite hacks letting less compiler know whatever you're trying outside bounds of things should worry :) the following generate kinds of less compiler errors: .class{ _margin: !15pl*madhax!__dang,ie; } but, if wrap hacky madness inside ~"" , less ignore (although still have access @variables if want use them) .class{ _margin: ~"!15pl*madhax!__dang,ie"; } hope helps!

php - Send Order ID to Authorize.net Instead of Transaction ID in Magento -

i'm using authorize.net module in magento 1.7 process credit card transactions. right now, transaction id sent, not order number. there way send order number instead? would change ->setlasttransid($response->gettransactionid()) getorderid on line 1367 of app/code/core/mage/paygate/model/authorize.net? of course, wouldn't change core files, i'd copy local first. it looks authorize.net payment method in magento community edition 1.7 sends order increment id number (what typically considered order number) authorize.net gateway in xinvoicenum field. see lines 1154 1156 in app/code/core/mage/paygate/model/authorizenet.php: if ($order && $order->getincrementid()) { $request->setxinvoicenum($order->getincrementid()); } one possible way more order information authorize.net magento use authorize.net's cim (customer information manager) version of gateway, along magento payment method such ours: http://www.storefrontc

jquery - Google Charts With Tabs - Chart Area Incorrect -

although may seem common problem not able find solution particular problem.. i trying create 2 pie charts using google charting api.. the 1st pie chart in 1st tab (default selected) shows accurate width , height 2nd pie chart in hidden tab not show appropriate width.. here fiddle ... in fiddle can see chart area in hidden tab less chart area in active tab although code both charts same... google.load('visualization', '1.0', {'packages':['corechart']}); google.setonloadcallback(drawchart); function drawchart() { var data = google.visualization.arraytodatatable([ ['task', 'hours per day'], ['work', 11], ['eat', 2], ['commute', 2], ['watch tv', 2], ['sleep', 7] ]); var options = { title: 'my daily activities', backgroundcolor: '#ddd', chartarea: {width:500,height:200} }; var chart = new google.v

xhtml2pdf does not show image always -

i use xhmtl2pd tool convert html pdf. here piece of html <tr> <td style="width:10px;vertical-align:top">&bull; </td> <td style="padding:0 0 5px 0;width:200px;display:inline-block"> blah blah <br/> <img src="images/little-gray-arrow.png" height="10" width="11" alt="blah" /> </td> </tr> the bizarre thing if remove br tag image of little-gray-arrow.png never shows up. put br tag back, image shows in "next" line. have tried options, padding, margin, , none works. i try inline-displaying image between text, , image clock.png bottom half cut off, regardless tried. <tr> <td style="width:10px;vertical-align:top">&bull; </td> <td style="padding:0 0 5px 0;width:200px;"> wait <img src="images/clock.png" height="20" width="2

c# 3.0 - How to Send automatic emails like newsletter -

i see question closed administrator similar question. try explain in detail solution i'm looking for: first i'm trying develop windows console application. sending frequency: monday friday how many users: 5 20 format of data: table rows countries , columns different types of products , cells represent sale of country-product limitation: service users prefer not use pdf or excel or attachment of type should html format possible show in body of mail currently creating report artisan like: ..... var mystringbuilder = new stringbuilder("<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">"); mystringbuilder.append("<html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\">"); mystringbuilder.append("</head><body>"); mystringbuilder.appendline(); mystringbuilder.append("<table style=\"font-family: calibri; text

mysql how to replace part of a string that contains quotes -

i have table field called " params " values (they different 2 names below same): {"lots_of_stuff,"frameborder":"0",lots_of_stuff,"pageclass_sfx":"",lots_of_stuff} i need script change "frameborder":"0" "frameborder":"1" , "pageclass_sfx":"" "pageclass_sfx":"1". please note not fields in params have this. you can use mysql's replace function: update tbl set value = replace(replace(value, 'pageclass_sfx":""', 'pageclass_sfx":"1"'), 'frameborder":"0', 'frameborder":"1') result | value | -------------------------------------------------------------------------------------- | {"lots_of_stuff,"frameborder":"1",lots_of_stuff,"pageclass_sfx"

java - Applet Not Initialized -

i trying make java applet on eclipse print array of bars of random lengths, sort them length , print new array. however, when run program, says applet not initialized. code below. can me? thank much! import java.awt.*; import java.awt.event.actionevent; import java.awt.event.actionlistener; import java.util.random; import java.applet.applet; public abstract class proj1_1 extends applet implements actionlistener { private static int[] numbers = new int[10]; public void init() { button startbutton = new button("sort"); startbutton.addactionlistener(this); add(startbutton); setsize(300,300); setvisible(true); } public void paint(graphics screen) { numbers = proj1_1.myrandom(numbers); int i; (i = 0; <= numbers.length - 1; i++) { screen.fillrect(20, 20 + 10 * i, numbers[i] + 30, 6); } } public static int[] m

xslt - Read attributes of element and replace part of string in the attribute based on some criteria -

i have problem in creating xsl transformation below case: <text> <data> <object class="centre" name="country-1/centre-1/rty-1" version="1"> <p name="map">20</p> <p name="required">0</p> </object> <object class="left" name="country-1/left-1/rty-1" version="1"> <p name="map">20</p> <p name="required">0</p> </object> <object class="right" name="country-1/right-1/uio-1" version="1"> <p name="map">20</p> <p name="required">0</p> </object> </data> </text> in above snippet have to: find element class attribute centre and replace centre side in class attribute value , sub string replace name attribute value country-1/ centre -1/rty-1 country-1/ side -1/rty-1**. rest elements sh

memory - Creating a separate log for each Passenger process in a Rails app -

i'm trying determine cause of high app server instance memory usage , need separate log each running passenger process (e.g., production_18204.log). there simple way configure in rails app? thanks. to log memory used process in each request use following code. def log_memory_usage mem_usage = `ps -o rss= -p #{ process.pid }`.to_i if logger logger.info("[memory usage]: #{ number_to_human_size(mem_usage) } | pid: #{ process.pid } | controller: #{ controller_name } | action: #{ action_name }") end end use before action in base or application controller. include actionview::helpers::numberhelper make number_to_human_size work. courtesy: https://github.com/binarylogic/memorylogic

ios - my chat system looks a little wierd, cant get dynamic height for cell -

Image
ive got chat system in app, , im attempting make dynamic cells have dynamic height according how text in cell, pretty common thing people try do, cant get mine working properly. also messages align right, sender supposed on left , reciever should on right... heres have done storyboard. created tableview 2 dynamic prototypes , inside uiviewcontroller here viewcontroller that... each cell has label, 1 left 1 right, whole right , left thing work... heres issue. pulling right all, if isnt happening , else overruling. heres ss. so have 2 issues... text wont have multiple lines... along wont dynamic height, also... if can point me right dirrection getting sender , reciever show on different sides. - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { nsarray *mywords = [[getmessage objectatindex:indexpath.row] componentsseparatedbystring:@":oyr4:"]; if (mywords[1] == [myclass str]){ static nsstring *

iphone - Cannot determine between plist and sqlite3 -

Image
i have been debating between .plist , sqlite3 database hold data need access, not manipulate within .plist/database. here question. lets want store height , color of trees, flowers, bushes , want each piece of information accessible. below similar like: trees palm 6 feet green willow 8 feet brown bushes evergreen 5 feet green cinquefoil 2 feet yellow flowers rose 1 foot red tulips 2 feet yellow so if want individually access 2 feet height under tulips , display in text box in app..what best form of data store/resource use. .plist or sqlite? how lay out .plist? always, appreciate time , efforts!! thanks! since dont have data use .plist easier manage make each parent trees,flowers,bushes , array make each child item dictinary , when check if child satisfies requirement 2 feet height under tulips use it. create plist this: code sample: note:i didnt test need improve you can use kind of logic here check color,kind or height. i giving example p

Java error: cannot find symbol, and can't figure out why -

error: error: cannot find symbol what appears doesn't works: if write: "invoervakhandler extends boven" error disapears endless loop , in end program crashes , says stack overflow error. if try change "}" symbol class boven , place in end of text more error messages. question: have change in code make work? note: i'm new java , know there more posts 1 can't apply them code current limited understanding of java. if wants know: i'm using jcreator. what i'm trying make: i'm trying make simple. 1) fill in name in jtextfield, press enter , name should appear in jtextarea. after name in jtextarea jtextfield becomes empty can fill name , on there should appear list of names in jtextarea. (this i'm trying make) 2) push button kieswin make program choose random person list. 3) push button resetl reset program can make new list choose random winner it. part of code error appears: (from class invoervakhandler) strin

Is it possible to specify WebSphere classloader delegation mode in a WAR file? -

i'm working on app distributed war file. among our supported app servers websphere 7.0, 8.0, , 8.5. war file requires parent_last classloader delegation mode bundled libraries picked in preference was-provided versions. it's possible set classloader delegation mode web module in console when deploying it, , works fine. however, i'd ideally happen automatically avoid step customers perform. is there can add war file specify classloader delegation mode? this question , other places on web talk creating deployment.xml file, far can tell can placed in ear file, not in standalone war file. some information on websphere classloading can found here , here . try click servers > server types > websphere application servers > server_name i believe set server class loader server scope , apps deployed it, unless overwritten, follow. regards. further info here .

jquery - eq() working against its definition -

here code: console.log($("div:eq(x)"))//[object object] i dont understand why above code outputs object object ,even if supply y in place of x still works ,whatever supply still works. i'm beginner jquery, have made mistake or misunderstood? that x undefined. eq accept anything, thought index accept. i got trying accomplish this: for (var = 0; < 5; i++) { $("<div>helow</div>").appendto(document.body); document.write("</br>"); setinterval(waka,5000); } function waka(){ (var = 0; < 5; i++) { $("div:eq(i)") //i want select each div } } but each div not getting selected @ all. assumed i gets replaced numerical value. if think of $(param) function param being parameter. if call function function can return - doesn't have tell parameter invalid. when jquery interprets "div:eq(x)" can't find & returns empty instance of it

html - textarea should give an error in jquery -

this input comes , gives me beskede if such there no content in them, therein fashion, want "textarea" had set beskede visitor page. <form action="#" method="post" name="kontakt_box"> <br /> <label>navn<br /><input type="text" name="navn" class="new" placeholder="navn"> <span id="myhint">angive et navn</span></label><br /> <label>efternavn<br /><input type="tel" name="efternavn" class="new" placeholder="efternavn"> <span id="myhint">angive et efternavn</span></label><br /> <label>email<br /><input type="email" name="email" class="new" placeholder="email"> <span id="myhint">angive en e-mail</span></label&

javascript - Performance improvement of page where million records are present -

i need suggestion how improve performance of application, i'm developing mvc 3 asp.net application. controller , i'm pulling 50,000 records of type string, items i.e 50,000 added html div dynamically using jquery. $(div).append("<input type='radio' name='reporttype' id='" + item.item1 + "' value = '" + item.item2 + "'/>" + item.item1 "); i see there considerable amount of time taken while adding above radio button parent control i.e html div the parent html div has check box , on checking that, child box must selected. see there considerable amount of time checking items all these items in scroll viewer, there way improve user experience, loading data on scroll basis thing data virtualization of silverlight in html 5. i check items , drag on part of page, make browser non responsive mode. can provide me best user experience of these many records improve query performance yo

c# 4.0 - Error using foreign keys in entity framework -

i used foreign key after clicked delete button runs messagebox.show("error"); because foreign key after clicked delete button i not want insert table again gives same error, delete never can not insert or update table again gives same error, delete how problem solved code delete private void button1_click(object sender, eventargs e) { try { int del = convert.toint32(datagridview1.rows[datagridview1.currentrow.index].cells[0].value); t1 query = (from p in db.t1 p.id == del select p).firstordefault(); db.t1.remove(query); db.savechanges(); fill(); } catch { messagebox.show("error"); } } code insert try { db.t1.add(new t1() { names=textbox1.text }); db.savechanges(); //fill(); } catch {

timezone - How to use a custom time in browser to test for client vs server time difference -

i wrote little piece of code show server time in webpage. @ moment have 1 machine cannot test if code working. is there way tell browser use time configuration different 1 configured in os? have used plugins firefox test different locales, wonder if there similar options time tests. thanks. unfortunately, javascript aware of current time zone, set operating system. there no facilities let date object use different time zone in particular context. there libraries time zone conversions, won't asking. there "trick" can use though. browsers read system time zone when first started. if launch browser , then change time zone of computer, browser continue operate under old time zone. know google chrome on windows works way. tested ie10, picks new time zone. one other thing though, said showing server time in web page. how getting that? php? .net? else? server time has no bearing on client or browser time, unless happen on same machine - during dev

jQuery UI Menubar Phantom Submenu Issue -

i creating jquery menubar, , looking weird effect when mouse on top level menu item has submenu first item has sub menu. if mouse in , out (moving left , right on view menu item) 20 times, start see view>encoding sub-submenu moving more , more right. i can recreate issue modified version of menubar demo example. on firefox 20.0.1. see here: http://jsfiddle.net/njjgm/ i figure finding right edge of subsub menu , setting new left edge of same subsub menu position... if slow down opening or fix positioning math shouldn't have bug. i'm looking in jquery.ui.menubar.js file see if can adjust settimeouts, or fix subsub menu positioning not having luck. i'm looking @ (from jquery.ui.menubar.js line 262): __applymousebehaviorforsubmenuhavingmenuitem: function (input, menubar) { var menu = input.next( menubar.options.menuelement ), mousebehaviorcallback = function( event ) { // ignore triggered focus event if ( event.type ===

java - Jaxb XML Attribute -

i doing marshalling of java object xml using jaxb . had requirement create thing <link rel="self" href="test" /> how can done? annotations should use. any appriciated java class public class item { private string title; private int price; private string productlink; private string rel; public string gettitle() { return title; } public void settitle(string title) { this.title = title; } public int getprice() { return price; } public void setprice(int price) { this.price = price; } @xmlpath("link/@href") public string getproductlink() { return productlink; } public void setproductlink(string productlink) { this.productlink = productlink; } you can create link class annotated @xmlrootelement properties ( rel , href ) annotated @xmlattribute . the following tutorial acquainted jaxb (jsr-222) : http://wiki.eclipse.org/eclipse

symfony - Symfony2 SetSharedMaxAge HTTP caching -

this have: public function indexaction() { $response=new response(); $response= $this->render('ratingbundle:default:index.html.twig'); $response->setpublic(true); $response->setsharedmaxage(15000); return $response; } what's wrong it? when check app env response header see age:247 cache-control:max-age=0, must-revalidate=0, public, s-maxage=15000 but when check in browser.. see again age 0 loaded again right? how can set public all?

graphics - What is the best way to convert from a RectF to a Rect in Android? -

i convert rectf rect in android. have: rectf rectf = new rectf(); rectf.set( ... values ... ); ... rect rect = new rect((int)rectf.left, (int)rectf.top, (int)rectf.right, (int)rectf.bottom)); is there better way? ah ha -- found answer: rectf.round(rect); -- or -- rectf.roundout(rect);

c# - Models / Entities vs complex types -

i have problem understanding complex data types vs entities in asp mvc , c#. started creating following type, not meant entity (db table): public class period : iperiod { public datetime { get; set; } public datetime { get; set; } } i added type model: public class event { public int id { get; set; } public string title { get; set; } public period eventtime { get; set; } } this worked fine. seemed understand period complex type, not entity. added columns eventtime_from , eventtime_to event table. however, added complexity period type removing interface, moving class different namespace , adding methods class. suddenly, when trying rebuild database, interpreted entitytype, throwing exception missing primary key. what system here? when classes seen complex types, , when seen entities? it hard going on without knowing changes made can tell ef explicitly period complex type either marking complextype attribute or using fluent mapping: modelb

Default plugins errors after upgraded to Grails 2.2.2 from 2.2.0 -

after upgrading 2.2.0 2.2.2 i'm getting following errors when run grails: 2013-05-08 16:23:34,957 [localhost-startstop-1] debug support.pluginawareresourcebundlemessagesource - not resolve resources plugin resources-1.1.6 message: class path resource [web-app/file:/users/charlie/.grails/2.2.2/projects/gpa/resources/plugins/resources-1.1.6/grails-app/i18n/] cannot resolved url because not exist line | method ->> 70 | getobject in org.grails.datastore.gorm.bean.factory.abstractmappingcontextfactorybean - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 109 | postprocessbeanfactory in org.grails.datastore.gorm.plugin.support.persistencecontextinterceptoraggregator | 303 | innerrun . . . . . . . in java.util.concurrent.futuretask$sync | 138 | run in java.util.concurrent.futuretask | 895 | runtask . . . . . . . in java.util.concurrent.threadpoolexecutor$worker | 918 | run in ''

angularjs - angular.js and require.js - how to navigate? -

i'm experimenting angular.js , require.js. i'm trying simple login form module. project based on https://github.com/partap/angular-requirejs-seed project. so, have routes: angular.module('app', []) .config([ '$routeprovider', function ($routeprovider) { $routeprovider.when('/auth', { templateurl : 'forms/auth.html', controller : ... }); $routeprovider.when('/account', { templateurl : 'forms/account.html', controller : ... }); $routeprovider.otherwise({ redirectto : '/auth' }); }]); so when application starts navigates #/auth. ok. auth controller created follows: define([ 'angular' ], function (angular) { return function ($scope) { ... here ... ... , redirect /account if credentials valid ... }; }); everything goes until redirection - t