Posts

Showing posts from January, 2012

ruby - How to use namespace in rails without namespace in url -

i have question routes in rails when using namespaces. example code: namespace :api # /api/... api:: namespace :v1 devise_for :users, :controllers => {sessions: 'api/v1/users/sessions', :registrations => "api/v1/users/registrations", :password => 'api/v1/users/passwords'} resources :events namespace :informations resources :agendas resources :attendees resources :polls resources :presentatios resources :speakers resources :sponsors resources :votes resources :vote_options end end end end i check url in console grep agenda, , results in: /api/v1/events/:event_id/informations/agendas how can remove namespace information url without removing namespace routes? you can use module option add namespace (as in module wrapping) controllers: resources :events, module: 'v1/api' prefix verb uri pa...

reactjs - Instagram like filters using React Native -

i have been looking way develop instagram filters using react-native. have created filters using mobile framework called ionic uses webview create apps, filters slow. how manipulate images create such filtered effects using react-native. cheers i think you'd need @ implementing opengl view performance. if you're doing on device filters should done using glsl shaders. hoping find polyfill-type component webgl, haven't found 1 yet. the react-canvas project quite interesting (even though it's canvas, not webgl) - , might worth exploring. edit: it's long time after, there gl-react purpose of doing advanced effects instagram filters on images.

Upgrade php version of xampp not success -

today decided upgrade xampp new php version (5.6.11). have downloaded , configured based on google said. after resetting server, runs successfully. when check xampp's phpinfo, has not been updated. screenshot what have missed? back htdocs files , database. download xampp . uninstall xampp control panel. manually remove xampp folder partition. install back problem solved

mysql - Difference between two dates that are on different rows and columns? -

my table schema looks this.. load_id | stoptype | departure_date | arrival_date there 2 stop types pk(pickup) or dl(delivery) if stop type pk departure date exists , if stop type dl delivery date exists. each departure , delivery couple load id same. complicates me aren't in rows right next each other. query should use? you try that: select load_id, max(departure_date), max(arrival_date) table group load_id this query return every load both dates, next step calculate difference via datediff , like: select load_id, datediff(max(arrival_date), max(departure_date)) diff table group load_id

javascript - UI not updating while using Knockout Observable Array -

i new knockout. trying use observable arrays track changes ui. ui loading initial data stored in array. , trying add new object array dynamically screen. now able add new object array. ui not getting reflected new changes in array. below html , javascript code. am missing something. <html> <head> <link rel="stylesheet" href="bootstrap.css" type="text/css" /> <link rel="stylesheet" href="bootstrap-theme.css " type="text/css" /> <script src="jquery.js" type="text/javascript"></script> <link rel="stylesheet" href="prodconfig.css " type="text/css" /> <script src="jquery.mobile.min.js" type="text/javascript"></script> <link rel="stylesheet" href="cordys.min.css" type="text/css" /> <link rel="stylesheet" href="jquery...

wordpress - WP_Query sometimes returns zero results when there are matching posts - why? -

this 1 has got me stumped. i have category.php file contains loop: <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <div class="entry-content description clearfix"> <h2 class="category-subtitle"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php echo the_content(); ?> <?php global $withcomments; $withcomments = 1; ?> </div><!-- .entry-content --> <?php endwhile; else : get_template_part( 'content', 'none' ); endif; ?> this block of code works fine , returns results 1 expect. in addition, outside loop (after it, in case matters), i've got column 1 side loop - i'm going refer newsfeed loop sake of clarity: <h3 class="newsfeed-heading"><a href="/category/news/">latest news</a>...

Rendering Problems: Failed to load platform rendering library (Android Studio) -

this problem driving me crazy! i've tried every solution i've found, including not limited changing api, have added jdk_home , , changing theme. one thing keep in mind first app in android studio. (i switched eclipse after couldn't figure out , created helloworld app button, heard android development wouldn't supported eclipse anymore , figured should start android studio.) if provide answers in simplest way, forever grateful. any suggestions or solutions welcome! :) maybe have select different android version preview. in case i've removed preview sdk versions , preview failed work. seems preview not updated too. you find option in upper right corner of preview window. i found short youtube video showing it: https://www.youtube.com/watch?v=49cf6uu38wo

Android XML Layout - a picture with a TextView on it -

Image
i'm working on xml layout in app , want make imageview have piece of text on (i want have textview on it). anyway, less words , more examples. want this: i know best way make (with opaque strip , preferably text stretch or shrink depending on length of name. though think might figure stretching out myself). you can create relativelayout imageview , textview 2 children <relativelayout android:layout_width="wrap_content" android:layout_height="wrap_content" > <imageview android:id="@+id/myimageview" android:layout_width="150dp" android:layout_height="75dp" android:src="@drawable/myimage" /> <textview android:id="@+id/mytextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignbottom="@+id/myimageview" android:layou...

c# - limit a network interface to connect to a single target IP -

i setting windows tablet has multiple network interface including low bandwidth should used our specific program. how limit nic interface possible target ip. don't want normal internet traffic go on it, connection specific ip address / server. what want achieve called routing . if can set routing table root (resp. administrator), can describe. set default gateway on "big" interface , set 1 dedicated route via "narrow" gateway interface.

javascript - Canvas fill shape with text -

i have this example in canvas. know how can add text in shapes. i have looked code draws shapes not sure how add text. able add text doesn't move balls? function draw() { context.clearrect(0, 0, stagewidth, stageheight); var = balls.length; while(--i > -1) { context.fillstyle = balls[i].color; context.beginpath(); context.arc(balls[i].x,balls[i].y,balls[i].size,0,math.pi*2,true); context.closepath(); context.fill(); } } you have use ball's x , y value make sure text follow ball, , use textalign , textbaseline align text. function draw() { context.clearrect(0, 0, stagewidth, stageheight); // align once all. context.textalign = 'center'; // set text align center. context.textbaseline = 'middle'; // set text vertical align m...

c# - Azure CDN endpoint giving 502 bad gateway with https -

i setup azure cdn endpoint. pointed origin server. works http protocol. same files when try https - returns 502 - bad gateway error. how troubleshoot , fix problem? a similar setup works on endpoint https. i think may need serve cdn assets on https. you'll need enable https within azure portal if still not then: you can't yet use own domain/ssl certificate azure cdn although there big request on azure feedback site. if you've created cdn azure cloud service (e.g. http://[yourapp].cloudapp.net/cdn/ ) it's important create self-signed certificate azure domain ([yourapp].cloudapp.net). if you're using azure virtual machines can done through iis. this caught out when enabled https origin server did have ssl certificate our own custom domain , not *.cloudapp.net one. for details click on http://benfoster.io/blog/azure-cdn-https

javascript - Three.js - apply shader to blur a geometry -

been learning threejs on past day or i'm struggling shaders. i'm trying blur geometry have. tried using depth of field examples found on three.js site made foreground objects blurry too. i'm hoping single out 1 object , blur that. now have mesh created lambertmaterial so: var material = new three.meshlambertmaterial({ color: 0x5c5c5c, emissive: 0x000000, shading: three.flatshading, transparent: true, opacity: 1 }); var mesh = new three.mesh(geometryjson, material); scene.add(mesh); and found 2 shaders online (one verticle blur , 1 horizontal blur). how apply them while keeping above settings color ect? horizontal blur shader verticle blur shader i tried using shadermaterial this: var material = new three.shadermaterial( { uniforms: three.uniformsutils.clone( horizontalblurshader.uniforms ), vertexshader: horizontalblurshader.vertexshader, fragmentshader: horizontalblursh...

matlab - Parameter estimation for epidemic models -

i have epidemic model: function ypsirid = ypsirid(t,y) global q m b r ypsirid(1) = q - m*y(1) - b*y(1)*y(2); ypsirid(2) = (b*y(1)*y(2)) - (m+r)*y(2); ypsirid(3) = (r*y(2)) - m*y(3); ypsirid = ypsirid(:) can kindly suggest easiest possible method carry out parameter estimation using matlab. thanks!

how do i add functions to the events of dynamic elements in pure javascript? -

my script dynamically writes html page. there buttons written want have onclick functions. please don't suggest frameworks jquery since javascript development course. assignment show know how create, read , delete cookies. script reads cookies , displays names , values delete button in table. far, delete cookie function isn't called @ when click of delete buttons. time. document.getelementbyid("showcookies").onclick = function(){ var columnright = document.getelementbyid('columnright'); var cookies = document.cookie; var cookiescontent = '<h1>existing cookies</h1>'; console.log(cookies); cookies = cookies.split(";"); if(cookies.length > 0){ cookiescontent += '<table width="100%" cellspacing="1" cellpadding="10" border="0"> \ <thead> \ <tr> \ ...

File Upload not working in Magento from custom admin module -

i want upload file try lot can't thing , did't error in log didn't gat type of file in folder. here form class sample_bigcom_block_adminhtml_form_edit_file extends mage_adminhtml_block_system_config_form_field { protected function _getelementhtml(varien_data_form_element_abstract $element) { $url = mage::helper("adminhtml")->geturl('bigcom/ajax/process/'); //echo $url; $value=mage::getsingleton('core/session')->getformkey(); //$url1 = mage::helper("adminhtml")->geturl('seosetup/ajax/processtest/'); $html = '<form action="'.$url.'" method="post" enctype="multipart/form-data"> <p><input name="form_key" type="hidden" value="'.$value.'" /></p> <p><input type="file" name="csvupload" /></p> ...

java - How can I set doInbackground finish its task before continuing the mainActivity? -

these mainactivity : database_connector wp_terms = new database_connector("select * `dse120071750`.`wp_terms` ",progressdialog,this); wp_terms.execute(); wp_terms.onpreexecute(); try { (int i=0; i<wp_terms.getjsonarray().length(); i++){ jsonobject obj = wp_terms.getjsonarray().getjsonobject(i); this.wp_terms.put(obj.getstring("term_id"), obj.getstring("name")); } } catch (jsonexception e) { e.printstacktrace(); } databaseconnector: package hk.hoome.www.mobilehoome; public class database_connector extends asynctask<void,void, void> { //string mode; httpresponse response; string sql; jsonarray jsonarray; searchpage searchpage; public database_connector(string sql, searchpage searchpage){ //this.mode = mode; this.sql = sql; this.searchpage = searchpage; jsonarray = new jsonarray(); } @override protected void doinbackground(void... params) { con...

Exec python from php -

i'm trying run python script php with $res = ''; exec('./home/desktop/scripts/fetch_matches.py', $res); my python file starts #!/usr/bin/python , has exec rights. have print in there it's not working( var_dump($res) gets me empty array). what's missing? also, if i'll have different methods in script, how call them? you need rid of . before path. if it's normal unix/linux system, /home in root of filesystem. . means current directory, unless you've recreated /home filesystem in directory you're running php program, path incorrect. also, unless username desktop , you're missing directory between /home/ , desktop/ - should username. pwd command never return . before present working directory. for second question, please refer docs on calling python command line . can execute arbitrary code command line, along lines of python -c "from fetch_matches import fetcher; fetcher()"

javascript - Catching click event while delete thumbnail -

i modified fu thumbnail template hook click event on it. display delete button (the provided one). problem when click on delete button, click event bubbles rest of javascript stack. how can prevent delete button propagate click event?? (usually event.stoppropagation()...). thanks help if you'd prevent dom event bubbling, attach event handler element terminate , call stoppropagation() on event object . example, click event: someelement.addeventlistener('click', function(event) { event.stoppropagation(); }); the above code not work in ie8 , older since addeventlistener , stoppropagation first introduced in ie9.

ios - Crash in NRMANSURLConnectionSupport -

i keep getting following crash log in new relic board. not able replicate bug. issue affects maybe more half of users. has else faced similar issue or know how fix it? hardware model: iphone 6 (iphone7,2) process: t_app [1421] code type: arm64 parent process: launchd [1] date/time: 2015-07-22 01:09:04 +0000 launch time: 2015-07-22 01:09:04 +0000 os version: ios 8.1.2 (12b440) exception type: sigsegv crashed thread: 14 application specific information: *** terminating app due uncaught exception 'sigsegv', reason: '' thread 14 crashed: 0 cfnetwork 0x187e41030 __zn11httpmessage20ensureparserfinishedev + 69680 1 cfnetwork 0x187e40fb8 __zn11httpmessage19copyallheaderfieldseppk9__cfarray + 69560 2 cfnetwork 0x187e766d4 [nshttpurlresponse allheaderfields] + 288468 3 t_app 0x10006b22c [nrmansurlconnectionsupport notice...

swift - UIView animation acting weird -

my view controller's view has child view -a "login" panel of sorts, 2 input text fields- placed @ center, autolayout constraints set in interface builder. view controller class has outlet set reference vertical constraint , manipulate @ run time. on startup - viewdidlayoutsubviews() -, cache value of vertical constraint in property ( constraintinitialvalue ), calculate value hide panel beneath view's bounds (based on both panel's , view's sizes) , apply value immediately, hiding panel before user sees view. cache calculated "off-screen" value of constrain in property ( constraintoffscreenvalue ), later use (e.g., "hide" panel). (i initial setup in viewdidlayoutsubviews() because first opportunity actual bounds of view controller's view.) (for record, original constraint value 0.0 : center y, no offset. and, iphone 6 , current size of panel, "offscreen value" -453.0.) in background, authenticate user. if fails, ani...

how to compare the difference between two similar tables datapoint by datapoint in r -

i have table (df1) looks this: i id col.3 col.4 col.5 col.6 col.7 col.8 m chr18_1369 g g t g g g m chr18_54979 g n n g g m chr18_187626 c t n t c c m chr18_196254 c c g c n g m chr18_224569 c n c c m chr18_275670 t t c c t t there missing data points represented "n" in df1. after imputation, missing data "n" replaced letter. output df2 as: i id col.3 col.4 col.5 col.6 col.7 col.8 m chr18_1369 g g t g g g m chr18_54979 g g g g g m chr18_187626 c t t t c c m chr18_196254 c c g c c g m chr18_224569 c c c m chr18_275670 t t c c t t i have data frame (df3) i id col.3 col.4 col.5 col.6 col.7 col.8 m chr18_1369 g g t g ...

python - jupyter notebook jumps after evaluation of cell -

in jupyter notebook, every time evaluate cell @ bottom of page, notebook jumps hides part of output. here example pictures. in picture want evaluate last cell. https://imgur.com/qzab8nw after evaluation, screen jumps can't see last part of output. https://imgur.com/gpqjrbt so every time have scroll manually view. there setting here can tweak eliminate issue? here's information "about" page of jupyter: the version of notebook server 3.2.1-2d95975 , running on: python 2.7.5 |anaconda 1.6.2 (32-bit)| (default, jul 1 2013, 12:41:55) [msc v.1500 32 bit (intel)] current kernel information: python 2.7.5 |anaconda 1.6.2 (32-bit)| (default, jul 1 2013, 12:41:55) [msc v.1500 32 bit (intel)] type "copyright", "credits" or "license" more information. ipython 3.2.1 you may add few cells below last code cell avoid issue.!!! when press ctrl+enter run last cell (infact cell), dom of notebook remo...

sql - Finding the min distance MYSQL -

i want find min distance between (x2-x1)^2 + (y2-y1)^2 particular macid , timestamp. i'm trying find nearest possible gate location individual @ 1 particular instance of time. so, query should return 1 unique value of user @ 1 instance of time min gate location. the data set looks like: x1 y1 timestamp macid x2 y2 gate | 5618 | 5303 |1 12:22:02 | 54:ea:a8:53:5b:eb | 5844 | 5377 | c24 | 5848 | 5046 |1 12:22:02 | 54:ea:a8:53:5b:eb | 5844 | 5377 | c18 | 6094 | 5464 |1 12:22:02 | 54:ea:a8:53:5b:eb | 5844 | 5377 | c17 | 6021 | 6540 |1 13:09:48 | 48:5a:3f:6a:01:b9 | 6210 | 6801 | c23 | 6366 | 7036 |1 13:09:48 | 48:5a:3f:6a:01:b9 | 6210 | 6801 | c14 | 6366 | 7036 |1 13:09:48 | 48:5a:3f:6a:01:b9 | 6210 | 6801 | c13 the result set should below: x1 y1 timestamp macid x2 y2 gate | 5848 | 5046 |1 12:22:02 | 54:ea:a8:53:5b:eb | 5844 | 5377 | c18 | 6021 | 6540 |1 13:09:48 | 48:5a:3f:6a:01:...

Get Android app without expansion files from Google Play -

i wonder how google play decide if user download full .apk file expansion files (main, patch...) or simple .apk file without expansion files. i've read articles how implement download service missing expansion files inside our application, there lack of information how test it. what think uploading application on google play main expansion file, , install signed .apk our development machine (not google play). theoretically if have download service in our app should start , missing main expansion file google play? for have put obb file on location device memory > android > obb > package name > obb file. in application need add code if obb file there not download. so never download if obb file not there. hope you. let me know if need more side.

asp.net - Dynamically insert date into gridview header -

Image
i have gridview compares data between current year , last year. <columns> <asp:boundfield datafield="st_entity_id" headertext="entity id" sortexpression="st_entity_id" /> <asp:boundfield datafield="totalconsentsthisyear" headertext="total consents year" readonly="true" sortexpression="totalconsentsthisyear" /> <asp:boundfield datafield="totalconsentslastyear" headertext="total consents last year" readonly="true" sortexpression="totalconsentslastyear" /> <asp:boundfield datafield="totalissuedconsentsthisyear" headertext="total issued consents year" readonly="true" sortexpression="totalissuedconsentsthisyear" /> <asp:boundfield datafield="totalissuedconsentslastyear" headertext="total issued consents last year" readonly="true...

selenium - vstest.console.exe open nunit GUI but doesn't run tests -

i have visual studio project includes test selenium code. trying run using vstest.console.exe using command vstest.console.exe c:\code\samplereportsproject\samplereportsproject\bin\debug\samplereportsproject.dll on running command, opens nunit gui window doesn't execute test. on running again, message starting test execution, please wait... warning: no test available in c:\code\samplereportsproject\samplereportsproje ct\bin\debug\samplereportsproject.dll. make sure installed test discoverers & executors, platform & framework version settings appropriate , try again.

regex - C++ (C++11) regular expressions differences on OS X and Linux -

this question has answer here: is gcc 4.8 or earlier buggy regular expressions? 3 answers i'm trying code work on both os x , linux same. code below compiled clang++ --std=c++11 regextest.cpp #include <regex> #include <iostream> int main() { std::string str = "/api/asd/"; std::string pattern = "/api/(.*)/"; std::cout << "starting matching" << std::endl; std::smatch matches; if (std::regex_match(str, matches, std::regex(pattern, std::regex::egrep))) { std::cout << "found match!" << std::endl; std::cout << "all matches: "; (auto& : matches) std::cout << << ", "; std::cout << std::endl; } return 0; } on os x, result of running code is: starting matching found matc...

android - Take Picture on camera but no find thumbnail -

i picture camera no official stamp following code in pictures take. code :- intent intent = new intent("android.media.action.image_capture"); photo = this.createtemporaryfile("photo", ".jpg"); photo.delete(); cekilenresimuri = uri.fromfile(photo); intent.putextra(mediastore.extra_output, cekilenresimuri); startactivityforresult(intent, kameradan_resim_al); onactivity result:- this.getcontentresolver().notifychange(cekilenresimuri, null); contentresolver cr = this.getcontentresolver(); bitmapfactory.options options = new bitmapfactory.options(); cekilenresim = bitmapfactory.decodefile(cekilenresimuri.getpath(), options); editorresim.setimagebitmap(cekilenresim); how can overcome problem? if able captured image bitmap. can’t find thumbnail have add image in gallery. can add these lines: private void galleryaddpic() { intent mediascanintent = new intent(intent.action_media_scanner_scan_file); file f = new file(mcurrentphotopath); uri ...

java - Injecting object into Spring Configuration -

i turning old xml/java configuration pure java config. in xml used injection of parameters configuration file this: <bean class="com.project.springrestconfiguration"> <property name="parameters" ref="parameters" /> </bean> @configuration public class springrestconfiguration { private parameters parameters; public void setparameters(parameters parameters) { this.parameters = parameters; } // @bean definitions ... } is possible inject parameters in javaconfig? (without need of using autowiring!) @configuration @import(springrestconfiguration.class) edit: @import can't see chance inject parameters springrestconfiguration basically need use @autowired can still use name , not type interpretation this: @configuration public class springrestconfiguration { @autowired @qualifier("parameters") // somewhere in context should have bean named 'parameters'. d...

multithreading - Caching read-mostly values: are time lookups cheaper than atomic operations? -

my multithreaded app uses bunch of read-mostly values. these values configuration values, , change when operator edits config file , instructs app reload config file without downtime. values accessed multiple threads. none of threads mutate value. mutation occurs when config file reloaded. because values can change, accessing them requires form of synchronization. because change rarely, not want use mutexes: a normal mutex disallows multiple threads accessing values concurrently. since threads read values, concurrent access threads safe long config file isn't being reloaded. a read-write mutex sounds solution, have high constant overhead. i go lower level , use atomic operations directly. example, can make config object immutable, atomic pointer latest version: upon reloading config file, create new config object , atomically update pointer currently-active config object. the reader threads atomically load pointer , use config object without synchronization, since...

c# - All regex testers say pattern works but when in code it doesn't -

i have tested pattern in regex101 & regexpr , both show working well, when put in c# code, allows incorrect strings. pattern appears in code: @"^-?((4[0-6])|(11[5-9]?|12[0-5]?))?(°[0-5][0-9]?)?([\s'])?([0-5][0-9]?)?([\s""\.])?" should match dms latitude degree between 40 , 46 or 115 , 125 43°34'45.54" it should not allow letter f , when use online tester, works fine, when put in code, says match. here c# code: var patternlist = new[] { @"^-?([14])$", // matches 1 or 4 @"^-?((4[0-6])|(11[5-9]?|12[0-5]?))([\s\.])([0-9]{1,10})$" // decimal -- matches 40-46 or 115-125 period (.) number 10 places @"^-?((4[0-6])|(11[5-9]?|12[0-5]?))?(°[0-5][0-9]?)?([\s'])?([0-5][0-9]?)?([\s""\.])?", // matches full dms optional decimal on second - 43°34'45.54" }; bool ismatch = false; foreach( var p in patternlist ) { ...

javascript - fullcalendar eventMouseover rerenderEvents -

i using fullcalendar fork multiple resources. want use callback "eventmouseover" change border color events same title, have that: eventmouseover: function( event, jsevent, view ) { //get day viewed var currentviewdate = $('#calendar').fullcalendar('getdate') var events = $('#calendar').fullcalendar( 'clientevents', function(event) { //get list of events displayed day if (moment(event.start).format('yyyy-mm-dd') == currentviewdate.format('yyyy-mm-dd')) { return true; } }); //search events same title event mouse on (var = 0; events.length > ; i++) { if (events[i].title == event.title) { events[i].bordercolor = 'blue' console.log(event.title) } } $('#calendar').fullcalendar( 'rerenderevents') } and works, means changed border colors particular events, looks when put mouse on over eve...

Issues with Globalize and CarrierWave uploads in Rails 4.2 app -

i have issues translated files in rails 4.2 app. background here gem versions i'm using: gem "rails", "4.2.1" gem "carrierwave" # 0.10.0 gem "globalize" # 5.0.1 and model: class download < activerecord::base belongs_to :download_type has_and_belongs_to_many :products translates :title, :part_number, :file mount_uploader :file, downloadfileuploader validates :title, presence: true def to_param "#{id}-#{title.parameterize}" end end the issues in view, want list download , of current translations download, current locale data each translation. in rails console: > i18n.locale => :en > download = download.find(481) => #<download id: 481, title: "smartsensor hd quick-reference guide (user)", part_number: "wx-500-0171", download_type_id: 3, created_at: "2015-01-16 22:49:13", updated_at: "2015-04-20 16:59:25", file: "smartsensor_hd_use...

php - Unexpected '[' - no error on localhost but there is one on server -

this question has answer here: php parse/syntax errors; , how solve them? 12 answers $query_var[] = '`'.array_keys($activefilters)[$i].'` concat(\'%\',:'.array_keys($activefilters)[$i].',\'%\')'; parse error: syntax error, unexpected '[' so following line generates error in xampp apache server on localhost error isn't occurring. on server there error $query_var = []; but changed $query_var = array(); , error wanst appearing unexpected [ i sure has php version or that correct, php version issue of php 5.4 can use $query_var = []; http://php.net/manual/en/migration54.new-features.php so host running older php version.

loops - Silverstripe Bootstrap Accordion Sidebar -

hi iam creating site silverstripe , trying create dynamic sidenav using bootstrap accordion, have got working using $pos create unique values id , data-parent attributes. i'm running trouble 3rd level items having same id , data-parent values earlier items on list $pos resetting. my code following: <div id="extra-links-section" class="extra-nav"> <div class="list-group panel"> <% loop menu(4) %> <a class="$linkingmode list-group-item list-group-item-success" href="<% if $children && urlsegment != 'coaches-and-managers' %>#dropdown$pos<% else %>$link<% end_if %>" <% if $children && urlsegment != 'coaches-and-managers' %>data-toggle="collapse"<% end_if %> data-parent="#extra-links-section">$title <% if $children && urlsegment != 'coaches-and-managers' %><i class="fa fa-caret-down"...

ios - Global Color Palette for Interface Builder -

in swift i'm writing extension (like obj-c category) maintains in code class methods of "house colors." i'm wondering if there way make color extension accessible interface builder using ibinspectable or else opposed attaching colors uiview subclasses i've seen in lot of ibinspector sample usage. extension uicolor { // house blue @ibinspectable var houseblue: uicolor { return uicolor(red:(51/255), green:(205/255), blue:(255/255), alpha:(1)) } // house gray @ibinspectable var housegray: uicolor { return uicolor(white:0.4, alpha: 1) } // house white @ibinspectable var housewhite: uicolor { return uicolor.whitecolor() } } as far know, can't programatically define colors show in interface builder, can extend uicolor custom colors use in code: extension uicolor { static func mycustomcolor() -> uicolor { return uicolor(red: 23/255.0, green: 175/255.0, blue: 72/255.0, alpha: 1.0) } } and reference custom c...

java - SpringWS service doesn't response for any requests via SOAP UI -

springws service doesn't response requests via soap ui? collegues, beginner in spring , need help. created web service , can receive wsdl description in soap ui, problem service not respond requests. web srvice config: package com.mayacomp.app; import org.springframework.boot.context.embedded.servletregistrationbean; import org.springframework.context.applicationcontext; import org.springframework.context.annotation.bean; import org.springframework.context.annotation.configuration; import org.springframework.core.io.classpathresource; import org.springframework.ws.config.annotation.enablews; import org.springframework.ws.config.annotation.wsconfigureradapter; import org.springframework.ws.transport.http.messagedispatcherservlet; import org.springframework.ws.wsdl.wsdl11.defaultwsdl11definition; import org.springframework.xml.xsd.simplexsdschema; import org.springframework.xml.xsd.xsdschema; @enablews @configuration public class webserviceconfig extends wsconfigureradapte...