Posts

powershell - How do I get the length of file names longer than 250, then output the character count to a csv file? -

i've got this: cmd /c dir /s /b |? {$_.length -gt 250} however, export character count , file path 2 separate columns in csv file. adding | export-csv ./250files.csv does trick exporting count column, want path each file on second column. export-csv expecting objects convert csv. since dealing strings need make objects in order desired output. calculated properties you cmd /c dir /s /b | select @{name="path";expression={$_}}, @{name="length";expression={$_.length}} should able pipe next step easy.

SAPUI5 Tool Header in XML-View -

i´ve started first sapui5 application , wanna use tool header item in developer guide . (i´m using xml-view.) i´ve included view error uicomponent.js:6 uncaught error: failed load 'sap/tnt/toolheader.js' resources/sap/tnt/toolheader.js: 404 - not found do have embed special script in application? (which one?) page.view.xml <core:view xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:tnt="sap.tnt" xmlns:html="http://www.w3.org/1999/xhtml" controllername="zdemo.controller.machdetail"> <tnt:toolheader> <button icon="sap-icon://menu2" type="transparent"> <layoutdata> <overflowtoolbarlayoutdata priority="neveroverflow" /> </layoutdata> </button> <toolbarspacer width="20px" /> <button text="...

javascript - Dropdown list set put selected value from database -

i trying create drop down menu select value stored in database. right code creates dropdown first option selected. have read through several tutorials, , tried apply them, cannot working. hope can help. <div class="form-group"> <label>up-to-date</label> <select class="form-control" name="uptodate"/> <option value="ja">ja</option> <option value="nee">nee</option> </select> </div> whole code : <?php error_reporting(e_all); ini_set('display_errors', 1); session_start(); include("../includes/connect.php"); if (isset($_session['logged_in'])) { if(isset($_post['btnslaop'])) { $id=$_post['id']; $uitgeleend=$_post['uitgeleend']; $nr=$_post['nr']; $model=$_post['model']; $serienummer=$_post['serienummer']; $capaciteit=$_post['capaciteit...

c++ - friend method from a different namespace -

i have following situation. have class foo inside own namespace my_lib : namespace my_lib{ template<typename t> class foo{ t data; public: // blah blah }; } i trying interface library has own namespace other_lib . putting interface inside wrapper namespace in own my_lib . copy method my_lib::wrapper::copy need access my_lib::foo::data need implement following: namespace my_lib{ namespace wrapper{ template<typename t> void copy(const foo<t>& my_foo, other_lib::foo<t>& other_foo) { // copy my_foo.data other_foo } } } to accomplish my_lib::wrapper::copy method needs friend of my_lib::foo class. can accomplish series of forward declarations in foo.h // forward declare other_lib::foo namespace other_lib{ template<typename t> class foo; } namespace my_lib{ // forward declare wrapper::copy namespace wrapper{ template<typename t> void copy(const foo<t>& my_foo, other_lib::foo<t>& other_foo); }...

android - Write permission on external SD card is denied -

i use command adb push transfer files external sd card of phone. i'm using android 5.0. write permission denied . i use ls command see permissions list. ./adb shell ls /storage/extsdcard -la and here 1 of got: drwxrwx--- root sdcard_r 2015-12-13 10:29 new as see, file group sdcard_r (has no write permission). please me! how can write data external sd card using adb? root user elevated permissions, can file or folder in system. it's dangerous, powerful, , integral part of linux. android popular "version" of linux in world (as popular computing system), discussed above superuser access more restricted on other linux systems root phone

android - use google mobile vision api to detect the first barcode and send the data to another activity -

hi checked barcode reader sample google on github , trying make barcodedetector detect first barcode (only one) , when send decoded barcode activity. mabye wrong need put code barcodegraphic graphic = mgraphicoverlay.getfirstgraphic(); barcode barcode = null; if (graphic != null) { barcode = graphic.getbarcode(); if (barcode != null) { intent data = new intent(); data.putextra(barcodeobject, barcode); setresult(commonstatuscodes.success, data); finish(); } else { log.d(tag, "barcode data null"); } } else { log.d(tag,"no barcode detected"); } return barcode != null; } somewhere in 1 barcode captured automatically without need tap when barcode graphic appears.i figured dont need multiprocessor.builder<> barcodedetector barcodedetector = new barcodedetector.builder(context).build(); barcodetrackerfactory barcodefactory ...

c# - Sort student array according to average marks -

i have created student class array in c# var student = new student[5]; having variables sid,name, avgmrks; want sort array according average marks of students. i assuming when having variables, mean student object has properties: sid, name, avgmrks. can do: student.orderby (x=>x.avgmrks);