Posts

Showing posts from March, 2013

How to add a post build step for maven release in Jenkins? -

i want copy files in post build step when maven release gets performed. unfortunately, there no actions (such post build step or pre build step) on clicking perform maven release link in jenkins. there jenkins release plugin searching. it's additional jenkins plugin plugin "maven release". the release plugin adds pre/post build configuration dialog build enviroment configuration dialog. can enabled checking checkbox "release build configration".

php - ImpressPages 4 : upload photo auto-rotate -

i'm on ip 4.1.1. want upload photo (for photo or gallery widget example). take portrait photo (jpg) on pc when upload it, in landscape format... i try use read_exif_data , imagerotate (like in post : php read_exif_data , adjust orientation ) doesn't work. an idea? in advance , have nice day :) at first talking end user "upload photo ...". ysing read_exif_data function , other stuff programming. if talking end user interface. photo landscape, has meta data how image has rotated before displaying it. in case rotate image on computer , reupload.

html - How to fix the alignment of my portfolio website? -

i'm new html , css , trying build first portfolio website. i'm having few difficulties , wondering if lead me in right direction. want navigation bar stay fixed scroll down page, doesn't move. body items aren't aligning properly. can't seem image, table, , objective align properly. what happen: the image far left of page, centered, , below navigation bar the table aligns right below image (wherever image is, table) p.s. table links social media accounts the objective right of page, next image lots of space between them the title above objective (wherever objective is, title) in conclusion: right of page should objective , title, , left of page should image , table problems i'm having: title hidden behind navigation bar table, image, , objective won't align properly any appreciated, thank you! html <!doctype html> <html> <head> <link href="stylesheet.css" rel="stylesheet" type="te

random even number in Objective-C? -

i know : randnum = arc4random_uniform(n); will set randnum random number 0 n - 1. however how can modify above statement random number 0 n - 1? it faster using bitwise operator, clear lowest bit @gallymon said. unsigned int evennumber = arc4random_uniform(n) & 0xfffffffe ;

destructor - Not able to find the point of object destruction in python -

before jump suggestions , let me write poc code similar case: class x: _instance=0 def _new__(): if cls._instance: #instance instantiated , return same instance return cls._instance cls._instance=initialize_instance() return cls._instance now library . client code works like: var = x() # operations on var . . . #end of program the problem facing when client code ends , function in library must executed (for cleanup purposes) . have tried close() , __del__() , both don't control when client program ends. ideally think should because instance destroyed. there other way can achieve without adding code client side? client make 1 call handle , let library deal everything. you haven't removed references x, because still have cls._instance reference. that's why del isn't getting called. you can wrap client object in context manager, , call whatever need call cleanup on exit method: class wrappe

tomcat7 - While connecting tomcatv 7.0.54 with Eclipse Luno, How to clear port collision error? -

i using windows 8 os. while connecting tomcat eclipse , have encountered following error. several ports (90, 80) required tomcat v7.0 server @ localhost in use. server may running in process, or system process may using port. start server need stop other process or change port number(s). i have tried recovery methods given in previous answers. but, still cant clear error. kindly guide me...... it may case there multiple instances if same tomcat running. can try restarting eclipse. , can terminate of java process task manager. @ last can try changing ports of tomcat, server.xml file. how change port of tomcat 8080 80?

to pass the html combobox value to php in same file without submit -

i want change combobox2 entry based on selection in combobox1.. want retrieve entries of combobox2 database , need in php. need pass selected value in combobox1 php php variable. tried lot... not yet got output. here code degree type<select id="select3" name="deg"> <option value="ug">ug</option> <option value="pg">pg</option> </select> department name<?php $host="localhost" ; $mysql_db="db" ; $mysql_u="root" ; $mysql_p="" ; mysql_connect( "$host", "$mysql_u", "$mysql_p"); mysql_select_db( "$mysql_db"); $sel="select dept_name dept_mast deg_type='???' "; $val=mysql_query($sel); $selectbox='<select name=\'userst\'>'; while ($row = mysql_fetch_assoc($val)) { $selectbox.='<option value=\"' .

java - Common onclick listner inside a dialog -

Image
i working on application managing daily expenses. need add feature , user can calculate sum of more expenses under 1 category. [simply when user wants add expense, (lets food) needs calculate expenses food , add total amount food category. to this, use button. when user tap button,a small calculator pops out.(using dialog). my problem is, want use common onclicklistner buttons inside dialog.how can it.? here code using protected void popupcalculator(){ final dialog dialog_cal = new dialog(newexpence.this); dialog_cal.settitle("calculator"); dialog_cal.setcontentview(r.layout.calculater); initialisebuttons(dialog_cal); dialog_cal.show(); } public void initialisebuttons(dialog d){ num0 = (button) d.findviewbyid(r.id.btn0); num1 = (button) d.findviewbyid(r.id.btn1); num2 = (button) d.findviewbyid(r.id.btn2); num3 = (button) d.findviewbyid(r.id.btn3); num4 = (button) d.findviewbyid(r.id.btn4); num5 = (button) d.fin

ios7 - I want to add a space in between a string in objective c -

- (ibaction)addspace:(id)sender { //here nospce textbox in enter value nsstring *one=self.nospace.text; if (one.length==4) //if length of string equal 4 should put whitespace //in between string. { nsstring *blank=@" "; nsstring *two=[blank. stringbyappendingstring:one,index(2)]; nsstring *new=two; //here withspace textbox in want show expected result self.withspace.text=new; } //this not work me nsstring *two=[blank. stringbyappendingstring:one,index(2)]; there's extraneous . after blank in method call. remove , index(2) , code should work better. your code improved using mutable string. use -insertstring:atindex: , avoid need intermediate strings. update: should change name of new variable. new name of method in nsobject, , reserved word in c++. using variable name should work, it's bound lead confusion in future.

playframework - PersistenceException: Error with [models.Task] It has not been enhanced but it's superClass -

i working 2 databases while saving data object in table getting following error: persistenceexception: error [models.task] has not been enhanced superclass [class play.db.ebean.model] has? (you not allowed mix enhancement in single inheritance hierarchy) marker[play.db.ebean.model] classname[models.task] i using 2 java classes 1 task.class , other userdetails.class: task.class : @entity @table(name="third") public class task extends model { @id @column(name="id") private int id; @column(name="name") private string username; public static finder finduser=new finder<string,task>(string.class,task.class); } and userdetails.class : @entity @table(name="userdetails") public class userdetail extends model{ @id @column(name="id") private int id; @column(name="username") private string username; @column(name="itemdetail") private string itemname;

javascript - Round integer number to 1 decimal -

Image
i using jquery knob , input value change through sliders. window.onload = function(){ var elements=document.queryselectorall('input[type=range]') for(var = 0; < elements.length; i++){ elements[i].addeventlistener('change',calcul , false); } } function calcul(){ var elements = document.queryselectorall('input[type="range"]') var len = 0 var buf = 0 for(var i=0;i<elements.length;i++) { if(elements[i].parentnode.parentnode.style.display != 'none'){ buf += parseint(elements[i].value) len++ } } buf = len === 0 ? 0 : buf/len document.getelementbyid("knob").value=buf; $("#knob").trigger("change"); } now want round "buf" variable 1 decimal, tried use tofixed , math.round.... cant work, can please me? edit:i used this, if use console.log goes well. buf = len === 0 ? 0 : buf/len; gem_cijfer = buf.tofixed(1); d

preg replace - PHP Complicated preg_match -

it's far reach have been experimenting both preg_match , preg_replace in effort extremely complicated. i trying take entire paypal button code , extract 13-digit button id number. have used preg_replace of unwanted characters out , expose code 1 line of jumbled mess. unfortunately extracted equals signs too-which assume need extract value= newly generated string. the second issue face, if can leave equal signs in string have created, there 2 values in paypal button form. now, somehow need ignore first value , grab second id need. the reason doing because paypal doesn't seem have way copy button id. instead generates code whole form , when click on it, automatically highlights whole form code not allowing highlight small portion want. having make simpler doesn't understand code copy form code, paste in form field , have website automatically grab id number use in script have written. so far, have this: <?php $string = ''; $res = preg_replace("/[

git - How to build only specific requirements -

we looking migrate cvs svn/git. but, before picking 1 svn/git question in mind i.e, for example: developers have 10 requirements. out of 10 requirements,developers worked on 6 requirements , requested build. r building 10 requirements. but, looking build 6 requirements excluding remaining 4 requirements. i came know that,it possible git. there alternative is possible? if so,how? you can dedicate branch in git monitored build scheduler (like jenkins git plugin ). (you can auto-create jenkins job new feature branch ) you can example git cherry-pick commit want apply on branch , see if build pass.

c# - What is the best use of a variable when required by multiple methods -

i'm using xmlmanager xml manipulations in several methods in class.where should declare xmlmanager variable ? 1.locally within each method , intialization. 2 declare @ globally , initiate @ method level as is, in question, there's absolutely no difference whatsoever because there's neither performance gain nor significant design issues. maybe if question put context there reason choose 1 approach on other, stands now. none of approach better other one

javascript - How to configure plugin.xml for IOS plugin upgrade from 2.x to 3.0 in cordova / phonegap -

Image
i trying use phonegap 2.9 plugin in 3.0 . making plugin.xml comply plugman. apart adding header , source file in plugin.xml (.m & .h ) instructions old plugin following (after jump) . question put in plugin.xml create outputlibrary folder mentioned below containing .a file ensure outputlibrary folder exists in folder structure under plugins. outputlibrary in xcode, must select “create folder references added folders” shown in figure 6. figure 6: adding outputlibrary plugins folder in xcode ensure include folder exists under outputlibrary folder in plugins. if not there add it, example, outputlibrary/include.  8. add following native file include folder under outputlibrary shown in figure 5. libattiosphonegapplugin.a first of all, on cordova 3.0 can still install plugins same way did on phonegap 2.9, manually. second, link plugin might help. about plugin.xml, add .a file should use framework option: <source-file src="pathtothelibfile/lib

java - Socket Exception - How to get original socket from Socket Exception object -

i have 1 method transfers data 1 socket another. whenever there problem either on socket need detect socket has caused socket exception. possible detect socket exception object ? not exception itself, can context. if code manipulates 1 socket, exception must relate socket. it sounds not handling exceptions @ appropriate level, instead handling (catching) low level exception @ high level part of program, , expecting able low level handling @ point. consider catching exception @ intermediate level, partially handling it, rethrowing it. might want exception translation (chaining) @ point.

Perl Read XML value -

Image
use strict; use warnings; use xml::libxml; $xml = xml::libxml->load_xml(io => \*data); $role ($xml->findnodes('//@role')) { print $role->value; } __data__ <?xml version='1.0'?> <employee> <name>smith</name> <age>43</age> <sex>m</sex> <department role='manager'>operations</department> </employee> above code returns "role = manager". how other values? example name . age , sex , department . edited use strict; use warnings; use xml::libxml; $xml = xml::libxml->load_xml(io => \*data); $employee ($xml->findnodes('//copy')) { print "name: ", $employee->findvalue('//body'), "\n"; print " role: ", $employee->findvalue('copyelement/@copyelementtype'), "\n"; } __data__ <?xml version="1.0" encoding="utf-8" standalone="no" ?> <copyconten

php - Simplify & Fix Regex -

i'm new working regular expressions , wondering if following regex somehow simplified... {{(?:[\s]+)?(.*)([\s]+)?}} i trying string out of following pattern... {{some_string}} {{ some_string}} {{ some_string }} {{ some-string }} {{ string }} additionally, doesn't quite work right there should not trailing spaces on match. regex101 link: http://regex101.com/r/kt9yt5 for direct match, use \k magic {{\s*\k[^}]+?(?=\s*}}) see demo. explanation {{\s* matches opening braces , whitespace characters the \k tells engine drop matched far final match returns the negated character class [^}]+? lazily matches characters to... the point lookahead (?=\s*}}) can assert follows spaces , closing braces. sample code see output @ bottom of live php demo . $regex = '~{{\s*\k[^}]+?(?=\s*}})~'; preg_match_all($regex, $yourstring, $matches); print_r($matches[0]); output [0] => some_string [1] => some_string [2] => some_s

javascript - is it possible using multiple controllers on one controller in angularjs? -

so let have multiple controller angular.module('myapp.controllers', []). controller('myctrl1', ['$scope', function($scope) { //define $scope.controller1 here $scope.controller1 = "controller1"; }). controller('myctrl1', ['$scope', function($scope) { //define $scope.controller2 here $scope.controller2 = "controller2"; }). controller('myctrl3', ['$scope', function($scope) { //i want property of $scope.controller1 , //$scope.controller2 here }); as can see above, example want access $scope property controller1 , controller2 3... the question is, angularjs capable of calling multiple controller on 1 controller ? in angularjs, scopes inherited based on position in dom. if html looked like: <div ng-co

c - Signal handler statement not printed -

while going through signals, found statement inside handler not printed. here code used: #include"stdio.h" #include"signal.h" #include"unistd.h" void handlersigint(int sig) { if(sig == sigint) printf("\nfinally caught sigint..."); } int main() { printf("hello ... u'll receive signal"); if(signal(sigint, handlersigint) == sig_err) { printf("error in sigint handling"); } while(1) sleep(1); /*now press control + c see effect */ return 0; } i got following output when run program : [root@node1 mytest]# ./a.out ^chello ... u'll receive signal ^cfinally caught sigint... ^cfinally caught sigint... ^cfinally caught sigint... ^z [1]+ stopped ./a.out my confusion : when first pressed "ctrl+c" didn't print message in handler i.e. "finally caught sigint..." .but second time started printing message. can explain why happenin

css - Stylus - selectors that are near: "+" operator -

unfortunately cannot working in stylus: .class1 + .class2 background: red it doesn't catch styles element. maybe i'm not aware of syntax? you can use css literals @css { .class1 + .class2 background: red }

if else condition not validating for mysql query in php mysql -

Image
hi have small problem execution of query using if else condition. have 2 tables i.e dashboard_widget , dashboard_widget_users , in both table store unserialize configuration.users configuration dashboard_widget_users table.but if configuration null take bydefault configuration dashboard_widget table.i want use if else condition , tried unable execute properly.the condition if(!empty($empty_config)) getting satisfied if empty not getting result.thank you. dashboard_widget_users table dashboard_widget table here php code: $query = "select dashboard_widget_users.configuration dashboard_widget_users inner join yw_user on dashboard_widget_users.dsnr_yw_user = yw_user.intern inner join dashboard_widget on dashboard_widget_users.dsnr_dashboard_widget = dashboard_widget.id dashboard_widget_users.dsnr_yw_user =10 , dashboard_widget.id =1 "; $result = mysql_query($query, $myconnection); if ($row = mysql_fetch_assoc($result)) { $empty_config=$row['

c - Freescale t4240qds: Serial Rapidio API -

i trying develope protocol stack.as have build kernel , enabled rapidio interfaces in t4240 board. can serial rapidio api freescale t4240qds board? you need download linux sdk qoriq processors. version 1.7 current release of writing. avalable here . need freescale.com account if don't have 1 already, free.

c# - Detect changes in iis logs files -

i running filesystemwatcher on "w3svc1" folder, iis logs stored default. when go adress localhost or of webapp localhost/xxxxx. filesystemwatcher not raise events. know there delay between request , writting in logs, after 1 hour there no change event raised. then, when open file notepad++, see logs added. has explaination. code: class program { static void main(string[] args) { filesystemwatcher watcher = new filesystemwatcher(); watcher.path = @"c:\inetpub\logs\logfiles\w3svc1"; watcher.notifyfilter = notifyfilters.lastwrite; watcher.includesubdirectories = true; watcher.filter = "*.log"; watcher.changed += new filesystemeventhandler(onchangedok); watcher.created += new filesystemeventhandler(onchangedok); watcher.enableraisingevents = true; console.writeline("press \'q\' quit sample."); while (console.read(

c - Synchronous mode of USART -

i working stm32f103 , want send , receive data synchronous mode of usart2. have question, how can set clock example 10 mhz usart? register? gpio_inittypedef gpio_initstructure; rcc_apb2periphclockcmd( rcc_apb2periph_gpioa | rcc_apb2periph_afio ,enable); rcc_apb1periphclockcmd(rcc_apb1periph_usart2,enable); gpio_initstructure.gpio_pin = gpio_pin_2; gpio_initstructure.gpio_mode = gpio_mode_af_pp; gpio_initstructure.gpio_speed = gpio_speed_10mhz; gpio_init(gpioa, &gpio_initstructure); gpio_initstructure.gpio_pin = gpio_pin_3; gpio_initstructure.gpio_mode = gpio_mode_ipu; gpio_init(gpioa, &gpio_initstructure); gpio_initstructure.gpio_pin = gpio_pin_4; gpio_initstructure.gpio_mode = gpio_mode_af_pp; gpio_initstructure.gpio_speed = gpio_speed_10mhz; gpio_init(gpioa, &gpio_initstructure); usart_inittypedef usa

Condition based spool generation in Oracle SQL script -

i have scenario generate spool based on condition. the spool should generate if user types y. column col noprint new_value elcm_script select decode(lower('&gen'),'y','c:\elcm.sql','n', 'null') col dual; spool c:\elcm_details.spl @&elcm_script spool off in above generate spool file if user type n error reading file.. how stop generating spool if n.or how remove spool generated/ if can put controlling section own script, e.g. elcm_ctl.sql , make that: accept run_it char format a1 prompt "run script?" set termout off whenever sqlerror exit success rollback exec if upper(nvl('&run_it', 'n')) != 'y' raise no_data_needed; end if; whenever sqlerror continue spool c:\elcm.sql select 'select sysdate dual;' dual; spool off set termout on spool c:\elcm_details.spl @c:\elcm.sql spool off the accept command bit neater relying on substitution prompts, in opinion, , self-docu

java - Paint in Swing not working -

why not work? shows me gui not paint. how change 2 classes? import java.awt.graphics; import javax.swing.jframe; public class runpaintgui extends jframe{ public static void main(string[] args){ jframe frame = new jframe(); frame.setsize(5000,2000); frame.setresizable(false); frame.settitle("game"); frame.setvisible(true); } public void paint(graphics g){ super.paint(g); g.drawstring("adsf",40,45); g.draw3drect(50, 30, 600, 700, true); repaint(); } } you creating generic jframe in line: jframe frame = new jframe(); what want is: jframe frame = new runpaintgui(); then paint() method will called.

c# - Overloading return types -

this question has answer here: c# not inferring overloaded method via return type 6 answers is following method overloaded? class { public void display(int a, int b) { console.write(a+b); } public int display(int a, int b) { return a+b; //return a+b value } } the return type doesn't affect method's signature. code not compile, either type or number of parameters should different in order make compile.

Url helper with GET parameter in laravel -

i want create url format : domain.com/list?sortby=number&sortdir=desc in view (blade). i'm using approach don't prefered : {{ url("list")."?sortby=".$sortby."&sortdir=".$sortdir }} because using {{ url("list", $parameters = array('sortby' => $sortby, 'sortdir' => $sortdir) }} didn't produce hoped. there better way? have tried url::route method. example route: route::get('/list', array('as' => 'list.index', 'uses' => 'listcontroller@getindex')); retrieve url specific route query string: url::route('list.index', array( 'sortby' => $sortby, 'sortdir' => $sortdir )); if using closure on route: route::get('/list', array('as' => 'list.index', function() { return url::route('account-home', array( 'sortby' => 1, 'sortdir' =>

javascript - Firefox redraw very slow (5 secs) -

i'm developing lazy scroll table resizeable columns. retrieves data server if user scrolling position data not loaded yet. because want user able scroll million of rows, put 2 list of 32 items in dom. if once of these lists scrolls out-of-the-viewport, put on other side of visible list , refresh items. this works great in chrome, firefox (on ubuntu linux) gives me headaches, redraws screen after 5 seconds instead of instantly. does know why firefox behaves , maybe how fix/prevent this? [edit] code finishes quickly, can see in console log actions. javascript places nodes in dom. when inspecting elements, properties ok, layout-calculation seems done , ok. i try factor out specific code, works server generate settings , events. (i use wicket, , refresh each of 2 lists wicket ajax. wicket renderes html , replaces dom-entries). makes complicated. the issue came form css setting . table had overflow:hidden setting. removing helped , resolved issue.

Getting & setting values from xml in android -

i new in android, have mainactivity.java in src , activity_main.xml in layout . if create button in activity_main.xml , can set or values of button properties in xml through mainactivity.java ? how can change property of popupwindow hieght,width through java yes can modify properties of view s defined in xml file. for that, have put id in view want modify in activity_main.xml , example: <button android:id="@+id/mybutton" ... /> then, in mainactivity class, can button following method: button mybutton = (button) findviewbyid(r.id.mybutton); now, can add every property want on view. can example set text: mybutton.settext("click me!");

Rich text editor doesn't appear in Typo3 -

i'm using typo3 cms 6.2.3, , when go page tab, , try edit element, there's no rte available above text field. have install extra? did activate "enable rich text editor" under: user tools > user settings > edit & advanced functions > checkbox "enable rich text editor (if available)"? greetings

vba - How to identify a wildcard date -

when email specific sender specific subject comes in, vba code things attachment. example of subject line is: profit , loss summary 06-20-2014 here code have adapted http://www.jpsoftwaretech.com/outlook-vba/automate-outlook/ dim objns outlook.namespace set objns = getnamespace("mapi") if typeof item outlook.mailitem dim msg outlook.mailitem dim twodays variant set msg = item if (msg.sendername = "my fav sender") , _ (msg.subject = "profit , loss summary"& " " & format(date, "mm_dd_yyyy")) , _ (msg.attachments.count = 1) this recognizes today's date. need code identify date (because reports can come in few days later usual, still want macro run). how use wildcard date end? why not ignore date, since don't care is, , string "profit , loss summary " @ beginning of subject? instr(msg.subject, "profit , loss summary ") = 1 as in if msg.sendername = "my fav

ruby on rails - Adding META keywords and description on Home Page only -

i enter keywords , description of home page of ruby website. home page has 2 files : 1- main_controller 2- home_page.html.erb <% content_for :html_title, 'erratum humanum est' %> <div class="clear"></div> <div id="video"> <div class="container"> <div class="video-glow"> <h1><%= t('application.home_page.heading')%></h1> <div class="clear"></div> <div class="video-section"> <iframe width="418" height="235" src="https://www.youtube.com/embed/sfsfsfsfsfsfq?rel=0;hd=1" frameborder="0" allowfullscreen></iframe> </div> </div> </div> </div> how can enter meta description , keywords on these pages? (i not want enter new ruby gem this) thanks, roman in application.html.erb

ElasticSearch Relationships -

hi friends please me ... i have doubt regarding relationships in elastic search. i explain doubt following example step 1: have created index named "books" in elastic search example.com:9200/books/ step 2: created type named 'author' , data inserted it post example.com:9200/books/author/1 { "fname" : "david","lname":"thomas" } post example.com:9200/books/author/2 { "fname" : "hamton","lname":"vergo" } step 3: created mapping type 'authorbook' child of 'author' post example.com:9200/books/authorbook/_mapping {"authorbook":{"_parent":{"type":"author"}}} step 4 : inserted data authorbook post example.com:9200/books/authorbook/100?parent=1 { "bookname" : "bookname1" } post example.com:9200/books/authorbook/200?parent=1 { "bookname" : "bookname2" } post example.com:

c - Why use & to pass value for function with *? -

i wanted ask author, caf , understanding functions , pointers in c i realized can't ask question on same page. i'm still confused using & pass value of pointer function. thought &q passing address of q, how going translate value of q int sqp(int * x)? there no "translation". your function int sqp(int *x); takes 1 argument, x , type int * , i.e. "pointer integer". so, call need pass pointer integer, i.e. address of integer. the & prefix operator used compute address of argument, can do: int foo = 4711; sqp(&foo); to call sqp() function address of variable foo .

unable to install CDT in Eclipse Luna -

i have downloaded eclipse luna in package eclipse ide java ee developers . want add eclipse cdt program in c/c++ (i know can download cdt package, prefer way, don't offer option answer please). when tried install using marketplace didn't found luna version. if use luna update site, retrieves cdt 8.4.0.201406111759, got error: an error occurred while collecting items installed session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.collect, operand=, action=). no repository found containing: osgi.bundle,org.eclipse.net4j.jms.api,3.1.100.v20140218-1709 if use kepler update site, retrieving cdt 8.3.0.201402142303i, got error: an error occurred while collecting items installed session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.collect, operand=, action=). no repository found containing: osgi.bundle,org.eclipse.cdt,8.3.0.201402142303 no repository found containing: osgi.bundle,or

servicestack - SwaggerUI exposing Dictionary<string,string> type in the wrong way -

dear overflowers i'm using swaggerui exposing servicestack rest service specification i've encountered unexpected issue. one of services accept request made [route("/myservice/getstuff", "post")] public class getstuffrequest : ireturnvoid { public string searchstring { get; set; } public dictionary<string,string> parameterarray { get; set; } } but way swaggerui exposing request object: getstuffrequest { parameterarray (dictionary`2[[string`), searchstring (string) } dictionary`2[[string` { comparer (iequalitycomparer`string`), count (int), keys (dictionary`2+keycollection[[string`), values (dictionary`2+valuecollection[[string`), item (string) } iequalitycomparer`string` { } dictionary`2+keycollection[[string` { count (int) } dictionary`2+valuecollection[[string` { count (int) } why happens? can fix someway? peace&code 2 all

css - Nested elements naming style (Jade, HAML, Slim) -

looking solution how use smacss naming convention jade, haml or slim template engine. expect following jade code : .module .child .child as output i'll following: <div class="module"> <div class="child"></div> <div class="child"></div> </div> but i'd reach following result: <div class="module"> <div class="module-child"></div> <div class="module-child"></div> </div> is there solution manage can in sass example, mean avoid adding 'module-' string each 'child' manually ? update also acceptable solutions haml , slim this closest got jade ( live playground here ): mixin e(elt) - var = attributes; - var cl = attributes.class;delete attributes.class - var elt = elt ? elt : 'div' // if no parameter given if cl - var cl = parent + '-' + cl else - var cl = parent

arrays - Biggest index with a value in a for loop javascript -

i have severals arrays, , find biggest index value. var test1 = [0, 0, 200, 0, 0, 0]; var test2 = [0, 400, 200, 0, 250, 0]; var test3 = [240, 0, 0, 0, 0, 0]; var test4 = [240, 0, 0, 0, 100, 0]; below differents arrays, , each one, retrieve this test1 : 2, 200 test2 : 4, 250 test3 : 0, 240 test4 : 4, 100 i tried break when value different of zero, , not 1 biggest index value. function seekandfind(array) { (var = 0; < array.length; i++) { if ( array[i] !== 0 ) { console.log(array[i]); break; } } } fiddle : http://jsfiddle.net/jeremdsgn/p4xld/ why not go backwards through array? function seekandfind(array) { (var = array.length - 1; >= 0; i--) { if ( array[i] !== 0 ) { console.log(i, array[i]); break; } } }

excel - Different behavior in VBA when in debug mode (steps) or in automatic mode -

i have excel macro makes hyperlinks in first column of table. when run step step in manual mode, works fine , hyperlinks created. when run in automatic mode, runs without error hyperlinks not created. i not have ideas why...? public sub aktualisieren() call column_makehyperlinks(1) end sub and then sub column_makehyperlinks(blatt) ' ### start tabellenanalyse ### ' - länge ' - start ' - ende on error resume next set ws = sheets(blatt) ' set tabelle = ws.listobjects(1) ' table anzahl = tabelle.listrows.count ' number of rows in table start = tabelle.listrows(1).range.row ' first row in table ende = tabelle.listrows(tabelle.listrows.count).range.row ' last row in table smsg = "there " & anzahl & " rows in '" & tabelle.name & "'. " smsg = smsg & dnl & "start in row " & start smsg = smsg &

spring - No qualifying bean of type [com.sprhib.dao.UserDao] found for dependency -

i newbie spring framework. trying learn it. have time same problem ioc. cant correctly implement it. please help. i have problem @autowiring classes. error stack: cze 27, 2014 12:03:56 pm org.springframework.web.context.contextloader initwebapplicationcontext severe: context initialization failed org.springframework.beans.factory.beancreationexception: error creating bean name 'usercontroller': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private com.sprhib.dao.userdao com.sprhib.controller.usercontroller.userdao; nested exception org.springframework.beans.factory.nosuchbeandefinitionexception: no qualifying bean of type [com.sprhib.dao.userdao] found dependency: expected @ least 1 bean qualifies autowire candidate dependency. dependency annotations: {@org.springframework.beans.factory.annotation.autowired(required=true)} @ org.springframework.beans.factory.annotation.autow