Posts

Showing posts from February, 2012

if statement - EXCEL - IF multiple strings in a range of cells -

server type count enterprise 3 standard 24 enterprise core 6 in excel, looking check if server type (a2-a5) contains both 'enterprise' , 'enterprise core' or 'enterprise'. if contains both, add 2 numbers together, otherwise, display number 'enterprise'. perhaps this: =sumif(a:a,"enterprise",b:b)+sumif(a:a,"enterprise core",b:b) if doesn't have both .. it'll find 1 add ..

Headerdoc, Objective-C, anonymous type, ERROR -

i have generate doc xcode's project objective-c. have error anonymous type . think headerdoc doesn't @interface section. can resolve that? my apologies grammar mistakes, have xcode's project objective-c, want generate doc script (i'm not @ work try explain problem). in project have class x .h /*! headerdoc comment */ @interface x: nsobject @end .m #import x.h @interface x(){ /*! headerdoc comment */ nsstring *_xid; } @end @implementation x /*! headerdoc comment */ -(void)amethod{ } @end and when run, have error "anonymous type", , when removed @interface section in .m it's working.

python - Pip invalid command egg_info -

i upgraded pip , broke things. i tried running this: sudo pip install -u ipython pyzmq requirement up-to-date: ipython in /library/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages downloading/unpacking pyzmq downloading pyzmq-14.5.0.tar.gz (997kb): 997kb downloaded running setup.py (path:/private/tmp/pip_build_root/pyzmq/setup.py) egg_info package pyzmq usage info.... error: invalid command 'egg_info' ---------------------------------------- cleaning up... command python setup.py egg_info failed error code 1 in /private/tmp/pip_build_root/pyzmq storing debug log failure in /users/asselinpaul/.pip/pip.log ➜ ~ pip show setuptools --- name: setuptools version: 15.0 location: /library/frameworks/python.framework/versions/2.7/lib/python2.7/site-packages/setuptools-15.0-py2.7.egg requires: more info: ➜ ~ python /library/frameworks/python.framework/versions/2.7/bi

javascript - Trying to put a timer on colorbox while also placing a cookie & reading it to show only once -

hello , thank anyone's help. i'm trying title says , i've had success placing cookie browser reads , shows colorbox popup once per browser session. however, when try add timer code seems throw acknowledgement of cookie out. please take @ page i've knocked show , explain : http://www.absorbent-spill-kits.co.uk/testing-cookies/cookiepage2.html if close popup, i've written on page script , trouble i'm having. this should it(partially tested). question benefit more examples. //check cookie if(!$.cookie("colorboxshown")){ //if no cookie, set timeout of 3 minutes (1000 milliseconds) * (60 seconds) * (3 minutes) settimeout(function() { $.colorbox({ iframe: true, width: "80%", height: "80%", href: "http://www.sitepoint.com" }); }, 1000*60*3); //your expires work too, adds year current date. var expires = new date(); expires.setfullyear(expires.getfullyear() + 1); $.c

etl - Pentaho - Having multiple Copy rows to result results in Get rows from result empty -

Image
i'm trying process data , store in datawarehouse. doing it, wanted store dimensions in 1 transformation , fact (only have one) in transformation. can use job execute first one, copy rows result , them second transformation. in first transformation, read excel file , separate data streams. data baptism, have 1 stream person, 1 parents, 1 sponsors, , on... @ end of each stream, insert data database , return pk autogenerated (it id autoincrement). in second one, have get rows result , want set them txt file (just see been done correctly). problem file created empty. suppose if let fields in get rows result empty, gets fields. what doing wrong? at end want have 1 copy rows result @ end of each stream in first transformation , data in second one. in "insert pare padrina" return id_pare_padrina autogenerated, , same "insert mare padrina" (i have more streams have include them result). transformation not executed per row because need values of other

xml - Jetty Configuration: problems with dtd -

i'm using jetty embedded in gradle project jetty.xml server configuration. jetty has xml configuration use jettyrunwar (gradle plugin). this jettyrunwar in build.gradle: jettyrunwar{ contextpath = "/" httpport = 8080 jettyconfig = file("./jetty.xml") reload = "automatic" scanintervalseconds = 10 webapp = file("./build/libs/relevanteme.war") } and jetty.xml (configuration). <?xml version="1.0" encoding="iso-8859-1"?> <!doctype configure public "-//jetty//configure//en" "http://www.eclipse.org/jetty/configure_9_0.dtd"> <configure id="server" class="org.eclipse.jetty.server.server"> <set name="port"><systemproperty name="jetty.port" default="8080"/></set> <new id="webapp" class="org.eclipse.jetty.webapp.webappcontext"> <set name="

C++ does not name a type in Constructor definition -

i try compile code, pretty sure made mistake in headers or in compilation don't understand where. know basic problem, , read other topic, don't understand. , watch other code wrote , don't see difference... g++ -c main.cpp -o out i don't understand error, try : g++ -c readfastqfile.cpp the error readfastqfile.cpp:8:1: error: ‘readfastq’ not name type readfastq::readfastq(){ //constructor and files : main.cpp #include <iostream> #include <string> #include "readfastqfile.hpp" using namespace std; int main(int argc, char *argv[]){ cout << "hello" <<endl; //readfastq allreads; return 0; } readfastqfile.hpp #ifdef readfastqfile_hpp #define readfastqfile_hpp #include <iostream> #include <string> using namespace std; class readfastq{ public: readfastq(); //constructor private: string readname; string sequence; string score; };

bash - How Can I get Rake to use RVM's Ruby? -

i'm trying install application on ubuntu uses ruby. installed rvm , ruby 2.0 , ran rake install , rake tried using older system version of ruby. uninstalled system version , tried running rake again. time said "no such file". how rake use rvm's ruby? below output different commands. $ rake install sudo bundle --without production staging test levelbuilder --quiet sudo: unable execute /usr/local/bin/bundle: no such file or directory rake aborted! ... /home/ubuntu/../rake_utils.rb:33:in `system' .. /home/ubuntu/../rake_utils.rb:43:in `bundle_install' /home/ubuntu/../rakefile:198:in `block (3 levels) in <top (required)>' .. /home/ubuntu/.rvm/gems/ruby-2.0.0-p643/bin/ruby_executable_hooks:15:in `eval' ... the path , version right: $ echo $path /home/ubuntu/.rvm/gems/ruby-2.0.0-p643/bin:/home/ubuntu/.rvm/gems/ruby-2.0.0-p643@global/bin:/home/ubuntu/.rvm/rubies/ruby-2.0.0-p643/bin:/home/ubuntu/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sb

javascript - $.ajax submiting a form, sometimes get success and sometimes error -

i have simple log-in form passed php through $.ajax function. problem on localhost $.ajax function result success , error. of time when i'm getting success when i'm using chrome debugger. when checked file on server got error result $.ajax. thanks in advance.. form code: <form method="post" action=""> <h3>login</h3> <label>user name:<input type="text" name="uname" id="uname"></label> <br> <label>password:<input type="password" name="pass" id="pass"></label> <br> <button type="submit" id="submit">login</button> </form> $.ajax code $("#submit").click(function(){ $.ajax({ cache: false, url: 'php/login.php', type: 'post',

jquery - How do I change DFP Text Link Creative style, which is forced to display as Times New Roman from user agent stylesheet? -

Image
we using dfp text ad creatives throughout our site, user agent stylesheet forcing display in times new roman font (see attached) ripping out link iframe , placing dom not working option us: https://stackoverflow.com/a/16039744/2595830 the options within dfp allow change text color , not font family. more control on styling can better, have suggestions on how @ least change font-family of link? <!doctype html> <html lang="en-us"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>test text link</title> <style type="text/css" media="screen"> body{ font-family: 'helvetica', arial, sans-serif; } </style> <script type='text/javascript'> var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; (function() { var gads = document.createelement('script'); gads.async = true; gads.type = 'text

adding a result of a calculation to a span with javascript (jQuery) after a button is clicked -

hi wrote jq i'm not sure correct :) me figure out how 1.when user clicks button (show results) 2.the 2 figures added , result displayed in span # result 3.check on user input, warning, if there no number entered text boxes only pure jquery please :) thank in advance help. http://jsfiddle.net/4ke8k5vp/ <body> <div id="wrapper"> <p> <input type="text" id="num1" placeholder="enter number" value="" /> + <input type="text" id="num2" placeholder="enter number more" value="" /> = <span class="alert" id="result"></span> </p> <input type="button" value="show results" /> </div> $(document).ready(function () { var num1 = $('#num1'); var num2 = $('#num2'); var total = num1

bash passing positional parameters in function -

i have small problem, please next code , output, , tell me miss. #!/bin/bash foo () { echo "parameter #1 $1" } foo my output: [user@host]$ ./test.scr test parameter #1 parameter #1 functions own positional parameters when called. if need pass scripts arguments function use foo "$@" (the quotes important not forget them).

ios - UITableView - switch data from two arrays -

i'm working on application in have uitableview, 2 arrays , 1 uisegmentedcontrol. need when uisegmentedcontrol value 0 loaded in uitableview data array one, , when uisegmentedcontrol has value 1 loaded data array two. simply, need switch data loaded uitableview arrays. tried use bool, not work, think it's not ideal. here code: - (void)viewdidload { [super viewdidload]; alltabledata = [[nsmutablearray alloc] initwithobjects: [[food alloc] initwithname:@"bwm" anddescription:@"auto" anddefinice:@"osobni"],nil ]; alltabledata2 = [[nsmutablearray alloc] initwithobjects: [[food alloc] initwithname:@"renault" anddescription:@"dodavka" anddefinice:@"velka"],nil ]; } - (nsinteger)numberofsectionsintableview:(uitableview *)tableview { return 1; } - (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section { long rowcount; if(

maven - sonarqube displays 0 unit tests data coverage -

trying see unit test code coverage on sonar. using jacoco code coverage , able code coverage project when execute code in eclipse. while running in jenkins, following messages , warnings no tests run , no sources compile i can code coverage report on sonar unit tests shows. how can sonar display coverage unit tests? how can eliminate warning messages? attaching surefire , jacoco plugins , jebnkins console log kindly <plugin> <groupid>org.jacoco</groupid> <artifactid>jacoco-maven-plugin</artifactid> <version>0.6.4.201312101107</version> <executions> <execution> <id>prepare-unit-test-agent</id> <goals> <goal>prepare-agent</goal> </goals> </execution> <execution> <id>generate-unit-test-report</id> <goals> <goal>report</goal> </goals> </execution>

java - Number Format Exception Error logic help don't see the issue -

getting number format exception error when trying design , exit command in expression string. advice tremendously appreciated :). string expression = " "; //all other varaible in loop declared , intialized //removed cluttering purposes while(!expression.equals("quit")) { expression = kbd.nextline(); variable = expression.charat(0); startindex = expression.lastindexof(" ")+1;//index of future integer value stringlength = expression.length(); strvalue = expression.substring(startindex,stringlength); intvalue = integer.parseint(strvalue);//error here numberformatexception } system.out.println(" "+strvalue);//string value test print tempindex.put(variable,intvalue);//assigns int value variable int getvarvalue = tempindex.get(variable);//gets value stored in variable system.out.println(variable+" = &qu

ios - WatchKit Notification payload example -

as may know, on pushnotificationpayload.aps file, actions can set on "watchkit simulator actions" node. can provide me real push notification payload includes actions? thanks! we use test payload looks this: { "aps": { "alert": { "title": "my alert title", "body": "the body message", }, "category": "mycategoryname" }, "watchkit simulator actions": [ { "title": "like it!", "identifier": "my_like_action" } ], "mycategorydictionary": { "image" : "http://.....", "subject" : "the subject of alert message", "content": "detailed content info can go here" }, "customkey": "use file define testing payload notifi

XStream double underscore - handling in Java Spring Batch Application Context -

​i using xstream oxm (java objects xml). namecoder uses underscore default escape character (more info below) , since have ext_data xml tag, being written ext__data. xstream maps java class names , field names xml tags or attributes. unfortunately mapping cannot 1:1, since characters used identifiers in java invalid in xml names. therefore xstream uses anxmlfriendlynamecoder replace these characters replacement. default namecoder uses underscore escape character , has therefore escape underscore also. may provide different configured instance of xmlfriendlynamecoder or complete different implementation thenonamecoder prevent name coding @ all. responsibility ensure, resulting names valid xml. ( http://x-stream.github.io/faq.html ) i have attempted providing different configured instance of xmlfriendlynamecoder (using various implementations of hierarchicalstreamdriver) using complete different implementation of nonamecoder. although app runs successfully, results remain uncha

php - LIKE Statement not Working Properly in PDO -

i have piece of code return search results database: $search_stmt = $dbconnection->prepare("select * `books` `title` '%testing1234%' order `rating` desc, `title` asc limit 1000"); this piece of database: --------------------- | id |title | --------------------- | 1 |testing1234 | --------------------- | 2 |testament... | --------------------- that doesn't return table. replacing testing1234 testing , returns row 1 . i've tried replacing testing1234 test , returns both rows. i've replaced like '%testing1234%' regexp 'testing1234' , same results regexp got of like statements. when put original query sequel pro, returns row 1 . so conclusion i'm not using pdo properly, me going in right direction appreciated! the answer make sure the charset defined whne establishing connection database. this original code connecting: $dbconnection = new pdo('mysql:host=' . $db_host . ';d

java - How to dynamically populate @Value property from local property file in Spring? -

i having issue setting property need use in code. in class, i've declared property so: @value("${foo.password}") private string foopassword; this fine, there bit of wrinkle when comes how property file i'm pulling stored in other environments. in of our upper environments, our value stored encrypted. however, in our dev environment, don't have ability decrypt value must store decrypted. encrypted values stored 1 key, while decrypted values stored key. in order make generic solution, i'd love able specify backup value in @value annotation. like... @value("${foo.passwordencrypted ? foo.passworddecrypted }") private string foopassword; ... in dev environment can grab decrypted value, while upper environemnts can grab encrypted value , needs do. is can achieved @value? possible create our own custom annotation similar? i believe looking "default" value? in case use way @value("${foo.passwordencrypted:default_decr

xml - XSL string parsing and getting value with a bid oddity -

been fighting xml beginner, , result have have work with. xml being returned following: <response .... /> <metric ... /> <stuff .... /> <stuff .... sname="on" tag="parameters: (@sid: dftdr.23423.s1.rt, @stype: x)" /> well trying output select parameters , sid value there. display in example, parameters dtfdr.23423.s1.rt . got 1 half of done doing this: <xsl:value-of select="substring(/response/metric/stuff[@sname='on'][1]/@tag, 1, 9)"/> but can't think of way parse sid out dynamic value getting length. can start position can't seem figure out , easy indexof concept "," or if there's better way this. this base xml it's cards dealt, can't change it. is there easier way write out buried @sid value? much help, hope explained enough. try expression parse out sid <xsl:value-of select="substring-before(substring-after(/response/metric/stu

c# - MSBUILD - Optimize ResolveProjectReferences target -

we have large solution of 300+ projects. the build process taking long time. have looked combining number of projects management reluctant allocate enough time that. i have tried following: set copy local false use common bin folder solution however, builds still take 5+ minutes, when there small change 1 small projects. note incremental build process works fine, , projects have changed built. while looking @ diagnostics, appears of time spent in resolveprojectreferences target. target appears calling <msbuild> task. particular call appears take 500 ms each time. sounds high me considering nothing gets built majority of time! i.e. check modified date of assembly , conclude nothing needs built. that process seems inefficient me. there can do? instance create temporary file keeps track of projects have changed since last build , override resolveprojectreferences target use that? else? note: i build command line. i use /m switch i output build errors conso

c# - Background fetch on Xamarin.forms -

i have been looking around, don't see topics related background fetch in xamarin.forms. have xamarin.forms.ios solution can update data dragging view down. how should go setting background fetch on xamarin.forms (is there such thing?) or have create custom renderer ios application? my main goal have application check new data every minute or while using little resources possible. using azure in case there work around doing this. if want use ios background fetch have implement fetch code in ios project would. http://developer.xamarin.com/guides/ios/application_fundamentals/backgrounding/part_3_ios_backgrounding_techniques/updating_an_application_in_the_background/#background_fetch_ios_7

java - Scrollable in JTextArea -

i have class extending jframe , jtextarea configuration below. reason scroll doesn not appear. can't figure out why. jtextarea ta=new jtextarea(); ... ta.settext(out); jscrollpane scrollframe = new jscrollpane(ta); //ta.setautoscrolls(true); scrollframe.setverticalscrollbarpolicy(scrollpaneconstants.vertical_scrollbar_always); scrollframe.sethorizontalscrollbarpolicy(jscrollpane.horizontal_scrollbar_always); add(scrollframe); add(ta); setsize(300, 300); setresizable(false); setdefaultcloseoperation(windowconstants.hide_on_close); setvisible(true); for example, adding scrollable jtextarea (java) just add scrollframe , not jtextarea add(scrollframe); // add(ta);

java - Serving static content in a Tomcat webapp -

in tomcat webapp in circumstances should we serve static content using tomcat default servlet , in other case should placing it in directories @ same level (not under, of course) of web-inf ? i hope question clear enough,thanks. files placed under web-inf not accessible via url cannot served static content. typically place there configuration files or other internals. as static content, can use not need special access. example if content can seen depends on user logged in, need provide such logic in servlet , store files under web-inf otherwise, can "guess" correct url able retrieve them.

javascript - Ajax request, null data, path to the server rails -

i have client request ajax, final url /promotion?mtd , log tell me parameter mtd = null. should promo = mtd, need data passing in url. ajax: var promo = document.getelementbyid('data-select').value; $.ajax({ type: 'get', url: '/promotion', data: promo, datatype: 'json', success: function(data){ alert(data); } }); log/development.log: started "/promotion?mtd" 127.0.0.1 @ 2015-04-14 16:32:34 -0430 processing promoscontroller#get_percent json parameters: {"mtd"=>nil} var promo = document.getelementbyid('data-select').value; $.ajax({ type: 'get', url: '/promotion', data: {"promo" : promo}, datatype: 'json', success: function(data){ alert(data); } });

css - make text area like notepad JavaFX -

Image
how can style text field notepad using css or code? i tried said here , was: textarea { background: url(http://i.stack.imgur.com/ynxjd.png) repeat-y; width: 600px; height: 300px; font: normal 14px verdana; line-height: 25px; padding: 2px 10px; border: solid 1px #ddd; } but didn`t affect text area. here i`m looking for: thanks approach create lined linear gradient background content portion of textarea. -jewelsea-lined-notepad: linear-gradient( 0px 0px 0px 11px, repeat, gainsboro, gainsboro 6.25%, cornsilk 6.25%, cornsilk ); implementation notes the tricky part having lines in linear gradient line lines of text. thought simple specifying gradient size 1em (e.g. 1 measure of font size per line), didn't allow gradients align. specified gradient in absolute pixel sizes (found trial , error). unfortunately, approach, change fonts or font sizes text area, need adjust values in gradient manu

arrays - PHP: "Notice: Undefined variable", "Notice: Undefined index", and "Notice: Undefined offset" -

i running php script, , keep getting errors like: notice: undefined variable: my_variable_name in c:\wamp\www\mypath\index.php on line 10 notice: undefined index: my_index c:\wamp\www\mypath\index.php on line 11 line 10 , 11 looks this: echo "my variable value is: " . $my_variable_name; echo "my index value is: " . $my_array["my_index"]; what these errors mean? why appear of sudden? used use script years , i've never had problem. what need fix them? this general reference question people link duplicate, instead of having explain issue on , on again. feel necessary because real-world answers on issue specific. related meta discussion: what can done repetitive questions? do “reference questions” make sense? notice: undefined variable from vast wisdom of php manual : relying on default value of uninitialized variable problematic in case of including 1 file uses same variable name. majo

Serializing Joda DateTime with Jackson and Spring -

i having problems consistently serializing , deserializing joda datetime java json , again using spring boot , jackson-databind 2.5.2. pom.xml looks this. <dependency> <groupid>com.fasterxml.jackson.core</groupid> <artifactid>jackson-databind</artifactid> <version>2.5.2</version> </dependency> <dependency> <groupid>com.fasterxml.jackson.datatype</groupid> <artifactid>jackson-datatype-joda</artifactid> <version>2.5.2</version> </dependency> <dependency> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-web</artifactid> <version>1.2.1.release</version> </dependency> when serialize datetime object integer representing datetime. not expected actually, fine. when go save object following error... failed convert property value of type 'java.lang.string' required typ

sql - Database design for products table -

i have product table , category table in database. a product can have (n) number of categories. what best design tables , fields performance , optimization? products table -------------- id name ... categories table ---------------- id name ... product_categories table ------------------------ product_id category_id if want products of category do select p.* products p join product_categories pc on pc.product_id = p.id join categories c on pc.category_id = c.id c.name = 'shoes'

Use a custom named php file in a Wordpress theme -

i'm building wordpress theme someone, based on older modified theme, , using ajax scripting flash based "holders" ad areas. i'm trying use custom name phps add image widgets them. so basically, trying use <?php get_ad('variantnamehere'); ?> , ad-customname.php theme files. i assume have register files within functions.php, have no idea how that. is there way that? in theme's functions.php add following: require_once( dirname(__file__) . '/ad-customname.php' );

Converting rtf to pdf using python -

i new python language , given task convert rtf pdf using python. googled , found code- (not rtf pdf) tried working on , changed according requirement. not able solve it. i have used below code: import sys import os import comtypes.client #import win32com.client rtfformatpdf = 17 in_file = os.path.abspath(sys.argv[1]) out_file = os.path.abspath(sys.argv[2]) rtf= comtypes.client.createobject('rtf.application') rtf.visible = true doc = rtf.documents.open(in_file) doc.saveas(out_file, fileformat=rtfformatpdf) doc.close() rtf.quit() but throwing below error traceback (most recent call last): file "c:/python34/lib/idlelib/rtf_to_pdf.py", line 12, in <module> word = comtypes.client.createobject('rtf.application') file "c:\python34\lib\site-packages\comtypes\client\__init__.py", line 227, in createobject clsid = comtypes.guid.from_progid(progid) file "c:\python34\lib\site-packages\comtypes\guid.py", line 78, in fr

Embedded HTML in JavaFX WebView not rendering properly -

Image
i trying embed codemirror js editor in webview, borrowing heavily code located post. http://github.com/jewelsea/conception javafx code editor content highlighter java code here html template <!doctype html> <html> <head> <link rel="stylesheet" href="http://codemirror.net/lib/codemirror.css"> <link rel="stylesheet" href="http://codemirror.net/theme/cobalt.css"> <script src="http://codemirror.net/lib/codemirror.js"></script> <script src="http://codemirror.net/mode/sql/sql.js"></script> </head> <body> <form> <textarea id="code" name="code">--this code inside sqlttool;&#10;insert thing&#10;${code}</textarea> </form> <script> var editor = codemirror.fromtextarea(document.getelementbyid("code"), { linenumb

html - Javascript - Manipulating certain checkpoints with differnet names from url -

i have website checkboxes in html: <input onclick="markaschanged(this); toggleapprovedeny(this);" name="2c9923914b887d47014c9b30b1bb37a1_approvechk" type="checkbox"> <input onclick="markaschanged(this); toggleapprovedeny(this);" name="2c9923914b887d47014c9b30b1bb37a1_denychk" type="checkbox"> <input onclick="markaschanged(this); toggleapprovedeny(this);" name="2c9923914b887d47014c9b8b4f0337df_approvechk" type="checkbox"> <input onclick="markaschanged(this); toggleapprovedeny(this);" name="2c9923914b887d47014c9b8b4f0337df_denychk" type="checkbox"> i need line/script 'check' boxes '_approvechk' , leave others unchecked. there way in url "javascript:alert();" style? or way call javascript script stored locally through url? is there way in url "javascript:alert();" style? yes wouldn't rec

gruntjs - add variable id in script tags using grunt -

i have around 10 files eg: file1.html, file2.html, fil31.html, file4.html each file contains starting , end script tag blank id='' field i want add id's script tags in each file. the id's file names. before running grunt eg: file1.html <script type='text/ng-template' id=''> <div>couple of other dive tags</div> </script> after running grunt id filed should have if file name eg: file1.html <script type='text/ng-template' id='file1.html'> <div>couple of other dive tags</div> </script> i have tried using couple grunt packages can't head around how make them pick file name , add them ids. grunt file_append grunt-script-link-tags has faced same problem or knows how solve this? use following code add id's dynamically in script tag. replace text specified replacement using grunt replace

android - How to add a Phonegap java plugin in Ionic? -

i using ionic make app , have same problem : cannot find file in gallerie after downloading phonegap in android when download picture in app it's not updating android media storage. so wanted set plugin in ionic app : https://github.com/philipp-at-greenqloud/pluginrefreshmedia but don't know should put java file ? couldn't find tutorial java plugins in ionic. best regards you can add phonegap plugin ionic project command line using: cordova plugin add https://github.com/philipp-at-greenqloud/pluginrefreshmedia i recommend adding ngcordova project , learning bit make life easier when dealing plugins , such.

javascript - Dragging item gets hidden when overflow-y is used -

i created fiddle demonstrate problem (also can run inside question, below). i have sidebar of playing card images want drag main area. sidebar holds lot of cards want scrollable. however, when give scroll feature, when drag card, gets hidden when drag out of sidebar. var app = angular.module('myapp', ['ngdraggable']); app.controller('ctrl', function ($scope) { }); #gallery-container { overflow-y: scroll; } .card { width: 100%; } <link href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"/> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular.min.js"></script> <script src="https://rawgit.com/fatlinesofcode/ngdraggable/master/ngdraggable.js"></script> <div ng-app="myapp"> <div ng-controller="ctrl"> <div class="row"> &l

meteor - creating proxy url with meteorjs -

i wondering how might achieve following using ironrouter in meteorjs: app.route("/api/tts").get(function(req,res){ res.type('audio/mpeg'); var text = req.query.q; var request = require('request'); var url = "https://translate.google.pl/translate_tts?ie=utf-8&q=" + text + "&tl=en&total=1&idx=0&client=t&prev=input"; request.get(url).pipe(res); }); if have iron:router installed already, can. need install request using meteorhacks:npm . then write: router.route("/api/tts", function () { // nodejs request object var req = this.request; // nodejs response object var res = this.response; res.type('audio/mpeg'); var text = req.query.q; var request = meteor.npmrequire('request'); var url = "https://translate.google.pl/translate_tts?ie=utf-8&q=" + text + "&tl=en&total=1&idx=0&client=t&prev=input"; request.ge

algorithm - What can be a correct approach for SPOJ COURIER -

i trying solve courier problem on spoj. able understand have solve tsp dynamic programming approach unable understand whether approach handling multiple parcel between same pair of cities correct or not. pseudocode following: 1) use floyd warshall find pair shortest path in o(n^3). pair of cities connected more 1 roads, can keep shortest 1 undirected graph. 2) add shortest cost each request start end. 3) create new directed graph each of 12 requests , homecity. node of new graph merge of each request's source , destination. edge weight between a->b can calculated shortest path between 'a' request's destination 'b' request's source.i thinking of duplicating pairs if have multiple request between them. 4) use tsp dp solve new undirected 13 city tsp problem. o(n^2 2^n) come around 1384448. not sure whether time out multiple test cases. can please give inputs complicating problem approach of creating new directed graph? not using information there 5

android - Getting java.lang.NullPointerException when I try to use maps -

first of all, i'm using android studio , it's first time using maps. i created project, navigation drawer activity. file> new project > next > next> switched "navigation drawer activity" , clicked next > finish. after, clicked in project right button > new > activity > google > google maps activity. i put google api maps key in google_maps_api.xml. so opened mainactivity, , type following inside oncreateview function: @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view rootview = inflater.inflate(r.layout.activity_maps, container, false); setupmapifneeded(); return rootview; } then add after following 2 functions: private void setupmapifneeded() { // null check confirm have not instantiated map. if (mmap == null) { // try obtain map supportmapfragment. mmap = ((supportmapfragment) ge

javascript - show form and content in "verification" modal -

i present user form filled out in modal pops after click "submit" verification. see carbon copy of form, each field disabled or grayed out can on , confirm right. make changes form @ stage require cancel out of modal , taken form. i having trouble getting data contained within form. there easy way jquery or javascript? or there strategy allowing user on changed missing/forgetting? you can display clone version of form in modal: var $clonedform = $('#myformid').clone(); $('input, select, textarea', $clonedform).attr('disabled', 'disabled'); $clonedform.appendto('#modalid');

sql - How to join a large table (1M+) with a reference table in Teradata? -

i have following 2 tables- tablea (3 million rows; "data table") tableb (2300 rows; "reference table") schemas - tablea - id, field1, field2, field3, num_of_actual_items, num_of_possible_items tableb - field1, field2, field3, num_of_possible_items background there 14000 unique ids in tablea . [select count(distinct id) tablea] gives 14000 answer. there 2300 possible combinations of field1, field2 , field3 , of them corresponding num_of_possible_items listed in tableb . tablea not contain entries id when num_of_actual_items given " field1-field2-field3 " combination 0. this trying fix. ideally tablea should have 32,200,000 rows (14000 ids x 2300 combinations). query have follows: select a1.id, a1.field1, a1.field2, a1.field3, a1.num_of_actual_items, a1.num_of_possible_items tablea a1 union select distinct a2.id, b.field1, b.field2, b.field3, 0 num_of_actual_items, b.num_of_possible_items tablea a2, tableb b a2.fie