How to calculate multiple Decimal column sum | Linux |

i have a scenario where i want to calculate the sum of multiple decimal columns my below code works perfect with non-decimal column but not with decimal Code works perfect for this data ID|NAME|SAL|COST|PER|TAG 1|A|10|10|20|10| 1|B|10|15|20|10| 1|C|10|17|25|80| 1|D|115|110|20|100| 1|E|10|10|10|10| code : #!/bin/bash FILE=”$1″ COLUMNS=”${@:2}” for col in $COLUMNS; do colnum=$(awk -v RS=’|’ ‘/’$col’/{ print NR;…

Details

how to have a single search API using path parameters (No form used)

I have been using this view for searching a word as: db refers mongo connection (just for ref) @app.route(‘/’) def index(): return render_template(‘index.html’) @app.route(‘/words-<word>’, methods=[‘GET’, ‘POST’]) def wordsearch(word): collection_name=word[0].lower()+’_collection’ words=db[collection_name] data=words.find({‘word’:word}) return render_template(‘wordsearch.html’,data=data) In index.html template I have been doing this to match this above url as: <script type=”text/javascript”> $(document).ready(function(){ $(‘#submit’).on(‘click’, function() { var wordvalue…

Details

Why doesn’t the update OLEDB query do nothing?

I’m using OLEDB in my program to update an excel sheet. The Execute returns 1 as row update count, but doesn’t change nothing. My code is as below: public static void updateExcel(string sql, string path) { try { OleDbConnection con; OleDbCommand comm = new OleDbCommand(); con = new OleDbConnection(“Provider=Microsoft.ACE.OLEDB.12.0;Data Source=” + path + “;Extended Properties=Excel…

Details