Trouble when I try consume a UserTask in Bonita

When I try to consume a task in Bonita from Eclipse, I have this error:

POST http://localhost:8080/bonita/serverAPI/org.bonitasoft.engine.api.ProcessAPI/updateActivityInstanceVariables HTTP/1.1

2019-05-23 16:47:01,406 ERROR c.e.b.s.BPMService:206 – Exception org.bonitasoft.engine.exception.UpdateException: USERNAME=usuario | Some data does not exists, wanted to update [param1, param2] but there is only [] at org.bonitasoft.engine.api.HTTPServerAPI.invokeMethod(HTTPServerAPI.java:128) at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:86) at com.sun.proxy.$ Proxy6.updateActivityInstanceVariables(Unknown Source) at com.example.bonita.service.BPMServiceImpl.updateProcess(BPMServiceImpl.java:144) at com.example.bonita.service.BPMServiceImpl.executeBPMTask(BPMServiceImpl.java:221) at com.example.bonita.service.BPMService.obtenerToken(BPMService.java:197) at com.example.demo.Application.main(Application.java:209) at < ========== Beginning of the server stack trace ========== >. ( ) at org.bonitasoft.engine.api.impl.ProcessAPIImpl.updateActivityInstanceVariables(ProcessAPIImpl.java:2617) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:462) at org.bonitasoft.engine.api.impl.ServerAPIImpl$ 2.call(ServerAPIImpl.java:431) at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:274) at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPIInTransaction(ServerAPIImpl.java:438) at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:272) at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:124) at org.bonitasoft.engine.api.internal.servlet.HttpAPIServletCall.doPost(HttpAPIServletCall.java:111) at org.bonitasoft.engine.api.internal.servlet.HttpAPIServlet.doPost(HttpAPIServlet.java:35) at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ ConnectionHandler.process(AbstractProtocol.java:806) at org.apache.tomcat.util.net.NioEndpoint$ SocketProcessor.doRun(NioEndpoint.java:1498) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$ Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$ WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)

Do you have any idea that I forget something?

Thank you

MacBook Pro having trouble sleeping

Problem

My MacBook Pro seems to have trouble sleeping when closed. I noticed it because it’s hot in the mornings, while the battery is nearly drained. It doesn’t happen all the time, and, unfortunately, I don’t know how to reproduce this behaviour on purpose.

Sometimes I use Caffeine, an app which makes sure Mac won’t go to sleep. I used it with my old MacBook 12′ and it worked well with Caffeine activated (it was sleeping tight). This one though, I can’t leave it in my backpack on (alleged) sleep since I’m afraid of damaging it from excessive heat. However this app seems to be unrelated to be problem, since it occurred without the application as well.

Question

What wakes my Mac and how can I be sure that it’ll sleep for the whole night?

Additional information

MacBook Pro (13-inch, 2018, Four Thunderbolt 3 Ports), Mojave 10.14.4, 2,3 GHz Intel Core i5, 16 GB 2133 MHz LPDDR3

I did some research, tried to investigate it on my own, but I’m clueless with this output:

$   log show --style syslog # excerpt - the first line is repeated many times during the night 2019-05-21 00:18:57.630795+0200  localhost apsd[74]: <private>: Not choosing red list for topic <private> because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.630796+0200  localhost apsd[74]: <private>: Not choosing red list for topic <private> because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.630797+0200  localhost apsd[74]: <private>: Not choosing red list for topic com.apple.Notes because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.630798+0200  localhost apsd[74]: <private>: Not choosing red list for topic com.apple.Notes because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.630799+0200  localhost apsd[74]: <private>: Not choosing red list for topic <private> because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.630799+0200  localhost apsd[74]: <private>: Not choosing red list for topic <private> because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.630800+0200  localhost apsd[74]: <private>: Not choosing red list for topic <private> because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.630801+0200  localhost apsd[74]: <private>: Not choosing red list for topic <private> because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.630965+0200  localhost apsd[74]: (Security) Created Activity ID: 0xe3c85, Description: SecItemCopyMatching 2019-05-21 00:18:57.631108+0200  localhost apsd[74]: (Security) Created Activity ID: 0xe3c86, Description: SecItemCopyMatching 2019-05-21 00:18:57.631112+0200  localhost apsd[74]: (Security) Created Activity ID: 0xe3c87, Parent ID: 0x80000000000e3c86, Description: SecItemCopyMatching_ios 2019-05-21 00:18:57.631166+0200  localhost apsd[74]: (Security) [com.apple.securityd:SecCritical] Failed to talk to secd after 4 attempts. 2019-05-21 00:18:57.631190+0200  localhost apsd[74]: (Security) Created Activity ID: 0xe3c88, Description: SecItemCopyMatching 2019-05-21 00:18:57.631292+0200  localhost apsd[74]: Looking up connection on peer: 5ab15c70   found <private> 2019-05-21 00:18:57.631495+0200  localhost apsd[74]: successful entitlement check 'com.apple.private.push-to-wake' for 263 2019-05-21 00:18:57.631508+0200  localhost apsd[74]: [com.apple.apsd:connectionServer] <private>: connection set push wake topics from <private> to <private> 2019-05-21 00:18:57.631586+0200  localhost apsd[74]: <private>: Filter will potentially be changed by <private> 2019-05-21 00:18:57.631595+0200  localhost apsd[74]: <private>: Not choosing red list for topic <private> because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.631596+0200  localhost apsd[74]: <private>: Not choosing red list for topic <private> because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.631598+0200  localhost apsd[74]: <private>: Not choosing red list for topic <private> because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.631599+0200  localhost apsd[74]: <private>: Not choosing red list for topic <private> because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.631600+0200  localhost apsd[74]: <private>: Not choosing red list for topic <private> because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.631601+0200  localhost apsd[74]: <private>: Not choosing red list for topic <private> because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.631603+0200  localhost apsd[74]: <private>: Not choosing red list for topic com.apple.private.ids because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.631604+0200  localhost apsd[74]: <private>: Not choosing red list for topic com.apple.private.ids because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.631606+0200  localhost apsd[74]: <private>: Not choosing red list for topic <private> because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.631606+0200  localhost apsd[74]: <private>: Not choosing red list for topic <private> because dark wake enabled and in full into dark wake 2019-05-21 00:18:57.631608+0200  localhost apsd[74]: <private>: Not choosing red list for topic <private> because dark wake enabled and in full into dark wake ... 
$   pmset -g assertions Assertion status system-wide:    BackgroundTask                 0    ApplePushServiceTask           0    UserIsActive                   1    PreventUserIdleDisplaySleep    0    PreventSystemSleep             0    ExternalMedia                  0    PreventUserIdleSystemSleep     1    NetworkClientActive            0 Listed by owning process:    pid 286(sharingd): [0x000142480001a7f2] 00:00:38 PreventUserIdleSystemSleep named: "Handoff"    pid 97(hidd): [0x000135310009a2c8] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4295051175.3"     Timeout will fire in 600 secs Action=TimeoutActionRelease Kernel Assertions: 0x104=USB,MAGICWAKE    id=508  level=255 0x100=MAGICWAKE mod=21/05/2019, 15:48 description=en0 owner=en0    id=1165  level=255 0x4=USB mod=01/01/1970, 01:00 description=com.apple.usb.externaldevice.01100000 owner=USB3.0 Hub    id=1167  level=255 0x4=USB mod=01/01/1970, 01:00 description=com.apple.usb.externaldevice.14200000 owner=USB2.0 Hub Idle sleep preventers: IODisplayWrangler 
$   pmset -g System-wide power settings: Currently in use:  standbydelaylow      10800  standby              1  womp                 1  halfdim              1  hibernatefile        /var/vm/sleepimage  proximitywake        1  powernap             1  gpuswitch            2  networkoversleep     0  disksleep            10  standbydelayhigh     86400  sleep                1  hibernatemode        3  ttyskeepawake        1  displaysleep         10  tcpkeepalive         1  highstandbythreshold 50  acwake               0  lidwake              1 

First Program Tic-Tac-Toe. Trouble with abstraction?

This is the first little project I’ve made that didn’t feel it was complete gibberish. But I couldn’t tell.

The biggest problem I had with this was using the BoardValue enum working like I wanted to. I understand that classes should have a level of abstraction to them and I suspect that the way I implemented the at(int) returning a char over a BoardValue took away from that. However, I though having to convert the return from at(int) to a char if it returned a BoardValue would be redundant. For example, using a statement like this

char print_char = Board.at(some_index) == BoardValue::o ? 'O' : 'X'; 

I hope I’ve done a decent job describing my dilemma.

Overall, I’m hoping for some overall general code style tips and pointers on how to write better code from here.

tictactoe.h

#ifndef TICTACTOE #define TICTACTOE #include <array> #include <iostream>  enum BoardValue : char{ none = ' ', o = 'O', x = 'X' };  class Board { public:     Board()     {         for(auto begin = board.begin(),end = board.end();begin != end; ++begin)             *begin = BoardValue::none;     }      char at(int index) const{ return board.at(index); }     inline bool check_win(BoardValue) const;     bool place(int, BoardValue); private:     bool check_diagonals(BoardValue) const;     bool check_horizontals(BoardValue) const;     bool check_verticals(BoardValue) const;      std::array<char, 9> board{}; };  inline bool Board::check_win(BoardValue check) const {     if(check == BoardValue::none)         throw "Trying to check_win for check == BoardValue::none!";     return check_diagonals(check) || check_horizontals(check) || check_verticals(check); }  #endif 

tictactoe.cpp

#include "tictactoe.h" #include <iostream>  //returns false if index is occupied bool Board::place(int index, BoardValue value) {     if(board.at(index) != BoardValue::none)         return false;     board.at(index) = value;     return true; }  bool Board::check_diagonals(BoardValue check) const {     //if middle is not check no diagnols will pass     if(board.at(4) != check)         return false;     //backward diagonal '\'     if(board.at(0) == check && board.at(4) == check)         return true;     //forward diaganol '/'     if(board.at(2) == check && board.at(6) == check)         return true;     return false; }  bool Board::check_horizontals(BoardValue check) const {     for(int row = 0; row < 3; ++row){         if(board.at(row) == check &&             board.at(row + 3) == check &&             board.at(row + 6) == check)             return true;     }     return false; }  bool Board::check_verticals(BoardValue check) const {     for(int col = 0; col < 3; ++col){         if(board.at(col * 3) == check &&             board.at(col * 3 + 1) == check &&             board.at(col * 3 + 2 ) == check)             return true;     }     return false; } 

main.cpp

#include "tictactoe.h" #include <iostream>  int ask_input(char player, bool retry = false) {     if(!retry)         std::cout << "It's " << player             << "'s turn. Where do you want to go(e.g. A1 B3 C2)? ";     else         std::cout << "No, no, no " << player             << "! Input a letter followed bt a number: ";     std::string input;     std::cin >> input;      if(input.size() < 2)         return ask_input(player, true);      int col_input{};     switch(*input.begin())     {         case 'A':         case 'a':             col_input = 0;             break;         case 'B':         case 'b':             col_input = 1;             break;         case 'C':         case 'c':             col_input = 2;             break;         default:             return ask_input(player, true);     }      int row_input = *(input.begin() + 1) - '0'; //convers char '1' to int 1     --row_input;      return col_input * 3 + row_input; }  BoardValue ask_turn() //ask whos first if return true O goes first {     BoardValue turn;     std::string input;     std::cout << "Who goes first(X or O)? ";     for(bool valid_input{false}; !valid_input;)     {         std::cin >> input;         switch(input.front()) //input cannot be null at this point         {             case 'x':             case 'X':                 valid_input = true;                 turn = BoardValue::x;                 break;             case '0':             case 'o':             case 'O':                 valid_input = true;                 turn = BoardValue::x;                 break;             default:                 std::cout << "Invalid input! Try X or O :";         }     }     return turn; }  std::ostream &print_board(std::ostream &os,const Board &board) {     os << " |A|B|C\n";     for(int row = 0; row < 3; ++row)     {         os << std::string( 8, '-') << '\n';         os << row + 1 << '|';         for(int col = 0; col < 3; ++col)         {             char follow_char{ col == 2 ? '\n' : '|' };             os << board.at(col * 3 + row) << follow_char;         }     }     os << std::endl;     return os; }  int main(){     Board board{};     BoardValue turn{ ask_turn() };      //turn will be set back to appropriate value at start of game loop     turn = turn == BoardValue::o  ? BoardValue::x : BoardValue::o;     int turn_count{0};     while(board.check_win(turn) == false)     {         turn = turn == BoardValue::o  ? BoardValue::x : BoardValue::o;         print_board(std::cout, board);         bool input_valid{false};         while(input_valid == false)         {             int input;             input = ask_input(turn);             input_valid = board.place(input, turn);             if( input_valid == false )                 std::cout << "That place is take! Try again..\n";         }         if(++turn_count == 9) //max amount of turns game is tie             break;     }     print_board(std::cout, board);     if(turn_count == 9)//game is tie         std::cout << "Looks like its a tie...\n";     else         std::cout << (char)turn << " wins!\n"; } 

Trouble with adding string to a linked list, c++

I added an integer to a linked list with no problem but when I edited the node class to add a string I keep getting an error. Any and all advice will help

Linked List Class:

#pragma once #include <iostream> #include <string>  using std::string;  //class to make nodes template <class T> struct node {     int data;     string name;     node<T> *next;  //pointer that links the nodes together  };  template <class T> class LinkedList {  private:     node<T> *head;     node<T> *tail;    public:     LinkedList() {          //contrustor that initializes the class         head = nullptr;         tail = nullptr;      }      ~LinkedList() {         //deallocates any memory allocated in class methods       }          void Insert(int data, string name) {          node<T> *tmp = new node<T>; //creates the node and stores it in a tmp variable. calls node class. tmp is a pointer         tmp->data = data;  //store data in the tmp node         tmp->name = name;   // store name in the tmp node         tmp->next = nullptr; // sets tmp next to null          if (head == nullptr) {          //if linked list is empty             head = tmp;             tail = tmp;         }          else {              tail->next = tmp;             tail = tail->next;           }     } 

Main File:

#include<iostream> #include "linked_list.h" #include <string>  using namespace std;  void main() {      LinkedList<string>* list = new LinkedList<string>();      list->Insert(12, 'hey');  } 

I have trouble translating Turing machine language, can you help me break down language notation to English?

My problem is I don’t have many issues with creating a Turing machine state table when given a string such as 01101, my issue arises when I am presented with a problem which requires the Turing machine to recognize the language {0n1n | n ≥ 0}.

I have found this guide on a similar problem however I cannot grasp what is going on and what is required from the language statement. Any help in regards to how to read the specified language effectively would be appreciated.

Having trouble installing Ubuntu 19.04 via USB on Acer Swift 3 sf341-51 laptop

I’m trying to install Ubuntu 19.04 on an Acer Swift 3 sf341-51 with a bootable usb made w/ Rufus as per the guide provided by Ubuntu here: https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-windows#0 After the installation when I removed the USB and restarted, my laptop could not find an OS (The specific error was, “Default Boot Device missing or Boot Failed”). I tried making a partition table myself, but that didn’t work either. It gave me the same result – no OS found and error of Default Boot Device Missing or Boot Failed.

I then tried turning off secure boot, and reinstalled Ubuntu – however, I ran into the same problem/error as before.
I tried changing my boot mode from UEFI to legacy. This gave me a very fast cycling bootloop. I recorded it on my phone so that I could read the error that kept popping up for about half a second. ‘System BootOrder not found. Initializing defaults. Creating boot entry” Boot0000” with label “ubuntu” for file “\EFI\ubuntu\shinx64.efi’
I then tried going back into UEFI boot mode, leaving secure boot off, and moving my EFI File Boot up the boot priority list above my hard drive. This gave me the same “Default Boot Device missing or Boot Failed” error I was getting before.

I have installed Ubuntu 18.04 LTS on this laptop and I know I ran into similar issues, however I do not remember what fixed them before. I think I remember something about GRUB, but I have no idea how to troubleshoot that.

Any and all advice is sincerely appreciated.

Trouble installing dependencies for gpointing-device-settings. Error with gnome-settings-daemon

I’ve been installing all the required dependencies for gpointing-device-settings which I don’t have (figuring out by running ./configure and seeing what causes errors). But I’ve gotten to an error that I have not been able to get past.

screenshot of terminal displaying error message

I’ve done

  1. install gnome-settings-daemon but that doesn’t stop the error
sudo apt-get install gnome-settings-daemon 
  1. add path of gnome-settings-daemon to PATH and to PKG_CONFIG_PATH
    added the following to .profile
export PATH="/usr/lib:$  PATH" export PATH="$  HOME/usr/lib:$  PATH" PATH="/usr/lib:$  PATH" PATH="$  HOME/usr/lib:$  PATH" 

have extra just in case (I’m a beginner and just wanted to make sure that I wasn’t doing it wrong so I put in every combination)

paths as seen on terminal

Having trouble with a Django Application to Elastic Beanstalk

So I’ve been trying to setup the sample Django app from here: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html

Does anybody have experience debugging python apps that they’ve deployed with eb?

It deploys successfully because I see this:

eb deploy Creating application version archive "app-190505_023511". Uploading hush-app/app-190505_023511.zip to S3. This may take a while. Upload Complete. 2019-05-05 09:35:13 INFO Environment update is starting. 2019-05-05 09:35:17 INFO Deploying new version to instance(s). 2019-05-05 09:35:41 INFO New application version was deployed to running EC2 instances. 2019-05-05 09:35:41 INFO Environment update completed successfully. 

But I see this when I run eb open on my web browser:

Internal Server Error The server encountered an internal error or misconfiguration and was     unable to complete your request. Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log. 

Does anyone have suggestions on how to debug this?