Status Bar with several Stage

I would like to have some opinion on the design, I made to represent the product process QTY. At each stage, i should show to the user, how many of his requested product has been proceed. If there are other proposal, or way to improve current design.

  1. First choice i made, is to represent the QTY in percentage to avoid having huge QTY number (such as 100 000 000 PCS)
  2. I rather not using a mouse-hover to provide more details. Even i have a design with.
  3. Size (Height/Wide) of the status bar is not changeable.

Thanks

enter image description here

Show Blutooth status on menu bar – Linux aqpplication name please?

What is the name of the application which actually shows the Bluetooth devices? I have TWO USB dongle Bluetooth adapters installed and getting conflicting info. Only one USB dongle shows as “paired” ( with what ?) type “Computer”. And it is “off” and cannot be turned “on”.

I can get there thru “Bluetooth Settings” and the window title is “Bluetooth”. I like to bypass the flaky GUI with CLI commands, but need the real app name.

Script para atualizar status de duplicados

Estou criando um script que atualiza o campo ativo para false caso haja alguma duplicação para um codigo_assinante. O problema que estou tendo é: Se por exemplo, tenho 5 casos de codigo_assinante duplicado, e cada um deles tem 2 duplicações, tenho que rodar o script várias vezes porque ele só atualiza 1 por vez. Preciso fazer que ele entenda que, até quando houve duplicações ele precisará executar.

Segue meu script:

#!/usr/bin/python  import logging  import psycopg2  logging.basicConfig(level=logging.INFO,                     format='%(asctime)s.%(msecs)03d %(levelname)s - %(funcName)s: %(message)s',                     datefmt='%Y-%m-%d %H:%M:%S',                     filename="logs/script_cancela-duplicados.log") conn_adesao = None cursor_adesao = None    def connect_db_adesao():     global cursor_adesao, conn_adesao     host_adesao = ""     db_adesao = ""     db_user_adesao = ""     db_pass_adesao = ""      conn_adesao = psycopg2.connect(host=host_adesao,                                    database=db_adesao,                                    user=db_user_adesao,                                    password=db_pass_adesao)     cursor_adesao = conn_adesao.cursor()     logging.info("Conexao com banco de adesao aberta com sucesso.")  def read_adesao():     logging.info("Realizando consulta no banco de adesao.")     sql = 'with tabela_auxiliar as (' \           'select min(id) as id from assinatura ' \           'where ativo = true ' \           'group by codigo_assinante ' \           'having Count(codigo_assinante) > 1) ' \           'select codigo_assinante, a.id, ativo from assinatura a ' \           'join tabela_auxiliar ta on a.id = ta.id ' \           'where codigo_assinante in (' \           'select codigo_assinante from assinatura ' \           'where ativo = true ' \           'group by codigo_assinante ' \           'having Count(codigo_assinante) > 1)'     cursor_adesao.execute(sql)     total_eventos = cursor_adesao.rowcount     logging.info("Quantidade de clientes recuperados do banco: {}".format(total_eventos))     row = cursor_adesao.fetchone()     while row:         update_db_adesao(row)         row = cursor_adesao.fetchone()     logging.info("Terminou de ler a base de adesao.")   def update_db_adesao(row):     codigo_assinante = row[0]     id = row[1]     logging.info("Cancelando assinatura duplicada codigo_assinante[{}], id[{}]."                  .format(codigo_assinante, id))     sql = "update assinatura set ativo = false " \           "where codigo_assinante = %s " \           "and id = %s "     cursor_adesao.execute(sql, (codigo_assinante, id))     updated_rows = cursor_adesao.rowcount     logging.info("{} linha(s) atualizada no banco, codigo_assinante[{}], id[{}]."                  .format(updated_rows, codigo_assinante, id))     if updated_rows < 1:         logging.warning("Nao ha atualizacao para o codigo codigo_assinante[{}], id[{}]"                         .format(codigo_assinante, id))     conn_adesao.commit()   def close_db():     if cursor_adesao is not None:         cursor_adesao.close()     if conn_adesao is not None:         conn_adesao.close()     logging.info("Conexao com banco fechada com sucesso.")   connect_db_adesao() read_adesao() close_db() 

Outro problema é que, mesmo ele executando e atualizando 1 por vez, estou recebendo o seguinte erro:

Traceback (most recent call last):   File "./cancela_duplicados.py", line 81, in <module>     read_adesao()   File "./cancela_duplicados.py", line 50, in read_adesao     row = cursor_adesao.fetchall() psycopg2.ProgrammingError: no results to fetch 

SP2010 – Workflow to change field status to “Expired” if field Expiry Date is less than Today

I can’t seems to figure-out how to make the below workflow works.

I have a simple lists that has an ID expiration date and A status field to show if “Active” or “Expired” based on the ID Expiration date.

Basically the workflow should check the “ID Expiration Date” daily and if it is greater than [Today] date, it will set the Status field value to “Active” and “Expired” if less than [Today] date.

Your help is much appreciated!

enter image description here

Erro no ajax com 419 (unknown status)?

O código funciona até um certo tempo depois para de rodar:

JAVASCRIPT

<script type="text/javascript">       $  (document).ready(function(){                     fetch_data();                    function fetch_data()                   {                    $  .ajax({                     url:"{{route('admin.contatos.preenche.table',"$  devedor->id")}}",                     dataType:"json",                     success:function(data)                     {                      var html = '';                      html += '<tr>';                      html += '<td contenteditable id="tipo"></td>';                      html += '<td contenteditable id="descricao"></td>';                      html += '<td><button type="button" class="btn btn-success btn-xs" id="add">Add</button></td></tr>';                      for(var count=0; count < data.length; count++)                      {                       html +='<tr>';                       html +='<td contenteditable class="column_name" data-column_name="tipo" data-id="'+data[count].id+'">'+data[count].tipo+'</td>';                       html += '<td contenteditable class="column_name" data-column_name="descricao" data-id="'+data[count].id+'">'+data[count].descricao+'</td>';                       html += '<td><button type="button" class="btn btn-danger btn-xs delete" id="'+data[count].id+'">Delete</button></td></tr>';                      }                      $  ('tbody').html(html);                     }                    });                   }                    var _token = $  ('input[name="_token"]').val();                       $  (document).on('click', '#add', function(){                 var tipo = $  ('#tipo').text();                 var descricao = $  ('#descricao').text();                 var devedor_id = "{{ $  devedor->id }}";                 if(tipo != '' && descricao != '')                 {                 $  .ajax({                      url:"{{route('admin.contatos.salva.table')}}",                     method:"POST",                     data:{tipo:tipo, descricao:descricao ,devedor_id:devedor_id , _token:_token},                     success:function(data)                     {                     $  ('#message').html(data);                     fetch_data();                     }                 });                 }   else   {    $  ('#message').html("<div class='alert alert-danger'>Both Fields are required</div>");   }  });   $  (document).on('blur', '.column_name', function(){   var column_name = $  (this).data("column_name");   var column_value = $  (this).text();   var id = $  (this).data("id");    if(column_value != '')   {    $  .ajax({      url:"{{ route('admin.contatos.update.table') }}",     method:"POST",     data:{column_name:column_name, column_value:column_value, id:id, _token:_token},     success:function(data)     {      $  ('#message').html(data);     }    })   }   else   {    $  ('#message').html("<div class='alert alert-danger'>Enter some value</div>");   }  });    $  (document).on('click', '.delete', function(){   var id = $  (this).attr("id");   if(confirm("Tem certeza que quer deletar esse contato?"))   {    $  .ajax({      url:"{{ route('admin.contatos.delete.table') }}",     method:"POST",     data:{id:id, _token:_token},     success:function(data)     {      $  ('#message').html(data);      fetch_data();     }    });   }  });   }); 

HTML

 <div class="container">    <h3 align="center">Lista de contatos cadastrados</h3>    <br />    <div class="panel panel-default">       <div class="panel-heading">Sample Data</div>       <div class="panel-body">          <div id="message"></div>          <div class="table-responsive">             <table class="table table-striped table-bordered">                <thead>                   <tr>                      <th>Tipo</th>                      <th>Contato</th>                      <th>Delete</th>                   </tr>                </thead>                <tbody>                </tbody>             </table>             {{ csrf_field() }}          </div>       </div>    </div> </div> 

Error “ld returned 1 exit status” en Dev C++

Tengo un error en Dev C++, intento validar que una cadena (nombre) no este vacia y luego calcular una nota final sumadas las notas parciales. Pero no logro hacer que compile por el error “ld returned 1 exit status”. Cuando el nombre sea null el programa debe parar, y si alguna nota no esta dentro de 0 y 10 vuelva a pedir otro nombre hasta completar X alumnos pero siempre hasta que un nombre sea null (se detiene el programa).

CÓDIGO

#include<iostream>  using namespace std;   int main(){      /* variables      nombre = nombre     nota1 = n1     nota2 = n2     nota3 = n3      */      string nombre;     int n1, n2, n3, c;     float suma;      c == 1;      while (c!=0){          cout<<"Ingrese Nombre: ";cin>>nombre;          if (!nombre.empty()){             cout<<"Ingrese Nota 1: ";cin>>n1;             cout<<"Ingrese Nota 2: ";cin>>n2;             cout<<"Ingrese Nota 3: ";cin>>n3;              if(n1, n2, n3 > 0 and n1, n2, n3 < 10 ){                  suma = n1*0.1 + n2*0.5 + n3*0.4;                  cout<<"La nota de "<<nombre<<" es "<<suma<<endl;             }          }                else{             c = 0;                       cout<<"No existe alumno";                        }            }      return 0; }