Time Clock (Clock in and out) with flutter, also able to export data from an admin page, and export it to a PDF, with editing options from admin side

I am newer to flutter, and I am making an Employee Portal. I need to make a Clock in and out feature, and they need to be able to Clock in to a certain job, and I also need to be able to export the users time clock for that certain week to a pdf, please give me directions on how to do that..

sharepoint online – Need To Convert DOCX File To Latest To Manipulate XML on Client Side

My JavaScript-based web app uses the html-to-docx library file which produces a Word 2007 docx blob (zip archive), which is a compatibility mode version in today’s Word browser and desktop implementations.

I want to use the Text Effects feature in Word, and I already know that this requires that the document.xml becomes a far larger markup file after using Word to save the Word 2007 docx as the latest docx version. Once I get that latest docx version with larger xml file, I can use any zip file utility (JSZip, Pizzip) to open it, deserialize the XML and search the node I want, make edits, and so on.

Web searches for library code to run in client to achieve the 2007 docx=>latest docx do not show what I want (lots of stuff for Node that might work). I’m looking for strategies that I may be missing.

WordPress Theme not working properly on user side

Please give me some help…

I’m using the Newspaper WordPress theme. After I customize the theme It works and looks perfect for the admin’s browsers. But when I log in to another device. Its weird some content and theme do not appear to the user. What is the reason for that? What should I do?

Add more Google Apps to gmail side panel

I mean to add more Google Apps to show when I click on the Waffle icon in the right side panel of Gmail.
In particular, I want to add Groups.
I know I can do two other things:

  1. The “+” button only allows for adding Add-ons, not other Google apps.
  2. Reordering what is already there by click-and-drag.

but none of this is what I am looking for.

Is this possible? How?

Update Sharepoint List Item with Javascript Client Side Object Model

For the past days I’ve been trying, with no success, to establish a connection to a sharepoint list (https://mywebsite.com/sites/concasbkcu/Lists/list_teste/AllItems.aspx) and update its items with the follow code:

var siteUrl= 'https://mywebsite.com/sites/concasbkcu/';
var targetlistItem;
var itemID = 1;

function updateListItem() {

var clientContext = new SP.ClientContext(siteUrl);
var targetList = clientContext.get_web().get_lists().getByTitle('list_teste');

targetListItem = targetList.getItemById(itemID);

targetList.set_item('Title', 'Test Title');

targetList.update();

clientContext.executeQueryAsync(onRequestSucceeded, onRequestFailed);

}

function onQuerySucceeded() {

    alert('Item updated!');
}

function onQueryFailed() {

    alert('Request failed');
}

I tried calling this function on a html button, but it just doesn’t work…no error message is shown and the item doesn’t update at all. Can someone help me, please?

Regards!

key management – How to manage Encryption Key for Server Side Encryption in AWS S3

I need to encrypt personal data like email, phone number, etc. I am using AWS KMS for managing the encryption keys. This is the system that is already implemented is as follows:

  1. All the existing data is encrypted using a worker which first generates a data key by calling the aws-sdk. This call returns the plaintext(decrypted data key) and the encrypted data key. This plaintext is then used to encrypt the data and then is removed from the memory.
  2. Now whenever a new data key is generated, the encrypted data key is stored in a .json file and uploaded to AWS S3 bucket. This upload has Server Side Encryption enabled using a Customer Key. I store the path to this json file to the db table that keeps record of the active data keys.
  3. Whenever I need to decrypt data, I get the json file from the s3 bucket which contains the encrypted data key. Then I call the decrypt function of aws sdk and retrieve the original data key which is then used to decrypt the encrypted data.

Now my question is:

How do I manage the customer key used in step 2 for the server side encryption of the s3 file upload. Right now I generate a random key for each data key and store this in the data keys table.
Is this a safe way to handle this key?
What is the general practice regarding using SSE-C keys? Should I keep a constant key for each data key instead of generating a new one?

any help is highly appreciated

Calculating a triangle’s angle & side length

Alright, hopefully an interesting one. I’m trying to make a program for the game Foxhole, where artillery uses azimuths and ranges between spotter, gun, and target in order to direct the artillery’s angle and range to the target.

This math involved in this is far above my head, and I’ve tried thinking it over with a pen and paper – but I’m making no progress, it simply exceeds my knowledge. Any help or formulas would be great!

Notes:

  • I’m not sure my diagrams are accurate, but I did my best to try to
    visualize the situation.

Process 1, simple:

  1. The spotter measures his distance from target & his angle to the target
  2. The spotter measures his distance from gun & his angle to the gun
  3. An unknown formula is used to determine the gun’s angle and distance to target
  4. The gun is aligned to the target, the gun is ranged, and the gun may fire onto the target

Here is an attempted visual:

Process 1


There is a second process we would like to do, which seems far more complicated than the process above.

Process 2, complex:

  1. The spotter measures his distance from the land mark & his angle to a land mark
  2. The spotter measures his distance from the gun & his angle to the gun
  3. The spotter advances. The spotter measures his new distance from land mark & his new angle to the land mark
  4. The spotter measures his distance from the target & his angle to the target
  5. (Math is done)
  6. The gun is aligned to the target, the gun is ranged, and the gun may fire onto the target

Here is an attempted visual:

Process 2

Thanks for looking

calculus and analysis – Making equal left and right hand side of the some equality

I think that there is a similar posts in here. But I don’t find right keyword.

My question:
After some calculations, I get equality. For a simple example:

$$list={a,b,c}=={1,2,3}$$

Can we extract $a=1,b=2,c=3$.

I want to make some calculations such as $a+b+c=?, D[a*c,x]=? $ e.t.c

What are the best options?

`list = {a, b, c} == {1, 2, 3};
Thread[{a, b, c} == {1, 2, 3}, Equal];
a + b + c

D[a*c,x]

smartcontracts – Can smart contracts be set up on a side chain or 2nd layer solution?

What is a smart contract?

Smart contracts go beyond the vending machine in proposing to embed contracts in all sorts of property that is valuable and controlled by digital means. Smart contracts reference that property in a dynamic, often proactively enforced form, and provide much better observation and verification where proactive measures must fall short.

Computerized devices that respond to the environment according to price signals or other contractual terms, customer preferences, and other states or events that are encoded in them or that they are encoded to respond to. Many smart contracts in the future may be programmed using a contract drafting language for specifying their event-driven behavior.

If a loan was taken out to buy that car, and the owner failed to make payments, the smart contract could automatically invoke a lien, which returns control of the car keys to the bank. This smart lien might be much cheaper and more effective than a repo man.

Smart contracts allow a new freedom of contract that is no longer possible, if it ever was, with traditional law.

https://nakamotoinstitute.org/the-idea-of-smart-contracts/

https://unenumerated.blogspot.com/

What is DeFi?

Being honest, its the new buzzword for selling your tokens to newbies for most of the projects. DeFi or Decentralized Finance in reality could be a term used for financial applications that use decentralized protocols.

Are smart contracts and decentralized finance possible with Bitcoin?

Yes

Is it theoretically possible for a side chain or second layer solution to utilize/implement smart contracts?

Smart contracts can be written using solidity for Rootstock (sidechain) and simplicity for Liquid (sidechain)

Is there is possibility that the ‘DeFi’ space eventually transitions to simply being a 2nd layer solution on the BTC network instead of on ETH?

Not sure if we should use the term “DeFi” for financial applications on top of a chain that is not decentralized, projects involving few people, governance tokens with most of the supply with VCs and devs.

Also any transition depends on market and people involved in Bitcoin projects. Honestly, lot of Bitcoin developers don’t get the appreciation they deserve for working on some of the projects. Example: Confidential transactions for Elements based sidechains, Oracles using discreet log contracts, Bisq, Joinmarket, Rootstock etc.

Lot of things are being done on Lightning Network. Its difficult to keep a track of everything happening in this space but recently saw this video for a project which provides a market place to incentivize people to seed torrents by paying with sats over the Lightning Network.

cookies – I have CSRF protection implemented server side, can I safely use `SameSite=None; Secure; HttpOnly`?

We have a web service where GET is always safe and all unsafe POST requests use single-use CSRF tokens. We have some cases where cross-origin domain would need to pass us POST request with data that should be used with currently active user session (top-level cross-site POST) so we need the session cookie while handling this request. The cross-origin is trusted and the request is signed with HMAC signature but the cross-origin doesn’t know and shall not know the session cookie value used by the user which is the reason we need the cookie from the browser. (In short the flow goes like this: we redirect logged in user to 3rd party service where user uses UI to select data items that get passed to us with details. We don’t know the credentials to the 3rd party service and they cannot know the session details of our service.)

We can currently get this to work with setting session cookie with SameSite=None; Secure; HttpOnly but I have three questions:

  1. Does SameSite=Lax or SameSite=Strict offer any other protection but CSRF attacks? We already have CSRF token protection so we don’t need SameSite cookies for this.
  2. I know that Google has published a plan to kill third party cookies which use SameSite=None; would our use of 1st party cookies be affected, too? I’d like to have a setup which would work in the future, too.
  3. Is there any way to declare that we want SameSite: Lax plus allow 1st party cross-origin POST requests (that is, when browser location bar shows our domain, allow submitting the cookie always without the 2 minute hack that Chrome used to have when SameSite was not set at all)? We’re not interested in user tracking and would want to avoid stamped as such by the browser UI.

Basically I’m asking if SameSite=None; Secure; HttpOnly is safe to use safely both in sense of security and longetivity, or if there’s a better way to do this.