Posts

Showing posts from June, 2014

PHP-jQuery Displaying items properly -

i have problem. want display every "subject" (titles) in page , not first 1 now. when add new message, index displays first one, , when click on "open" button can see messages. any suggestion? many thanks. this de code: <?php require_once("config.php"); if (isset($_session['username']) === false){ header('location:login.php'); exit(); } $where = ""; $searchcriteria = ""; if (isset($_get['search']) && $_get['search'] != '') { $searchcriteria = mysql_real_escape_string($_get['search']); $where = " subject '%" . $searchcriteria . "%'"; $where .= " or message '%" . $searchcriteria . "%'"; } $sql = "select * notes " . $where . " limit 30"; $result = mysql_query($sql); ?> <!doctype html> html> <head> <meta http-equiv="content-type" content="te...

java - How to match any integer in hibernate? -

to match string table , use restrictions.like("fieldname","%") . how achieve same when matching field integer? restrictions has many methods eq, ge,gt,le, lt, in you can use 1 above depending on contition check. refer api doc

openid - Switched for Federated Login in App Engine, now users must login every few hours -

i switched google accounts api federated login today , users reporting must login every few hours now, before logged in permanently. is there can extend time users logged in when using federated login? somebody suggested increase cookie expiration 1 or 2 weeks , should solve issue. come , delete answer if not.

jquery - Ajax call throwing an error but I see response on Fiddler -

my page using ajax call username. see response in fiddler still throws error. here code: $.ajax({ type: "post", url: "selection.aspx/getuser", data: "{}", contenttype: "application/json; charset=utf-8", datatype: "json", success: function (response) { var username = response.d; if (username.indexof("error") > 0) { jalert(username); } else { if( username!= "" ) { $("#maincontent_lbluser").text(username); } } }, error: function (xhr, status, error) { if (xhr.responsetext != "") { var err = eval(...

jquery - jqxgrid aggregates 'sum' ,replace dollar to an other symbol -

Image
i used jqxgrid of jqwidgets, works well, when use aggregates special column used statistics total cost, want replace $ in front of number other symbol, searched long time on google, still not fixed problem. can me? in advance here piece of girds' snapshot: get script, var getlocalization = function () { var localizationobj = {}; localizationobj.currencysymbol = "your symbol "; return localizationobj; } then during grid initialization: $("#jqxgriddata").jqxgrid( { width: 850, height: 250, localization: getlocalization(), ... ... } hope help, jms

drools - How to get output result from guvnor rule in java code -

i uploaded patient model jar on guvnor, class has name , result field. i created rule in guvnor insert result "pass" whenever name has particular value: code of rule below: rule "isjohn" dialect "mvel" when patient( name == "john") patient fact0 = new patient(); fact0.setresultstring( "pass" ); fact0.setname( "patient: john" ); insert( fact0 ); end below java code call rule. knowledgebase knowledgebase = readknowledgebase(); statefulknowledgesession session = knowledgebase.newstatefulknowledgesession(); patient patient = new patient(); patient.setname("john"); system.out.println("patient.name "+patient.getname()); session.insert(patient); session.fireallrules(); system.out.println("************patient.name "+patient.getname()); system.out.println("patient result string "+patient.ge...

ios - Crashing application on ios7 with DT set to iOS5 ( UIKeyAutomaticallyAdjustsScrollViewInsets -is not an integer number) -

had such issue: there 2 storyboards in project - ipad , iphone. deployment target set ios 5. when try run on ios7 using ipad-simulator app crashes message - [nskeyedunarchiver decodeint32forkey:]: value key (uikeyautomaticallyadjustsscrollviewinsets) not integer number the strange thing iphone simulator runs well. storyboard settings set to: 1)opens in xcode5 2)builds project dt 3)views ios 7 , later. 4)xcode 5 dp4. in storyboard select view / navigation controller , view controller layout make sure adjust scroll view insets checked.

r - How to subset SpatialGrid using SpatialPolygon -

Image
i trying subset spatialgrid 1 polygon present in class spatialpolygons . how can this? i tried way: grd.clip <- grd[!is.na(over(grd, polygon))] but error error in matrix(idx, gr@cells.dim[2], gr@cells.dim[1], byrow = true)[rows, : (subscript) logical subscript long i've tried way turn out not desired solution. i'll keep here illustrate original idea i'll willing delete if necessary the solution initial question still not clear me i'll make better if necessary library(sp) library(rgdal) library(raster) library(latticeextra) load shapefile shp <- readogr(dsn = "d:/programacao/r/stackoverflow/17962821", layer = "shp") proj4string(shp) create grid topology grid <- gridtopology(cellcentre.offset=c(731888.0,7457552.0), cellsize=c(16,16),cells.dim=c(122,106)) grid <- spatialgrid(grid, proj4string=crs(proj4string(shp))) convert spatialgrid rasterlayer rgrid <- raster(extent(grid)) ...

javascript - passing variable value to href argument in anchor tag -

how pass variable value href argument in anchor tag. <body> <script> var id = "10"; $('a_tag_id').attr('href','http://www.google.com&jobid='+id); </script> <a id="a_tag_id">something_here</a> </body> i want anchor tag after above code executed. <a href="http://www.google.com&jobid=10">something_here</a> but somehow above code not working. there wrong doing? you have miss # in jquery selector, , insert code inside document.ready make script work when page ready try this: <script> $(document).ready(function(){ var id = "10"; $('#a_tag_id').attr('href','http://www.google.com&jobid='+id); }); </script> demo

xpath - what is the significance of "." in xslt -

i new xsl , got stuck @ piece of code. can please me understand below code , "." stand for. here code: <xsl:apply-templates select="."/> thanks help! "." in xslt (and xpath) represents "context node" (or in 2.0, "context item"). important concept understand, , should reading because short paragraph can't explain it. essentially, constructs change context: example, when xsl:apply-templates on particular node, in selected template, node context node. when xsl:for-each, each selected node becomes context node in turn. relative path expressions such foo/bar navigate starting context node, , "." selects context node itself.

postgresql - Complex SQL query with multiple tables and relations -

in query, have list pair of players playerid , playername play exact same teams.if player plays 3 teams, other has play exact same 3 teams. no less, no more. if 2 players not play team, should included. query should return (playerid1, playername1, playerid2, playername2) no repetition such if player 1 info comes before player 2, there should not tuple player 2 info coming before player 1. for example if player plays yankees , redsox, , player b plays yankees, red sox, , dodgers should not them. both have play yankees, , red sox , no 1 else. right query finds answer if players play same team. tables: player(playerid: integer, playername: string) team(teamid: integer, teamname: string, sport: string) plays(playerid: integer, teamid: integer) example data: player playerid playername 1 rondo 2 allen 3 pierce 4 garnett 5 perkins team teamid teamname sport 1 celtics basketball 2 lakers...

jsp tags - How to get the domain name in JSTL? -

in jsp, want current domain name. how can using jstl ? eg., if user browsing through site 'www.somesite.com', want display domain 'www.somesite.com' in jsp. how ? can request object ? or, there other way ? <c:out value="${pagecontext.request.servername}" />

VB.NET printing several ,pdf-files in background to specified printer -

i need print several pdf-documents specific network printer. have in specific order. should preferably go on in background. have created vb.net program reads names of pdf documents in correct order excel sheet , works fine, problem getting them printed out. suggested itextsharp library, cannot find documentation explains how open .pdf-file, add pdf's , print. please help! brgds iver in oslo itextsharp cannot print pdf files. can use adobe reader print files, see question more details: adobe reader command line reference , or can use 3rd party library printing pdf files, solution might cost money.

delphi - Get name of object clicked -

i have bunch of tcubes made @ runtime inside viewport3d. know if 1 clicked on. , if return name of tcube. small example of talking about. procedure blockclicked; begin //get name of block //checkmode ( add , delete, other) //get name of block x, y, , z //do other stuff end; procedure tform1.cubeclick(sender: tobject); var cube: tcube; begin // senders points cube clicked cube := sender tcube; end;

jquery - JavaScript Historic back/forward -

i'm building little coffeescript application 10 buttons , container (simple). when user press on 1 of button : container change. the buttons navbar , instead of using links (that reload entire page), used javascript (coffeescript, jquery or whatever) change content of page (with ajax query load data). the problem , forward button of browser can't work solution... , need find solution that. routing maybe ? i way asana.com resolved issue: address change content seems not entirely reloaded. what suggest ? help hashes. simplest solution define url hash every time user clicks on button. example: location.href = "#" + button.id; with that, create history entry, , user can press or forward in browser. but how can check when happens? there's hashchange event: window.onhashchange = function() { var state = location.hash.substring(1); // chomps initial # ... }; basing code on state variable, can trigger ajax calls there. by way, ca...

java - mouse location and graphics painting -

this program suppose shift 2 rectangles 10 points right each time click on screen @ x coordinate 300 or greater, doesn't, whats problem? import javax.imageio.imageio; import javax.swing.*; import java.awt.*; import java.awt.event.actionevent; import java.awt.event.actionlistener; import java.awt.event.mouseevent; import java.awt.event.mouselistener; import java.io.ioexception; /** * created intellij idea. * change template use file | settings | file templates. */ public class mastermind extends jcomponent implements actionlistener,mouselistener { //private mouseevent me; private int screenx=0; private int screeny=0; private actionevent e; private int xx=10; public mastermind() throws ioexception { } public static void main(string [] args) throws ioexception { jframe window = new jframe("master mind"); mastermind game= new mastermind(); window.add(game); window.pack(); window.setlocat...

xml - FlowDocument to HTML transformation - how do I select the foreground color in XSLT? -

i have adapted , extended xslt this answer this: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl x"> <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/> <xsl:template match="x:section[not(parent::x:section)]"> <div> <xsl:apply-templates select="node()"/> </div> </xsl:template> <xsl:template match="x:section"> <xsl:apply-templates select="node()"/> </xsl:template> <xsl:template match="x:paragraph"> <p> <xsl:apply-templates select="node()"/> </p...

html - How can I get the availability status from an location my using php selected form ical - database? -

i working in organization , 1 seminaryroom available other organizations too. need show other organizations in website, if room reserved or not. information can selected ical database, how can them? please me ical._______.com/principals/locations/_____sog1sr/ ical._______.com/principals/__uids__/4b2f63d6-1906-4115-a9c9-dc888e53a44d/ that 2 links have same content, ical database! my question is, commend can informations? if add /calendar-proxy-read, come same page thats db shows me: collection listing name size last modified mime type calendar-proxy-read/ ? 2013-jul-31 12:20 (collection) calendar-proxy-write/ ? 2013-jul-31 12:20 (collection) properties name value {dav:}acl (access forbidden) {dav:}acl-restrictions <?xml version='1.0' encoding='utf-8'?><acl-restrictions xmlns='dav:'/> {dav:}alternate-uri-set <?xml version='1.0' encoding='utf-8'?><alternate-uri-set xmlns=...

css - Why position: relative; places background elements their existent on front? -

.main-column h2 { padding-top: 110px; padding-bottom: 110px; background: url('someimagehere.png') no-repeat center top; margin: 0 auto; position: relative; /*so image stays on top.*/ } .text-column { width: 215px; background-color: yellow; margin-top: -120px; /*so enters inside h2*/ padding-top: 120px; margin-left: auto; margin-right: auto; } <div class="main-column"> <h2>hello tittle 1</h2> <div class="text-column"> <p>i'm on column 1 , it</p> <p>i'm on column 1 well</p> </div> </div> this works, don't it. why given "position: relative" h2, place background image there visible, on top of other element yellow background color? again, code works. i'm asking on understanding behavior. please advice using position:relative or position:absolute or position:fixed allows use z-index value determine orde...

Convert jquery to javascript code -

if can, please advise me how to: i need convert nice script, pure javascript without jquery. very important! selection area need keep aspect ratio. http://www.script-tutorials.com/html5-image-crop-tool/ well, don't know why need need use html dom / mouse events instead of jquery events: object.onmousemove object.onmouseup object.onmousedown also need use inmediate function instead jquery document ready shortcut $(function(){...}) : (function(){ // ... code goes here })()

javascript - Replace the "click" to "onload" -

how can replace "click" in code click when page load "onload" $(document).ready(function() { $("#submit").click(function() { request(); return false; }); $("#website-form input").keypress(function(e) { if (e.keycode == 13) { e.preventdefault(); request(); return false; } }); }); i try this: $("#submit").trigger('click')(function() { but got error: uncaught typeerror: object not function please help $("#submit").trigger('click')(function() { invalid statement. $("#submit").trigger('click') returns jquery object referencing #submit element, not function reason error. you need $("#submit").trigger('click') manually trigger click handler

objective c - Exception raised- NSTextView delegate- textViewDidChangeSelection: notification -

i creating first mac app, text editor. document-based, , document.xib has nstextview. have made document class delegate of textview. implementing method: -(void)textviewdidchangeselection:(nsnotification *)notification { nsrange range=self.textview.selectedrange; nslog(@" %@ ",[[self.textview textstorage] attributesatindex: range.location effectiverange: &range]); i using method call inside nslog attributes of selected text , update notification method underline button(pressed or not). problem when app runs , press key exception raised: uncaught exception raised *** -[nsconcretetextstorage attributesatindex:effectiverange:]: range or index out of bounds i tried debugging @try: @catch: block , seems method above throws exception. if replace: range.location with (range.location-1) it throws exception when cursor @ index 0. does know happening? effectiverange not range used method d...

Send message through websocket using javascript -

i connecting websocket server using javascript , play framework. having trouble understanding proper way make use of websocket.send() method of websocket. $(function() { //depending on browser have use websocket or mozwebsocket var ws = window['mozwebsocket'] ? mozwebsocket : websocket; var websocket = new ws('ws://localhost:9000/websocket'); websocket.onopen = function() { websocket.send('test'); } //split message websocket type, user , text //uses nifty regular expression websocket.onmessage = function (event) { $('.output').append(event.data); } }); when use send() outside onopen event error because send() not available. thinking there must event dynamically execute send() without onopen event (afaik) executes when connection opens up. thanks! onopen correct event handler use handler used when connection ready used. the api docs show 4 event handlers onopen onmessage o...

How to disable change markers in PyCharm -

Image
where in settings can disable markers added/modified lines? you can configure in editor | colors & fonts | general | modified lines / added lines : this changes left gutter color, modify right stripe mark color go diff color settings , change color same stripe gutter background:

amazon s3 - Can I use transactional file remove/upload on AWS S3 with aws-sdk-ruby? -

i find activerecord::base.transaction effective in complex methods. i wondering if possible upload/remove files aws s3 within transaction like: s3object.transaction # write files # raise exception end after exception raised every action should rolled on s3. possible s3object ? although s3 api has bulk delete functionality, not support transactions each delete operation can succeed/fail independently of others. the api not provide bulk upload functionality (through put or post) each upload operation done through independent api call can succeed or fail. as result, ruby api client or other api clients can not provide transactional support s3 operations.

actionscript 2 - Flash AS2: Setting text of textfield through code causes some characters to be deleted -

i have following line of code set text of dynamic textfield: boxcopy.text = 'coming soon: 30th january 2014'; but when compile file, shows as: 'coming soon: 0th january 201' i have no idea why is. font character set contains numeric characters, should display it. anyone got ideas? thanks, stefan so figured out embedding font's lowercase, uppercase, numeric , punctauation charcters fixed problem. strange behaviour through because if typed dynamic textfield in scene view worked fine. thought i'd keep question here in case has same issue.

javascript - Mozilla form.submit() not working -

i creating dynamic form using following code, function createform() { var f = document.createelement("form"); f.setattribute('method',"post"); f.setattribute('action',"./upload"); f.setattribute('name',"initiateform"); f.acceptcharset="utf-8"; var name = document.createelement("input"); name.setattribute('type',"text"); name.setattribute('name',"projectname"); name.setattribute('value',"saket"); f.appendchild(name); f.submit(); } but in mozilla nothing happens code works expected ( in chrome). code being called function invoked button on click event. after executing code returning false. please me out. in advance :-) you need append new created form document, because not there on page load. try this: function createform() { var f = document.createelement("form"); ...

web services - error 404 due to mishandling of a war file, maybe? -

Image
i'm trying deploy java project on tomcat via war file, got 404-error when enter above url in favorite navigator. followed this tutorial . to deploy project, puted war file under ${tomcat}/webapp . here sun-jaxws.xml <?xml version="1.0" encoding="utf-8"?> <endpoints xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime" version="2.0"> <endpoint name="projetservices" implementation="com.bh.services.service" url-pattern="/service"/> </endpoints> web.xml <?xml version="1.0" encoding="utf-8"?> <!doctype web-app public "-//sun microsystems, inc.//dtd web application 2.3//en" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"> <web-app> <listener> <listener-class> com.sun.xml.ws.transport.http.servlet.wsservletcontextlistener </listener-class> </li...

How Can I arrange these files into Spring MVC structure -

here mainapp.java package spring.pac; import java.util.list; import org.springframework.context.applicationcontext; import org.springframework.context.support.classpathxmlapplicationcontext; public class mainapp { public static void main(string[] args) { applicationcontext context = new classpathxmlapplicationcontext("beans.xml"); studentjdbctemplate studentjdbctemplate = (studentjdbctemplate)context.getbean("studentjdbctemplate"); system.out.println("------records creation--------" ); studentjdbctemplate.create("zara", 11); studentjdbctemplate.create("nuha", 2); studentjdbctemplate.create("ayan", 15); system.out.println("------listing multiple records--------" ); list<student> students = studentjdbctemplate.liststudents(); (student record : students) { system.out.print("id : " + record.getid() ); ...

ios - Pass Integer to another UIView -

i'm trying pass integer variable 1 uiview another. basically, have 2 uiview controllers set up. first uiviewcontroller has integer called "page" , seconds uiviewcontroller has integer called "page_num". what trying pass variable int "page" int "page_num". following error: property 'page_num' not found on object of type 'imageviewer *'.... here code (header file): imageviewer *seccondata; @property (nonatomic, retain) imageviewer *seconddata; here code (implementation file): imageviewer *screen = [[imageviewer alloc] initwithnibname:nil bundle:nil]; self.seconddata = screen; seconddata.page_num = page; screen.modaltransitionstyle = uimodaltransitionstylecrossdissolve; [self presentviewcontroller:screen animated:yes completion:nil]; what doing wrong? code have shown above worked when wanted pass nsstring 1 uiviewcontroller another. imageviewer *screen = [[imageviewer alloc] initwithnibname:nil bund...

extjs4.2 - Extjs 4.2 attach an handler to a panel tool do not work -

here doing: ext.define('ng.view.taxinvoice.widget', { extend: 'ng.code.portal.portlet', alias: 'widget.taxinvoicewidget', layout: 'card', tools: [{ type: 'gear', scope: this, callback: 'ongeartoolclick' }], items: [{ xtype: 'taxinvoicelist' }, { html: 'taxinvoicegraph' }], ongeartoolclick: function (panel) { alert('1111') not invoked! } }); the alert statement never fired... can tell me why? update ok way worked using accepted answer @kevhender this: ext.define('ng.view.taxinvoice.widget', { extend: 'ng.code.portal.portlet', alias: 'widget.taxinvoicewidget', layout: 'card', items: [{ xtype: 'taxinvoicelist' }, { html: 'taxinvoicegraph' }], initcomponent: function () { this.tools = [{ type: 'gear', scope: this, ...

Adding items to jQuery array using push on click -

link this kind of thing have, , push , splice working marvellously. want add(push) items when click on sort of button. like: button click... data.items.push(anything)... , appears in list (the array using list). link enter move , type input boxes , click button, add movie , type , unique id in object. var data = {items: [ {id: "1", name: "snatch", type: "crime"} ]}; $('button').on('click',function(){ var name = $('#name').val(); var type = $('#type').val(); var id = parseint(data.items[data.items.length-1].id)+1; data.items.push({"id":id.tostring(), "name":name,"type":type}); console.log(data); }); demo

AngularJS 'ng-filter' is very slow on array of ~1000 elements -

i have simple <input> search filter set list of itemnames in angularjs . my list looks this: var uniquelists = { category1: ['item1', 'item2', 'item3' ... 'item180' ], // real list contains ~180 items category2: ['itema', 'itemb', 'itemc' ... 'itemzzz' ], // real list contains ~1080 items category3: ['otheritem1', 'otheritem2', 'otheritem3' ] // real list contains 6 items } i iterate through list in angular , print out results in <ul> each category. <div ng-repeat="(key,val) in uniquelists"> <form ng-model="uniquelists[index][0]"> <input ng-model="searchfilter" type="text" /> <ul> <li ng-repeat="value in val | filter: searchfilter"> <label> <input type="checkbox" ng-model="...

java - Get current host in XmlAdapter -

is there way of retrieving current base uri in xmladapter? or how archieved? public class service{ ... @get public myentity getentity() { return em.find(myentity.class, "dummy"); } ... } @xmlrootelement(name = "myentity") public class myentity { @xmljavatypeadapter(myadapter.class) private entity2 entity2ref; ... } public class myadapter extends xmladapter<entity2ref, entity2> { // null shold injected host uri @context uriinfo uri; ... } below complete example of how done: xml response below going demonstrate how following response uri in address element put in via xmladapter aware of uriinfo . <?xml version="1.0" encoding="utf-8"?> <customer id="1"> <name>jane doe</name> <address>http://localhost:9999/address/123</address> </customer> java model below java model use example. customer by default contents of addres...

c++ - CUDA C - library error from cutil.h to helper_cuda.h -

i have project developed in c, on cuda 4.0. try compile on cuda 5.0 have problem cutil.h, have changed cutil helper_cuda.h , receive error always: in file included /path/to/helper_cuda.h:24 and /path/to/helper_string.h:18: fatal error: fstream: no such file or directory fstream c++ library, how can compile without have error? sorry english :d my suggestion: load cuda 4.0 sdk on cuda 5.0 setup build cuda 4.0 sdk using cuda 5 toolkit (nvcc, etc.) now include same header files , link against same libraries (that built) correspond cutil arrangement cuda 4.0 sdk. helper_cuda.h not drop-in replacement cutil.h discovering. likely, if worked past fstream issue, might run one, depending on components out of cutil project using.

bash - Missing something in the linux terminal after launching matlab from the command line -

Image
i'm having weird behaviour when launching matlab command line in linux. i've bash script in linux execute function in matlab command line , other operations custom functions written in c++ follows: #!/bin/bash # prepare input data sure has not been written other test! matlab2011a -nodesktop -nosplash -r "prepare_data_matlab( 'a' ); quit" # launch c++ program ... # prepare more data matlab2011a -nodesktop -nosplash -r "prepare_data_matlab( 'b' ); quit" when script finished can not see i'm writing in terminal, although commands have effects. need reset terminal. the fact works fine if launch matlab prepare_data_matlab( 'a' ) problem comes when execute function option prepare_data_matlab( 'b' ) . i have commented line line , found problem option b call function dlmwrite(file_name, b, ' '); which not used in prepare_data_matlab( 'a' ) . so, how should execute matlab command line avoid beh...

java - SolrJ doesn't catch SolrExeption -

i'm using solrj add docs solr index. see log solr throws exception when debugging response solrj doesn't solr failing. there way me error in solrj (error type: org.apache.solr.common.solrexception)? thanks if using concurrentupdatesolrserver (solrj 3.6 , later) or streamingupdatesolrserver (3.6 , earlier), there no error handling update requests. update requests succeed , return immediately, whether solr there accept them or not.errors logged that's it. happens because requests sent solr background threads. if need exception handling, use httpsolrserver (commonshttpsolrserver in older releases) instead. concurrent/streaming objects trade error handling built-in threading. httpsolrserver threadsafe, not use multiple threads internally, need handle indexing simultaneously muitiple threads in own application. nb: might confused fact 3.6 listed above both objects. isn't typo - old object types deprecated in 3.6.0 , removed in 4.0.0.

php - cakephp how to log events -

i want log events across multiple controllers , store them in 'actions' database. need have actions class/controller because need id action object after has saved. what best way of doing can run method across controllers add new action database? $this->action->log($array) ; many thanks you should use component that. components objects can used across controller (as long include in controller's $components property, or in of appcontroller). for example, if have experience auth in cake, that's component, , methods can called controller. more info components here: http://book.cakephp.org/2.0/en/controllers/components.html if need more help, feel free try , write component , come problems might have.

ruby on rails - redmine icalender export plugin -

i trying install redmine icalendar export plugin( https://github.com/planio/redmine_icalendar_export ) , plugin require icalendar, tried install using "gem install icalendar" . after installation calender part stopped working , showing error "internal error error occurred on page trying access." in log file getting following error: actionview::templateerror (no route matches {:action=>"index", :status=>"all", :controller=>"calendar", :assigned_to=>"*", :format=>"atom", :project_id=>#<project id: 3, name: "test project", description: "", homepage: "", is_public: true, parent_id: nil, created_on: "2013-01-08 06:03:05", updated_on: "2013-02-16 04:02:42", identifier: "testproject", status: 1, lft: 5, rgt: 6>, :key=>"268944ce53edddhsjhhgyuh57678dff5f3a0db719323c"}) on line #5 of vendor/plugins/redmine_icalendar_expor...

jquery - Colorbox fill all framesets -

i've been looking way solve problem can't seem find it... have following index.html frameset: <html> <head> <script src="js/jquery-1.9.1.js"></script> <script src="js/jquery-ui-1.10.3.custom.min.js"></script> <script type="text/javascript" src="js/jquery.colorbox.js"></script> <link href="js/colorbox.css" rel="stylesheet" type="text/css" media="screen" /> <script> function mycallforcolorboxfunction(html){ alert('done'); $.colorbox({title:'aniversariantes',inline:true, href:"#colorbox_content", width:"600px", height:"500px"}); } </script> </head> <frameset rows="100,70,*" frameborder="1" framespacing="2"> <frame src="cre.html" name="superior" marginwidth="0" frameborder="0" marginheight="...

razor - ASP.NET MVC One to Many Database Table Values with List Attribute -

my first table is: first table name: contacts contactid (pk) firstname lastname company second table name: phones contactid (fk) phonetype phonenumber my view model is public class contactvm2 { public int contactid { get; set; } public string firstname { get; set; } public string lastname { get; set; } public string company { get; set; } public string phonetype { get; set; } public string phonenumber { get; set; } } repository class is public class contactrepository { contactsdbentities dbrepo = new contactsdbentities(); public list<contactvm> getallcontacts() { list<contactvm> contactviewlist = new list<contactvm>(); var allcontacts = dbrepo.contacts.tolist(); var allphones = dbrepo.phones.tolist(); foreach (var cont in allcontacts) { foreach (var ph in allphones) { if (cont.contactid == ph.contactid) { ...

junit - Performant way to check java.lang.Double for equality -

what performant way check double values equality. i understand that double = 0.00023d; double b = 0.00029d; boolean eq = (a == b); is slow. so i'm using double epsilon = 0.00000001d; eq = math.abs(a - b) < epsilon; the problem infinitest complaning tests taking time. it's not big deal (1 sec top), made me curious. additional info a hard coded since it's expected value, b computed by // fyi: current = int, max = int public double getstatus() { double value = 0.0; if (current != 0 && max != 0) value = ((double) current) / max; return value; } update java.lang.double way public boolean equals(object obj) { return (obj instanceof double) && (doubletolongbits(((double)obj).value) == doubletolongbits(value)); } so 1 assume best practice. junit has method of checking double 'equality' given delta: assert.assertequals(0.00023d, 0.00029d, 0.0001d); see this api doc...