Can I call hashCode() into equals()

Hi,
I implemented a class MyObject that overrides the method hashCode() that respect the general contract and the resulting hashcode value is stored in a data member of my class MyObject.
I also overrided the equals() that looks like this:
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj == this) return true;
if (other instanceof MyObject == false) {
return false;
.... complex tests to check the equality that take a long time....
To optimize the equals() I would like to do:
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj == this) return true;
if (other instanceof MyObject == false) {
return false;
// use the hashCode, if different, no need to make the complex checks
if (hasCodeValue_ != obj.hashCode()) {
return false;
.... complex tests to check the equality
I think it should work because the hashCode is different when the objects are different, but I can't find any example of equals() implementation that uses the hascode(), is there any reason for that ? Thanks for your help, BR,
Sebastien.

Would you clarify for me please?
Do you mean that the hashCode method will naturally be
faster because something like String.hashCode() will
return faster than String.equals(otherString) ?Equals methods usually require a few checks before they really start comparing things. They check to see if the objects are the same, they check to see of the object passed in was null, they check the type of the argument and then they cast it. Then they start comparing members and if any of their members are Objects there's more of that.
Hashcode methods just go right at the values. And like you said, they can be cached in a lot of cases like String.
Or do you mean that one should take care to write
hashCode methods that are very fast?
If the latter, I'd like to hear about how you make
sure of that.Well, you could eliminate fields from the calculation but that might produce bad results. Generally, you just don't do a lot of complicated operations.

Similar Messages

  • I can't be the only person who has this problem - when a month ends on a Saturday I can't drag events into the next month and instead have to cut and paste - a real pain in the butt. I thought there was something called "scroll" but I can't find that

    I can't be the only person who has this problem with iCal- when a month ends on a Saturday I can't drag events into the next month and instead have to cut and paste - a real pain in the butt. I thought there was something called "scroll" but I can't find that.

    Yeah that works, but, it involves a click on the event, a click on edit, a click on the date, keystrokes, plus, since you can't see the next month you have to have a calendar in front of you so as to put it to the right date. It's easier just to cut it and advance the month and paste it, once you are in the right month you can move it around helter skelter willy nilly no problems. Although now that you mention it I will try it, maybe it is easier than cut and paste as I don't really care about the date, as long as it gets moved into the right month I can drag it around all I want.

  • Can we call a php function into coldfusion coding?????????

    can we call a php function into coldfusion??
    if anybody knows that let me know....

    Nope, as IIS can only pass one page to one handler, so it gets passed to ColdFusion *or* PHP. The only way it would work is to have a page with an iFrame containing a PHP page, but that's not calling a PHP function from ColdFusion.
    Dare I ask what it is you're trying to achieve exactly? If it's an extremely complicated function that can't possibly be rewritten, you'd probably want to wrap it up in a webservice and call it from CF.

  • How can i call a condition type into my ALV report

    I am developing one ALV report in that how can i call a condition type.I am one condition type PB00 for special price.This special price column should be present at the output list.This special price is not there any one of the database tables.So we will create one condition type for this.How can I develop one condition type and how we may call this condition type into my ALV report.

    V/06 is the condition type transaction .You attach a Access sequence to that which is stored in V/07 .
    there you can also get based on key combination tables names .
    which you can used in your report to include in the ALV .
    Contion type PB00 Access sequence PB00
    which will have step say
    Step Table combination 
    1      071       Material plant
    2      142       SO/dc/DV
    here Application would A and table would A table number .
    for eg .A071 .

  • How can i call this file path into my bsp-html  to display the images?

    Hi
    I have a file path for an image like c:/test_logo.bmp.
    How can i call this file path into my bsp-html  to display the images?
    moosa

    Try this...
    Can i have  sample code in BSP-HTML to display images?

  • How do I Translation Route a call back into CVP?

    This is ICM 8.5, CVP 8.5 and Avaya CM 5.2.  I'm trying to configure the system to be able to Translation Route a call back into CVP that originally started in CVP.  I've read and read Cisco documentation that talk about various ways it can be done but I think I really need step-by-step instructions to figure out what I've done wrong.  I'm happy to explain it in gory details if anyone wants to help me troubleshoot.  However, I think it would be simpler if someone can point me to a document that outlines a successful configuration and I can find my own mistake.

    Thanks clearbluelou, some of this was very helpful, but I had to set my translation routes up differently. Kris Lambrecht's post was very helpful, but also introduced some confusion, which looking back was very simple...hindsight is always that way right?!?!
    I am going to list out the configurations I used to make this work, most of which are what's listed in the Type
    8 setup in Kris's post starting with Step 7 except its for a Type 10 Network VRU; you don't use Type 8 anywhere, but the configuration is very similar.
    Assumption is that you already have an existing system and are routing calls to CVP already so a lot of the steps in the config guide are already done.
    References below are to "Configuration and Administration Guide for Cisco Unified Customer Voice Portal Release 8.5(1)" starting on page 109, step 7:
    http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/customer_voice_portal/cvp8_5/configuration/guide/ConfigAdminGuide_8.5.pdf
    Here's the details of my implementation:
    ICM 7.2.7
    CVP H323, Type 10
    Avaya PBX connected with a PG also running CTIOS
    Destination is the CVP Servers/CVP PGs (PG1), call transfer is originating from an Avaya PBX connected to ICM via a PG/CTIOS server (PG2).
    1. Build a new Service under destination PG, CVP in this case, as outlined in Step 7 from the CVP Config Guide.
    - Service
    Peripheral Number: 2
    Peripheral Name: Pre_Route
    Name: CVP_PG1.Pre_Route
    - Route
    Name: CVP_PG1.Pre_Route
    -Peripheral Target
    Not required
    Labels
    Not Required
    2. Build Network Trunk Groups, as outlined in Step 8 from the CVP Config Guide:
    - Network Trunk Group
    Name: CVP1_NTG
    Peripheral: CVP_PG1
    PeripheralNumber: 200
    PeripheralName: CVP1_NTG
    Name: CVP_PG1.CVP_NTG
    Trunk Count: Use Trunk Data
    3. Build Translation Routes using the TransRoute wizard, I built a pool of 10 DNIS 1000-1010; these are dummy DNIS; outlined in Step 9 from CVP Config Guide; here's what they should look like in
    the TransRoute explorer when finished:
    -Translation Route
    Name: TR2CVP1
    Type: DNIS
    -Route
    Name: CVP1.1 - CVP1.10
    Service Name: CVP_PG1.Pre_Route
    -Peripheral Target
    DNIS's: 1000-1010
    NTG: CVP1_NTG 
    -Label
    Routing Client: PBX_PG2
    Labels: 1000-1010
    Label Type: Normal
    Customer: None
    4. Configure Trans Route DNs 1000-1010:
    - Have to be built on the Avaya pointed to a VOIP gateway with Session Target equal to the CVP Call Server (or GK).
    - Add Translation Route DNISs in CVP Call Server Configuration under ICM Tab.   
    !!!Make sure you "Save and Deploy"!!!---->If you don't calls will show up on the ICM as new calls on the Translation 
    Route DNIS's under your CVP Peripheral.
    5. Build Dialed Numbers in ICM:
    -Extension 2000 is the dialed number Agents on the Avaya transfer to.
    -VDN 2000 on Avaya PBX should be routed to an Adjunct Route step which will send a route request to PG2 and kick off a script in ICM.
    -You have to build a dialed number in ICM Dialed Number Explorer under the PBX peripheral (PG2 in my example) PG2.2000, and point it to a CallType and subsequently a script, for example "Avaya2CVP".
    6. Build your ICM Call Routing Script: (follow's ClearBlueLou's description)
    - Route the call through typical CVP call setup initialization nodes
    -Route to Trans Route to VRU node with "CVP_PG1.Pre_Route" as the service selected, and "TR2CVP1" Trans Routes 
    selected.
    -Then send to a microapp.
    Your test call should have exited the success connection of the TrasRoute to VRU node and will continue routing with all call variable information will route (and show up in TCDs and RCDs) under Dialed Number PG2.2000.

  • I can no longer log into my ichat linked to my gmail.  right after opening up ichat, receive the following message:  lost connection with jabber.  the server has unexpectedly disconnected.

    i can no longer log into my ichat linked to my gmail.  right after opening up ichat, receive the following message:  lost connection with jabber.  the server has unexpectedly disconnected.  how to troubleshoot?  thanks.

    Hi,
    There can be many reasons why the Login is "up the creek".
    Any break in the network at your end whilst logged in will cause  an issue.
    A sort of discrepancy between what iChat thinks the state should be and what the server thinks.
    If they don't agree the server will refuse to accept.
    A Crash at the server end which does not log you out properly will also do it.
    Any file at any time can be come corrupted.
    Luckily with the iChat .plists they are recreated if removed with an iChat Restart.
    If it were AIM you can also get your Account Suspended  and this will not log you in.
    (It tends to happen from Chat rooms where people notify AIM about bad behaviour (as they see it) and you have to apply to get Un-suspended).
    Most of the big IM services use multiple servers.
    Sometimes these go out of Sync.
    In the case of AIM this happens when they remove Old unused Screen Names from people's Buddy List prior to making them available for re-registration.  I am not sure if this happens at Google.
    You seem to be talking about an account that has worked at Work and having new computer at home.
    As I mentioned the Priority thing you have not said that it has coincided with the new computer logging in  (this will kick the work Computer out of Google whether you are logged in  on the Web Mail page or in iChat)
    IN addition to that iChat stays partially logged in for Off Line IMs
    This is done in the background by a support app called iChatAgent
    If your Computer is ON but ichat is not started people can still send you Messages.
    Instead of saving these on the server until you login iChat will start up.
    Depending if the home Mac is effecting the Work Login it may be holding sway over your Login.
    Using your girlfriend's login may have booted her Off Line where she normally uses the name/login.
    The AIM Side can be specifically set to allow Multiple Logins and therefore NOT allow them.  If this happens you get a warning and messages to do something about it.
    You do not get these in any Jabber or Google Login as the Priority setting is supposed to take care of it.
    If the Login works at the Web Mail Login and on one computer then the .plist on the work computer is the most likely issue.
    There is a small chance that a Corrupt Buddy Pic (Home Folder/Library/Caches/com.apple.iChat/Pictures) may be the cause.
    Set this folder to icon view and also use the Finder's View Menu > Show View Options and select icon view.
    This should show all pics as their icon.
    Check that all display properly.
    At this point I would try a COMBO version update install of the last Update you did over what you have.
    This often corrects hard to trace things
    The 10.5.8 COMBO is here
    11:28 PM      Monday; June 20, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
     Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Can't call out on PSTN after ethernet adapter failure in J4W

    Hi all
    Okay here goes.
    We are currently deploying new laptops in our business. It's the brand new Lenovo X1 Carbon 2nd G. together with a USB based docking station. Unfortunately there is a very annoying bug with the docking station. The problem is that the dock ethernet NIC, suddenly disappears from time to time in Windows. This means that Jabber for Windows is failing over to the Wi-Fi network. This should be okay, but we are seeing an issue with J4W, when the ethernet NIC disappear.
    The problem is that J4W can't call out to external phone numbers/PSTN, but all internal calls are working fine. Also it's possible to call from an external number/PSTN to the J4W client. But still, the J4W client can't call an external no. You will only hear a busy tone when trying to make an external call.
    It doesn't help restarting the J4W client, we have to reboot the entire computer to make the client be able to call external numbers over Wi-Fi. Meaning that the ethernet NIC on the docking station, isn't reappearing after a reboot of the laptop. To make it reappear, we have to disconnect and connect the docking station cable.     
    Atm. we are waiting for a fix from Lenovo, but in the meantime I can't understand why we can't call external no. when the ethernet NIC fails. I mean, we can call external numbers. over Wi-Fi, but not when the ethernet NIC are failing.
    Can anyone point me into the correct direction here?
    Specs:
    CUCM: 8.6.2.22900-9
    CUP: 8.6.4.13900-4
    J4W: 9.7
    Gateway: Cisco 2911
    OS: Windows 7 32 bit.

    Hello Taxi-Anne, 
    Welcome to the forums. 
    Try following the steps below to turn off the call forwarding: 
    1. Touch Phone.
    2. Swipe down from the top of the screen.
    3. Touch the Settings icon.
    4. Touch Call Forwarding.
    5. Touch the required option (e.g., Forward If Busy).
    6. Touch Save.
    Let us know if this helps. Have a good day. 
    -SR
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • How can I call AM from another page

    Hi,
    I have come across a situation which I am not sure how to solve it. Here is the issue. I have a custom requirement to add another page to an already existing custom page. The first page used to hold the data and commit buttons however because of requirements, we want users to add some comments on the second page and then save the data. In other words the save button is now suppose to move to the second page.
    The dilemma I have is that the method that used to be called from the PFR CO of Page 1 was linked to page 1 AM which had that commit method.
    I still want to re-use the method from the Page 1 AM since there is a lot of logic involved. How can I call that method while I am in my second page from my CO?
    I am using setForwardURL and I am retaining AM from page 1.
    Also, if this is not feasible what are other alternatives. Any ideas would be appreciated.
    Edited by: user501998 on Jan 7, 2010 12:21 AM

    Hi,
    Can you give me an example? I mean do I just call the AM like in the example below...in my PFR...of Page 2 Controller. I thought this would be giving me an error method not found or something since it would be looking at the AM of my current page. I will try it and see but if there is another syntax can you please provide it.
    Thanks
    Partial code from PFR of Page 2
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if(eventName.equals("save"))
    if ( respName.endsWith("Admin") )
    am.invokeMethod("commitTransaction"); --- This is the AM Method in Page 1...
    } else
    throw new OAException("Shipper successfully updated.", OAException.CONFIRMATION);

  • Can I call a .htm page of view1 from another .htm page of view 2?

    Hi,
    I have a viewset QuestionnaireTabVS with a view area TABS which has two views  QuestionCondnsVS (default) and View QuestionRisksVS.
    When a variable say GV_TAB  is set as 'Questions' it navigates to the QuestionCondnsVS view and when the variable GV_TAB is set as 'Risks' it navigates to the QuestionnaireRisksVS.
    This view set QuestionnaireTabVS is contained in an overview page which  has two Radiobuttons. It works fine when  the first radiobutton is selected, i.e, when I click on the Questions it renders the QuestionCondnsVS view and when I click on the Risks it renders me the QuestionRisksVS view .
    Problem is when  I had clicked the RISK tab first and then selected the another radiobutton the rendered view QuestionRisksVS doesnt get removed
    but is present there by default which I dont want.I want the QuestionCondnsVS view to be present there by default after the second radiobutton is selected. I tried to refresh all the controllers but somehow it navigates to the  QuestionRisksVS only .
    So i thought to call the  .htm page of QuestionCondnsVS forcefully from the QuestionnaireTabVS .htm page as soon as I select the another radiobutton.
    Can I call a .htm page of QuestionCondnsVS from another .htm page of  QuestionnaireTabVS? If yes then how or any other suggestion is welcome

    Hi Dharmakasi,
    The Radiobuttons code is not added in the same HTML page but lies in a different component where the coding is on event handler.
    METHOD eh_onchecked.
      DATA: lv_option TYPE REF TO if_bol_bo_property_access,
            lv_check  TYPE char1.
      lv_option ?= typed_context->switch->collection_wrapper->get_current( ).
      lv_check = lv_option->get_property_as_string( iv_attr_name = 'OPTION'   ).
      IF lv_check EQ zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_old.
        zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_old.
      ELSEIF lv_check EQ zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_new.
        zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_new.
      ELSEIF lv_check EQ zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_scaf.
        zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_scaf.
        ELSEIF lv_check EQ zcl_gaf_adm_toolbox=>gv_matrix_mnt_scaf_anz.
        zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_scaf_anz.
      ELSEIF lv_check EQ zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_sow.
        zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_sow.
      ENDIF.
    ENDMETHOD.
    Here the LV_CHECK = old is the first radiobutton whereas LV_CHECk = new is the second radiobutton. I have tried to set the value of gv_tab ='Question' here but again no success.
    The .HTM coding of QuestionanireTABVS is
    <%@page language="abap" %>
    <%@extension name="thtmlb" prefix="thtmlb" %>
    <%@extension name="chtmlb" prefix="chtmlb" %>
    <%@extension name="bsp" prefix="bsp" %>
    <% data: ls_line                type CRMT_THTMLB_LINK,
             lv_flag                type ABAP_BOOL.
        data: lv_xml                type string.
    if zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_old.
       REFRESH controller->gt_navlink_tab[].
    *   if controller->gt_navlink_tab[] is initial.
         ls_line-id = 'Questions'.
         ls_line-onclick = 'QUEST'.
         ls_line-text = page->otr_trim( 'ZGAF_CRM_70/QUESTIONS' ).
         insert ls_line into table controller->gt_navlink_tab.
         ls_line-id = 'Risks'.
         ls_line-onclick = 'RISK'.
         ls_line-text = page->otr_trim( 'ZGAF_CRM_70/GLOBAL_RISK' ).
         insert ls_line into table controller->gt_navlink_tab.
         %>
    <%--   endif.  %>--%>
    <thtmlb:tray id     = "HeaderExt"
                 indent = 'FALSE'
                 design = 'STANDARD'>
      <thtmlb:trayHeader>
        <thtmlb:grid cellSpacing = "0"
                 columnSize  = "1"
                 height      = "100%"
                 rowSize     = "1"
                 width       = "100%" >
          <thtmlb:gridCell colSpan     = "1"
                       columnIndex = "1"
                       rowIndex    = "1"
                       rowSpan     = "1"
                       >
            <thtmlb:navLink links  = "<%= controller->gt_navlink_tab %>"
                    selectedLinkId = "<%= controller->gv_tab %>" />
        <bsp:call comp_id = "<%= controller->GET_VIEWAREA_CONTENT_ID( 'TABS' ) %>"
                  url     = "<%= controller->GET_VIEWAREA_CONTENT_URL( 'TABS' ) %>" />
          </thtmlb:gridCell>
        </thtmlb:grid>
      </thtmlb:trayHeader>
      <thtmlb:trayBody>
        <%
    *    data: lv_xml    type string.
        lv_xml    = controller->CONFIGURATION_DESCR->GET_CONFIG_DATA( ).
        %>
        <chtmlb:config xml     = "<%= lv_xml %>"
                       mode    = "RUNTIME"  />
      </thtmlb:trayBody>
    </thtmlb:tray>
    <% elseif zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_type_new.
       REFRESH controller->gt_navlink_tab[].
    *   if controller->gt_navlink_tab[] is initial.
         ls_line-id = 'Questions'.
         ls_line-onclick = 'QUEST'.
         ls_line-text = page->otr_trim( 'ZGAF_CRM_70/QUESTIONS' ).
         insert ls_line into table controller->gt_navlink_tab.
    *     ls_line-id = 'Risks'.
    *     ls_line-onclick = 'RISK'.
    *     ls_line-text = page->otr_trim( 'ZGAF_CRM_70/GLOBAL_RISK' ).
    *     insert ls_line into table controller->gt_navlink_tab.
         %>
    <%--   endif.  %>--%>
    <thtmlb:tray id     = "HeaderExt"
                 indent = 'FALSE'
                 design = 'STANDARD'>
      <thtmlb:trayHeader>
        <thtmlb:grid cellSpacing = "0"
                 columnSize  = "1"
                 height      = "100%"
                 rowSize     = "1"
                 width       = "100%" >
          <thtmlb:gridCell colSpan     = "1"
                       columnIndex = "1"
                       rowIndex    = "1"
                       rowSpan     = "1"
                       >
            <thtmlb:navLink links  = "<%= controller->gt_navlink_tab %>"
                    selectedLinkId = "<%= controller->gv_tab %>" />
        <bsp:call comp_id = "<%= controller->GET_VIEWAREA_CONTENT_ID( 'TABS' ) %>"
                  url     = "<%= controller->GET_VIEWAREA_CONTENT_URL( 'TABS' ) %>" />
          </thtmlb:gridCell>
        </thtmlb:grid>
      </thtmlb:trayHeader>
      <thtmlb:trayBody>
        <%
    *    data: lv_xml    type string.
        lv_xml    = controller->CONFIGURATION_DESCR->GET_CONFIG_DATA( ).
        %>
        <chtmlb:config xml     = "<%= lv_xml %>"
                       mode    = "RUNTIME"  />
      </thtmlb:trayBody>
    </thtmlb:tray>
    <% elseif zcl_gaf_adm_toolbox=>gv_matrix_mnt_type EQ zcl_gaf_adm_toolbox=>GV_MATRIX_MNT_TYPE_SCAF or
              zcl_gaf_adm_toolbox=>gv_matrix_mnt_type = zcl_gaf_adm_toolbox=>gv_matrix_mnt_scaf_anz  or
              zcl_gaf_adm_toolbox=>gv_matrix_mnt_type EQ zcl_gaf_adm_toolbox=>GV_MATRIX_MNT_TYPE_SOW.
       REFRESH controller->gt_navlink_tab[].
    *   if controller->gt_navlink_tab[] is initial.
         ls_line-id = 'Questions'.
         ls_line-onclick = 'QUEST'.
         ls_line-text = page->otr_trim( 'ZGAF_CRM_70/QUESTIONS' ).
         insert ls_line into table controller->gt_navlink_tab.
    *     ls_line-id = 'Risks'.
    *     ls_line-onclick = 'RISK'.
    *     ls_line-text = page->otr_trim( 'ZGAF_CRM_70/GLOBAL_RISK' ).
    *     insert ls_line into table controller->gt_navlink_tab.
         %>
    <%--   endif.  %>--%>
    <thtmlb:tray id     = "HeaderExt"
                 indent = 'FALSE'
                 design = 'STANDARD'>
      <thtmlb:trayHeader>
        <thtmlb:grid cellSpacing = "0"
                 columnSize  = "1"
                 height      = "100%"
                 rowSize     = "1"
                 width       = "100%" >
          <thtmlb:gridCell colSpan     = "1"
                       columnIndex = "1"
                       rowIndex    = "1"
                       rowSpan     = "1"
                       >
            <thtmlb:navLink links  = "<%= controller->gt_navlink_tab %>"
                    selectedLinkId = "<%= controller->gv_tab %>" />
        <bsp:call comp_id = "<%= controller->GET_VIEWAREA_CONTENT_ID( 'TABS' ) %>"
                  url     = "<%= controller->GET_VIEWAREA_CONTENT_URL( 'TABS' ) %>" />
          </thtmlb:gridCell>
        </thtmlb:grid>
      </thtmlb:trayHeader>
      <thtmlb:trayBody>
        <%
    *    data: lv_xml    type string.
        lv_xml    = controller->CONFIGURATION_DESCR->GET_CONFIG_DATA( ).
        %>
        <chtmlb:config xml     = "<%= lv_xml %>"
                       mode    = "RUNTIME"  />
      </thtmlb:trayBody>
    </thtmlb:tray>
    <% endif.
    %>

  • Can LabVIEW call a DLL built with VS(2005) C++ with /CLR and Without an Entry Point

    My project requires me to convert a C++ program to a DLL and having it called by LabVIEW. Due to the complexity of this C++ program (converted from fortran using f2c -C++ option), it cannot be compiled without using /clr option.  I did build the application standalone (/clr), and it functioned fine.  When I build it into DLL using VS2005, I was forced to use No Entry point option and without using DllMain in the C++ code. Eventually the DLL was built without error.  But after I call it from LabVIEW, I was not getting calculated results as expected.  I added a testing function to the C++ code of the DLL and just try to modify a parameter, it will not, but only return the input numbers.  I was passing data by pointer and not by value, so I expect this parameter output be modified.  I suspect that the DLL didnt get executed at all as it has no entry point specified.
    Am I on the right track to approach this task, or I am heading to totally wrong direction here?   I believe due to the fact that my C++ was from f2c and use vsf2c.lib and so on, the code is managed code, so that a regular DLL cannot be built from it with an entry point. How can LabVIEW call such a DLL? Am I right on that?  I really need your advice here for a right approach to this problem and possible implementation "watch outs"...Thanks!
    Bryan

    Hi...Finally I was able to compile my code with an entry point defined and without using /clr.  I can also call this DLL from LV and got back a variable from a little test function added to the DLL.  But the function that was used for my main application in the DLL crashed LV and I got a pop up box from Microsoft Visual C++ Runtime Library: Runtime Error! "This application has requested the Runtime to terminate it in an unusual way, please contact the application's support team for more information".  In Visual Studio I also got the following message: (I eliminated most of the "No symbols loaded" messages that are not errors but just info.)  I would apprciate if someone can take to look with your more "experienced eyes", many thanks! Bryan.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\xpsp2res.dll', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\Shared\nicont.dll', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\Shared\NICONTDT.dll', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\nitaglv.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\lkbrow.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\lkrealt.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\lvdaq.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\lvdesktop.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\lvfp.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\mfc71.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\MFC71ENU.DLL', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\FieldPoint\SubVIs\FPLVMgr.dll', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\lvfprt.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\LvProjectProxy.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\LvRealTimeCoreProvider.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\MVEProvider.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\QtCore4.dll', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\QtXml4.dll', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\QtGui4.dll', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\mxLvProvider.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\nimxlcpp.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\nimxlc.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\variable.mxx', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\lvMax.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\MAX\UI Providers\FieldPoint71.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\MathScriptParser.dll', Binary was not built with debug information.
    'LabVIEW.exe': Loaded 'Z:\bli\development\projects\galfitDLL\Debug\galfitDLL.dll', Symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700\msvcr80.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\mesa.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\mscms.dll', No symbols loaded.
    'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\icm32.dll', No symbols loaded.
    The thread 'Win32 Thread' (0xf94) has exited with code 0 (0x0).
    The thread 'Win32 Thread' (0x90c) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0xfd0) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0x284) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0xdac) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0xa98) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0x528) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0x614) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0xa5c) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0xebc) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0x5cc) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0x700) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0xcf0) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0xc7c) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0x4c8) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0xa4) has exited with code 3 (0x3).
    The thread 'Win32 Thread' (0x52c) has exited with code 3 (0x3).
    The program '[804] LabVIEW.exe: Native' has exited with code 3 (0x3).

  • Can I call .m files from a LabVIEW executable without the full developmen​t version of matlab installed?

    I have an executable that I am trying to build (and distribute).  Right now, it has Matlab script nodes that call some matlab .m scripts that someone else wrote.  The target PC will not have the full development version of Matlab installed.  Would that work?  I have tried to compile the .m scripts into a DLL, but I can't import that to LabVIEW because of the special Matlab types (*mxArrays).  I have also tried to write a wrapper around that DLL, but with no success.  So now I'm wondering if I can either call the Matlab .m scripts directly from a Matlab Script node OR if I can call my Matlab DLL from within a script node.  OR any other idea someone might have...
    Thanks a lot!
    -Matt Bradley
    ************ kudos always appreciated, but only when deserved **************************

    Simon,
    I looked at MathScript and am considering using it, but one thing that is not clear to me is if I will be able to use my .m files like I can with Matlab.  I call the same Matlab script repeatedly and it keeps track of some information in global variables (for example, the number of consecutive detections).  Can I do that entirely within mathscript or would I have to reload all of the info each time -- if I had to do that, it would mean substantial changes to the .m files ... and that's not an option.
    -Matt
    -Matt Bradley
    ************ kudos always appreciated, but only when deserved **************************

  • How can i call a zreport from my bsp page.

    Hi friends,
    How can i call a zreport from my bsp page.
    Moosa

    Hi Friend,
    These are the codings  to be wirtten in BSP for transferring values to the REPORT
    DATA:wf_date TYPE ztable-ID.
          data:seltab type standard table of rsparams,
           wa_seltab like line of seltab,
         event TYPE REF TO if_htmlb_data.
    DATA:p_value TYPE REF TO CL_HTMLB_INPUTFIELD.
    event = cl_htmlb_manager=>get_event( runtime->server->request ).
    p_requ ?= CL_HTMLB_MANAGER=>GET_DATA(
                                            request  = runtime->server->request
                                            name     = 'inputField'
                                            id       = 'i1'
    if p_requ is not initial.
      wf_date = p_requ->value.
    endif.
    clear wa_seltab.
    if wf_date is not initial.
      wa_seltab-selname = 'P_REQU'.
      wa_seltab-kind = 'P'.
      wa_seltab-option = 'EQ'.
      wa_seltab-low = wf_date.
      append wa_seltab to seltab.
    endif.
    submit *ZSAMPLEAP1* with selection-table seltab AND RETURN  .(ZSAMPLEAP1 refers to the report name and AND RETURN for coming back to the BSP page after the completion of its operation in Report )
    IMPORT int_name TO int_name FROM MEMORY ID '*zid*'.(For importing the obtained value from Report)
    In Report
    REPORT  ZSAMPLEAP1.
    SELECT-OPTIONS: p_requ FOR ztable-id  NO INTERVALS.
    SELECT SINGLE name from ztable into int_name WHERE id = p_requ-low.
    WRITE:int_name.
        EXPORT int_name TO MEMORY  ID 'zsharmila'.
    With Regards,
    SHARMILA BRINDHA.M

  • Direction Needed: Storing calculated values from datagrid column in order to call values into graph

    Hi all,
    I am new to Flex/Flash Builder, actionscript, and mxml, so please be kind.
    I have developed a small program that has a component that displays a datagrid fed with information out of a mysql db via a php data services connection. Within that same component (page), I have a graph that charts the dates via a plot chart. I am interested in adding a line series to the graph, but the data I want to use is a calculated field in the datagrid which I used a custom lable function to derive and display. Can someone steer me to the correct method to store such values and how to call them into a chart?
    Some addition information
    Custom label function:
      /* Custom label function for the Delta1 column. Calculates the number of days between the planting date and 10% flower. */
                                  private function calculateTo1stFlower(item:Object, column:GridColumn):String {
                                            var tempDate1:Date = new Date(item.dflower10 - item.dplanting);
                                            return Math.round((tempDate1.time / MS_PER_DAY) + 1).toString();
    /* Number of milliseconds in a day. (1000 milliseconds per second * 60 seconds per minute * 60 minutes per hour * 24 hours per day) */
                                  private const MS_PER_DAY:uint = 1000 * 60 * 60 * 24;
    Within my spark datagrid
    <s:GridColumn width="30" headerText="Δ1" labelFunction="calculateTo1stFlower" ></s:GridColumn>
    I assume I need to store the array of values for this column and then chart the saved values as the xField within the LineSeries. Should I use a class based model?
    The following link seemed like it may be an appropriate path; I am not sure though.
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7b51.html
    Thanks in advance for any support,
    Matthew

    Thanks for trying to post DDL, but you have no idea how to do a data model. You do not know that tables have to have keys, what ISO-11179 is, etc. 
    You have a table that is supposed to model companies. Your singular names says that there is only one company!  There is no company identifier (the industry standard is the DUNS). A customer is not a company. We do not use numeric data types for identifiers;
    do you do math on them? NO!  The attribute property comes after the attribute name (you never heard of ISO-11179). 
    Think about how silly VARCHAR(1) is. 
    CREATE TABLE Companies 
    (company_duns CHAR(9) NOT NULL PRIMARY KEY, 
     company_name VARCHAR(30)NOIT NULL, 
     margin_oil INTEGER NOT NULL, 
     margin_hangar INTEGER NOT NULL, 
     margin_cleaning INTEGER NOT NULL);
    INSERT INTO Companies
     VALUES (1, 'AviatKorea', 100, 125, 200), 
    (2, 'AXHollande', 50, 40, 30), 
    (3, 'BFXNorway', 60, 80, 600), 
    (4, 'EEEFrance', 10, 25, 60);
    CREATE TABLE Company_Tariffs
    (company_duns INTEGER NOT NULL
       REFERENCES Companies(company_duns), 
     tariff_type CHAR(1) NOT NULL
        CHECK (tariff_type IN ('A','B','C','D'),
     PRIMARY KEY (company_duns, tariff_type));
    INSERT INTO Company_Tariffs values (1, 'A'), (2, 'C'), (2, 'D'), (3, 'A'), (4, 'A'), (4, 'C'), (4, 'D')
    SELECT * -- do not use * in production code
      FROM Companies AS C,
           Company_Tariffs AS T 
     WHERE C.company_duns = T.company_duns;
    >> I would like something like with a computed column [ ] that retrieves the different contracts used: <<
    You might but a SQL programmer would not. This violated First Normal Form. It is a display report and is done in the presentation layers. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • HELP Can't call terminal by Mod4+Enter (awesome wm)

    I can't call terminal by binding key Mod4+Enter. What wrong happened with my rc.lua ?. Please help me. My english not well, sorry everyone.!
    -- z1lt0id Awesome WM 3.5.+ config --
    -- github.com/z1lt0id --
    -- Varation of github.com/copycat --
    -- Required Libraries
    gears = require("gears")
    awful = require("awful")
    awful.rules = require("awful.rules")
    awful.autofocus = require("awful.autofocus")
    wibox = require("wibox")
    beautiful = require("beautiful")
    naughty = require("naughty")
    vicious = require("vicious")
    scratch = require("scratch")
    -- layouts
    layouts = require("layouts")
    -- Conky
    function get_conky()
    local clients = client.get()
    local conky = nil
    local i = 1
    while clients[i]
    do
    if clients[i].class == "Conky"
    then
    conky = clients[i]
    end
    i = i + 1
    end
    return conky
    end
    function raise_conky()
    local conky = get_conky()
    if conky
    then
    conky.ontop = true
    end
    end
    function lower_conky()
    local conky = get_conky()
    if conky
    then
    conky.ontop = false
    end
    end
    function toggle_conky()
    local conky = get_conky()
    if conky
    then
    if conky.ontop
    then
    conky.ontop = false
    else
    conky.ontop = true
    end
    end
    end
    -- Run once function
    function run_once(cmd)
    findme = cmd
    firstspace = cmd:find(" ")
    if firstspace then
    findme = cmd:sub(0, firstspace-1)
    end
    awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")")
    end
    run_once("compton --backend glx --paint-on-overlay --vsync opengl-swc --unredir-if-possible --shadow-exclude 'n:a:Conky' --blur-background-exclude 'n:a:Conky' --config ~/.compton.conf -b")
    -- run_once("nm-applet")
    -- run_once("/opt/dropbox/dropboxd")
    run_once("mpd")
    run_once("conky ~/.conkyrc")
    run_once("unclutter -idle 1")
    -- Localization
    os.setlocale("en_AU.UTF-8")
    -- Error Handling
    -- Check if awesome encountered an error during startup and fell back to
    -- another config (This code will only ever execute for the fallback config)
    if awesome.startup_errors then
    naughty.notify({ preset = naughty.config.presets.critical,
    title = "Oops, there were errors during startup!",
    text = awesome.startup_errors })
    end
    -- Handle runtime errors after startup
    do
    in_error = false
    awesome.connect_signal("debug::error", function (err)
    -- Make sure we don't go into an endless error loop
    if in_error then return end
    in_error = true
    naughty.notify({ preset = naughty.config.presets.critical,
    title = "Oops, an error happened!",
    text = err })
    in_error = false
    end)
    end
    -- Variable Definitions
    home = os.getenv("HOME")
    confdir = home .. "/.config/awesome"
    scriptdir = confdir .. "/script/"
    themes = confdir .. "/themes"
    active_theme = themes .. "/blackburn"
    beautiful.init(active_theme .. "/theme.lua")
    terminal = "urxvt"
    editor = "vim"
    editor_cmd = terminal .. " -e " .. editor
    gui_editor = "gedit"
    browser = "dwb"
    browser2 = "dwb"
    mail = terminal .. " -g 130x30 -e mutt "
    tasks = terminal .. " -e htop "
    musicplr = terminal .. " -g 130x34-320+16 -e ncmpcpp "
    modkey = "Mod4"
    altkey = "Mod1"
    -- Table of layouts to cover with awful.layout.inc, order matters.
    layouts =
    awful.layout.suit.floating,
    layouts.uselesstile,
    layouts.termfair,
    layouts.browse,
    layouts.uselessfair,
    layouts.centerwork,
    -- Wallpaper
    if beautiful.wallpaper then
    for s = 1, screen.count() do
    gears.wallpaper.maximized(beautiful.wallpaper, s, true)
    end
    end
    -- Tags
    tags = {
    names = { " :) ", " :/ ", " :P ", " X) ", " ;) "},
    layout = { layouts[1], layouts[2], layouts[2], layouts[2], layouts[2] }
    for s = 1, screen.count() do
    tags[s] = awful.tag(tags.names, s, tags.layout)
    end
    -- Menu
    myaccessories = {
    { "ranger", terminal .. " -depth 16 -g 130x30 -e ranger"},
    { "editor", gui_editor }
    myinternet = {
    { "weechat", terminal .. " -g 130x30 -e weechat-curses" },
    { "sabnzbd" , "dwb http://localhost:9090" },
    { "transmission", terminal .. " -g 130x30 -e transmission-remote-cli -c xenogia:dot.dot.dot@localhost:9091" },
    { "sickbeard", "dwb http://localhost:8081" },
    { "couchpotato", "dwb http://localhost:5050"}
    mymedia = {
    { "volume", "pavucontrol"},
    { "smplayer", "smplayer"},
    { "vlc", terminal .. " -e vlc -I ncurses" },
    { "cdw", terminal .. " -g 130x30 -e cdw"},
    { "devede", "devede"},
    { "ghb" , "ghb"}
    mygames = {
    { "playonlinux", "playonlinux"},
    { "dosbox" , "dosbox"},
    { "desura", "desura"},
    { "steam", "steam" },
    mygraphics = {
    { "gimp" , "gimp" },
    { "feh" , "feh" }
    myoffice = {
    { "libreoffice" , "libreoffice" }
    mysystem = {
    { "lxappearance" , "lxappearance" },
    { "gparted" , "sudo gparted"},
    { "htop" , tasks }
    mymainmenu = awful.menu({ items = {
    { "accessories" , myaccessories },
    { "graphics" , mygraphics },
    { "internet" , myinternet },
    { "media" , mymedia },
    { "games" , mygames },
    { "office" , myoffice },
    { "system" , mysystem },
    mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
    menu = mymainmenu })
    -- Colours
    coldef = "</span>"
    colwhi = "<span color='#b2b2b2'>"
    colbwhi = "<span color='#ffffff'>"
    blue = "<span color='#7493d2'>"
    yellow = "<span color='#e0da37'>"
    grey = "<span color='#636060'>"
    purple = "<span color='#e33a6e'>"
    lightpurple = "<span color='#eca4c4'>"
    azure = "<span color='#80d9d8'>"
    green = "<span color='#87af5f'>"
    lightgreen = "<span color='#62b786'>"
    red = "<span color='#bd0707'>"
    orange = "<span color='#ff7100'>"
    brown = "<span color='#db842f'>"
    fuchsia = "<span color='#800080'>"
    gold = "<span color='#e7b400'>"
    lightblue="<span color='#3eae9e'>"
    lightblue2="<span color='#266c76'>"
    lightblue3="<span color='#285666'>"
    lightblue4="<span color='#257c85'>"
    lightblue5="<span color='#223d5a'>"
    lightblue6="<span color='#235369'>"
    offyellow="<span color='#857b52'>"
    bottomgrey="<span color='#999999'>"
    -- {{{ Wibox
    -- {{{{ Temp
    tempicon = wibox.widget.imagebox()
    tempicon:set_image(beautiful.widget_temp)
    tempwidget = wibox.widget.textbox()
    vicious.register(tempwidget, vicious.widgets.thermal, bottomgrey .. " Temp: $1°C" .. coldef, 15, "thermal_zone0")
    -- {{{ Kernel Info
    sysicon = wibox.widget.imagebox()
    sysicon:set_image(beautiful.widget_arch)
    syswidget = wibox.widget.textbox()
    vicious.register( syswidget, vicious.widgets.os, bottomgrey .. " Kernel: $2" .. coldef)
    -- {{{ Uptime
    uptimeicon = wibox.widget.imagebox()
    uptimeicon:set_image(beautiful.widget_uptime)
    uptimewidget = wibox.widget.textbox()
    vicious.register( uptimewidget, vicious.widgets.uptime, bottomgrey .. " Uptime: $1d $2h $3m" .. coldef)
    -- {{{ Cpu
    -- CPU widget
    cpuicon = wibox.widget.imagebox()
    cpuicon:set_image(beautiful.widget_cpu)
    cpuwidget = wibox.widget.textbox()
    vicious.register(cpuwidget, vicious.widgets.cpu, bottomgrey .. " Cpu: $1%" .. coldef, 15)
    cpuicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn(tasks, false) end)))
    -- {{{ Ram
    -- Memory widget
    memicon = wibox.widget.imagebox()
    memicon:set_image(beautiful.widget_mem)
    memwidget = wibox.widget.textbox()
    vicious.register(memwidget, vicious.widgets.mem, bottomgrey .. " Memory: $2MB" .. coldef, 15)
    -- {{{ Mpd
    mpdicon = wibox.widget.imagebox()
    mpdicon:set_image(beautiful.widget_mpd)
    mpdwidget = wibox.widget.textbox()
    -- Register widget
    vicious.register(mpdwidget, vicious.widgets.mpd,
    function (widget, args)
    if args["{state}"] == "Stop" then
    return " - "
    else
    return args["{Artist}"]..' - '.. args["{Title}"]
    end
    end, 10)
    -- {{{ Net
    -- Net widget
    netdownicon = wibox.widget.imagebox()
    netdownicon:set_image(beautiful.widget_netdown)
    netdownicon.align = "middle"
    netdowninfo = wibox.widget.textbox()
    vicious.register(netdowninfo, vicious.widgets.net, green .. "${enp9s0 down_kb}" .. coldef, 1)
    netupicon = wibox.widget.imagebox()
    netupicon:set_image(beautiful.widget_netup)
    netupicon.align = "middle"
    netupinfo = wibox.widget.textbox()
    vicious.register(netupinfo, vicious.widgets.net, red .. "${enp9s0 up_kb}" .. coldef, 1)
    ethdowninfo = wibox.widget.textbox()
    vicious.register(ethdowninfo, vicious.widgets.net, "<span color=\"#d3c6d7\">${enp9s0 down_kb}</span>", 1)
    ethupinfo = wibox.widget.textbox()
    vicious.register(ethupinfo, vicious.widgets.net, "<span color=\"#d3c6d7\">${enp9s0 up_kb}</span>", 1)
    -- {{{ Volume
    -- Volume widget
    volicon = wibox.widget.imagebox()
    volicon:set_image(beautiful.widget_vol)
    volumewidget = wibox.widget.textbox()
    vicious.register(volumewidget, vicious.widgets.volume, bottomgrey .. " Volume: $1%" .. coldef, 1, "Master")
    -- Pacman Widget --
    -- Pacman Icon
    pacicon = wibox.widget.imagebox()
    pacicon:set_image(beautiful.widget_pac)
    -- Pacman Widget
    pacwidget = wibox.widget.textbox()
    pacwidget_t = awful.tooltip({ objects = {pacwidget},})
    vicious.register(pacwidget, vicious.widgets.pkg,
    function(widget,args)
    local io = { popen = io.popen }
    local s = io.popen("pacman -Qu")
    local str = ''
    for line in s:lines() do
    str = str .. line .. "\n"
    end
    pacwidget_t:set_text(str)
    s:close()
    return "" .. bottomgrey .. " Updates: " .. args[1] .. coldef
    end, 60, "Arch")
    --'1800' means check every 30 minutes
    pacicon:buttons(awful.util.table.join(
    awful.button({ }, 3, function () awful.util.spawn("".. terminal.. " --hold -e sudo pacman -Syu", false) end),
    awful.button({ }, 1, function () awful.util.spawn("sudo pacman -Syu", false) end)
    -- {{{ Clock
    -- Textclock widget
    clockicon = wibox.widget.imagebox()
    clockicon:set_image(beautiful.widget_clock)
    mytextclock = awful.widget.textclock(bottomgrey .. " %A %d %B</span> " .. colwhi .. "</span><span color=\"#ffffff\">></span> <span color='#999999'>%H:%M</span>")
    -- {{{ Spacers
    space = wibox.widget.textbox()
    space:set_text(' ')
    -- {{{ Seperator
    openb = wibox.widget.textbox(lightblue6 .. " [" .. coldef)
    closeb = wibox.widget.textbox(lightblue6 .. " ]" .. coldef)
    -- Create a wibox for each screen and add it
    mywibox = {}
    mybottomwibox = {}
    bottombox = {}
    mypromptbox = {}
    mylayoutbox = {}
    mytaglist = {}
    mytaglist.buttons = awful.util.table.join(
    awful.button({ }, 1, awful.tag.viewonly),
    awful.button({ modkey }, 1, awful.client.movetotag),
    awful.button({ }, 3, awful.tag.viewtoggle),
    awful.button({ modkey }, 3, awful.client.toggletag),
    awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end),
    awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end)
    mytasklist = {}
    mytasklist.buttons = awful.util.table.join(
    awful.button({ }, 1, function (c)
    if c == client.focus then
    c.minimized = true
    else
    -- Without this, the following
    -- :isvisible() makes no sense
    c.minimized = false
    if not c:isvisible() then
    awful.tag.viewonly(c:tags()[1])
    end
    -- This will also un-minimize
    -- the client, if needed
    client.focus = c
    c:raise()
    end
    end),
    awful.button({ }, 3, function ()
    if instance then
    instance:hide()
    instance = nil
    else
    instance = awful.menu.clients({ width=250 })
    end
    end),
    awful.button({ }, 4, function ()
    awful.client.focus.byidx(1)
    if client.focus then client.focus:raise() end
    end),
    awful.button({ }, 5, function ()
    awful.client.focus.byidx(-1)
    if client.focus then client.focus:raise() end
    end))
    for s = 1, screen.count() do
    -- Create a promptbox for each screen
    mypromptbox[s] = awful.widget.prompt()
    -- Create an imagebox widget which will contains an icon indicating which layout we're using.
    -- We need one layoutbox per screen.
    mylayoutbox[s] = awful.widget.layoutbox(s)
    mylayoutbox[s]:buttons(awful.util.table.join(
    awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
    awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
    awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
    awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
    -- Create a taglist widget
    mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons)
    -- Create a tasklist widget
    mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
    -- Create the wibox
    mywibox[s] = awful.wibox({ position = "top", screen = s })
    -- Widgets that are aligned to the left
    local left_layout = wibox.layout.fixed.horizontal()
    left_layout:add(mylauncher)
    left_layout:add(mypromptbox[s])
    -- Widgets that are aligned to the right
    local right_layout = wibox.layout.fixed.horizontal()
    right_layout:add(space)
    right_layout:add(space)
    -- right_layout:add(mylayoutbox[s])
    -- Now bring it all together (with the tasklist in the middle)
    local layout = wibox.layout.align.horizontal()
    layout:set_left(left_layout)
    -- layout:set_middle(mytasklist[s])
    layout:set_middle(mytaglist[s])
    layout:set_right(right_layout)
    mywibox[s]:set_widget(layout)
    -- Create Bottom WiBox
    mybottomwibox[s] = awful.wibox({ position = "bottom", screen = s })
    -- Widgets Aligned to the Middle
    local bottom_left_layout = wibox.layout.fixed.horizontal()
    bottom_left_layout:add(sysicon)
    bottom_left_layout:add(syswidget)
    bottom_left_layout:add(space)
    bottom_left_layout:add(volicon)
    bottom_left_layout:add(volumewidget)
    bottom_left_layout:add(space)
    bottom_left_layout:add(cpuicon)
    bottom_left_layout:add(cpuwidget)
    bottom_left_layout:add(space)
    bottom_left_layout:add(memicon)
    bottom_left_layout:add(memwidget)
    bottom_left_layout:add(space)
    bottom_left_layout:add(tempicon)
    bottom_left_layout:add(tempwidget)
    bottom_left_layout:add(space)
    bottom_left_layout:add(pacicon)
    bottom_left_layout:add(pacwidget)
    bottom_left_layout:add(space)
    bottom_left_layout:add(uptimeicon)
    bottom_left_layout:add(uptimewidget)
    bottom_left_layout:add(space)
    bottom_left_layout:add(clockicon)
    bottom_left_layout:add(mytextclock)
    local bottom_right_layout = wibox.layout.fixed.horizontal()
    if s == 1 then bottom_right_layout:add(wibox.widget.systray()) end
    -- Bring Bottom Wibox Together
    local bottom_layout = wibox.layout.align.horizontal()
    bottom_layout:set_middle(bottom_left_layout)
    bottom_layout:set_right(bottom_right_layout)
    mybottomwibox[s]:set_widget(bottom_layout)
    end
    -- Mouse Bindings
    root.buttons(awful.util.table.join(
    awful.button({ }, 3, function () mymainmenu:toggle() end),
    awful.button({ }, 4, awful.tag.viewnext),
    awful.button({ }, 5, awful.tag.viewprev)
    -- Key bindings
    globalkeys = awful.util.table.join(
    -- Capture a screenshot
    awful.key({ altkey }, "p", function() awful.util.spawn("screenshot",false) end),
    -- Move clients
    awful.key({ altkey }, "Next", function () awful.client.moveresize( 1, 1, -2, -2) end),
    awful.key({ altkey }, "Prior", function () awful.client.moveresize(-1, -1, 2, 2) end),
    awful.key({ altkey }, "Down", function () awful.client.moveresize( 0, 1, 0, 0) end),
    awful.key({ altkey }, "Up", function () awful.client.moveresize( 0, -1, 0, 0) end),
    awful.key({ altkey }, "Left", function () awful.client.moveresize(-1, 0, 0, 0) end),
    awful.key({ altkey }, "Right", function () awful.client.moveresize( 1, 0, 0, 0) end),
    awful.key({ modkey, }, "Left", awful.tag.viewprev ),
    awful.key({ modkey, }, "Right", awful.tag.viewnext ),
    awful.key({ modkey, }, "Escape", awful.tag.history.restore),
    awful.key({ modkey, }, "k",
    function ()
    awful.client.focus.byidx( 1)
    if client.focus then client.focus:raise() end
    end),
    awful.key({ modkey, }, "j",
    function ()
    awful.client.focus.byidx(-1)
    if client.focus then client.focus:raise() end
    end),
    awful.key({ modkey, }, "w", function () mymainmenu:show({keygrabber=true}) end),
    -- Show/Hide Wibox
    awful.key({ modkey }, "b", function ()
    mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible
    end),
    -- Application Switcher
    awful.key({ "Mod1" }, "Tab", function ()
    -- If you want to always position the menu on the same place set coordinates
    awful.menu.menu_keys.down = { "Down", "Alt_L" }
    local cmenu = awful.menu.clients({width=245}, { keygrabber=true, coords={x=525, y=330} })
    end),
    -- Layout manipulation
    awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
    awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
    awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
    awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
    awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
    awful.key({ modkey, }, "Tab",
    function ()
    awful.client.focus.history.previous()
    if client.focus then
    client.focus:raise()
    end
    end),
    -- Standard program
    awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
    awful.key({ modkey, "Control" }, "r", awesome.restart),
    awful.key({ modkey, "Shift" }, "q", awesome.quit),
    awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
    awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
    awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
    awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
    awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
    awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
    awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
    awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
    awful.key({ modkey, "Control" }, "n", awful.client.restore),
    -- Dropdown terminal
    awful.key({ modkey, }, "z", function () scratch.drop(terminal) end),
    -- Widgets popups
    -- Volume control
    awful.key({ "Control" }, "Up", function ()
    awful.util.spawn("amixer set Master playback 1%+", false )
    vicious.force({ volumewidget })
    end),
    awful.key({ "Control" }, "Down", function ()
    awful.util.spawn("amixer set Master playback 1%-", false )
    vicious.force({ volumewidget })
    end),
    awful.key({ "Control" }, "m", function ()
    awful.util.spawn("amixer set Master playback mute", false )
    vicious.force({ volumewidget })
    end),
    awful.key({ "Control" }, "u", function ()
    awful.util.spawn("amixer set Master playback unmute", false )
    vicious.force({ volumewidget })
    end),
    awful.key({ altkey, "Control" }, "m", function ()
    awful.util.spawn("amixer set Master playback 100%", false )
    vicious.force({ volumewidget })
    end),
    -- Music control
    awful.key({ altkey, "Control" }, "Up", function ()
    awful.util.spawn( "mpc toggle", false )
    vicious.force({ mpdwidget } )
    end),
    awful.key({ altkey, "Control" }, "Down", function ()
    awful.util.spawn( "mpc stop", false )
    vicious.force({ mpdwidget } )
    end ),
    awful.key({ altkey, "Control" }, "Left", function ()
    awful.util.spawn( "mpc prev", false )
    vicious.force({ mpdwidget } )
    end ),
    awful.key({ altkey, "Control" }, "Right", function ()
    awful.util.spawn( "mpc next", false )
    vicious.force({ mpdwidget } )
    end ),
    -- Copy to clipboard
    awful.key({ modkey, }, "c", function () os.execute("xsel -p -o | xsel -i -b") end),
    -- User programs
    awful.key({ modkey, }, "q", function () awful.util.spawn( "dwb", false ) end),
    awful.key({ modkey, "Control" }, "m", function () awful.util.spawn( terminal .. " -g 130x30 -e mutt", false ) end),
    awful.key({ modkey, }, "s", function () awful.util.spawn(gui_editor) end),
    awful.key({ modkey, "Control" }, "f", function () awful.util.spawn( terminal .. " -depth 16 -g 130x30 -e ranger", false ) end),
    awful.key({ modkey, "Control" }, "v", function () awful.util.spawn( "/usr/local/bin/video", false) end),
    -- awful.key({ modkey, }, "d", function () awful.util.spawn( "spacefm", false ) end),
    -- Conky
    -- Prompt
    awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
    awful.key({ modkey }, "x",
    function ()
    awful.prompt.run({ prompt = "Run Lua code: " },
    mypromptbox[mouse.screen].widget,
    awful.util.eval, nil,
    awful.util.getdir("cache") .. "/history_eval")
    end)
    clientkeys = awful.util.table.join(
    awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
    awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
    awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
    awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
    awful.key({ modkey, }, "o", awful.client.movetoscreen ),
    awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
    awful.key({ modkey, }, "n",
    function (c)
    -- The client currently has the input focus, so it cannot be
    -- minimized, since minimized clients can't have the focus.
    c.minimized = true
    end),
    awful.key({ modkey, }, "m",
    function (c)
    c.maximized_horizontal = not c.maximized_horizontal
    c.maximized_vertical = not c.maximized_vertical
    end)
    -- Compute the maximum number of digit we need, limited to 9
    keynumber = 0
    for s = 1, screen.count() do
    keynumber = math.min(9, math.max(#tags[s], keynumber));
    end
    -- Bind all key numbers to tags.
    -- Be careful: we use keycodes to make it works on any keyboard layout.
    -- This should map on the top row of your keyboard, usually 1 to 9.
    for i = 1, keynumber do
    globalkeys = awful.util.table.join(globalkeys,
    awful.key({ modkey }, "#" .. i + 9,
    function ()
    screen = mouse.screen
    if tags[screen][i] then
    awful.tag.viewonly(tags[screen][i])
    end
    end),
    awful.key({ modkey, "Control" }, "#" .. i + 9,
    function ()
    screen = mouse.screen
    if tags[screen][i] then
    awful.tag.viewtoggle(tags[screen][i])
    end
    end),
    awful.key({ modkey, "Shift" }, "#" .. i + 9,
    function ()
    if client.focus and tags[client.focus.screen][i] then
    awful.client.movetotag(tags[client.focus.screen][i])
    end
    end),
    awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
    function ()
    if client.focus and tags[client.focus.screen][i] then
    awful.client.toggletag(tags[client.focus.screen][i])
    end
    end))
    end
    clientbuttons = awful.util.table.join(
    awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
    awful.button({ modkey }, 1, awful.mouse.client.move),
    awful.button({ modkey }, 3, awful.mouse.client.resize))
    -- Set keys
    root.keys(globalkeys)
    -- Rules
    awful.rules.rules = {
    -- All clients will match this rule.
    { rule = { },
    properties = { border_width = beautiful.border_width,
    border_color = beautiful.border_normal,
    focus = true,
    keys = clientkeys,
    buttons = clientbuttons,
    size_hints_honor = false
    { rule = { class = "MPlayer" },
    properties = { floating = true } },
    { rule = { name = "PlayOnLinux" },
    properties = { tag = tags[1][1] } },
    { rule = { instance = "urxvt", class = "URxvt" },
    properties = { tag = tags[1][2] } },
    { rule = { class = "Sublime_text" },
    properties = { tag = tags[1][4] } },
    { rule = { instance = "urxvt", class = "URxvt", name = "sabcurses.py"},
    properties = { tag = tags[1][5] } },
    { rule = { instance = "urxvt", class = "URxvt", name = "ranger"},
    properties = { tag = tags[1][2] } },
    { rule = { instance = "urxvt", class = "URxvt", name = "weechat"},
    properties = { tag = tags[1][3] } },
    { rule = { instance = "urxvt", class = "URxvt", name = "mutt" },
    properties = { tag = tags[1][3] } },
    { rule = { instance = "urxvt", class = "URxvt", name = "htop" },
    properties = { tag = tags[1][2] } },
    { rule = { instance = "urxvt", class = "URxvt", name = "cdw" },
    properties = { tag = tags[1][2] } },
    { rule = { instance = "urxvt", class = "URxvt", name = "transmission-remote-cli"},
    properties = { tag = tags[1][5] } },
    { rule = { instance = "urxvt", class = "URxvt", name = "vlc"},
    properties = { tag = tags[1][4] } },
    { rule = { class = "Conky" },
    properties = {
    floating = true,
    sticky = true,
    ontop = false,
    border_width = 0,
    focusable = false,
    size_hints = {"program_position", "program_size"}
    { rule = { class = "Ghb" },
    properties = { tag = tags[1][1] } },
    { rule = { class = "Devede" },
    properties = { tag = tags[1][1] } },
    { rule = { name = "LibreOffice"},
    properties = { tag = tags[1][4] } },
    { rule = { class = "Gimp" },
    properties = { tag = tags[1][1],
    floating = true } },
    -- Signals
    -- Signal function to execute when a new client appears.
    client.connect_signal("manage", function (c, startup)
    -- Enable sloppy focus
    c:connect_signal("mouse::enter", function(c)
    if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
    and awful.client.focus.filter(c) then
    client.focus = c
    end
    end)
    if not startup then
    -- Set the windows at the slave,
    -- i.e. put it at the end of others instead of setting it master.
    -- awful.client.setslave(c)
    -- Put windows in a smart way, only if they does not set an initial position.
    if not c.size_hints.user_position and not c.size_hints.program_position then
    awful.placement.no_overlap(c)
    awful.placement.no_offscreen(c)
    end
    end
    local titlebars_enabled = false
    if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then
    -- Widgets that are aligned to the left
    local left_layout = wibox.layout.fixed.horizontal()
    left_layout:add(awful.titlebar.widget.iconwidget(c))
    -- Widgets that are aligned to the right
    local right_layout = wibox.layout.fixed.horizontal()
    right_layout:add(awful.titlebar.widget.floatingbutton(c))
    right_layout:add(awful.titlebar.widget.maximizedbutton(c))
    right_layout:add(awful.titlebar.widget.stickybutton(c))
    right_layout:add(awful.titlebar.widget.ontopbutton(c))
    right_layout:add(awful.titlebar.widget.closebutton(c))
    right_layout:add(awful.titlebar.widget.closebutton(c))
    -- The title goes in the middle
    local title = awful.titlebar.widget.titlewidget(c)
    title:buttons(awful.util.table.join(
    awful.button({ }, 1, function()
    client.focus = c
    c:raise()
    awful.mouse.client.move(c)
    end),
    awful.button({ }, 3, function()
    client.focus = c
    c:raise()
    awful.mouse.client.resize(c)
    end)
    -- Now bring it all together
    local layout = wibox.layout.align.horizontal()
    layout:set_left(left_layout)
    layout:set_right(right_layout)
    layout:set_middle(title)
    awful.titlebar(c):set_widget(layout)
    end
    end)
    client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
    client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)

    @Prezioso: sorry about that i will upload some screenshots about error
    Sloved. Thank you very much. urxvt not install, i change terminal to gnome-terminal.
    I have one question about themes for copycat-killer. This is github https://github.com/copycat-killer/awesome-copycats.
    I can't use his themes althought installed fonts are Terminus (Multicolor, Powerarrow Darker) and Tamsyn (other ones).
    Then I copy them to ~/.fonts and use command " fc-cache -fv ". after that restart awesome but error font. What wrong i do. ?
    this is my calendar.lua file
    Licensed under GNU General Public License v2
    * (c) 2013, Luke Bonham
    local icons_dir = require("lain.helpers").icons_dir
    local awful = require("awful")
    local beautiful = require("beautiful")
    local naughty = require("naughty")
    local io = { popen = io.popen }
    local os = { date = os.date }
    local tonumber = tonumber
    local setmetatable = setmetatable
    -- Calendar notification
    -- lain.widgets.calendar
    local calendar = {}
    local cal_notification = nil
    function calendar:hide()
    if cal_notification ~= nil then
    naughty.destroy(cal_notification)
    cal_notification = nil
    end
    end
    function calendar:show(t_out, inc_offset, scr)
    calendar:hide()
    local offs = inc_offset or 0
    local tims = t_out or 0
    local f, c_text
    local today = tonumber(os.date('%d'))
    local init_t = calendar.cal .. ' | sed -r -e "s/(^| )( '
    calendar.offset = calendar.offset + offs
    if offs == 0 or calendar.offset == 0
    then -- current month showing, today highlighted
    if today >= 10
    then
    init_t = calendar.cal .. ' | sed -r -e "s/_\\x08//g" | sed -r -e "s/(^| )('
    end
    calendar.offset = 0
    calendar.notify_icon = calendar.icons .. today .. ".png"
    -- bg and fg inverted to highlight today
    f = io.popen( init_t .. today ..
    ')($| )/\\1<b><span foreground=\\"'
    .. calendar.bg ..
    '\\" background=\\"'
    .. calendar.fg ..
    '\\">\\2<\\/span><\\/b>\\3/"' )
    else -- no current month showing, no day to highlight
    local month = tonumber(os.date('%m'))
    local year = tonumber(os.date('%Y'))
    month = month + calendar.offset
    if month > 12 then
    month = month % 12
    year = year + 1
    if month <= 0 then
    month = 12
    end
    elseif month < 1 then
    month = month + 12
    year = year - 1
    if month <= 0 then
    month = 1
    end
    end
    calendar.notify_icon = nil
    f = io.popen(calendar.cal .. ' ' .. month .. ' ' .. year)
    end
    c_text = "<tt><span font='" .. calendar.font .. " "
    .. calendar.font_size .. "'><b>"
    .. f:read() .. "</b>\n\n"
    .. f:read() .. "\n"
    .. f:read("*a"):gsub("\n*$", "")
    .. "</span></tt>"
    f:close()
    cal_notification = naughty.notify({
    text = c_text,
    icon = calendar.notify_icon,
    position = calendar.position,
    fg = calendar.fg,
    bg = calendar.bg,
    timeout = tims,
    screen = scr or 1
    end
    function calendar:attach(widget, args)
    local args = args or {}
    calendar.cal = args.cal or "/usr/bin/cal"
    calendar.icons = args.icons or icons_dir .. "cal/white/"
    calendar.font = args.font or beautiful.font:sub(beautiful.font:find(""),
    beautiful.font:find(" "))
    calendar.font_size = tonumber(args.font_size) or 11
    calendar.fg = args.fg or beautiful.fg_normal or "#FFFFFF"
    calendar.bg = args.bg or beautiful.bg_normal or "#FFFFFF"
    calendar.position = args.position or "top_right"
    calendar.scr_pos = args.scr_pos or 1
    calendar.offset = 0
    calendar.notify_icon = nil
    widget:connect_signal("mouse::enter", function () calendar:show(0, 0, scr_pos) end)
    widget:connect_signal("mouse::leave", function () calendar:hide() end)
    widget:buttons(awful.util.table.join( awful.button({ }, 1, function ()
    calendar:show(0, -1, scr_pos) end),
    awful.button({ }, 3, function ()
    calendar:show(0, 1, scr_pos) end),
    awful.button({ }, 4, function ()
    calendar:show(0, -1, scr_pos) end),
    awful.button({ }, 5, function ()
    calendar:show(0, 1, scr_pos) end)))
    end
    return setmetatable(calendar, { __call = function(_, ...) return create(...) end })
    Thank everyone.
    Last edited by zyzzvn (2015-02-04 14:55:21)

Maybe you are looking for

  • Error in  Authorization even after giving Colon authoriztion to users

    Dear Experts We have built a query which is having Sum GT function used and also Constant for some characterstics. But when we execute the query the user is getting not authorized message. If i run the query without  the SUM GT and Constant RKF and C

  • Headphones stop working after a certain time and the notification for sound change has disappeared

    HP Pavilion dv6-6176sa Win7 64bit. I have a Pavilion dv6, and occasionally no sound will go through headphones when the jack is plugged in. The headphones themselves are not at fault, they are brand new and work fine. When the headphones are plugged

  • Creation Sales Order by using LSMW...................

    Hi All, We have designed one LSMW program by which we are able to create Sales Orders. Import method for this LSMW is *BAPI Method*.So finally by processing IDOC steps, sales orders getting created. My req is 1) We have to schedule a background job f

  • Direct delivery

    Hi we have this situation Salescompany sell a sparepart to to an endcustomer. This is express delivery. Spareparts must be ordered at our sparepart company. Normally done as 3rd party. The sparepart company is out of stock - na d must order from the

  • Routing sound out of logic

    I have just purchased a Korg Monotron and am very pleased with it! I am trying to send sound out from Logic into the Monotron, and then filter the audio in the Monotron and record this back into Logic, however I have a problem. The audio I want to se