Posts

Showing posts from January, 2015

Label text in python/kivy -

i writing code 2 buttons return random text label kivy, can't 2 buttons return texts on same line, want either button overwrite whatever second button displays on same line : boxlayout: orientation: 'vertical' pos: self.pos label: id: label1 text: root.truths label: id: label2 text: root.dares gridlayout: cols: 2 spaccing: 20 padding: 25 button: text: 'truth' on_press: root.truthkey() button: text: "dare" on_press: root.darekey() the above code in kv file , code in python file show below from kivy.app import app kivy.uix.widget import widget kivy.uix.gridlayout import gridlayout kivy.uix.boxlayout import boxlayout import random kivy.properties import stringproperty class truthanddare(boxlayout): truths = stringproperty() dares = stringproperty() def __init__(self, **kwargs): supe...

nsstring - Objective C : Find number of operators in a mathematical string -

i'm using following technique find number of operators in mathematical string. for (int index = 0; index < [self.evaluatestring length]; index++) { unichar chars = [self.evaluatestring characteratindex:index]; if (chars == '+' || chars == '-' || chars == '*' || chars == '/' ||chars == '^') { self.operatorcount++; } } my trainer says method not good. know there better/more elegant method this. thanks. it seems string evaluated. part of evaluation parsing. during process mathematical operators identified , counted. the advantage on simple character counting tell apart 3 - 1 (operator) -1 (negative number literal).

javascript - Things in controller doesn't appear using AngularJS -

i trying show silder using ng-repeat. picture , other things in controller don't appear. here js code angular.module('starter', []) .controller('slider', function($scope) { $(document).ready(function(){ $('.slider').slider({full_width: true}); }); $scope.pictures=[ { img:"http://www.brics-info.org/wp-content/uploads/2015/08/transmission-lines.jpg, info:"Эрчим хүчний барилга угсралт", desc:"Засвар, тестчилэл" }, { img:"http://www.burns-group.com/images/uploads/projects/amtrak-zoo-transmission-line-3.jpg", info:"Эрчим хүчний барилга угсралт", desc:"Засвар, тестчилэл" }, { img:"http://www.sgceng.com/snp_lib/showpic.php?recordid=630&timestamp=1204139644&table=sgcengco", info:"Эрчим хүчний барилга угсралт", desc:"Засвар, тестчилэл" } ] ; }) this index.html <script src=...

angularjs - How to inject External Providers in karma jasmine test case? -

i'm new angular , karma test cases. for application i'm using angularjs , sweetalert displaying alerts. ( sweetalert plugin here ) below code getting status http request , display http request status in sweetalert (function () { 'use strict'; angular .module('app.admin') .controller('testcontroller', testcontroller); testcontroller.$inject = ['$scope','$http','sweetalert']; function testcontroller($scope,$http,sweetalert) { var vm = this; vm.test = 'hi'; vm.todos = []; vm.todo = 'run'; vm.status = ''; vm.geturl = function(){ $http.get("some url") .then(function (result) { vm.status = result.status; sweetalert.swal(json.stringify(vm.status)) }); }; vm.addtodo = function(){ vm.todos.push(vm.todo); }; vm.removetodo = function(index){ vm.todos.splice(index, 1); }; } ...

java - Vaadin Form Validation with BeanFieldGroup -

in book of vaadin read following: validating bean done beanvalidator, initialize name of bean property should validate , add the editor field. validation done after focus leaves field. bean validators automatically created when using beanfieldgroup . so here's beanfieldgroup: beanfieldgroup<ordersearchcriteria> binder = new beanfieldgroup<>(ordersearchcriteria.class); binder.setitemdatasource(searchcriteria); and how i've added validation on bean: @min(0) private bigdecimal minamount; @min(0) private bigdecimal maxamount; @pattern(regexp = "([a-za-z]+@[a-za-z]+.[a-za-z]{2,})?") private string email; validation not automatically added thought would. missing? you need download implementation of bean validator, , things start working out of box. if you're using maven , want use hibernate-validator add dependency in pom.xml file this: <dependency> <groupid>org.hibernate</groupid> <artifactid...

Two Texts on a Single Button in Android? -

i have button in android studio: <button android:layout_width="match_parent" android:layout_height="match_parent" android:text="event name (23)" /> it looks this: ------------------------------------- | event name (23) | ------------------------------------- what 2 pieces of text in single button. basically, want on left side of button, name of event... want on right side of button have number of people registered event, looks this: ------------------------------------- | event name (23) | ------------------------------------- is possible? i new android, keep in mind. you can create layout instead of button , perform click event on layout. <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="15dp" android...

java - How to create and Download Excel File by using Ajax request -

i want create excel file, if user pressed formular button on webpage. first solution works fine. user pressed button, serverside java code creates file , after java code executed webbrowser open dialog, aks user whether show or save excel file. but new requirements customer. if user pressed formular button, necessary show animated gif image while server side java code executed , animated gif must disapeared immediately, if server side java code finished. this struts2 submit button, starts http request, if button pressed: <s:submit value="show data" onclick="myjsfunction(); return false;" /> this client code, creates , sends http request struts2 actionclass: function myjsfunction(){ $.ajax({ type: "post", datatype: 'binary', url: "myactionclass.action", data: {//some necessary input values}, success: function(data){...

border radius not applying for ionic modals in Android -

i trying apply border-radius property ionic modals. applying chrome in desktop. not applying android devices. how achieve android? .modal{ border-radius: 8px; } view <script id="accountsearchmodal.html" type="text/ng-template"> <div class="modal"> <header class="bar bar-header bar-positive"> <h1 class="title">account search</h1> <div class="button button-clear" ng-click="modal.hide()"> <span class="icon ion-close"></span> </div> </header> <content has-header="true" padding="true"> <div class="list"> <form name="accountcreatefrmtemp"> <label class="item item-input margin-75" > <input type="number...

How to manipulate an Access database with SQL and C# in Visual Studio 2010 -

i'm trying run sql commands on connected access database , show results, i've built sql queries in design view of dataset unable view them on main forms' datagrid, using c# in vs 2010. how execute sql commands on connected access database , view them in datagrid on main form? please help

Need to add cognalys sdk to android app -

i making android app needs phone number verification. i want use "cognalys sdk" in application. please me understand how add in application ? cognalys library android phone no verification. integrating in android need add sdk library here sample code link

Parsing Json from URL in Android Studio -

i trying parse json. have lately been attempting use gson in android studio. however, can't seem obtain connection or data. data looking at, if ever obtain site this: {"item":{"icon":"address_here", id=820","id":820,"type":"default", "typeicon":"catagory","name":"name of object", "description":"this annoying issue stuck on"}} i have been using async, no avail. perhaps new way @ good. here's current code: public class javaparser extends asynctask<string, string, string> { public string getinternetdata() throws exception { string surl = "someurl.com"; //just string // connect url using java's native library try { url url = new url(surl); httpurlconnection request = (httpurlconnection) url.openconnection(); log.d("debug:", "made partial connection"); try { ...

java - JavaFX - draw squiggly line -

Image
is there simple way draw squiggly line across path in javafx? horizontal line in (source: https://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/electron-positron-annihilation.svg/2000px-electron-positron-annihilation.svg.png ) i know can achieve breaking path multiple parts, , drawing each cubic bezier curve, hoping there easier way.

groovy define metaclass with its own custom methods and set it for the object -

is possible set metaclass object in groovy custom methods? mean kind of dynamic inheritance... for example this class original { def my_method() { } } class meta { def meta_method() { } } def obj = new original() obj.metaclass = new meta() obj.meta_method() you can use traits achieve kind of things. it's little more "high level" directly manipuling metaclass ​class original { def my_method() { } } trait meta { def meta_method() { } } def obj = new original()​.withtraits meta ​obj.meta_method()​ see: http://docs.groovy-lang.org/next/html/documentation/core-traits.html#_implementing_a_trait_at_runtime

How jng works in assembly? -

i need make sub if bl>7fh code i'm using is: cmp bl,7fh jng here sub bl,bl here: i know bl>7fh because bl=92 , jng jump if bl not greater than 7fh in case bl greater 7fh why jumps?! the condition jng signed not greater than. depending on whether meant 92 or 92h either 92 or -110 when interpreted signed byte. in case, that's less 127 (7fh), means jng should jump. what want unsigned not greater (the name "not above" or "below or equal"). i.e. jna here ; or jbe here

select - Can't create table throught a view with function inside mysql -

i created 2 tables create table `prova` ( `id` int not null auto_increment , `text` varchar(255) not null , primary key (`id`) ) ; create table `prova2` ( `id2` int not null auto_increment , `text2` varchar(255) not null , primary key (`id2`) ) ; insert prova (text) values ('ffffff'); a function select on table 1 , inserts row in table 2 if value of variable @test set 0: create function `get_prova`() returns int(11) begin declare id_prova int ; declare test int ; set @test = 1; set @id_prova = (select id prova limit 1); if (@test = 0) insert prova2 (text2) values ('dddd'); end if; return @id_prova; end; then, create view calls function: create view temp_prova select id, text, get_prova() prova prova i want create table 3 contains result of view: create table zzz_prova select * temp_prova; but when try create table zzz_prova error: [sql]create table zzz_prova select * temp_prova;...

c++ - How to search a map with multiple keys with one of its keys? -

i have class key containg 2 integers class tkey { public: int ikey1; int ikey2; }; class tdata : public tkey { public: int idata; }; typedef map<tkey, tdata, less <tkey> > mapdata; typedef mapdata::iterator itdata; tmapdata mapdata; mapdata.push_back(...); mapdata.push_back(...); now find item ikey1 == 10 example! i can't use tkey thekey; thekey.ikey1 = 10; thekey.ikey2 = void; // <<<<< itdata = mapdata.find(thekey); how can that? you can perform custom search using std::find_if function. struct check_ikey1 { check_ikey1( int ikey1) : ikey1_(ikey1) {} bool operator()( const std::pair<int, int>& v ) const { return v.first == ikey1_; } private: int ikey1_; }; itdata = std::find_if( tmapdata.begin(), tmapdata.end(), check_ikey1(10) ); disclaimer: written in browser. not compiled! taken this answer .

database - Sqlite3 naming db file with a variable in python -

how can use current date name db file when runs creates db file named after current date. have far: import sqlite3 import time timedbname = time.strftime("%d/%m/%y") # connecting database file conn = sqlite3.connect(???) with error same '/' or '-' or '.' in "%d/%m/%y": conn = sqlite3.connect(timedbname, '.db') typeerror: float required 27.01.2016 try using: time.strftime("%d-%m-%y") i guess doesn't work because of slashes in generated date.

Regex parsing data from between <> PCRE -

i need parse asa logs , pull 2 fields, user , address field: jan 21 11:03:31 vpn1.domain.com %asa-5-223065: group user ip <255.255.255.255> anyconnect parent session started. jan 21 11:03:32 vpn1.domain.com %asa-3-844021: tunnelgroup grouppolicy user ip <255.255.255.255> no ipv6 address available svc connection jan 21 11:03:32 vpn1.domain.com %asa-4-844044: group user ip <255.255.255.255> first tcp svc connection established svc session. jan 21 11:03:32 vpn1.domain.com %asa-5-844025: group user ip <255.255.255.255> tcp svc connection established without compression jan 21 11:03:32 vpn1.domain.com %asa-3-844049: group user ip <255.255.255.255> address <255.255.255.255> assigned session i have this: (user <([^>]*)>)|(address <(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)>) which gives me: user <pp5678> , address <...

D3.JS: Multi-series line chart, show tooltip for all lines at date? -

Image
i've created multi-series line chart tooltips. please check out @ this jsfiddle . currently, tooltip works expected: when hover on circle, shows tooltip data's value @ point. var tooltip = d3.tip() .attr('class', 'tooltip') .offset([-10, 0]) .html(function (d) { return '<strong>population ' + (d.date).getfullyear() + ':</strong> ' + format(d.population) + ' people'; }); svg.call(tooltip); ... city.selectall('.circle') .data( function(d) { return(d. values); } ) .enter() .append('svg:circle') .attr('class', 'circle') .attr('cx', function (d, i) { return x(d.date); }) .attr('cy', function (d, i) { return y(d.population); }) .attr('r', 5) .on('mouseover', tooltip.show) .on('mouseout', tooltip.hide) however, open tooltips @ data points x-value. this: of course correct values points. how modify code a...

gradle - nexus proxy not working -

i configured nexus proxy repository nexus repository group. when start gradle build expected nexus initiate download of requested artifacts. in debug log found sth. org.sonatype.nexus.proxy.maven.maven2.m2repository - resourcestorerequest{requestpath='/com.mycompany/myartifact/, requestcontext=requestcontext{this=org.sonatype.nexus.proxy.requestcontext@585fb59, parent=null}, pathstack=[/repositories/nn01/com.mycompany/myartifact/], processedrepositories=[nn01], appliedmappings={}} :: localonly=true, remoteonly=false, asexpired=false, proxymode=allow there no request @ proxy target. remote browsing in ui working. repository not blocked. i have no idea, i'm doing wrong. why request localonly flag prevents server download artifact remote repository? important note. use gradle builds. found resolving ivy dependencies on proxied repository gradle leads missing resources . there no answer now. thanks help! i solved problem. dependency com.mycomp...

oAuth2Permissions for (Azure Resource Manager API: https://management.azure.com) -

hi guys can found oauth2permissions list ( azure resource manager api: https://management.azure.com ).. found link( https://msdn.microsoft.com/en- ... aauth2permession link not valid seems.. i’m trying access_token scope access virtual machines of azure .. not exact scopes , permissions azure resource manger.. in advance reply.. as google there no permissions needed access resource manager in azure . register application in azure active directory in applications page in login , can proceed further , access azure resources .

python - completely self-contained virtual environment -

i create python3 virtual environment (explicitly avoiding symlinks, --copies ): » python3 -m venv --without-pip --copies venv this complete virtual environment now: » tree venv/ venv/ ├── bin │   ├── activate │   ├── activate.csh │   ├── activate.fish │   ├── python │   └── python3 ├── include ├── lib │   └── python3.4 │   └── site-packages ├── lib64 -> lib └── pyvenv.cfg i disable pythonpath , make sure nothing leaking outside: » pythonpath="" activate venv: » source venv/bin/activate verify activate has not polluted pythonpath : » echo $pythonpath (blank, expected) i using right python: » python /foo/bar/venv/bin/python but system modules still being accessed: » python python 3.4.3 (default, oct 14 2015, 20:28:29) [gcc 4.8.4] on linux type "help", "copyright", "credits" or "license" more information. >>> import unittest >>> print(unittest) <module 'unittest' '...

javascript - Dropdown value changes on hover in Firefox -

in firefox if click on dropdown , hovering on list, , while hovering if take value of dropdown shows hovered value without clicking it. suppose have: <select size="1" class="form-control input-sm input-element" name="fivemod" id="fivemod"> <option value="[6fam]">6-fam (fluorescein)</option> <option value="[hex]">hex</option> <option selected="selected" value="[joe]">joe </option> <option value="[tet]">tet </option> here selected value joe. if run following code, $('#fivemod > option').hover(function(){ console.log($('#fivemod').val()); }); it printing value hover in list. creates problems in situations calling ajax request , in success, if hover through dropdown, taking wrong value without clicking it. (the html generated through jsf) you should not value of dropdown itself, value of option hove...

how to represent date type in apache thrift -

i'm developing service using apache thrift , need define periods of time. dates significant ( yyyy-mm-dd ) , time should totally omitted ( hh:ii:ss ). couldn't find specific date/datetime thrift data type i'm thinking 2 approaches: more complex int year, int month, int day, less complex includes time of day part don't need. int timestamp is there common thrift approach represent date(time) types? i don't think there date representation on thrift idl. use notation our projects. typedef string timestamp; then use notation on subsequent model needs timestamp usage this struct blah{ /** * todo:list notation datetime represents. eg iso-8601 * or if in format yyyy-mm-dd mentioned. */ 1:timestamp datetime; } string makes easier use joda operations --edit-- i don't know timestamp intend store. instance if want calculate current instance transaction has occurred , store thrift object, can joda. string t...

how identify ms access database using vb.net? -

i have ms access database application. have zip database , unzip database using dotnetzip library. question when user restore database how identify database database or not ? if database restore otherwise restrict using vb.net? want copy item unzip source folder destination folder. how can that? i unzip database , directly restore database when select wrong database restore database , when run program getting error.

javascript - Calling a function in ng-repeat -

i have <input type="file"> in ng-repeat , want call function whenever value of element changes <input type="file"> element in ng-repeat. i tried calling $(#"id").change() function not working. have tried using ng-change, ng-repeat doesnt work when use ng-change. code: in html <div ng-repeat="item in items"> <input type="file" accept="image/*" id="add_{{$index}}"/> </div> in js $("#add_images").change(function() { alert("hi"); } why mixing angular , jquery? you have in angular can use easily! in html <div ng-repeat="item in items"> <input type="file" accept="image/*" id="add_images" ng-change="dosomething()"/> </div> in controller js $scope.dosomething = function(){ //do whatever want }

asp.net mvc 5 - Error occured while Entity Framework generating model -

i'm having few tables in edmx (not more 20) i'm having big list of stored procedures (may more 1k) in edmx. ef version 5.0 whenever try add/update model db throw error, can 1 me out this? unable generate model because of following exception: 'system.data.entity.core.entitycommandexecutionexception: error occurred while executing command definition. see inner exception details. ---> system.data.sqlclient.sqlexception: incoming request has many parameters. server supports maximum of 2100 parameters. reduce number of parameters , resend request. @ system.data.sqlclient.sqlconnection.onerror(sqlexception exception, boolean breakconnection, action 1 wrapcloseinaction) @ system.data.sqlclient.sqlinternalconnection.onerror(sqlexception exception, boolean breakconnection, action 1 wrapcloseinaction) @ system.data.sqlclient.tdsparser.throwexceptionandwarning(tdsparserstateobject stateobj, boolean callerhasconnectionlock, boolean asy...

php - Codeigniter insert array into database -

i making registration form in register individually or many need way how make multiple register work cant add input db array string conversion error still dont have model this my code controller public function registerbatch(){ ($i = 0; $i < count($this->input->post('surname','firstname','age','school','course','email')); $i++) { $this->form_validation->set_rules("surname[$i]", "surname[$i]", "required"); $this->form_validation->set_rules("firstname[$i]", "firstname[$i]", "required"); $this->form_validation->set_rules("age[$i]", "age[$i]", "required"); $this->form_validation->set_rules("school[$i]", "school[$i]", "required"); $this->form_validation->set_rules("course[$i]", ...

phoenix framework - Can't put my Error template outside the error folder -

i created standard not_found page working ok long have inside "web/templates/error" folder ( not_found.html.eex ). i'm using (in error_view.ex ): def render("404.html", _assigns) render("not_found.html", %{}) end when try move folder (in particular case standard "web/templates/page" folder) "server internal error" message suppose appear because no render clause matches or no template found. template there , i've tried different folders. i'm using render function in error_view.ex : def render("404.html", _assigns) render("myproject.pageview", "not_found.html", %{}) end shouldn't work? the render/3 function takes 3 arguments. first argument should module call render on: def render("404.html", _assigns) render(myproject.pageview, "not_found.html", %{}) end you have provided string "myproject.pageview" instead of module mypro...

c# - Getting invalid month names in DateTime formatting -

i have simple program return day , shortdate. example, if input 27th march 2016, output "sun, 03/27/2016" string shortmonthformat = "ddd"; datetime dtc = convert.todatetime("2016-03-27 12:26:41.210"); string result = dtc.tostring(string.format("{0}, {1}", shortmonthformat, dtc.toshortdatestring())); console.writeline(result); console.readline(); this code works current system date format mm/dd/yyyy (03/27/2016). if system's date format changed dd-mmm-yy (27-mar-16), code returning following output "sun, 27-3ar-16" mar(march) returned "3ar" aug(august) becomes "aua.d." why happening? because m format specifier meaning single digit month number 1 12 , g specifier means period or era such a.d. since other characters doesn't referring any format specifiers, reflected output exactly are. by way, code seems little bit complicated , buggy. first, generate format using shortmonthfor...

jhipster - Error on "npm install & bower install" -

Image
after installation, new jhipster project appeared here such error: it log file npm-debug.log: 1891 verbose stack @ request.emit (events.js:185:7) 1891 verbose stack @ request.<anonymous> (c:\program files\nodejs\node_modules\npm\node_modules\request\request.js:1082:10) 1891 verbose stack @ emitone (events.js:95:20) 1891 verbose stack @ request.emit (events.js:182:7) 1891 verbose stack @ incomingmessage.<anonymous> (c:\program files\nodejs\node_modules\npm\node_modules\request\request.js:1009:12) 1892 verbose cwd d:\projects\jproject 1893 error windows_nt 6.1.7601 1894 error argv "c:\\program files\\nodejs\\node.exe" "c:\\program files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" 1895 error node v5.5.0 1896 error npm v3.3.12 1897 error unexpected end of input 1897 error {"_id":"karma","_rev":"632-143ecb8b5235e3c97cf3d4b359599b72","name":"karma",...

javascript - Is it possible to pass a boolean to a directive and trigger something if that boolean changes without $watch? -

i hoping able similar following simplified example: class buttoncontroller { set isfoo(value) { console.log(value); // here } } angular.module('myapp', []).directive('mbutton', () => { return { restrict: 'e', replace: true, controller: buttoncontroller, controlleras: 'button', template: '<button class="btn" type="button">blah</button>', scope: {}, bindtocontroller: { isfoo: '=' } }; }); and call directive like: <div ng-app="myapp"> <m-button is-foo="true"></m-button> </div> preview: http://codepen.io/anon/pen/zrwrvr?editors=1010 however, generates $compile:nonassign error fix, this: <div ng-app="myapp" ng-init="foo=true"> <m-button is-foo="foo"></m-button> </div> preview: http://codepen.io/anon/pen/vexwem?editors=1010 but want ab...

javascript - Displayformat fails to format -

i have picked mvc solution , trying format double variable 2 decimal places on form table. in modelview set using [displayformat(dataformatstring = "{0:f2}", applyformatineditmode = true)] before public double declaration not passed through table. table created using javascript. i have tried modify variable in javascript fails. here extract of code used <div class="row"> <div class="col-md-3">journey distance in miles</div> <div class="col-md-9">@model.miles</div> </div> the web page displays value without formatting new this, apologize in advance if obvious it looks displayformat isn't taking. i'm guessing model.miles isn't string. if not.. try this: <div class="row"> <div class="col-md-3">journey distance in miles</div> <div class="col-md-9">@model.miles.tostring("#.##")</d...

c# - What's wrong with my HttpWebRequest POST Request -

i have trouble while sending post http packages website, in sniffer looks http://data2.floomby.com/files/previews/25_3_2013/kui91gedh02qmem94lqtw.jpg @ screenshot. think, mixing post content data before sends, postdata string looks normal. here method code: public responsedata advancedrequest(string method, string url, string postdata, string proxydata, string referer, int timeout) { var req = webrequest.create(url) httpwebrequest; req.method = "get"; iwebproxy myproxy = new webproxy(proxydata.split(':')[0], convert.toint32(proxydata.split(':')[1])); req.proxy = null; //req.servicepoint.connectionlimit = 1; req.protocolversion = httpversion.version10; req.keepalive = true; //req.useragent = "mozilla/5.0 (windows nt 6.1; wow64; rv:19.0) gecko/20100101 firefox/19.0"; req.useragent = "mozilla/5.0 (windows nt 6.1; wow64; rv:19.0) gecko/20100101 firefox/19.0...

PHP ARRAY, there are many times the same valu inside -

i trying use csv file in php code. tried this: if (($handle = fopen("licences/myfile.csv", "r")) !== false) { while (($data = fgetcsv($handle, 1000)) !== false) { $num = count($handle); $row++; ($cc=0; $cc < $num; $cc++) { $userline = explode(";",trim($data[$cc])); $users =$userline[$cc]; echo "</br>" . print_r($userline) . "</br>"; } } } but output not expect. when print_r: array ( [0] => gl [1] => ) 1 array ( [0] => papb1 [1] => ) 1 array ( [0] => res [1] => ) 1 array ( [0] => ecllit [1] => ) 1 array ( [0] => gl [1] => ) 1 array ( [0] => papb1 [1] => ) 1 array ( [0] => res [1] => ) 1 array ( [0] => ecllit [1] => ) 1 array ( [0] => gl [1] => ) 1 array ( [0] => papb1 [1] => ) 1 array ( [0] => res [1] => ) 1 array ( [0] => ecllit [1] => ) 1 array ( [0] => gl [1] => ) 1 array ( [0] => papb1 [1] => ...

xslt - Images in XSL-FO in eXist-db -

in former question have touched broader problem of paths , recognizing inside exist-db app. at moment, not able images in pdf files. have tried 2 installations of exist (2.2 , 3rc) , many possible scenarios. of course, have tested pictures reachable through browser. in source file, have tried: 1. <graphic url="img/tealover.jpg"/> 2. <graphic url="/db/apps/karolinum-apps/data/mono/2015080/img/tealover.jpg"/> 3. <graphic url="http://46.28.111.241:8081/exist/rest/db/apps/karolinum-apps/data/mono/2015080/img/tealover.jpg"/> 4. <graphic url="url(img/tealover.jpg)"/> 5. <graphic url="url(/db/apps/karolinum-apps/data/mono/2015080/img/tealover.jpg)"/> 6. <graphic url="url(http://46.28.111.241:8081/exist/rest/db/apps/karolinum-apps/data/mono/2015080/img/tealover.jpg)"/> 7. <graphic url="url('img/tealover.jpg')"/> 8. <graphic url="url('/db/apps/karolinum...

ruby on rails - Mina deploy failed -

i try deploy rails app via mina.but when start deploy task, mina return error -----> launching $ cd "$release_path" $ echo "$release_path" $ if [ -e '/home/ubuntu/deploy/shared/tmp/sockets/pumactl.sock' ]; cd /home/ubuntu/deploy/current && rails_env="production" /home/ubuntu/.rbenv/shims/bundle exec pumactl -s /home/ubuntu/deplo cd /home/ubuntu/deploy/current && rails_env="production" /home/ubuntu/.rbenv/shims/bundle exec pumactl -s /home/ubuntu/deploy/shared/tmp/sockets/puma.state phased-restart else echo 'puma not running!'; fi not locate gemfile or .bundle/ directory ! error: deploy failed. my tasks in deploy.rb passed good, when mina start launch - error.here deploy_staging.rb require 'mina/bundler' require 'mina/rails' require 'mina/whenever' r...

Magento Configurable Product Overwrite Defaults by URL -

i browsing through js/varien/configurable.js , noticed comment said, // overwrite defaults url . mean there way pre-select drop down values altering url? if so, can please show me example of how accomplished (example: color)? perhaps http://www.example.com/test/product.html#color=blue ? options url modify selections? associated sku? attribute , option labels? attribute , option ids? // overwrite defaults url var separatorindex = window.location.href.indexof('#'); if (separatorindex != -1) { var paramsstr = window.location.href.substr(separatorindex+1); var urlvalues = paramsstr.toqueryparams(); if (!this.values) { this.values = {}; } (var in urlvalues) { this.values[i] = urlvalues[i]; } } // overwrite defaults inputs values if needed if (config.inputsinitialized) { this.values = {}; this.settings.each(function(element) { if (element.value) { ...

regex - Drop values between two characters in a string -

this question has answer here: get filename url path in r 2 answers suppose have multiple forms of following string x <- "/users/name/google drive/thesis/data/data x , y/uk//5port/5groups.csv" i want drop values between first / , last / return 5groups.csv . used gsub couldn't find how specify pattern. my question same this 1 in r. if using sub sub('.*\\/', '', x) #[1] "5groups.csv"