Latest posts

Final blog during GSOC 2021 with XFCE

It was great to be a part of XFCE community during the GSOC 2021. Some things get placed on right place and some didn’t, but moving forward with lot of learning and new concept related to XFCE. This was my first interaction with the GTK world and XFCE Panel plugin. I have explored different ways to implement things, some works and others doesn’t.

Here ways you can avoid to try out while developing XFCE panel plugin with Python and Javascript.

Method 1: Go all out with Python or Javascript rather than GTKSocket and GTKPlug with Libxfcepanel.

Yes, It is true that you can access most of the function or XFCE API through the usage of Libxfcepanel in python. But You would not be able to register panel with this method, due to unavailability of access to XFCE_PANEL_PLUGIN_REGISTER macros inside Libxfcepanel through panel. So, Even after implementing whole plugin with python, you would not be able to register inside a XFCE Panel, leaving your all your efforts as wastage.

Method 2: Move forward with GTKSocket and GTKPlug approach, But handing of XFCE Panel API will be done inside the Python or Javascript Part.

It would be bad approach as you would not be able to access XFCE panel plugin object inside python or javascript part in any way. And most API are based on XFCE panel plugin object, If you are able to find out any way to acess XFCE Panel Plugin pointer lying currently on a GTKSocket part inside a GTKPlug part then you it would be possible to move possible with this approach otherwise, you will not. Accessing C pointer inside a python or javascript is not a simple thing to implement.

Current Challenge: We are trying to use the concept of Dbus for handling of XFCE Panel API and signal inside a GTKSocket part, This approach is successfull in lot of API acess, but it have some challenge with menu registration.

For example, Basic requirement for right click XFCE menu is that you would have to pass GTKWidget as an argument of “xfce_panel_plugin_add_action_widget”, But You when you try to access GTKPlug through GTKSocket part, it does not return GTKPlug as an child of GTKSocket, making it difficult to access GTKPlug widget inside a GTKSocket part. This problem still remaining to solve out.

Here is an URL to the Sample Plugin with Python and Javascript.

https://gitlab.xfce.org/vishal2612200/gio-xfce-panel-plugin-samples

Here is an google doc url for documentation related to this URL.

https://docs.google.com/document/d/1BzfI7V0vZGLWtLUBSVCPwZiWZwLL01TjzzFM7FTP4M4/edit?usp=sharing

Few Contribution to XFCE, other than sample/skeleton Plugin

Blog during the GSOC

This is not an end here, looking out to contribute more after the GSOC also. Thanks to all mentors, Yosuf Phillips and itsmanjeet for your valuable support 🙂

Connection between XFCE API signals and Plug in Python/Javascript – Part 2

It was a major challenge to receive socket emitted signal in the plug inside a socket program written in C programming language. So we decided to move forward with dbus approach as discussed in last blog.

Inside a plugin we created dbus server part in gtkplug written in python and dbus client part in gtksocket. Benefit of this approach was we can transmit signals emitted by gtk plug to gtksocket part through dbus. As plug is embedded inside the gtksocket, so most of the events will be happening throughout the gtkplug leading to emission of different signals on different occasion. Yes, there is an way to access different XFCE API functions through the python. But we can’t register XFCE plugin through the python, hence sample plugin object was registered before creation of Gtksocket through C programming.

This challenge was the biggest challenge that why things became complex even for performing simple things.

so let me show you an example for client dbus in C and server dbus in python.

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h> 
#include <string.h>
#include <stdbool.h>
#include <ctype.h>

#include <dbus/dbus.h>


const char *const INTERFACE_NAME = "com.example.service.Print";
const char *const SERVER_BUS_NAME = "com.example.service";
const char *const CLIENT_BUS_NAME = "com.example.clientservice";
const char *const SERVER_OBJECT_PATH_NAME = "/com/example/service";
const char *const CLIENT_OBJECT_PATH_NAME = "/com/example/clientservice";
const char *const METHOD_NAME = "print";

const char *const ANOTHER_INTERFACE_NAME = "com.example.service.Quit";
const char *const ANOTHER_METHOD_NAME = "quit";

DBusError dbus_error;
void print_dbus_error (char *str);


int sendMethodCall(void) {
    /*
    This function is created to call quit method for server Dbus
    After sucessfull call through this function server dbus will get stopped.
    */
    DBusMessage *message;
    DBusPendingCall *pending;

    DBusConnection *conn;
    
    dbus_error_init (&dbus_error);

    conn = dbus_bus_get (DBUS_BUS_SESSION, &dbus_error);

    message = dbus_message_new_method_call(SERVER_BUS_NAME, SERVER_OBJECT_PATH_NAME, 
                           ANOTHER_INTERFACE_NAME, ANOTHER_METHOD_NAME);
    if (message == NULL) {
        fprintf(stderr, "Message is NULL \n");
        return -1;
    }

    if (!dbus_connection_send_with_reply(conn, message, &pending, -1)) {
        fprintf(stderr, "Out of memory \n");
        return -1;
    }

    if (pending == NULL) {
        fprintf(stderr, "Pending call is NULL \n");
        return -1;
    }
    printf("Method call has been sent.\n");

    dbus_message_unref(message);
    dbus_pending_call_block(pending);

    message = dbus_pending_call_steal_reply(pending);
    if (message == NULL) {
        fprintf(stderr, "Reply message is NULL \n");
        return -1;
    }

    printf("Received reply.\n");

    dbus_pending_call_unref(pending);
    dbus_message_unref(message);
}

int main (int argc, char **argv)
{
    DBusConnection *conn;
    int ret;
    char input [80];

    dbus_error_init (&dbus_error);

    conn = dbus_bus_get (DBUS_BUS_SESSION, &dbus_error);

    if (dbus_error_is_set (&dbus_error))
        print_dbus_error ("dbus_bus_get");

    if (!conn) 
        exit (1);

    printf ("Please type two numbers: ");
    while (fgets (input, 78, stdin) != NULL) {

        // Get a well known name
        while (1) {
            ret = dbus_bus_request_name (conn, CLIENT_BUS_NAME, 0, &dbus_error);

            if (ret == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) 
               break;

            if (ret == DBUS_REQUEST_NAME_REPLY_IN_QUEUE) {
               fprintf (stderr, "Waiting for the bus ... \n");
               sleep (1);
               continue;
            }
            if (dbus_error_is_set (&dbus_error))
               print_dbus_error ("dbus_bus_get");
        }
        
        DBusMessage *request;

        
        

        if ((request = dbus_message_new_method_call (SERVER_BUS_NAME, SERVER_OBJECT_PATH_NAME, 
                           INTERFACE_NAME, METHOD_NAME)) == NULL) {
            fprintf (stderr, "Error in dbus_message_new_method_call\n");
            exit (1);
        }

        DBusMessageIter iter;

        // method to append args into message dbus
        dbus_message_iter_init_append (request, &iter);

        char *ptr = input;
        if (!dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &ptr)) {
            fprintf (stderr, "Error in dbus_message_iter_append_basic\n");
            exit (1);
        }
        DBusPendingCall *pending_return;
        if (!dbus_connection_send_with_reply (conn, request, &pending_return, -1)) {
            fprintf (stderr, "Error in dbus_connection_send_with_reply\n");
            exit (1);
        }

        if (pending_return == NULL) {
            fprintf (stderr, "pending return is NULL");
            exit (1);
        }

        dbus_connection_flush (conn);
                
        //free message
        dbus_message_unref (request);	

        dbus_pending_call_block (pending_return);

        DBusMessage *reply;
        if ((reply = dbus_pending_call_steal_reply (pending_return)) == NULL) {
            fprintf (stderr, "Error in dbus_pending_call_steal_reply");
            exit (1);
        }

        dbus_pending_call_unref	(pending_return);

        char *s;
        if (dbus_message_get_args (reply, &dbus_error, DBUS_TYPE_STRING, &s, DBUS_TYPE_INVALID)) {
            printf ("%s\n", s);
            // Send method call
            printf("Send d-bus method call\n");
            if (sendMethodCall() != 0) {
                return -1;
            }

        }
        else
        {
             fprintf (stderr, "Did not get arguments in reply\n");
             exit (1);
        }
        dbus_message_unref (reply);	

        if (dbus_bus_release_name (conn, CLIENT_BUS_NAME, &dbus_error) == -1) {
             fprintf (stderr, "Error in dbus_bus_release_name\n");
             exit (1);
        }

        printf ("Please type two numbers: ");
    }

    return 0;
}

void print_dbus_error (char *str) 
{
    fprintf (stderr, "%s: %s\n", str, dbus_error.message);
    dbus_error_free (&dbus_error);
}

Above program takes input as a number and then pass it to server dbus in python, where you can perform any operation related to input number and then pass result through dbus back to client side in C. After printing out received result in client side, it print out the received message and make a call to sendMethodCall() which makes a call to quit function of server dus in python and leading to stoppage in operations of server dbus service.

This program can be optimise through struct , above code contain lot of repetitive things 🙁

Here is an code snippet of server dbus in python.

#!/usr/bin/env python3

import dbus
import dbus.service
import dbus.mainloop.glib

from gi.repository import GLib


class Service(dbus.service.Object):
   """
   Server dbus example in Python
   """

   def run(self):
      dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
      
      # define service bus name
      bus_name = dbus.service.BusName("com.example.service", dbus.SessionBus())
      dbus.service.Object.__init__(self, bus_name, "/com/example/service")

      self._loop = GLib.MainLoop()
      print("Service running...")

      self._loop.run()
      print("Service stopped")

   @dbus.service.method("com.example.service.Message", in_signature='', out_signature='s')
   def get_message(self):
      """
      Function without input string but string as output

      Typecast of output value is defined as s as value of out_signature
      """
      print("  sending message")
      return self._message

   @dbus.service.method("com.example.service.Quit", in_signature='', out_signature='')
   def quit(self):
      """
      function to quit mainloop
      """
      print("  shutting down")
      self._loop.quit()

   @dbus.service.method("com.example.service.Print", in_signature='i', out_signature='s')
   def print(self, input_string):
      """
      Function with input parameter

      Typecast of input value is defined as s as value of in_signature
      Typecast of output value is defined as s as value of out_signature

      """

      print("  print method", input_string)
      return "received two input number string" + input_string


Service().run()

above code snippet have been explained in last blog, you can take reference of last blog through url, https://freshlybuilt.com/connection-between-xfce-api-signals-and-plug-in-python-javascript-part-1/

Output – Server side

Output – Client side

Hope so you would have better idea, why we have used this approach, and through these code snippet I have tried to give you an idea, how does this approach work.

All type of suggestions are welcome in comment section of blog 🙂

Connection between XFCE API signals and Plug in Python/Javascript – Part 1

So, This was one of the major problem that we have to work on is to receive XFCE API signals in Plug developed using Python, signals were emitting out in our socket part that is written in C programming language, so we have to figure some logic so that our plug can response to emitted signals.

So, To solve this problem we have used the concept of d-bus. What we are trying to do is create server with python plug and then client side in C programmed Gtk Socket.

Want to have a look over how does client and server process work with python?

So lets start with code snippet in Python programming language.

Here is an example how we will setup server side for dbus in python.

Server side for dbus in Python

#!/usr/bin/env python3

import dbus
import dbus.service
import dbus.mainloop.glib

from gi.repository import GLib


class Service(dbus.service.Object):

   def __init__(self, message):
      self._message = message

   def run(self):
      dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
      
      # define service bus name
      bus_name = dbus.service.BusName("com.example.service", dbus.SessionBus())
      dbus.service.Object.__init__(self, bus_name, "/com/example/service")

      self._loop = GLib.MainLoop()
      print("Service running...")

      self._loop.run()
      print("Service stopped")

   @dbus.service.method("com.example.service.Message", in_signature='', out_signature='s')
   def get_message(self):
      """
      Function without input string but string as output

      Typecast of output value is defined as s as value of out_signature
      """
      print("  sending message")
      return self._message

   @dbus.service.method("com.example.service.Quit", in_signature='', out_signature='')
   def quit(self):
      """
      function to quit mainloop
      """
      print("  shutting down")
      self._loop.quit()

   @dbus.service.method("com.example.service.Print", in_signature='s', out_signature='s')
   def print(self, input_string):
      """
      Function with input parameter

      Typecast of input value is defined as s as value of in_signature
      Typecast of output value is defined as s as value of out_signature

      """

      print("  print method", input_string)
      return input_string


Service("This is the service").run()

in_signature and out_signature are used to define typecast for input and output value. For example, In the above example you can see for string as input, so we have defined ‘s’ as value of in_signature.

so now we are moving toward our client side of dbus in python.

Client Side for dbus in Python

#!/usr/bin/env python3

import dbus

class Client():

   def __init__(self):
      # Get the Session bus
      bus = dbus.SessionBus()

      # Get the object
      service = bus.get_object('com.example.service', "/com/example/service")

      # The service is an object that provides dbus.service.Object
      self._message = service.get_dbus_method('get_message', 'com.example.service.Message')
      self._quit = service.get_dbus_method('quit', 'com.example.service.Quit')
      self.print = service.get_dbus_method('print', 'com.example.service.Print')

   def run(self):

      print("Message from service:", self._message())
      print("print method running ", self.print("Hello World"))
      self._quit()


Client().run()

So from this example you can see that we are accessing dbus.service objects inside the client side. It proof that we can use different objects through dbus.

For testing out, these programs you have to open down two different terminal, In one terminal you have to start server side and then in other terminal you have to start client, Then finally you will see successful results.

Here is some glimpse of output

Server side output

Client side output

In the next blog we will have client part code snippet in C with some XFCE API example.

Suggestions and improvements are welcomed in the comment section of the blog.

Capital Budgeting

budget

Financial plans are guides that can help you navigate the monetary abilities of an accounting services in reno and pick effective moves. Budget planning of earnings and expenses, for example, is wanted to shop money, to be efficient in monetary management, to lessen non-effective prices and losses, in addition to boom the reliability of deliberate signs. In this newsletter, we are going to evaluate capital budgeting.

To recognize capital budgeting, you ought to recognize each parts of the time period. Capital on this context represents a protracted-time period, constant asset or capital funding such as a building. A budget is a plan that details the predicted income and charges over a time period, often the duration of an undertaking.

Accordingly, the time period capital budgeting is the system of figuring out which lengthy-term capital investments should be selected via management over a unique time period and as a result protected within the capital finances. It is the making plans for constant asset investments that are why it is also known as capital asset making plans. In easy phrases, the means of this term may be put as a decision made on whether to just accept or reject an assignment. Some of the examples of capital budgeting are:

Cost of acquisition of permanent assets like land and building

Cost of substitute of the everlasting asset

Cost of addition, enlargement, development, and alteration of fixed asset

Research and development task expenses.

Capital budgeting is essential for the analysis of capital expenditure, selection of great initiatives, coordination among various capital expenses, and fending off losses. It includes every aspect of the evaluation and decision-making process within the willpower of lengthy-time period asset replacements and purchases. Capital investment initiatives are a number of the most important monetary investments made by using an enterprise owner as they involve large amounts of cash.

Decisions regularly involve an unusually excessive amount of danger. Also, they may be generally now not easy to reverse and frequently impact operations for years into the future. Most importantly, choices facilitate and constrain method. After all, constant assets are used to supply your bookkeeping services in reno products. Addressing underneath-investment problems can also have a big business impact.

Capital investment projects can be categorized into two sorts: stand-on my own projects and together one of kind tasks. Independent capital funding tasks are initiatives that don’t have an effect on the cash flows of different tasks. Mutually different capital funding tasks are initiatives that are similar or just like different capital investment tasks that have an impact at the coins flows of different tasks.

Factors to consider

Comparing a project’s fee of return is not as easy because it sounds. There is a relatively complex monetary evaluation system that a enterprise owner need to undergo to get there. Unless you understand what you are doing, bear in mind expert assist.

The bookkeeping services in hartford proprietor must estimate the coins flows so one can be generated by means of the project. Cash flows are regularly the single most difficult variable to degree when looking to determine a challenge’s price of go back. It is vital to keep in mind both the amount and the time of the motion of finances. For instance, in case you are doing capital budgeting, you want to estimate about 5 years of coins glide.

There are classes of cash flows related to capital budgeting. These encompass selection-applicable cash flows and cash flows at once relevant to the asset over its beneficial lifestyles. For instance, you’ll look at annual cash financial savings and depreciation effects. The risk of obsolescence is likewise vital at the decision degree.

Some of the decision-applicable charges might encompass possibility fee, inclusive of substitute planning and the fine-tuning of the plans in order that they’re suitable for the method. Opportunity value is defined as the next best foregone opportunity and is often used for contrast and valuation purposes. As usually, applicable expenses are avoidable costs. Opportunity costs are mechanically considered relevant considering the fact that they are choice-driven.

As a rule, coins flows are predicted for the financial existence of the project and, of route, need to be as accurate as possible. Relevant coins flows over the lifestyles of a hard and fast asset which are quite simply identified by means of maximum CAP models encompass:

Initial investments in constant belongings and operating capital

Cash from the disposal of antique assets

Recurring running coins flows

Terminal disposal rate of fixed belongings

Recovery of operating capital on the end of the asset’s useful existence.

When it comes to working capital, you would treat it as a part of the investment cash flow and mirror different minor cash flows that arise because of the main asset. For example, filters for an espresso device will no longer be wished after the machine is offered, however without them, it will now not be able to work (relying on the model). Accordingly, running capital may be recovered. There is numerous coins flow forecasting techniques that accounting services in hartford proprietors can use to choose their projects.

Product Cost Meaning and Calculation

calculation

Any bookkeeping services in atlanta activity includes charges. The company’s price range are spent on various strategies and purchases vital for the making of merchandise, protection of device, the acquisition of raw substances, packaging, transportation, in addition to on control strategies, not to say wages. Such various natures of charges show the need for his or her classification and separate accounting.

Product fee because the call implies represents the costs an agency incurs in the course of product manufacturing. This can be the value of raw substances, wages of the primary manufacturing employees, and manufacturing overhead. In the case of the availability of offerings, an example of such charges might be the revenue of an expert who “produces services”, for example, a consultant in a consulting firm, a lawyer in a law firm, and so forth.

When dealing with a huge manufacturing accounting services in detroit, monitoring production costs is vital. Moreover, product costs are one of the focus regions of management accounting, on the grounds that they directly have an effect on the value of synthetic goods, and, therefore, their market rate and income that the agency can receive.

It is important that the value accountant provides management with accurate value calculations so as for control to determine a aggressive promoting fee. Luckily, the modern accounting software program makes it smooth to music, calculate, and preserve a document of the product fee. In addition, most software allows the practice of numerous reports, which makes evaluation of prices easier and much less time-eating.

These fees are the primary expenses of any production business; therefore, management constantly maintains the challenge of reducing them as a priority. The cost accountant wills paintings closely together with the purchasing and production departments to attempt to lessen prices as a lot as feasible.

Components

During the production system, corporations collect costs as they have to pay the wages and rents, buy capital to make manufacturing possible, and so forth. Note that in accounting, you do not look at the implicit production costs, inclusive of the possibility expenses. Let’s look at the actual additives of the product cost that a bookkeeper has to hold music of with the intention to compute the very last product price.

Direct substances

Direct materials are substances that shape an necessary a part of a finished product and which have a physical presence this is without problems traced to that completed product. In other words, you can physically see and contact that specific fabric component within the final completed product. Some fees that might be physically gift in the finished product, however is not cloth are taken into consideration to be oblique fabric prices. Some minor material prices are actually no longer sensible to hint or accounting services in atlanta for on a product-derivative basis, so they are protected inside the overhead charges.

Product Cost Meaning and Calculation

Direct labor

This class includes all prices of paying employees who truly physically work inside the production facility or provide the carrier. These consist of the wages of gadget operators and different line workers. The amount of direct exertions charges adjustments in direct percentage to the volume of production. The wages of manufacturing unit guards, janitorial aid, and other comparable employees are not covered in the direct exertions price.

Overheads

Not all fees a business enterprise incurs can be directly planned and accounted for inside the product value. Nevertheless, some of this price range becomes truly a crucial fee that should be incurred to supply the very last product. The idea of overhead costs commonplace in bookkeeping services in detroit implies prices or fees that relate to all manufacturing sports that occur for the duration of the path of production aside from the 2 above mentioned categories. For example, there are lease and taxes, the profits of supervisors, coverage, depreciation of equipment, and similar fees.

Sometimes, you’ll see those charges blended together less than one time period. For example, the time period top costs are supposed to consult direct material and direct labor. Another time period that is regularly used is conversion price that is how an awful lot a corporation spends to exchange uncooked substances into finished items. That would consist of direct labor and production overhead. Accordingly, your product price also can be taken into consideration as a top fee plus overhead or conversion prices and the cost of the actual substances.

What is Tax Shield?

tax

Tax payments are a topic that you get familiar with as quickly as you get your first task or begin your very own online bookkeeping services in sacramento. Many locate the tax bills to be a massive burden for them financially further to virtually being complex due to numerous tax laws and regulations. Although there may be no truly a way around this, there are various ways to make this burden at the least rather lighter.

Most humans are familiar with the term tax deductions. These deductions make general profits lower than it genuinely is, which cuts down the tax invoice as nicely. In reality, there are numerous eligible tax deductions that one can use for tax savings. Unfortunately, now not all and sundry knows the means of a tax protect and how they can strategically use it to decrease the quantity they need to pay the authorities.

The final intention of any business proprietor is to see the cost of their business develop and, thus, to boom the wealth of the owners. In order for a enterprise to grow and increase, own budget are often inadequate and the question of attracting borrowed capital arises. But even though the fairness capital (i.E. The proprietors’ capital) is enough to cowl all the online accounting services in sacramento needs for working capital and long-term financing of investment projects, raising debt financing May additionally nevertheless is a great concept.

What is Tax Shield?

It need to be cited that certain kinds of bills, for example, regular payments on borrowed loans, in accordance with the regulation, might not be situation to taxation. This is known as a tax shield, that’s an allowable deduction from taxable profits that saves you cash on the tax bill.

A tax protect is a certain impact that occurs whilst restructuring financial capital. There is a lower within the quantity of corporate tax because of an boom in the part of the borrowed capital. Loan hobby is paid earlier than profits tax is charged. Depreciation does now not without a doubt reason coins drift. However, depreciation additionally gives a so-referred to as “tax defend”.

In other phrases, a tax shield is a lower in a company’s tax liabilities quantity as a result of an increase in fees that may be subtracted from the profits based totally on which the taxes are calculated. Business valuation is intently tied with the idea of tax protect as it permits to save cash and boom coins flows. The tax guard computation is represented by way of the formulation above.

Interest Tax Shield

Now, allows have a look at the impact that having debt has on the company’s Income announcement, which goes to take the shape of the interest tax shield. This may be very precious to groups. For example, we are looking at Bear Corporation that has a 35% tax fee. In the yr 2020, the corporation had hobby equal to $25,000 and in 2021 the interest is $28,000. What is the interest tax shield this company is going to get by means of the usage of debt?

The right news is that there is not quite a few calculations to do. You might truely multiply the $25,000 by means of 35% to get $8,750 for the yr 2020 and the $28,000 via 35% to get $9,800 for the yr 2021. This way that the Bear may have a taxable earnings reduced by using $eight,750 and $9,800 way to the tax guard. Basically, by way of having a larger debt, an online accounting services in tampa is truly saving a large quantity in tax bills.

Depreciation Tax Shield

Let’s retain to use Bear business enterprise as our instance. In the yr 2020, this agency had sales identical to $980,000 and a depreciation expense of $10,000. What would be the advantage of using a tax protects?

By subtracting the depreciation tax shield quantity from the sales, you may get an EBIT value of $970,000. The tax fee will be $970,000 x 35% or $339,500. After subtracting the tax price, you arrive on the internet running earnings after tax of $630,500. Now, to get the coins earnings amount, you will need to add again the depreciation cost due to the fact it is a non-coins charge. This might give us a coins income cost of $640,500.

Now, allows assume the organization did now not account for the depreciation. The tax charge in this situation can be equal to $343,000. After subtracting the tax expense, you arrive at the internet working earnings after tax of $637,000. At this factor, it looks like the business enterprise is better of when depreciation is not added into the calculation. However, understand that in terms of the real cash earnings value, the $637,000 (no depreciation to feature lower back) is decrease in evaluation to the previous case where you had a coins profit of $640,500.

As you can see, the Bear online bookkeeping services in tampa might be $three,500 quick in the second case when it forgot to deduct the depreciation. To arrive at this number, you may truly use the tax protect system, in which you will multiply the depreciation amount of $10,000 with the aid of the tax price of 35%, which could come up with $three,500. Thus, a tax defend is an quantity with the aid of which the depreciation and amortization (or any non-coins rate) decrease your profits situation to taxation, developing cash savings.

Revenue Recognition Principle

revenue

As we all recognise, earning sales is the motive of doing commercial enterprise. Revenues are constructed from every day activities that an Accounting Services in New York became created to do, whether it is manufacturing and/or promoting items or offering services. Revenue is the income generated from the sale of products and services. It is a boom in an enterprise’s assets from the provision of goods and offerings. Recognition is the acknowledgment of some thing’s life. Thus, sales recognition is essentially the acknowledgment of profits.

If you’re jogging a small Accounting Services in san Francisco, you are most probable spotting sales the use of the coins accounting method. If your commercial enterprise is the usage of the cash foundation of accounting, then it’s miles surely smooth to compute the revenue when the cash hits the coins sign in or the bank account. This is because the cash foundation of accounting is very simple. Unfortunately, coins accounting isn’t always compliant with the US GAAP and this is why its miles used handiest with the aid of small businesses.

There is usually a point in time where a commercial enterprise will must migrate its books and facts to accrual accounting that is every other technique to account for business transactions. In maximum instances, this occurs while an organization decides to attract outside finances and needs to offer its monetary reports to the buyers.

Under accrual accounting, you e-book the revenue whilst you earn it based totally at the bill or the contract with a client, not when you get paid. Revenue is deemed to be found out when ownership of products has been transferred to the customer and whilst the patron has legally emerge as liable to pay the amount. So, it isn’t always related to the receipt of cash. Revenue recognition takes place in two approaches:

The service is supplied after which the cash can be paid.

The coins are paid and now the service can be supplied.

The first case is called accumulated revenue, and inside the second case, you’ll see this known as deferred sales. Note that a business can earn revenue on the identical time it’s far given the coins for performing a provider or selling a product. Thus, underneath the revenue popularity principle, bookkeepers ought to report sales within the length within which they have been earned.

Knowing while to recognize sales is the motive why we’ve the GAAP has designated guidelines for a while and the way to input revenue (and expense) transactions within the bookkeeping facts. This allows making certain that groups to no longer declare sales on their monetary statements that they have not but earned yet. It is not any wonder that buyers want the organisation to observe the sales popularity precept of their bookkeeping exercise. After all, they want to know what the organisation has simply earned and spent as of the date.

Example 1

Let’s study an instance of revenue recognition. Lex’s Printing Co. Earned a revenue of $7,800. We are going to observe it in extraordinary ways.

The first way, we’re going to assume that Lex’s Printing Co. Earned these sales, and cash was acquired immediately while those revenues were earned. How does this interest have an effect on our accounting equation? What elements of the accounting equation have become affected? Well, the organisation obtained coins, with a purpose to be recorded within the asset account named Cash. So, property is going up with the aid of $7,800. What else is occurring? The Bookkeeping Services in san Francisco isn’t incurring a liability but earning revenue, which impacts internet earnings via increasing it. Net profits, in return, influences retained income, which fall below the proprietor’s fairness phase. Therefore, revenues will make retained profits move up. Accordingly, our accounting equation will live in balance.

The 2nd way, we’re going to count on that Lex’s Printing Co. Earned this sales on credit and cash is to be received later. Let’s suppose once more approximately how this will have an effect on the accounting equation. Are belongings being affected? Well, there’s no cash account involved on this transaction. However, there is some other asset account being affected, which is referred to as Accounts Receivable. This account maintains song of the cash we are owed. So, our belongings are going up by way of the identical quantity – $7,800. Are our liabilities changing? Lex’s Printing Co. Does not owe something. Once once more, proprietor’s fairness is increasing because our sales are increasing.

Example 2

To assist you recognize this concept even better, allows don’t forget every other case. On April 18th, someone goes in your automobile components shop and orders some components for his or her automobile. Since those elements aren’t reasonably-priced, you’ve got the client pay cash on the time of ordering the parts. However, those components will arrive at your keep and may be picked up through the customer only on May tenth.

On May tenth, the patron comes returned to pick out up the products he already paid for. Assuming that the Bookkeeping Services in New York duration ends at the stop of the month, whilst need to you file the revenue. On April 18th the cash changed into acquired and it would appear that you could already report this as sales to your books. However, you haven’t but absolutely fulfilled your responsibility earlier than the purchaser and the customer has no longer but received the products he ordered. Thus, you aren’t capable of report this transaction as sales till May tenth. Until then, it’ll live to your books as unearned sales or a legal responsibility instead of an asset. As you may see, the revenue reputation precept is as a substitute easy and no longer as complicated as its miles regularly considered to be.

XFCE-PANEL-PLUGIN development using Python/Javascript – Part 3

As in the last blog, we get to know about Gtk Socket and Gtk Plug in two different programming language that was C and Python. So moving forward in our process, now we will move forward toward installation process of panel plugin.

I and my mentor decided to move forward with waf installation process, there were few reason to chose this method. As our focus is on beginner that are trying to develop XFCE panel plugin, so we decided to make whole process more simpler through waf installation process. Wscript is the main installation file, best thing about this is, it is easy to understand.

So Inside a waf installation file there are main file for installation i.e ‘waf‘ and ‘wscript’.

‘waf’ is an generated file so you don’t have to do much with this generated file. All installation operations will be performed through ‘wscript’ file.

In general, every project consist of several phases, that mostly contain following steps, On these steps concept, whole ‘waf’ installation is based on.

  • configure: it is used configure the project and find the location of the prerequisites, for example if you want to load c compiler you can define over this step.
  • build: it is used to transform the source files into build files
  • install: used to install the build files
  • uninstall: used for un-installation of the build files
  • dist: create an archive of the source files
  • clean: remove the build files.

Interested to learn more about ‘waf’ installation process, visit to the given link https://waf.io/apidocs/tutorial.html

so to give you better understanding, Here I am attaching one small code snippet for wscript file as an example.

APPNAME = 'Enter your plugin name'
VERSION = 'Enter your plugin version'

top = '.'
out = 'build'

def options (ctx):
	ctx.load('compiler_c')

def configure (ctx):
	ctx.load('compiler_c')
	args = '--cflags – libs'
	ctx.check_cfg(package = 'gtk+-3.0', atleast_version = '3.22',
		uselib_store = 'GTK', mandatory = True, args = args)


def build (ctx):
	ctx.program(
		features     = 'c cshlib',
		is_lib       = True,
		source       = ctx.path.ant_glob('panel-plugin/*.c'),
		packages     = 'gtk+-3.0',
		target       = 'sample-plugin',
		install_path = '${LIBDIR}/xfce4/panel/plugins/',
		uselib       = 'GTK',
		)
	
	ctx(
		features = 'subst',
		source = 'panel-plugin/sample.desktop.in',
		target = 'panel-plugin/sample.desktop')
		
	ctx.install_files(
		'usr/share/xfce4/panel/plugins/',
		'panel-plugin/sample.desktop')

def checkinstall (ctx):
    ctx.exec_command('checkinstall – pkgname=' + APPNAME +
     ' – pkgversion=' + VERSION + ' – provides=' + APPNAME +
     ' – deldoc=yes – deldesc=yes – delspec=yes – backup=no' +
     ' – exclude=/home -y ./waf install')

Hint: if you are getting confused with ctx don’t worry about it just an variable name you can replace ctx with your custom variable name also.

So Now time have come to introduce you with simple Xfce sample plugin Gitlab repo, Work is still in a process but you can still test it out.

Xfce Panel Sample Plugin Gitlab repo through Gtk Socket and GtkPlug Approach.

https://gitlab.xfce.org/vishal2612200/gio-xfce-panel-plugin-samples

If you find any issues or have any suggestion, Don’t forget to open issue on the repo 🙂

Can 3D Apparel Design Tools Transform The Supply Chain Ecosystem Of Your Brand?

3D Apparel Design Software

3D design technology has been around since the late 1900s, this software has been a common practice in industries like architecture, automobile, engineering, etc. But in the last few decades, 3D technology has gained considerable hype in the fashion industry to streamline and enhance the product development process. Whether it’s simplifying the supply chain ecosystem, streamlining the product development process, designing, manufacturing, or marketing, 3D apparel design software has significantly changed the traditional pattern of doing business. 

Not-to-mention, the pandemic has played a major role in making fashion brands realize that there is something extremely wrong with their traditional method, which collapsed in the time of need. While virtual prototyping is definitely the top benefit of 3D design technology, it also has a number of underlying perks that can transform the entire supply chain system of your brand. 

Why Shift From Physical To 3D Sampling?

Fashion is a fast-paced, ever-changing industry, wherein coordination between different departments can be a real challenge. In order to simplify their internal processes, brands are now looking for new ways to establish alignment between various departments and stages of the product development cycle. This is where 3D apparel design comes in handy since it eliminates the need to create physical samples of things. With the help of 3D solutions, designers can create digital prototypes of the design and get an overall feel of how the finished product would look on a human body, make any iterations they like on the digital prototype itself, all without the need for physical samples. This helps the vendor cut down a lot of the back and forth between different departments, the hassle of making and editing physical samples, and not to mention the cost that comes with it. All of this can be done through 3D technology after which the finalized 3D design and be sent for physical production. 

3D clothing design software is quickly taking a lead place in the product development process of some of the biggest brands in the world. It all started with giants like Hugo Boss & Nike adopting this technology in order to streamline their traditional process, and quickly became a major trend in the market. In 2017, Hugo Boss, in their annual report mentioned that, “the use of digital prototypes is shortening development times. The high degree of detail provided by 3D virtualization allows colors, contours, and the way the outer material drapes the wearer’s body to be realistically simulated. In 2017, the Company fully digitized product development for shirts, ties, and knitwear of the HUGO brand.”

Simplifying The Supply Chain With 3D Solutions

Another key benefit of 3D apparel design solutions is that it helps the brand simplify a lot of the traditional supply chain barriers that are common in the fashion industry. There is no doubt that COVID-19 has had a huge impact on industries across the globe and fashion is no exception. In the year 2020 as countries began to go on lockdown, the need for smooth remote operations came to the forefront and shocked the fashion industry which until now was operating on the traditional pattern. 

Brands quickly realized that they need to rise above the old ways and look for solutions that can help them operate things virtually. This is where 3D solutions came into the game, with this technology brands have been able to digitize their supply chain and work safely through computer software’s. Traditionally, brands would have to get physical samples shipped from long distances for different product development activities, this not only complicated their entire supply chain but also added to the production cost and time. But with 3D apparel design software, they don’t have to deal with these logistical issues because everything is done digitally. Not to mention, 3D assets are much simpler to move from department to department than physical ones.

The Cost & Sustainability Benefit Of 3D Apparel Design Software 

In the last few years, consumer awareness around sustainability has increased at a rapid pace, people are getting more and more involved with the idea of “sustainable fashion”. According to Mckinsey’s “The State Of Fashion- 2021” report, “more than three in five consumers…said brands’ promotion of sustainability was an important factor in their purchasing decisions.” As a result of this consumer mindset, brands are now looking for ways to reduce their carbon footprint and practice business in a more environmentally responsible fashion. In fact, it’s scary to note that Copenhagen Fashion Summit predicted that by the year 2030, the fashion industry will increase its carbon footprint to 2790 million tons, and its waste production will reach 148 million tons.

Now, in order to tackle this problem, brands have started to rely on technologies like 3D apparel design. With 3D technology, brands can lower their fabric wastage by 85% since it doesn’t require multiple physical samples that eventually go to waste. On top of that, it helps them save up to 80% production cost since there’s no need to get anything shipped or make multiple physical changes. Hence, it not only reduces material waste but also saves time and money. 

All in all, it’s safe to assume that 3D is the future of the fashion industry. This technology has tackled some of the most gruesome problems of fashion and on top of that allowed brands to practice business in a more– efficient, responsible, smart, and technologically advanced, manner. It’s certainly exciting to see what 3D apparel design software will bring next. 


Endnote

About Flix3D

Digitalization is here, and we believe in transforming the conventional design processes with AI technology. We have introduced a line of digital solutions that are creative, efficient, and environment-friendly. Our 3D studio offers digital product design and development tools that can make the digital transition seamless for our clients.

How To Move Your Houseplants Safely Within Home?

Houseplants are a type of living organism that often plays a crucial role in brightening any space within your home or workplace. They are proven to help you stick to a healthy lifestyle that was not possible otherwise. Good quality plants of this nature are a perfect choice for all those people living in sky-high apartments with hardly any space for outdoor gardening. They are filled with optimum greenery at each level that empowers them to take away all your mood swings instantly naturally and safely with hardly any effort. Most importantly, these floras often encourage you to take your fitness to the next level through regular indoor exercise sessions in addition to forming a perfect gift for almost all kinds of happy occasions. Indoor plants make those close to your heart feel the extent to which you love and feel for them. Just like the ones in your garden area, the ones inside your home or office also need a certain amount of sunlight for achieving optimum growth and would show signs of an abnormal reaction to inadequate sunlight. The following are some of the most prominent tips for shipping your plants indoors

Nature Of The Indoor Plants:

The first and most important thing, which must be kept in mind while thinking about moving houseplants is their nature. Not all floras of this type require the same amount of sunlight. It is always advisable to gather ample information about a given type of flora from as many reliable sources as possible before finally making your mind to go for it. Also, keep a close watch on the signs that your plants are indicating to correctly ascertain the issue faced by them. For instance, if the leaves have turned light yellow with a high rate of breakage, then this reveals that they may not be getting adequate sunlight. On the other hand, if they have turned dark green, then your favorite plants may be getting too much light from the sun. In the first case, you would certainly do better by shifting your plants close to a south-facing window. Make a point to buy plants online to get the maximum value for your precious cash.

Although most indoor plants are specially designed to do well indoors, they prefer to enjoy the cold breeze blowing outdoors periodically. Take into consideration the general health of the plants when it comes to deciding on their positioning. In case they are not that strong, then placing them at a shaded spot may be a great idea.

Online indoor plants are usually powered to create the conditions of survival on their own without any external help as they are usually sourced from a reliable place. Not only this, with detailed care instructions that are often extremely easy to adhere to.

Take Them Inside Well Before First Frost:

Are you in the habit of moving your indoor floras outside quite often? If so, then carry them inside well before it’s time for the first frost to pour down. The biggest reason for this is that it may often make the freeze that will affect their quality of life. You are free to request some of your close friends or family members for some help, who you often be more than happy to play an active role throughout the entire process.

Always give preference to buying plants from a tropical origin as they are hardly impacted by the atmosphere of the area where you are placed, which is not at all the case with the nontropical variant.

Focus On The Movement Of The Sun:

Another very important thing that you cannot afford to neglect while shifting your most preferred indoor plants is focusing on the position of the sun. Position your plants based on the sun to ensure they make the most of light from it.

Remember to order houseplants online that would surely help you to enhance your productivity by improving concentration.

Hope the above-discussed tips would help you move your houseplants safely for optimum outcome

XFCE-PANEL-PLUGIN development using Python/Javascript – Part 2

As we already discussed that we will be moving forward with GtkSocket and GtkPlug approach, so I will try to give you an idea how can you use this approach to develop xfce panel plugin.

Previous Part Blog link: XFCE-PANEL-PLUGIN development using Python/Javascript – Part 1

GtkSocket gives the capacity to insert widget from one process into another process in a such a manner that is straightforward to the user. One process create a GtkSocket gadget and afterward we passes that widget’s window ID to the other process, which then, at that point makes a GtkPlug with that window ID. Any widget contained in the GtkPlug then, at that point will show up inside the primary application’s window.

GtkSocket in C

#include <gtk/gtk.h>
#include <gtk/gtkx.h>
#include <stdio.h>
#include <stdlib.h>

int main(int ac, char **av)
{
    GtkWidget *window;
    GtkWidget *socket;

    gtk_init(&ac, &av);

    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    socket = gtk_socket_new();
    gtk_window_set_title(window, "some socket");
    gtk_window_set_position(window, GTK_WIN_POS_CENTER);

    gtk_container_add(window, socket);// added socket into window
    g_signal_connect(GTK_WIDGET(window), "destroy", gtk_main_quit, NULL);

    printf("socket ID: %d\n", gtk_socket_get_id(socket));

    char buffer[1024];
    sprintf(buffer, "python3 ./plug.py %d &", gtk_socket_get_id(socket));
    system(buffer);

    gtk_widget_show_all(window);
    gtk_main();

    return 0;
}

In the above example, we have created one GtkWindow, then we have created new socket through gtk_socket_new(), through gtk_container_add we have added socket into window.

gtk_socket_get_id() will return int socket id, which will be passed to plug.py (Python file containing GtkPlug code) through sprintf.

GtkPlug in Python

#!/bin/python3
# -*- utf:8 -*-

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
import sys


socket_id = sys.argv[1]
plug = Gtk.Plug.new(int(socket_id))

plug.connect('destroy', Gtk.main_quit)


class SocketDialogWindow(Gtk.Window):
    def __init__(self):
        box = Gtk.Box(spacing=6)
     
        button1 = Gtk.Button(label="Information")
        button1.connect("clicked", self.on_info_clicked)
        box.add(button1)

        plug.add(box) # box widget added to python plug
        plug.show_all()

    def on_info_clicked(self, widget):
        dialog = Gtk.MessageDialog(
            transient_for=self,
            flags=0,
            message_type=Gtk.MessageType.INFO,
            buttons=Gtk.ButtonsType.OK,
            text="Info about Python Sample Plugin",
        )
        dialog.format_secondary_text(
            "Copyright \xc2\xa9 2006-2019 Xfce development team\n"
        )
        dialog.run()
        print("INFO dialog closed")

        dialog.destroy()


SocketDialogWindow()

sys.argv is used to get argument through which socket id will be received, In this plug example, we have added one button to box widget, later on which is added into plug.

So to test out above example, we simply have to run GtkSocket file in C.

I hope so you would have better idea now, how does GtkSocket in C and GtkPlug in python work together.

Till now we have not registered our plugin or does any type of installation into xfce-panel, Further part of this blog will include further information , till that time Happy Coding 🙂

XFCE-PANEL-PLUGIN development using Python/Javascript – Part 1

While walking through my GSOC proposal idea, one question that i have find out on multiple platform is “How can I create xfce-panel-plugin in python, javascript or vala”.

so, Now time have come around to give you basic idea or overview about xfce-panel-plugin development in programming language other than C.

With the release of Xfce-panel 4.4, support have been added to create plugin in two ways: Internal and External Plugin.

Internal Plugins are loadable plugins that are developed using GModule Interface.

External Plugins are individuals program which are embedded into Xfce-Panel through GtkSocket and GtkPlug concept.

Here is list of Internal and External plugins.

Xfce4-Panel Internal Plugin

Xfce4-Panel External Plugin

  • Calculator –  a calculator plugin for the Xfce4 panel.
  • Clipman – A clipboard manager for Xfce
  • Eyes – Eyes that spy on you.
  • Notes – provides sticky notes for your desktop.
  • Weather – Shows the current temperature and weather condition, using weather data provided by xoap.weather.com

If you are working with C or Vala programming language, You can go out for plugin development using both of methods, it just a matter of your choice.

But, If you are trying to develop Xfce-panel-plugin through Python or JavaScript then Using GtkPlug and GtkSocket approach is more feasbile for developers.

There is small logic behind it, you can develop most of the part of the plugin through Python or Javascript but while registering down developed plugin, you will face one biggest problem that is registration through Macros, i.e You can’t access macros inside Python and Javascript, so this was the reason i was suggesting you to prefer GtkSocket and GtkPlug method with these two programming language.

Example for Gtk Socket and Gtk Plug using python

#!/usr/bin/python
"""
General flow of program
Entry widget -> GtkPlug -> GtkSocket -> Window
"""

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
import sys


def perform_embed_event(widget):
    print("This will get called when plug will emit embedded signal")

# initialize GtkSocket
window = Gtk.Window()
window.show()

# initialize GtkSocket
socket = Gtk.Socket()
socket.show()
window.add(socket)

# store socket id in socket_id variable
socket_id = socket.get_id()

print("socket", socket_id)

# initialize GtkPlug
plug = Gtk.Plug.new(socket_id)

# Different Plug signals
plug.connect("embedded", perform_embed_event)
plug.connect("destroy", Gtk.main_quit)

print("Plug ID:", plug.get_id())

# Entry Widget
entry = Gtk.Entry()
entry.set_text("Xfce GSoC 2021")

# Add entry widget into plug
plug.add(entry)

plug.show_all()
Gtk.main()

Above mentioned example contain four different things i.e GtkPlug, GtkSocket, Entry Widget and window.

Program Output:

In general term, Entry widget is added to GtkPlug. Through GtkSocket ID, GtkPlug have been added to it. And GtkSocket have been added to the window.

One tryout If you want to.

GtkSocket is dependent on window, If you don’t add socket to window, you would not be able to generate socket id through ‘get_id’, logic is very simple behind this thing, I want to you think about the logic behind it :).

Through this program, I have tried to give you an idea how does GtkPlug and GtkSocket works inside a single window. This program is totally based on single programming language that is python, In the next blog post we will try out GtkSocket in one programming language and GtkPlug in other programming. It will be a combination of GtkSocket in C and GtkPlug in Python and After That, Dbus concept is coming up next.

Update: Special Thanks to @dmytrokyrychuk for making me notice some bug inside a attached code snippet.