Posts

url rewriting - How to rewritten rule for c# for GET request example.com/123 redirect to example.com/default.aspx?pid=123 and 123 is dynamic change -

this uri http://example.com/xyz xyz number. have redirect http://example.com/default.aspx?pid=xyz this link should more: https://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module . in iis manager create new rule with: action: redirect pattern: ^([0-9]{3}) redirect url: default.aspx?pid={r:1} if xyz change in length, consider changing pattern to: ^([0-9]+)

c++ - cc1plus: error while loading shared libraries -

i running simulator mounted on disk. when trying cross compile application, gives me error: /mnt/mipsroot/cross-tools/bin/../libexec/gcc/mips-unknown-linux-gnu/4.6.3/cc1plus: error while loading shared libraries: libcloog.so.0: cannot open shared object file: no such file or directory i have tried lot rectify it, in vain. there way how can application cross compile? [root@canada ~]# yum search cloog redirecting '/usr/bin/dnf search cloog' (see 'man yum2dnf') last metadata expiration check: 0:56:47 ago on thu nov 10 14:11:03 2016. ================================= n/s matched: cloog ================================= cloog.i686 : chunky loop generator cloog.x86_64 : chunky loop generator cloog-devel.i686 : development tools chunky loop generator cloog-devel.x86_64 : development tools chunky loop generator [root@canada ~]# yum install cloog-devel did ?

node.js - Unable to run seneca for rest microservices -

i having following code in executable js after necessary imports. seneca.ready(function(err){ seneca.act('role:web', {use:{ prefix: '/products', pin: {area:'product', action:'*'}, map: { list:{get:true} } }}) var express = require('express'); var app = express(); app.use(require('body-parser').json()); app.use( seneca.export('web') ); app.listen(8082); }); i getting following error while trying run example: seneca fatal error message: seneca: export web has not been defined plugin. code: export_not_found details: { key: 'web' } thanks, sumit i beginner, hope snippet useful: var seneca = require('seneca')() var web = require("seneca-web"); var express = require('express'); var app = express(); var config = { routes : [ { prefix : '/products', pin : { area : 'product...

sql - Pass column name to a function -

create or replace function test123(column_name varchar(40)) returns record $$ declare rec record ; begin select * rec my_table column_name=1 limit 1; return rec; end; $$ language plpgsql; how can pass column name function , use name in query? the above code not work: error: operator not exist: character varying = integer when want use function parameters identifiers in queries inside function need dynamically execute query: create or replace function test123(column_name varchar(40)) returns record $$ declare rec record; begin execute format('select * my_table %i = 1 limit 1', column_name) rec; return rec; end; $$ language plpgsql; or shorter: create or replace function test123(column_name varchar(40)) returns record $$ begin return query execute format('select * my_table %i = 1 limit 1', column_name); end; $$ language plpgsql;

Loop MySQL run with java -

i have 3 tables having following content : author idauthor int name varchar publication idpublication int title varchar date year type varchar conference author_has_publication author_idauthor int publication_idpublication int i trying relational schema on authors. objectif show number of publication have in common. authors name parameters, can have 8 names. code giving number of common publication between 2 authors, have loop it. using java loop , sql statement that. here sql part private int runquery(string a1, string a2){ // a1 author 1 , a2 author 2 try { auth1 = new arraylist<string>(); class.forname("com.mysql.jdbc.driver"); connection connection = drivermanager.getconnection( "jdbc:mysql://localhost:3306/mydb", "root", "root"); statement stmt = connection.createstatement(); long start = system.currenttimemillis(); string ...

Paypal - Sandbox - Open Test Account -

after x hours of searching , lost-ing inside documentation , community, understand that, if : i'm non developer my client not company i want integrate paypal in market-place sending several emails paypal support i need to: register business account in paypal.com ( , not in sandbox ) find user because i'm not, otherwise need fake address, zip code , state enter in developer.paypal.com someone can answer me yes ? or right procedure ? thanks from https://developer.paypal.com/docs/faq/#international-developer-questions "i'm non-u.s. developer. products available me? the rest api supports number of countries , currencies. rest api provides simple payment processing common business needs, including paypal payments, direct credit card payments, authorization , capture, , refunds. more advanced payment solutions such parallel , recurring payments, can use nvp/soap apis. if you've used our nvp/soap apis, can continue use them. using old...

java - Getting ConcurrentModificationException from onLocationMethod -

this question has answer here: concurrent modification exception : adding arraylist 7 answers i trying update arraylist of locations per below logic in service, running in background thread through runnable.i have edited code show relevant code. getting concurrentmodificationexception . public static arraylist<location> locationpoints; @override public void onlocationchanged(final location location) { //log.i(tag, "onlocationchanged: " + location); log.i(tag, "onlocationchanged: " + locationpoints.size()); arraylist<location> alnew= locationpoints; if(!locationpoints.isempty()){ for(location l:alnew){ if(location.distanceto(l)<=200.0f){ locationpoints.add(l); }else{ locationpoints.add(location); } } }else{ locationp...