Posts

Showing posts from July, 2012

linux - Ubuntu -If command seems do not provide else outcome -

i not understand why if script not working. when have internet connection in linux displays online phrase. when have no internet connection still displays online phrase instead offline. #!/bin/bash # system_page - script monitor various connections , produce # system information in html file ##### constants title="monitor information $hostname" right_now=$(date +"%x %r %z") time_stamp="updated on $right_now $user" # clear screen clear echo -e "get http://google.com http/1.0\n\n" | nc google.com 80 > /dev/null 2>&1 function net_info { if [ $? -eq 0 ]; echo "online" echo "<h2 style="background-color:#00ff00"><font size="6"> internet connected</h2>" else echo "offline" echo "<h2 style="background-color:#ff0000"><font size="6"> internet not connected</h2>" fi } ##### main cat <<- _eof_ <html> <head...

Android Java - Using custom adapter with ListView Select a checkbox and another row item also selected -

i using arraylist, custom adapter , listview (using text , image indicate item selected when listview item clicked). image changes has same function checkbox, when clicked changes tick , changes cross when clicked second time etc... everything working expected except when click row indicate item has been selected works, issue item few rows down seems selected not intention. have read alot of posts in regards recylerviews , viewholder don't seem work. here sample of code; public void mylist() { info.add(new stored("name", 2000, r.drawable.pic1, "my details", false)); } private class mylistadapter extends arrayadapter<stored> { public mylistadapter() { super(mainactivity.this, r.layout.mylayout, info); } @override public view getview(int position, view convertview, viewgroup parent) { view itemview = convertview; if (itemview == null) { itemview = getlayoutinflater().inflate(r.layout.listla...

ios - ionic 2: export app to iphone without Mac -

i'm trying export ionic 2 app code ionic run ios but error ✗ cannot run ios unless on mac osx. i'm using pc since i'm not mac user, little stuck that. can do? i succeed installing virtual machine on window install os. works fine.

printing - How can I programmatically format printer documents with Python or other language? -

i trying replicate old label-making software allows choosing label size among other things. sizes of labels known standard measurements (2.5 inches 1 inch, example). see how detect os , send basic print jobs. print jobs seem strings sent printer. if trying to, example, move 2 inches right before printing next portion of job, increase whitespace in string (does amount of whitespace correspond physical measurement when printed)? there way define portions of page or other way jump around between xy coordinates on known page size? i have written software in python print html pages. advantage of html language print like, formatting easy, debugging can done using webbrowser. next can use software princexml allows convert html pages printable page. via stylesheet can define size of page. feel free concept mee if need more help.

javascript - script is preventing anchor link from appearing in URL -

i'm using jquery came across smooth scrolling anchor links within page. realize there in script preventing anchor link (e.g., '#top') appearing in url -- , want anchor link in url. can tell me part of turning off default behavior , turn on? <script> $(function() { $('a[href*="#"]:not([href="#"])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $('html, body').animate({ scrolltop: target.offset().top }, 500); return false; } } }); }); </script> i have not tested out on real page, on end of animate, can set hash. $(function() { $('a[href*="#"]:not([href="#"])').cli...

python - Reading csv file and returning as dictionary -

i've written function reads file correctly there couple of problems. needs returned dictionary keys artist names , values lists of tuples (not sure appears asking) the main problem i'm having need somehow skip first line of file , i'm not sure if i'm returning dictionary. here example of 1 of files: "artist","title","year","total height","total width","media","country" "pablo picasso","guernica","1937","349.0","776.0","oil paint","spain" "vincent van gogh","cafe terrace @ night","1888","81.0","65.5","oil paint","netherlands" "leonardo da vinci","mona lisa","1503","76.8","53.0","oil paint","france" "vincent van gogh","self-portrait bandaged ear","1889",...

java - Spring+Hibernate. Error creating bean. Unsatisfied dependency. Cannot figure out what annotation is not right -

Image
i've gone through every post on topic still can't find what's wrong. when try run server exception: org.springframework.beans.factory.unsatisfieddependencyexception: error creating bean name 'administratordao': unsatisfied dependency expressed through method 'setdao' parameter 0: no qualifying bean of type [com.project.dataaccesslayer.dataaccessobject] found dependency [com.project.dataaccesslayer.dataaccessobject]: expected @ least 1 bean qualifies autowire candidate dependency. dependency annotations: {}; nested exception org.springframework.beans.factory.nosuchbeandefinitionexception: no qualifying bean of type [com.project.dataaccesslayer.dataaccessobject] found dependency [com.project.dataaccesslayer.dataaccessobject]: expected @ least 1 bean qualifies autowire candidate dependency. dependency annotations: {} it says have no bean dataaccessobject if it's annotated @repository or defined in servlet-context.xml i h...

kubernetes default gateway not routing to local network -

i'm seeing weird issue on kubernetes , i'm not sure how debug it. k8s environment installed kube-up vsphere using 2016-01-08 kube.vmdk the symptom dns container in pod not working correctly. when logon kube-dns service check settings looks correct. when ping outside local network works should when ping inside local network cannot reach of hosts. for following host network 10.1.1.x, gateway / dns server 10.1.1.1. inside kube-dns container: (i can ping outside network ip , can ping gateway fine. dns isn't working since nameserver unreachable) kube@kubernetes-master:~$ kubectl --namespace=kube-system exec -ti kube-dns-v20-in2me -- /bin/sh / # cat /etc/resolv.conf nameserver 10.1.1.1 options ndots:5 / # ping google.com ^c / # ping 8.8.8.8 ping 8.8.8.8 (8.8.8.8): 56 data bytes 64 bytes 8.8.8.8: seq=0 ttl=54 time=13.542 ms 64 bytes 8.8.8.8: seq=1 ttl=54 time=13.862 ms ^c --- 8.8.8.8 ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss ro...

arrays - Algorithm to find ideal starting spot in a circle -

so problem have been debating such: your given array of integers representing circle. then, have pick spot in circle start. place start, compare value @ array number of steps took there , if steps less or equal number, include in final set. find place start have elements in set. ex, a=[0, 1, 2] if start @ index=0, then: a[0]=0 < =0 0 included a[1]=1 < =1 1 included a[2]=2 < =2 2 included final set: {0,1,2} if start @ index=1, then: a[1]=1 > 0 1 not included a[2]=2 > 1 2 not included here loop around a[0]=0 > 2 0 included final set: {0} if start @ index=2, then: a[2]=2 > 0 2 not included, here loop around a[0]=0 < = 1 0 included a[1]=1 < = 2 1 included final set: {0,1} so in trivial case, starting position index=0 best position results in final set elements. brute force method of finding obvious, trying find more efficient method. attempts far have been examine trying find max intersect of viable starting ranges calculated each element in arr...

excel - VBA Sub or function not defined error in while calling public/private sub in a Class -

i have vba script below: sub button_click () ' ' < code > ' call findstrings (strfolder, nothing) end sub public sub findstrings(strfolder string, optional wkssheet worksheet = nothing) ' ' < code> ' call processfolder(strfolder, strindent, varstrings, varmatchesfound, varfilenames, lngfoldercount, lngfilecount) end sub private sub processfolder(strfolder string, byref strindent string, byref varstrings variant, byref varmatchesfound variant, byref varfilenames variant, byref lngfoldercount long, lngfilecount long) ' ' < code> ' call processfile(objfile.path, strindent, varstrings, varmatchesfound, varfilenames) end sub private sub processfile(strfullpath string, byref strindent string, byref varstrings variant, byref varmatchesfound variant, byref varfilenames variant) ' ' < code> ' end sub currently, button_click , findstrings in module , processfolder , processfile in class . when r...

html - Make parent div same width as child, and ignore parent -

i have parent, child, , grandchildren divs . grandchildren need displayed in rows, not columns. i'm trying child have same width grandchildren, (the child's children,) @ same time, want parent retain height of grandchildren. i tried making child position: absolute , problem is, parent doesn't retain child, , grandchildren's height. how can make parent have same height descendants, while having different width. , have child have same width grandchildren? jsfiddle *, *:before, *:after { margin: 0; padding: 0; box-sizing: border-box; } #wrapper { background-color: lightblue; width: 220px; } #innerwrapper { display: flex; background-color: blueviolet; } .item { background-color: tomato; width: 100px; height: 100px; border: 1px solid blue; margin: 5px; flex: 1 0 auto; } #other { background-color: yellow; width: 300px; height: 250px; } <div id="wrapper"> <div id="innerwrapp...

list - INSERTINTO Query in python as a String and Display? -

first reading json file: import json pprint import pprint open('data.json') data_file: data = json.load(data_file) pprint(data) after reading json file,i want fetch parameters json not all. like: temperature 1,temperature 2,timestamp after that; want implement insert query string in 1 list or object , print list. in insert query, want insert 5 records , display records. please me out script. once have json content data variable, can access using name of attribute access index list_values=[] list_values.append(data['temperature 1']) #add values list print(list_values) you can treat json values, same way treat dictionary.

android - How do I add TableRows dynamically? -

i'm trying create new table row , add existing tablelayout. have scoured internet , seems i've tried cant new row show. if add tablerow id in layout , add custom imageview without adding new tablerow layout imageview shows need add new row dynamically. in fragment: @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view rootview = inflater.inflate(r.layout.fragment_default_view, container, false); final viewgroup tablelayout = (viewgroup) rootview.findviewbyid (r.id.table_bracket); tablerow.layoutparams layoutparams = new tablerow.layoutparams( tablerow.layoutparams.match_parent, tablerow.layoutparams.match_parent ); tablerow tablerow = new tablerow(context); tablerow.setlayoutparams(layoutparams); separatorimageview separator = new separatorimageview(getactivity()); separator.setlayoutparams(layoutparams); tablerow.addview(separator); tab...

python - Add Google sheet with data using Google API v4 -

i using python. need add sheet in spreadsheets using google api v4. can create sheet using batchupdate spreadsheet id , addsheet request (it returns shetid , creates empty sheet). how can add data in it? data = {'requests': [ { 'addsheet':{ 'properties':{'title': 'new sheet'} } } ]} res = service.spreadsheets().batchupdate(spreadsheetid=s_id, body=data).execute() sheet_id = res['replies'][0]['addsheet']['properties']['sheetid'] you can add code write data in google sheet. in document - reading & writing cell values spreadsheets can have multiple sheets, each sheet having number of rows or columns. cell location @ intersection of particular row , column, , may contain data value. google sheets api provides spreadsheets.values collection enable simple reading , writing of values. writing single range to write data single range, use spreadsheets.val...

postgresql - Postgres cursor -

i created composite type create type testdetailreporttype1 ( sname text, cdetailstimestamp timestamp, number text, dropdi text, queue text, agent text, status int, reference int ) i created cursor expect return list of composite type ...but no records returned when execute select * testdetailscursortest11("abc") query written within function when executed directly returns 31 row...i new postgress fail understand place going wrong while making function ,really appreciate guidance @ front. note->i want write cursor in scenario...i able result when function returning table. create or replace function public.testdetailscursortest11( hgname text) returns setof testdetailreporttype1 language 'plpgsql' $testdetailscursortest11$ declare cdetailcursor refcursor; cdetailtevent record; -- variable store agent event. cdetail calldetailreporttype1; begin open cdetailcursor select tblusers.username,tblcallevent.statecreatedate,tblc...

web scraping - logging into website using python -

i trying login website using python.i connected vpn. below code. import requests requests.session() c: url = 'https://servicedesknew.ascorp.com/caisd/pdmweb.exe' username = 'salmansa' password = '********' c.get(url) csrftoken = c.cookies['crfstoken'] login_data = dict(csrfmiddlewaretoken=csrftoken, username=username,pin=password ,next='/') c.post(url,data=login_data, headers={"referer" : "https://servicedesknew.ascorp.com/caisd/pdmweb.exe"}) page = c.get('https://servicedesknew.ascorp.com/caisd/pdmweb.exe') print(page.content) when run code error below. c:\python34\python.exe c:/users/salmansa/pycharmprojects/untitled1/test2.py usage: test2.py [-h] username password test2.py: error: following arguments required: username, password process finished exit code 2 please let me know if missing anything.

java - @FXMLViewFlowContext Null pointer exception -

i want create javafx application client. found datafx framework , it. have problem @fxmlviewflowcontext because returns null each time when call child fview parent. used lib version 8.0.7 , below codes i create side view in main controller i18n resource: // side controller add links content flow flow sidemenuflow = new flow(sidemenucontroller.class); sidemenuflowhandler = new flowhandler(sidemenuflow, context, common.getviewconfiguration()); drawer.setsidepane(sidemenuflowhandler.start(new animatedflowcontainer(duration.millis(320), containeranimations.swipe_left))); and side pane controller @fxmlcontroller(value = "/res/fxml/test.fxml") public class sidemenucontroller { @fxmlviewflowcontext private viewflowcontext context; @fxml private jfxlistview test; @fxml @actiontrigger("suppliers") private jfxbutton suppliers; @fxml @actiontrigger("history") private jfxbutton history; @fxml @actio...

Create gameview for all mobile dimensions - CocosSharp + Xamarin.forms -

i working on xamarin.forms + cocossharp mobile application. on xamarin contentpage have created ccgameview. ccgameview given width , height gameview.designresolution = new ccsizei(width, height) how can give width , height gameview adjusts on resolutions , black bars not shown.

arrays - Cannot merge two JSON objects in PHP, the result is null -

i want add json object other json object in php, tried , many other methods, cannot find correct method this have: $js_string1 = "{\"info\":[{\"thumb\":\"\",\"count\":1,\"date\":\"11/11/2016 4:05:28\",\"categories\":[null,null,null,null,null],\"sharing\":\"\",\"status\":\"private\",\"title\":\"apple\",\"windows\":[{\"alwaysontop\":false,\"focused\":true,\"width\":1440,\"windowid\":825},{\"active\":false,\"audible\":false, \"height\":727,\"width\":1440,\"windowid\":825}],\"top\":26,\"type\":\"normal\",\"width\":1440}]}"; $js_string2 = "{\"thumb\":\"\",\"count\":1,\"date\":\"10/10/2010 5:07:30\",\"categories\":[null,null,null,null,null],\...

c# - Send Email by hangfire without using <mailSettings> in webconfig -

i worked asp.net mvc 5 c# . want send email hangfire without data webconfing . in webconfig have code: <mailsettings> <smtp from="email@site.com"> <network host="host" port="25" username="email@site.com" password="*****" enablessl="false" defaultcredentials="false" /> </smtp> </mailsettings> when use in webconfig ,everything works correctly. want store email , password in database , value database. this .cs code [automaticretry(attempts = 20)] public static void sendemailtomember(member obj,string subject, string details){ var viewspath = path.getfullpath(hostingenvironment.mappath(@"~/views/emails")); var engines = new viewenginecollection(); engines.add(new filesystemrazorviewengine(viewspath)); var emailservice = new postal.emailservice(engines); var ee = new send...

spring - Pass get values to method and call in jsp page -

i'm using spring mvc, making small web-app. have form in jsp page, , i'm trying pass values .get controller method , display results called method after pressing "submit" button on same jsp page or another, preferrably on same page. this how form looks like: http://i65.tinypic.com/6gyo02.png this method want called after getting values form: public void calcmacros() { int goal = 0; if (this.goal == 0.7){ goal = 1; } else if (this.goal == 0.9) { goal = 2; } else if (this.goal == 1) { goal = 3; } else if (this.goal == 1.2){ goal = 4; } switch (goal) { case 1: weightloss(); weightlossprotcalc(); weightlosscarbcalc(); weightlossfatcalc(); break; case 2: weightloss(); weightlossprotcalc(); weightlosscarbcalc(); ...

How do I get a python program to rerun itself -

this question has answer here: how re-run code in python? 5 answers i want code below automatically rerun ideas hwo this? btw new stack overflow , python if doing wrong on either please let me know, thanks import sys import os import random answer_correct_message = random.choice(['well done', 'correct answer','nice one','thats correct!']) answer_wrong_message = random.choice(['unlucky','thats wrong','nope']) random_num_1 = random.randint(1,10) random_num_2 = random.randint(1,10) def question_asker_and_answerer(): q2 = input("what " + str(random_num_1) + " + " + str(random_num_2) + "?") if q2 == random_num_1 + random_num_2: the_questions = true if the_questions == true: return (answer_correct_message) else: return (answer_w...

oracle11g - SQL: Add values according to index columns only for lines sharing an id -

yesterday asked question: sql: how add values according index columns found out problem bit more complicated: i have array this id | value| position | relates_to_position |type 19 | 100 | 2 | null | 1 19 | 50 | 6 | null | 2 19 | 20 | 7 | 6 | 3 20 | 30 | 3 | null | 2 20 | 10 | 4 | 3 | 3 from need create resulting table, adds lines relates_to_position value matches position value, lines sharing same id! the resulting table should id | value| position |type 19 | 100 | 2 | 1 19 | 70 | 6 | 2 20 | 40 | 3 | 2 i using oracle 11. there 1 level of recursion, meaning line not refer line has relates_to_pos field set. i think following query this: select id, coalesce(relates_to_position, position) position, sum(value) value, min(type) type t group id, coalesce(relates_to...

How to save an array of custom struct to NSUserDefault with swift? -

i have custom struct called 'news' want append array nsuserdefault. it's showing error "type 'news' not conform protocol 'anyobject'". i don't want change 'news' struct class since it's being used other code already. there anyway can change nsuserdefaults.standarduserdefaults().arrayforkey("savednewsarray") type [news]? var savednews = nsuserdefaults.standarduserdefaults().arrayforkey("savednewsarray") var addsavednews = savednews as? [news] addsavednews.append(news(id: "00", title: newstitle, source: source, imageurl: imageurl, url: url)) nsuserdefaults.standarduserdefaults().setobject(addsavednews, forkey: "savednewsarray") nsuserdefaults.standarduserdefaults().synchronize() here 'news' struct. public struct news { public var id: string public var title: string public var source: string? public var imageurl: string? public var date: nsdate? public ...

sql - create serial numbers based on multiple columns -

Image
i have following data i want create index level shown in last column based on region, country, store type , location column. region column have own serial number each new region i.e. 'apac 1 , emea 2' same other columns(country, store type, location). have tried use partition result not able desired results. use dense_rank() window function. select *, concat( dense_rank() over(order region), ',', dense_rank() over(partition region order country), ',', dense_rank() over(partition region, country order [store type]), ',', dense_rank() over(partition region, country, [store type] order location) ) [index level] tab

python - ubuntu eric no module PyQt5.Qsci -

just installed ubuntu 16.04 lts yesterday, installed eric. worked fine. wanted start eric , use qtdesigner today, didn't work (got error qtdesigner not found) since have manually install according guides. went through error: error in sys.excepthook: traceback (most recent call last): file "<frozen importlib._bootstrap>", line 969, in _find_and_load file "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked file "<frozen importlib._bootstrap>", line 673, in _load_unlocked file "<frozen importlib._bootstrap_external>", line 665, in exec_module file "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed file "/usr/share/eric/modules/utilities/__init__.py", line 61, in <module> pyqt5.qsci import qscintilla_version_str, qsciscintilla importerror: no module named 'pyqt5.qsci' original exception was: traceback (most recent call last): file "/...

How can I open the Palette in Android Studio? -

after opening project, palette on workspace. when closed it, disappeared, , don't know how return palette. window in view > tool windows > palette doesn't work enter image description here if talking colour picker, way know how enter colour, android:textcolor="#000000" , in left margin show small square of colour, click square choose colour.

json - Simplify php curl code -

i trying json url. code working think better. (remove json_decode or json_encode). right have: (edit: still want use curl) <?php $curl = curl_init('url'); curl_setopt($curl, curlopt_url, 'url'); curl_setopt($curl, curlopt_returntransfer, true); $result = curl_exec($curl); curl_close($curl); $data = json_decode($result, true); echo json_encode($data["name"]); ?> you can try this: $data = json_decode(file_get_contents('php://input')); print_r($data);

error http wordpress use theme porto 3.3 -

Image
i error when uploading photos my website . see image below. i use porto theme version: 3.3, , wordpress version 4.6.1. seems problem server's files , directories permissions. error message explains - wordpress unable create directories images. refer article in codex: https://codex.wordpress.org/changing_file_permissions

c# - Dictionary<TEntity, string> and asp.net mvc how to? -

i have: public class nomenclature { public virtual int nomenclatureid { get; set; } public virtual nomenclaturetype nomenclaturetype { get; set; } public virtual idictionary<nomenclatureattribute, string> attributes { get; set; } } public class nomenclaturetype { public virtual int nomenclaturetypeid { get; set; } public virtual string name { get; set; } public virtual icollection<nomenclature> nomenclatures { get; set; } public virtual icollection<nomenclatureattribute> nomenclatureattributes { get; set; } public nomenclaturetype() { nomenclatures = new hashset<nomenclature>(); nomenclatureattributes = new hashset<nomenclatureattribute>(); } } public class nomenclatureattribute { public virtual int nomenclatureattributeid { get; set; } public virtual string attributename { get; set; } public virtual string attributetype { get; set; } public virtual nomenclaturetype nomenclatu...

javascript - how to print all dates inside cells from 1 to totalDays -

i trying make calendar , want print date 1 30 or 31 depends on month, , have total days in variable totaldays , have created tr , td 's in nested loops not sure how print value inside each td 1 30. var date = new date('11/13/2016'); var totaldays = new date(date.getfullyear(), date.getmonth() + 1, 0); var daysarr = ['m', 't', 'w', 't', 'f', 's', 's']; totaldays = totaldays.getdate(); var table = document.createelement('table'); (var = 0; <= 5+1; i++) { var tr = table.insertrow(i); for(var ii = 0; ii <= 7-1; ii++){ var td = tr.insertcell(ii); td.innerhtml = (ii); } } console.log(table); to fill days, can try one: var date = new date('11/13/2016'), totaldays = new date(date.getfullyear(), date.getmonth() + 1, 0), // changed ord...

php - I want to get each month expense from three table -

i have 3 table named "salary" , "allowance" , "bill" . "salary" table has s_id [primary key], e_id, s_amount, s_date. "allowanace" table has a_id[primary key], e_id, a_ta, a_da, a_ma, a_others, a_date, total_a "bill" table has e_id[primary key], electric, gas, water, b_others, b_date total_b i have joined these tables query>> select sum(allowance.`a_ta`+allowance.`a_da` +allowance.`a_ma`+allowance.`a_others`) total_allowance, (sum(salary.`s_amount`)) total_salary, sum(bill.`electric`+bill.`water`+bill.`gas`+bill.`b_others`) total_bill, (sum(allowance.`a_ta`+allowance.`a_da`+allowance.`a_ma` +allowance.`a_others`)+sum(salary.`s_amount`) +sum(bill.`electric`+bill.`water`+bill.`gas`+bill.`b_others`)) total_ex salary inner join allowance on salary.e_id=allowance.e_id inner join bill on salary.s_date=bill.b_...

multithreading - Python run GUI while serial reader is running -

i have build application maintains gui while serial reader running in background. serial reader updates variables need show on gui. far have this: # these variables updated reader. var1 = 0 var2 = 0 var3 = 0 #serial reader def readserial(self): ser = serial.serial(port='com4', baudrate=9600, timeout=1) while 1: b = ser.readline() if b.strip(): #function set variables var1,var2,var3 handle_input(b.decode('utf-8')) #simple gui show variables updating live root = tk() root.title("a simple gui") gui_var1 = intvar() gui_var1.set(var1) gui_var2 = intvar() gui_var2.set(var2) gui_var3 = intvar() gui_var3.set(var3) root.label = label(root, text="my gui") root.label.pack() root.label1 = label(root, textvariable=gui_var1) root.label1.pack() root.label2 = label(root, textvariable=gui_var2) root.label2.pack() root.label3 = label(root, textvariable=gui_var3) root.label3.pack() root.close_button = button(root, text="clos...

sql server - SQL nvarchar is invalid for sum operator -

i learning sql , have table looks this: id name payd note 1 john 5.00 r:8days;u:5$ 2 adam 5.00 r:8days; 3 john 10.00 r:8days; 4 john 10.00 r:8days; 5 adam 15.00 r:30days; i want make this: id name usage 5.00 10.00 15.00 sum 1 john 5 5.00 20.00 0 25.00 2 adam 5.00 0 15.00 20.00 i want check note column if there 'u:5$' in , add 5 customer has 'u:5$' in note column, if doesnt doesnt add anything. my code looks this: ;with cte ( select customer, paydamount, paydamount payd, note usage t1 ) select customer, usage ,[4.00] = isnull([4.00],0) ,[5.00] = isnull([5.00],0) ,[9.00] = isnull([9.00],0) ,[10.00] = isnull([10.00],0) ,[15.00] = isnull([15.00],0) ,[18.00] = isnull([18.00],0) ,[20.00] = isnull([20.00],0) ,[25.00] = isnull([25.00],0) ,[50.00] = isnull([50.00],0) ,[payd] =isnull([4.00],0) + isnull([5.00],0) + isnull([9.00],0) + isnull([10.00],0) + i...

angularjs - Nativescript angular Cannot move app.component.html in to separte folder -

i using nativescript 2.3.0 angular. created starter project following command tns create projname --ng i have following folder structure ├── app │ ├── app.css │ ├── app.component.html │ ├── app.component.ts │ ├── main.ts in side main.ts file have following. import { platformnativescriptdynamic, nativescriptmodule } "nativescript-angular/platform"; import { ngmodule } "@angular/core"; import { appcomponent } "./app.component"; @ngmodule({ declarations: [appcomponent], bootstrap: [appcomponent], imports: [nativescriptmodule] }) class appcomponentmodule {} platformnativescriptdynamic().bootstrapmodule(appcomponentmodule); notice importing appcomponent on line 3 what want want organize code have app.component file in separate folder as shown below │ ├── pages │ │ └── app.component.ts │ │ └── app.component.html │ ├── app.css │ ├── main.ts i have changed import in main.ts file follows import { app...