Posts

Showing posts from May, 2012

Why does my android app report that it cannot "find" my own class? possibly related to proguard? -

im developing android app, , started using proguard due "# of classes" library contained. in process, have been able add proguard rules , recompile app , "run" it. only each time "run" it, errors out , reports caused by: java.lang.classnotfoundexception: didn't find class "com.mycompany.mymodule.utils" on path: dexpathlist... since proguard has been implemented in order reduce total number of classes, use proguard on every build. dollars donuts problem lies in file - because app ran smoothly before added. have added following lines proguard.pro file in android studio try force resolved: -keepclassmembers class com.mycompany.mymodule -keep public class * extends android.app.activity -keep public class * extends android.app.application -keepclasseswithmembers class com.mycompany.mymodule.** { *; } -keepclasseswithmembers class com.mycompany.mymodule.utils {*;} however, not solve problem. i @ loss because application errors

PHP: Checking file size whilst downloading file to server -

the user provide url server fetch file using file_put_contents() i restrict file size 1mb i able check file size of files prior downloading using this solution. not every head request returns size of file prior download. is there way stop download of file server if file size exceeds number of bites? answer suggested sergiu paraschiv comments: function get_file_name_from_url( $url, $sizelimit ) { $_1mb = 8000000; $limit = $_1mb * $sizelimit; $file = fopen("$url","r"); fread($file,"$limit"); // check end of file if (feof($file)){ return true; } else{ //file big return false; } fclose($file); }

groovy - How to aggregate CSV lines with Apache Camel? -

i have csv similar this: county city area street county1 city1 area1 street1 county1 city1 area2 street2 county1 city1 area3 street7 county1 city2 area2 street2 county1 city2 area6 street1 county2 city1 area3 street3 county2 city1 area3 street2 ... during csv parsing, need aggregate same county/city create final structure this: county1/city1: [ [area1, street1], [area2, street2], [area3, street7] ] county1/city2: [ [area2, street2], [area6, street1] ] county2/city1: [ [area3, street3], [area3, street2] ] basically grouping county/city. i tried different things camel, latest: class csvappender { csvrow append(csvrow existing, csvrow next) { next.previous = existing next } } @csvrecord(separator = "\\t") class csvrow { @datafield(pos = 1) private string county @datafield(pos = 2) private string city @datafield(pos = 3) private string area @datafield(pos = 4) private string street csvrow previous

wordpress - styling adjustments to woo commerce shop page -

can offer advice on how make styling adjustments products on shop page? find close , i'd space them out bit. also, product titles, being of different lengths, creates bit of chaotic appearance 'add cart' buttons not positioned uniformly on straight line. obviously, caused varying length product titles , ratings element. need know function in style these elements. site test. takes awhile load, because servers on hosting platform slow. http://www.cjbergin.com/wordpress the spacing of products can changed having bigger margin on classes: .woocommerce ul.products li.product, .woocommerce-page ul.products li.product the product titles being different heights can fixed adding height: 20px; (change value suit needed). following classes: .woocommerce ul.products li.product h3, .woocommerce-page ul.products li.product h3

go - By reference or value -

if had instance of following struct type node struct { id string name string address string conn net.conn enc json.encoder dec json.decoder in chan *command out chan *command clients map[string]clientnodescontainer } i failing understand when should send struct reference , when should send value(considering not want make changes instance), there rule of thumb makes easier decide? all find send struct value when small or inexpensive copy, small mean smaller 64bit address example? would glad if can point more obvious rules the rule simple: there no concept of "pass/send reference" in go, can pass value. regarding question whether pass value of struct or pointer struct (this not call reference!): if want modify value inside function or method: pass pointer. if not want modify value: if struct large : use pointer. otherwise: doesn't matter.

javascript - Auto submit or clicked form based on referrer url -

i want make form auto click based on referrer site.. my url http://example.com/from/ <form action="" method="post"> <input name="name" value="jhon" type="text"> <input name="email" value="address@example.com" type="email"> <input name="age" value="28" type="text"> </form> what like, when user come url form automatically submitted (auto-clicked). when user comes directly page, or specific site (such own) form not submitted. is possible this? try using: string = document.referrer; for more information on this, should see this more information concerning this. after have gotten url, need decide it. can use document.ready: $( document ).ready(function() { //logic }); make x has value of "example website" do: $("#form_id").submit(); else nothing. also, might duplicate of this except user p

java - Wildfly web.xml security constraint blocking basic auth header for JAX-RS methods using ContainerRequestFilter -

the web application i'm developing consists of servlets , jax-rs webservices. until now, using containerrequestfilter authenticate rest method calls need secure servlets decided use web.xml define security constraints. web.xml looks this: <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <security-constraint> <web-resource-collection> <web-resource-name>rest</web-resource-name> <url-pattern>/rest/*</url-pattern> </web-resource-collection> </security-constraint> <security-constraint> <web-resource-collection> <web-resource-name>protected</web-resource-name> <url-pattern>/protected/*</url-pattern>

lazarus - SQLTransaction2 : Operation cannot be performed on an active transaction FreePascal - Code Typhon -

i solving error message. i using code typhon32 v4.9 on windows 7 pro. i had project connecting firebird database, single form works fine- no problems. i added 2nd form data entry form linked database in firebird - need both databases in 1 project. since adding 2nd form getting following error when close code typhon , when close form1 while using debugger: "sqltransaction2 : operation cannot performed on active transaction" i have tried numerous of solution found on internet can not solve it. i have button open 2nd follows: procedure tform1.bitbtn1click(sender: tobject); begin frmcontributions := tfrmcontributions.create(nil); try frmcontributions.showmodal; frmcontributions.free; end; end; here 2nd form code: unit ufirebirddemo1; {$mode objfpc}{$h+} interface uses classes, sysutils, sqldb, ibconnection, pqconnection, db, fileutil, forms, controls, graphics, dialogs, stdctrls, dbgrids, dbctrls; type tfrmcontributions = class(tform) btnupdate: tb

java - implementing hikaricp with microsoft sql server -

i trying figure out best approach using hikaricp (jdbc connection pool) microsoft sql server. saw, datasource option recommended (as case connection pools i've seen). however, not able form connection correctly sql server database based on examples i've seen - wondering if has working example can plug db info into. make sure have take following steps: if using maven, make sure have following dependency in pom file (if using jdk7/8): <dependency> <groupid>com.zaxxer</groupid> <artifactid>hikaricp</artifactid> <version>2.0.1</version> <scope>compile</scope> </dependency> if using build tool, change resource url accordingly (or download jar file maven repository if there no other option you). i believe need sqljdbc4.jar file in pom file (i wrong requirement may update post once reconfirm) import following in class along other references: import com.z

java - Where to put business logic in spring mvc framework? -

i dont know put business logic in spring mvc because i'm new it. have clue on because of lack in knowledge in spring mvc, don't start. ask if knows can tutorial on or complete sample of spring mvc web application has business logic on it? anyways, business logic talking about database handling :) @controller classes serve c mvc. note real controller in spring mvc dispatchservlet use specific @controller class handle url request. @service classes should serve service layer. here should put business logic . @repository classes should serve data access layer. here should put crud logic: insert, update, delete, select. @service , @repository , entity classes m mvc. jsp , other view technologies conform v mvc. @controller classes should have access @service classes through interfaces. similar, @service classes should have access other @service classes , specific set of @repository classes through interfaces.

memory management - Watching Other Applications With Ruby -

i wondering if possible ruby watch other applications , if application below memory threshold kills , starts again. operating system windows 7+ things need able do: monitor memory determine between different processes kill processes start new process (bat script or powershell) start monitoring again the watched application running run high memory when working , good. if goes below 1gb want application kill it. of course when restarts give grace period load ram. i going use shoes gui framework make nice wrap around it. theoretically nice have sort of auto detection if application running. if possible, requires gem think may hear them. i found usagewatch gem seems headed right way, glance @ documentation general , need specific process watching. if question not appropriate here please let me know via comment , remove and/or move proper place type of question asked. i appreciate time , effort helping me endeavor. thank you i suggest using win32

ios - getting local notification while the app is in background -

while app in background didreceivelocalnotification not called. so try notification didfinishlaunchingwithoptions - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions: (nsdictionary *)launchoptions { uilocalnotification *notification = [launchoptions objectforkey:uiapplicationlaunchoptionslocalnotificationkey]; //... } but app background mode enable (using external accessory communication) when click on notification, didfinishlaunchingwithoptions not called. any other way retrieve notification ? by checking apple's document notifications, says: ios note: in ios, can determine whether application launched result of user tapping action button or whether notification delivered already-running application examining application state. in delegate’s implementation of application:didreceiveremotenotification: or application:didreceivelocalnotification: method, value of applicationstate property , evaluate it. if value

php - Generate HTML from XML using only XSD and no XSL -

i'm new development, apologies , in advance. have case within xml , xsd files have : xml : <paragraph> <a href="www.google.co.nz">googlefoo</a> not strong. </paragraph> xsd : <xsd:element name="paragraph"> <xsd:complextype mixed="true"> <xsd:sequence> <xsd:element name="a"/> </xsd:sequence> </xsd:complextype> </xsd:element> <xsd:element name="a"> <xsd:complextype> <xsd:simplecontent> <xsd:extension base="xsd:string"> <xsd:attribute name="href" type="xsd:anyuri"/> </xsd:extension> </xsd:simplecontent> </xsd:complextype> </xsd:element> also dtd wich may of use. <!element paragraph (#pcdata | )*> <!element (#pcdata)> <!attlist href cdata #required> these files hosted offsite, have no

javascript - print popup jquery dialog box -

i need print popup dialog box.i have tried several times,but whole window popup dialog box.i need print dialog box. not around content of dialog box. here code view <script type="text/javascript"> $(document).ready(function(){ $("#dialogbox").dialog({ autoopen:false, modal:true, title: "ndb bank", width:950, height:300, open: function( event, ui ) { } }); $('#submit').click(function() { $('#dialogbox').empty() var $clone=$("#show").clone() $('#dialogbox').append($clone) $('#dialogbox').append("<input type='button' id='submit2' value='save' onclick='myfunction2()'></input>") $('#dialogbox').append("<input type='button' id='print' value='print' onclick='printfunction()'></input>") $("#dialogbox :input").prop(

qml - How to get listview position in Blackberry 10 native -

i trying load data web-services list-view , able load particular data list-view. but problem facing getting 10 data per page in list-view , when user scroll down tries load more data , when loads more data list-view, list-view start showing data 1st data itself, instead of 1st data want show current data. ex. when user scrolls more data page - 2 load 10 data , list-view contains 20 data, user @ 10th position , loading more data list-view should show 11th data instead of again start 1st data itself, when user loads 30 data should start showing data 21 data again starting 1st position. so question how can know position of list-item , directly moves user particular position directly user can see current data. the code trying is. onscrollingchanged: { if (atend && scrolling == false if (_app.powerdivert == 1) { _app.powerdivert += 1; } if (conninfo.isconnected()) {

Linux terminal: Keyboard shortcut for moving across tabs -

is there way move across different tabs in linux(centos) terminal ctrl + tab moving across different tabs in web browsers. i have tried alt + 1 , alt +2 etc... moving along ordered tabs. not work more 9 tabs. is there other keyboard shortcut move across tabs ? if you're using mac, can cmd + left/right arrow if you're using linux, can ctrl + page up/page down or left/right arrow please let me know if have questions!

c++ - What kind of stack unwinding libraries do exist and what's the difference? -

trying build own non-gnu cross-platform c++ environment, have faced fact don't understand basics of stack unwinding. environment build follows: libc++ ← libc++abi ← libunwind (or other unwinder). i've found libc++abi contains kind of libunwind, doesn't use on linux. comments understood, it's special libunwind: llvm stack unwinder supports darwin , arm not x86_64 - , it's confusing. how come cpu architecture affects stack unwinding process? also know following stack unwinders: glibc built-in. libc++abi llvm libunwind. gnu libunwind (from savanna). questions: how platform or cpu architecture affects stack unwinding process? why have many stack unwinders - , not single one? what kind of unwinders exist , difference between them? expectations answer: i expect answer covers topic whole, not separate points on each question. fundamentally, stack layout compiler. can lay out stack in whatever way thinks best. language standar

logging - How to disable laravel logs temporarily? -

i felt log recursion problem , disable logs single operation. there kind of runtime switch laravel logs? like: <?php log::stop(); // bypass log here log::resume(); unfortunately, there no way through facade on example above. what's best way turn laravel log off temporarily? here hacky way it. swap facade instance mock. with mockery : $app = log::getfacaderoot(); log::shouldreceive('error', 'warning', 'debug', 'info', 'notice', 'critical', 'alert', 'emergency'); // bypass log here log::swap($app); without mockery: class logmock { public function __call($name, $arguments) {} } $app = log::getfacaderoot(); log::swap(new logmock); // bypass log here log::swap($app);

Mallet topic model example can not compile -

i want compile mallet in java (instead using command line), include jar in project, , cite code of example from: http://mallet.cs.umass.edu/topics-devel.php , however, when run code, there error : exception in thread "main" java.lang.noclassdeffounderror: gnu/trove/tobjectinthashmap @ cc.mallet.types.alphabet.<init>(alphabet.java:51) @ cc.mallet.types.alphabet.<init>(alphabet.java:70) @ cc.mallet.pipe.tokensequence2featuresequence.<init> (tokensequence2featuresequence.java:35) @ mallet.topicmodel.main(topicmodel.java:25) caused by: java.lang.classnotfoundexception: gnu.trove.tobjectinthashmap @ java.net.urlclassloader$1.run(unknown source) @ java.net.urlclassloader$1.run(unknown source) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(unknown source) @ java.lang.classloader.loadclass(unknown source) @ sun.misc.launcher$appclassloader.loadclass(unknown source) @ java.lang.classloader.loadcla

Replacing the contents of a specific id tag of an html string in javascript -

i have js string this: var html_string = "<h3 id='title'>abc</h3><h5 id='subtitle'>xyz</h5>"; this string put codemirror iframe makes visible. want let user change title , subtitle in easy way <input> fields. how can replace these specific texts using id tags? for example if title input "hello", subtitle input "world" , current string 1 shown above new string should become: "<h3 id='title'>hello</h3><h5 id='subtitle'>world</h5>" should use regex? structure of regex this? note can't replace("abc", "hello") need change text based on id of tag. for multiple can use class, not id $("h3.title").each(function(index){ if($(this).text()=="hello"){ $("h5.subtitle:eq("+index+")").replace("xyz",$("input#id").val()); } })

ruby - Rendering Layouts without loading its inner layout in Rails -

im trying bring layout in html page by render layout 'flatty' thing loads whole flatty layout. in flatty.html.erb renders _header , _footer , _sidebar.html.erb dont want load _sidebar.html.erb in particular page. how should render this? maybe in controller action, can have flag indicating sidebar should not rendered. then, in flatty.html.erb file, check flag variable before render _sidebar.html.erb . for example, if have controller action called flatty , add instance variable, @disable_sidebar , act flag. def flatty @disable_sidebar = true # other code render layout: 'flatty' end then, in flatty.html.erb , add conditional before render sidebar (note ! negation in if statement: <% if !@disable_sidebar %> <%= render "layouts/sidebar" %> <% end %> alternatively, in flatty.html.erb can check controller , action values in params hash, , don't render sidebar if matches controller's action:

bash - How to find and replace, skipping lines containing a particular character? -

i using sed find , replace first appearance of pattern in file: sed -i "0,\#pattern#s##replacement#" ./file.txt how can tell skip of lines containing { . here sample input: this line not have item, skipped. line has pattern, has {, skipped too. line has pattern, , not character, changed. here sample output: this line not have item, skipped. line has pattern, has {, skipped too. line has replacement, , not character, changed. only 1 change made in entire file. if every line pattern contains { , no changes made file. how can use sed find , replace first appearance of item, skipping lines contain pattern, in case { ? this might work (gnu sed): sed '/{/b;/pattern/{s//replacement/;:a;n;ba}' file skips lines containing { on matching first pattern, substitutes replacement prints remaining lines end-of-file.

Android Listview - Null Pointer Exception -

when trying display items on listview showing nullpointerexception . in think got null either position or convertview , textview id , linearlayout id both correct. below lines got exception in code. viewitem.ll.setbackgroundcolor(rainbow[position]); viewitem.time.settext(timevalueslist.get(position).getelapsetime().replace(" minutes", "")); here mycode : class timerlistadapter extends baseadapter{ layoutinflater li; context ct; public timerlistadapter(context c){ this.ct=c; } @override public int getcount() { // todo auto-generated method stub return timevalueslist.size(); } @override public object getitem(int position) { // todo auto-generated method stub return position; } @override public long getitemid(int position) { // todo auto-generated method stub return pos

selenium webdriver - Unable to get all C# class files of dll into nunit -

i have added new class file project. , compiled it. got successful build. when trying run same dll nunit not getting newly added class file in nunit. ho newly added class file nunit? running test in nunit selenium webdriver. using nunit version 2.6 one possible reason may have not added [test] attribute on class name.

database - MySQL - UNION and ORDER/SORT ROWS -

i retrieving table result/s using mysql's union feature. table containing ordered items sales order below query used: set @meta_id=0; select bsb.id meta_id, bsb.order_id order_item_id, '_product_id' meta_key, bsb.product_id meta_value, 1 origin b_sale_basket bsb bsb.order_id = 255 union select bsb.id meta_id, bsb.order_id order_item_id, '_qty' meta_key, bsb.quantity meta_value, 2 origin b_sale_basket bsb bsb.order_id = 255 ) sales_order_meta the first query above retrieves ordered products having order_item_id of 255 while second query above retrieves quantity of each product ordered side note : in case ask why query them way since belong in same table, because i'm trying retrieve woocommerce ordered items... the output of query above looks this: http://i.stack.imgur.com/qpsjv.png but, wish order results below each product ordered there quantity of each product ordered below them.. the final result want, looks this: http://

jquery - Get the event invoking page -

is there way in jquery name of document/page has invoked event? below on change event common 2 pages , elements in both documents/pages have class new_featured_image $( document ).on( "change", ".new_featured_image", function() { // code document/page name }); there's no need use jquery, can read window.location.href and give address of page (should enough identify page). anyway, it's not clean way achieve goal. it's preferrable add class "body" tag depending on page ("pageone" , "pagetwo") , use class either identify page, like: $( document ).on( "change", ".new_featured_image", function() { if(body.hasclass("pageone")) {...} else {...} }); or add 2 different listeners: $( document ).on( "change", "body.pageone .new_featured_image", function() { // code document/page name }); $( document ).on( "change", "

c# - DCOM object - CoCreateInstanceEx succeeds, but Activator.CreateInstance fails -

native c++ code: int main() { auto hr = coinitializeex(nullptr, coinit_multithreaded); coserverinfo server = {0, l"win7x64", nullptr, 0}; multi_qi qi = {&iid_xxxservice, nullptr, 0}; hr = cocreateinstanceex(clsid_xxxservice, nullptr, clsctx_remote_server, &server, 1, &qi); } succeeds, threading model. or without call coinitializesecurity . when trying instantiate same object .net/c#, fails 0x80070005 : static void main(string[] args) { var machinename = "win7x64"; try { type dcomtype = type.gettypefromclsid(typeof(xxxservice).guid, machinename, false); object dcomobj = activator.createinstance(dcomtype); } catch (exception ex) { console.writeline(ex.message); } } i have tried latter coinitializesecurity (dllimported), mta , sta thread attribute, uac elevated process, fails. if machinename current machine, works (yes, current development machine has same com i

javascript - angularjs-how to implement click in angular -

i newbie in angularjs. stuck on code , wanted help. i having controller called watchlist controller in getting data displayed in watchlist. however want display data once watchlist tab clicked. this html code :- <div class='watchlist' > <button class='btn' id="watchlist" ng-click="fetchuserwatchlist()" watchlist-popover ng-controller="watchlistcontroller"> <i class="hidden-tablet hidden-phone"></i> <span class = 'mywatchlist'>my watchlist</span> <div class = 'watchlist-spinner ' ></div> </button> </div> my controller(watchlist):- $scope.fetchuserwatchlist = function(pageno,callback){ $scope.isloading = true; $rootscope.isrequest = true; userapi.mywatchlist({userid:$rootscope.getuser().userid,pageno:pageno}, function(r) { if (_.isnull(r.watchlistdata)) {

How to run open-source software on remote Linux server? -

i playing around an open-source software, fsl . have no problems running on mac, able start typing fsl in terminal. however, have no idea how start software on our school's hpc server. after logging school server via ssh, type fsl usual, , then if 'fsl' not typo can run following command lookup package contains binary: command-not-found fsl -bash: fsl: command not found then, navigate fsl installation directory ( /data/apps/arch/linux_x86_64/fsl/5.0.6 ) , type fsl . still same error. have tried module load /data/apps/arch/linux_x86_64/fsl/5.0.6 but error occurs. utility.c(2360):error:50: cannot open file '' 'reading' utility.c(2360):error:50: cannot open file '' 'reading' ... how should load , run it? you have call executable correct path. may either cd directory containing executable prefix executable's name path ./fsl or (if intend use executable frequently): add executable's path path -en

linux - "Non Zero Exit Status" R 3.0.1 'XML' and 'RCurl' -

i having bit of trouble installing xml , or rcurl on ubuntu machine 13.10. performed sudo update , upgrades today. i trying use rattle r. unable install 'xml' required use of rattle. pretty same question asked right here year later , different os. here error messages getting back: > install.packages("rcurl") installing package ‘/home/steven/r/x86_64-pc-linux-gnu-library/3.0’ (as ‘lib’ unspecified) trying url 'http://cran.rstudio.com/src/contrib/rcurl_1.95-4.1.tar.gz' content type 'application/x-gzip' length 870915 bytes (850 kb) opened url ================================================== downloaded 850 kb * installing *source* package ‘rcurl’ ... ** package ‘rcurl’ unpacked , md5 sums checked checking curl-config... no cannot find curl-config error: configuration failed package ‘rcurl’ * removing ‘/home/steven/r/x86_64-pc-linux-gnu-library/3.0/rcurl’ warning in install.packages : installation of package ‘rcurl’ had non-zero exit statu

ios - How to stop cellForItemAtIndexPath running if its datasource changed -

i collect photos alassetlibrary , present them in uicollectionview . add notification called alassetslibrarychangednotification handle photo changes , call showlatestphotos whenever notification posted. photo-collection function like: - (void)showlatestphotos { _latestphotos = [nsmutablearray array]; // photo asset , inset _latestphotos [_latestphotos insertobject:...]; [_collectionview reloaddata]; } the problem if perform screenshot(click home , power @ same time), alassetslibrarychangednotification posted more twice, is, showlatestphtots executed twice, , second time when _latestphotos set empty using _latestphotos = [nsmutablearray array] , cellforitematindexpath of collectionview's datasource triggered [_collectionview reloaddata] in first call still being called , when call [_latestphotos objectatindex:], application crashes. know how solve bug? use work if ([_latestphotos containsobject:yourobject] == no) { // _latestphotos = [

xml - Python: QName on node's attribute, lxml -

in python's lxml.etree, how add namesapce attribute of node one: name space is: xs_ns = 'http://www.w3.org/2001/xmlschema' result looking is: <xs:element name="label" type="xs:string"></xs:element>  i tried 1 result not looking for: element = et.subelement( sequence, et.qname(xs_ns, "element"), name="label", type=str(et.qname(xs_ns, "string")), ) gave me: <xs:element name="label" type="{http://www.w3.org/2001/xmlschema}string"/> as far know, while attribute self may have namespace, value of attribute doesn't consider namespaces: <!-- attribute has namespace prefix --> <dummy xs:foo="bar"/> <!-- attribute has value of string containing colon --> <dummy foo="xs:bar"/> so can put "prefix" , "value" single string altogether: type="xs:string" related discussion: xml

php - Getting the selected drop down value in codeigniter -

i want selected value drop down list variable. loading drop down list values database initially. inside view file, <select name="trackerid" style="height:30px; width:140px";> <?php foreach ($imei $row): { echo "<option value=\"trackerid\">" . $row['imie'] . "</option>"; } endforeach; ?> </select> with above code, able load imei numbers database. when click submit button, want send selected imei database. in controller file, $newconfarray["imie"] = $this->input->post("trackerid"); but when write simple var_dump test, returns bool(false). var_dump( $newconfarray["imie"]); i want selected imei view file. how it? suggestions highly appreciated. you have not put value in option try this echo "<option value='".$row[

command line - How can i install npm in ubuntu to run less js -

i have installed node js in ubuntu 14.04, not able install npm in it. want compile less through command line need npm . is there way compile less or how can install npm in ubuntu? first things first, run sudo apt-get update . npm should installed along node.js. it's possible have name collision issue; ubuntu repository carries program called 'node' (a program ham radio operators) unrelated node.js. further, many node modules assume 'node' refers node.js. try removing node: sudo apt-get remove node use which nodejs see command node.js lives. create symlink somewhere in path node points nodejs , e.g. sudo ln -s [path/to/nodejs/here] /usr/bin/node after that, /usr/bin should in system's path variable, should able use node.js typing 'node'. e.g. try node --version . should match nodejs --version . if none of works, can try removing nodejs , node, install nodejs-legacy, supposed use command 'node' default. consider

Matlab, How to get each column in a matrix -

i got 4-by-n matrix, like a = 1 5 9 3 0 6 2 3 10 7 8 4 what want getting each half column of as line1point1 = [1 3] line1point2 = [2 7] line2point1 = [5 0] line2point2 = [3 8] line3point1 = [9 6] line3point2 = [10 4] how that? i’m pretty new matlab coding.. appreciated.. cheers use reshape function, example: >> = [1 5 9; 3 0 6; 2 3 10; 7 8 4]; >> reshape(a,2,6) ans = 1 2 5 3 9 10 3 7 0 8 6 4

Is it possible to set Wordpress as Back-End for a static Website? -

i have static website , want make dynamic. client want integrate website wordpress control panel. so, question that, can integrate static website wordpress , can make it`s control panel in wordpress? the website`s link below.. http://greenopia.in/wip/dkreate/ yes, every customization possible in wordpress. if static site has page , can first save page data wordpress page. fetch there. but firest step convert site html wordpress theme. refer this link know wordpress theme development.

asynchronous - How to tell when execution is complete in node.js -

func1() calls func2() twice. func2() calls func3() variable number of times (based on parameter passed it). node.js asynchronous, how can tell when last call func3() has finished executing? assume not know how many times func3() called. this ought simple out of reach. thanks without async may writes console.log('yep') or many others @ end of code-block of func3(). if want - write there code details of help.

asp.net - radgrid data disappear after filtering -

i using radgrid show data , have set allowfilteringbycolumn true, when try filter rows, postback occurs , radgrid content disappears (all things disappear , border remains). <telerik:radajaxpanel id="pnlshowgrid" runat="server" loadingpanelid="radajaxloadingpanel4"> <div class="row-fluid"> <telerik:radgrid id="radgrid1" runat="server" cssclass="radgrid" height="400px" clientsettings-selecting-allowrowselect="true" allowpaging="true" pagesize="20" allowsorting="true" autogeneratecolumns="false" allowautomaticupdates="true" showstatusbar="true" allowautomaticdeletes="true" allowfilteringbycolumn="true" width="100%" onupdatecommand="radgrid1_updatecommand"