Search Results

Search found 49 results on 2 pages for 'rui carneiro'.

Page 2/2 | < Previous Page | 1 2 

  • DotNetNuke + XPath = Custom navigation menu DNNMenu HTML render

    - by Rui Santos
    I'm developing a skin for DotNetNuke 5 using the Component DNN Done Right menu by Mark Alan which uses XSL-T to convert the XML sitemap into an HTML navigation. The XML sitemap outputs the following structure: <Root > <root > <node id="40" text="Home" url="http://localhost/dnn/Home.aspx" enabled="1" selected="0" breadcrumb="0" first="1" last="0" only="0" depth="0" > <node id="58" text="Child1" url="http://localhost/dnn/Home/Child1.aspx" enabled="1" selected="0" breadcrumb="0" first="1" last="0" only="0" depth="1" > <keywords >Child1</keywords> <description >Child1</description> <node id="59" text="Child1 SubItem1" url="http://localhost/dnn/Home/Child1/Child1SubItem1.aspx" enabled="1" selected="0" breadcrumb="0" first="1" last="0" only="0" depth="2" > <keywords >Child1 SubItem1</keywords> <description >Child1 SubItem1</description> </node> <node id="60" text="Child1 SubItem2" url="http://localhost/dnn/Home/Child1/Child1SubItem2.aspx" enabled="1" selected="0" breadcrumb="0" first="0" last="0" only="0" depth="2" > <keywords >Child1 SubItem2</keywords> <description >Child1 SubItem2</description> </node> <node id="61" text="Child1 SubItem3" url="http://localhost/dnn/Home/Child1/Child1SubItem3.aspx" enabled="1" selected="0" breadcrumb="0" first="0" last="1" only="0" depth="2" > <keywords >Child1 SubItem3</keywords> <description >Child1 SubItem3</description> </node> </node> <node id="65" text="Child2" url="http://localhost/dnn/Home/Child2.aspx" enabled="1" selected="0" breadcrumb="0" first="0" last="1" only="0" depth="1" > <keywords >Child2</keywords> <description >Child2</description> <node id="66" text="Child2 SubItem1" url="http://localhost/dnn/Home/Child2/Child2SubItem1.aspx" enabled="1" selected="0" breadcrumb="0" first="1" last="0" only="0" depth="2" > <keywords >Child2 SubItem1</keywords> <description >Child2 SubItem1</description> </node> <node id="67" text="Child2 SubItem2" url="http://localhost/dnn/Home/Child2/Child2SubItem2.aspx" enabled="1" selected="0" breadcrumb="0" first="0" last="1" only="0" depth="2" > <keywords >Child2 SubItem2</keywords> <description >Child2 SubItem2</description> </node> </node> </node> </root> </Root> My Goal is to render this XML block into this HTML Navigation structure only using UL's LI's, etc.. <ul id="topnav"> <li> <a href="#" class="home">Home</a> <!-- Parent Node - Depth0 --> <div class="sub"> <ul> <li><h2><a href="#">Child1</a></h2></li> <!-- Parent Node 1 - Depth1 --> <li><a href="#">Child1 SubItem1</a></li> <!-- ChildNode - Depth2 --> <li><a href="#">Child1 SubItem2</a></li> <!-- ChildNode - Depth2 --> <li><a href="#">Child1 SubItem3</a></li ><!-- ChildNode - Depth2 --> </ul> <ul> <li><h2><a href="#">Child2</a></h2></li> <!-- Parent Node 2 - Depth1 --> <li><a href="#">Child2 SubItem1</a></li> <!-- ChildNode - Depth2 --> <li><a href="#">Child2 SubItem2</a></li> <!-- ChildNode - Depth2 --> </ul> </div> </li> </ul> Can anyone help with the XSL coding? I'm just starting now with XSL..

    Read the article

  • How to open email by x-gm-msgid in Gmail with Javascript

    - by Rui J
    I'm writing an extension which surfaces links to gmail messages. As the UI loads right in Gmail, I should be able to click on one of these links and have Gmail load it (without refreshing). I have "x-gm-msgid" available and theoretically, I should just be able to navigate to "https://mail.google.com/mail/u/0/#inbox/[x-gm-msgid]". I've tried using location.hash = "#inbox/[x-gm-msgid]" I've tried using history.pushState(null, null, "/mail/u/0/#inbox/[x-gm-msgid]") Neither of which works. Gmail just thwarts any attempt to change the URL (unless it is done via user interaction) Any thoughts on how to get around this restriction?

    Read the article

  • Conditionally disabling menu item

    - by Rui Pacheco
    Are menu items under File "special"? I've deleted Open Recent... from my application menu but it still shows up when I run the application. I've tried to clean all targets, I deleted other menu items to make sure there's no caching going on but I still can't make Open Recent... disappear at run time.

    Read the article

  • Generate dynamic UPDATE command from Expression<Func<T, T>>

    - by Rui Jarimba
    I'm trying to generate an UPDATE command based on Expression trees (for a batch update). Assuming the following UPDATE command: UPDATE Product SET ProductTypeId = 123, ProcessAttempts = ProcessAttempts + 1 For an expression like this: Expression<Func<Product, Product>> updateExpression = entity => new Product() { ProductTypeId = 123, ProcessAttempts = entity.ProcessAttempts + 1 }; How can I generate the SET part of the command? SET ProductTypeId = 123, ProcessAttempts = ProcessAttempts + 1

    Read the article

  • How to get the selected index of a dropdowlist with javascript

    - by rui martins
    I have a table with several @Html.dropdowlistfor in it. I was trying to read the selected value of using javascript, but all read is the html generated. How can I read it?? for (var i = 0; i < oTable.length; i++) { **userModel.Id = oTable[i][0];** regionModel.Users.push(userModel); processModel.Regions.push(regionModel); userModel = { "Id": "", "Name": ""}; regionModel = { "Id": "", "Name": "", "Users": []}; } TABLE <table class="tbl" id="tbl"> <thead> <tr> <th> Region </th> <th> Owner </th> </tr> </thead> <tbody> @if (Model != null) { foreach (var item in Model.Regions) { <tr> <td> @Html.DisplayTextFor(i => item.Name) </td> <td> @Html.DropDownListFor(i => item.Users, new SelectList(item.Users, "Id", "Name")) </td> </tr> } } </tbody> CODE function ProcessSave() { // Step 1: Read View Data and Create JSON Object var userModel = { "User": "", "Name": ""}; var regionModel = {"Region" : "","Name": "", "Users": []}; var processModel = { "User": "", "Description": "", "Code": "", "Regions": []}; processModel.Name = $("#Name").val(); processModel.Code = $("#Code").val(); processModel.Description = $("#Description").val(); var oTable = $('.tbl').dataTable().fnGetData(); for (var i = 0; i < oTable.length; i++) { regionModel.Name = oTable[i][0]; userModel.User = oTable[i][1]; userModel.Name = oTable[i][1]; regionModel.Users.push(userModel); processModel.Regions.push(regionModel); userModel = { "Id": "", "Name": ""}; regionModel = { "Name": "", "Users": []}; } // Step 1: Ends Here // Set 2: Ajax Post // Here i have used ajax post for saving/updating information $.ajax({ url: '/Process/Create', data: JSON.stringify(processModel), type: 'POST', contentType: 'application/json;', dataType: 'json', success: function (result) { if (result.Success == "1") { window.location.href = "/Process/Index"; } else { alert(result.ex); } } }); } MODELS namespace TestingTool.ViewModels { public partial class ProcessModel { public string Name { get; set; } public string Description { get; set; } public string Code { get; set; } public virtual ICollection<RegionModel> Regions { get; set; } } } namespace TestingTool.ViewModels { public class RegionModel { public int Region { get; set; } public string Name { get; set; } public virtual ICollection<UserModel> Users { get; set; } } } namespace TestingTool.ViewModels { public class UserModel { public int User{ get; set; } public string Name { get; set; } } }

    Read the article

  • From Java Object class to C++

    - by Rui
    Hi, I'm relative new to C++ and my background is in Java. I have to port some code from Java to C++ and some doubts came up relative to the Object Java's class. So, if I want to port this: void Algorithm::setInputParameter(std::string name, Object object) { ..... } I believe I should use void* type or templates right? I don't know what's the "standard" procedure to accomplish it. Thanks

    Read the article

  • How to hide canvas content from parent rounded corners in any webkit for Mac?

    - by Jose Rui Santos
    I have a parent div with rounded corners that contains a canvas: <div id="box"> <canvas width="300px" height="300px"></canvas> </div>? #box { width: 150px; height: 150px; background-color: blue; border-radius: 50px; overflow: hidden; }? The canvas renders a red rectangle that overflows the parent. As expected, this is what I get in all browsers: The problem: However, for webkit browsers running in Mac OS lion (I tested Safari 5.1.5 and Chrome 19), the canvas is still visible in the round corners: Interestingly, this problem seems to happen only when the inner element is a canvas. For any other child element, the content is correctly hidden. One workaround would be to apply the same rounded corners to the canvas itself, but unfortunately this is not possible, since I need to animate the canvas relative position. Another workaround that should work, is to redraw the canvas in a clipped region that resembles the rounded corners shape, but I would prefer a cleaner CSS3 solution. So, does one know how to fix this for Safari and Chrome on Mac? EDIT: Problem also happens in Chrome on Win7 jsFiddle here

    Read the article

  • MSN XMPP API fails to connect

    - by Rui
    I'm trying to use MSN XMPP API via Actionscript, but connection to MSN always fails. I can identify this error on logs: I DONT KNOW HOW TO HANDLE DER stuff of TYPE 22 I DONT KNOW HOW TO HANDLE DER stuff of TYPE 12 I DONT KNOW HOW TO HANDLE DER stuff of TYPE 22 I DONT KNOW HOW TO HANDLE DER stuff of TYPE 22 (..) > <stream:error > xmlns:stream="http://etherx.jabber.org/streams"><see-other-host > xmlns="urn:ietf:params:xml:ns:xmpp-streams">BY2MSG4020608.gateway.edge.messenger.live.com</see-other-host></stream:error> </stream:stream> Anyone knows what is this related to?

    Read the article

  • How to display inline several <li> with 100% width?

    - by Rui
    Hi, I have the following html: <div id="container"> <ul> <li>element 1</li> <li>element 2</li> </ul> </div> applied with a css as follows: #container { width:100%; overflow:auto; } #container ul { width: 100%; } #container li { width: 100%; } So now I would like to have an indeterminate number of elements (<li>) all with 100% width (so they can adjust accordingly to the browser's window size) but all side by side, displaying the horizontal scroll bar in the container. I have tried putting "display:inline" on ul's css, and "float:left" on li's css, but with no success. Any suggestions? Also, try to consider I'm trying to make this as "cross-browser compatible" as possible. Thanks in advanced;

    Read the article

  • Moving abroad - Relocation advice

    - by Tim Koekkoek
    Oracle offers graduates from different European countries the opportunity to start their career abroad. Some already have experience with living abroad as they have done an exchange semester or internship in another county, for others it is the first time they will move abroad. Rui started in October 2011 as a Business Development Consultant in Dublin and moved from Portugal to Dublin, Ireland to start his career. For those planning to leave their home country and who desire to work abroad, he will share some tips and tricks in this article. When you’re faced with an opportunity like this, there are lots of things that will come to your mind. Sometimes it can be either very exciting, or even stressful. 1. First of all, try to relax. If you are certain you are moving abroad, all you need to do is some research about the country where you’re going to live, get to know its culture (gastronomy, important dates and events, its economy and effective ways to keep you in touch with your family and friends – such as mobile companies and Internet services), and start to understand the best locations (with good access) you could/should live in are. Don’t forget that initially you can be limited by transport and therefore it is important to explore the ideal places for you. During this time, Oracle provides everything you’ll need (papers, documents, etc.) to cross borders. 2. When you arrive, you understand that you are in a new country, in a new place, where all things (or most) are unknown to you. Before you panic, try to see it as a new challenge where new opportunities will come. Sometimes, it’s not easy I know, but the very best a new place has to give to you, is the opportunity to understand a new culture, get to know other people, other ways of working, and grow both as a person and professionally. So, you have nothing to lose in this kind of experiment. 3. When you arrive at Oracle, there’s a fantastic team that will help you with settling in, HR, Payroll, Relocation, IT. In my case, Oracle helped me with the relocation, they supported me to arrange everything such as helping out with all the paperwork and finding a new apartment. As you can see they will do their best to help you to be successful! 4. Engage with your new co-workers. Going to a place where you don’t know anyone can be tough sometimes but see it as an opportunity to meet people from all over the world and share experiences. Embrace it. 5. Plan ahead, try to get the most information possible and use it. Oracle is a multinational enterprise that will allow you to get to know a new labour market and give you the flexibility you need to understand your view of employment and occupation, giving you the very best opportunities to join different teams and working areas, so that you can work where you fit best. Good luck! If you’re thinking about starting a career abroad, read the following article: http://www.overseasdigest.com/movingtips.htm it can be very useful to you. Interested in starting your career at Oracle like Rui has? Please have a look at https://campus.oracle.com for all of our latest vacancies.

    Read the article

  • Python - Code snippet not working on Python 2.5.6, using IDLE

    - by Francisco P.
    Hello, everyone I am using a piece of self-modifying code for a college project. Here it is: import datetime import inspect import re import sys def main(): # print the time it is last run lastrun = 'Mon Jun 8 16:31:27 2009' print "This program was last run at ", print lastrun # read in the source code of itself srcfile = inspect.getsourcefile(sys.modules[__name__]) f = open(srcfile, 'r') src = f.read() f.close() # modify the embedded timestamp timestamp = datetime.datetime.ctime(datetime.datetime.now()) match = re.search("lastrun = '(.*)'", src) if match: src = src[:match.start(1)] + timestamp + src[match.end(1):] # write the source code back f = open(srcfile, 'w') f.write(src) f.close() if __name__=='__main__': main() Unfortunately, it doesn't work. Error returned: # This is the script's output This program is last run at Mon Jun 8 16:31:27 2009 # This is the error message Traceback (most recent call last): File "C:\Users\Rui Gomes\Desktop\teste.py", line 30, in <module> main() File "C:\Users\Rui Gomes\Desktop\teste.py", line 13, in main srcfile = inspect.getsourcefile(sys.modules[__name__]) File "C:\Python31\lib\inspect.py", line 439, in getsourcefile filename = getfile(object) File "C:\Python31\lib\inspect.py", line 401, in getfile raise TypeError('{!r} is a built-in module'.format(object)) TypeError: <module '__main__' (built-in)> is a built-in module I'd be thankful for any solutions.

    Read the article

  • Consuming OData based Rest service in C# [en-US]

    - by ruimachado
    Nowadays comunication between applications is an active topic with daily usage and a large amount of pratical appliances. While developing an app in witch I had to consume an OData I found out that combining Linq with my code made this operation pretty easy.The algorithm to consume OData starts with adding a service reference to Visual Studio:After adding the service reference in wich you define the uri to the service, we start building our code.In your code the algorithm is the following:Define the Uri to your OData ServiceDefine the context of your odata, wich contains all entities exposed by the service.Query the context using LinqPrint the resultEasy and simple.Example code:01public static void Main(string[] args){02 03        Uri serviceUri= newUri("http://example.host.odataservice.net/service.svc", UriKind.Absolute);04        ODataService.ServiceEntities context = newODataService.ServiceEntities (serviceUri);05 06        context.Credentials = newSystem.Net.NetworkCredential(Username,Password);07 08         var query = from ServiceObject in context.YourEntity09                     select ServiceObject ;10 11        foreach (var myObject in query)12        {13            Console.WriteLine("\n Field1: {0} | Field2: {1}",14            myObject .Field1, myObject .Field2);15 16        }17}That’s it.Thank you,Rui Machadorpmachado.wordpress.com

    Read the article

  • What's the best webserver software for video?

    - by sopppas
    Hi, we have a collection of FLV files, to be displayed by FlowPlayer flash-app in a website. The scripts and handling of data are done with Apache/MySQL/PHP. As the video files are static files they should be served by a more static oriented webserver like lighttpd or nginx, like it's done with photos. What's the best webserver for serving video? A static files oriented webserver should be good? thanks in advance regards, rui

    Read the article

  • Nullable types and ?? operator C# [en-US]

    - by ruimachado
    Nullable types vs Non-nullable types   While developing our C# projects its frequent the null comparison operation to avoid null exceptions. This simple operation is mainly coded using the "var x = null" code example inside an if clause. However not all types of variables are nullable, which means that setting a variable to null is not allowed in every cases, it depends on what kind of type are you defining. But what if there was an extension to your non-nullable type that would convert your variable types to nullable? This extension really exists. As I said before in C# you have nullable types which represent all the values of an underlying type, and an additional null value and can be declared easily using "T?", where T is the type of the variable and for example the normal int type cannot be null, so its a non-nullable type, however if you define a "int?" your variable can be null, what you do is convert a non-nullable type to a nullable type. Example: int x=null;     Not allowed     int? x=null;   Allowed     While using nullable types you can check if a variable is null the same way you do it with nullable types:     But what about setting a default value when a certain variable is null?   In this cases the c# .net framework let you set a default value when you try to assign a nullable type to a non-nullable type, using the ?? operator. If you don't use this operator you can still catch the InvalidOperationException which is throw in this cases. For example  without the ?? operator :     Using the ?? operator your code becomes cleaner and more easy to read and you get a bonus, you can set a default value for multiple variables using the ?? in a chain set.     That’s it,   Thanks, Rui Machado rpmachado.wordpress.com

    Read the article

  • WebCenter Customer Spotlight: Fundação Petrobras de Seguridade Social

    - by me
    Author: Peter Reiser - Social Business Evangelist, Oracle WebCenter Solution Summary Fundação Petrobras de Seguridade Social (PetroS) is a Brazilian nonprofit organization pension fund serving 152 private companies with more then 145,000 plan participants and  managing a portfolio of  US$35.9 billion in equity. PetroS business objective was to implement a robust and flexible online solution to enable the foundation to successfully compete in the pension marketplace. PetroS implemented a robust, flexible and highly available database solution based on Oracle Database 11g, Enterprise Edition and modernized the company’s Web portal using Oracle WebCenter Suite.  The solution enables PetroS to make an average of 5,000 online loans per month to its 110,000 qualifying participants and supports 2,000 online consultations daily. Company ProfileFundação Petrobras de Seguridade Social (Petrobras Social Security Foundation)—better known as PetroS—is a pension fund founded in the 1970s to pay supplementary retirement benefits to Petrobras employees. Later, the foundation expanded its market to include 152 private companies, including Sanasa, Repsol YPF and Alesat. The Foundation, a nonprofit organization, has more than 145,000 plan participants, US$35.9 billion in equity, and a loan portfolio of US$730 million. Business ChallengesPetroS business objectives were to implement a robust and flexible solution to enable the foundation to successfully compete in the pension marketplace without affecting its monthly payments to 60,000 beneficiaries and to extend service delivery through the Web to better serve the fund’s more than 145,000 participants. Solution DeployedPetroS worked with Oracle Consulting to implement a robust, flexible and high available database solution based on Oracle Database 11g, Enterprise Edition and modernized the company’s Web portal using Oracle WebCenter Suite, enabling PetroS to deliver more flexible services to pension plan participants. Business ResultsThe solution enables PetroS to make an average of 5,000 online loans per month to its 110,000 qualifying participants and supports 2,000 online consultations daily. “The combination of Oracle Database 11g and Oracle WebCenter Suite has helped us deliver faster and better service for over 130,000 clients who participate in the 96 supplementary pension plans we currently offer. It has certainly helped to fuel our growth.” Newton Carneiro da Cunha, Diretor Administrativo, Fundação Petrobrás de Seguridade Social           Additional Information PetroS Customer Snapshot Oracle WebCenter Suite Oracle Database 11g, Enterprise Edition Oracle Real Application Clusters Oracle Diagnostics Pack Oracle Tuning Pack Oracle Consulting

    Read the article

  • Silverlight Cream for January 03, 2011 -- #1021

    - by Dave Campbell
    In this all-Submittal Issue: Gill Cleeren(-2-), Brian Noyes, Brian Genisio, René Schulte, and Andy Schwam(-2-). Above the Fold: Silverlight: "The INavigationContentLoader interface in Silverlight 4" Gill Cleeren WP7: "Sending Windows Phone Screenshots in an Email" René Schulte WCF RIA Services: "WCF RIA Services Part 10 - Exposing Domain Services To Other Clients" Brian Noyes Shoutouts: Want to know what it takes to be an MVP? Check out René Schulte's recap of 2010: Goodbye 2010 - Hello 2011 ... awesome, René! Rui Marinho sent me this post... it's WPF, but wow... WPF and Kinect! Kinect & WPF From SilverlightCream.com: The INavigationContentLoader interface in Silverlight 4 Gill Cleeren has a couple posts up... this first is a break-out of the INavigationContentLoader... what all can be done with it, in addition to the flow of the page load process broken out. Working with the RaiseCanExecuteChanged in MVVM Light (Silverlight) Gill Cleeren' latest post is a discussion of the Silverlight ICommand interface and Laurent Bugnion's RaiseCanExecuteChanged in MVVM Light, with example code. WCF RIA Services Part 10 - Exposing Domain Services To Other Clients Brian Noyes has Part 10 in his WCF RIA Services Tutorial series up at SilverlightShow ... with info on, for example, exposint an OData, SOAP, or REST/JSON endpoint, or how to consume them. Cross-Training in Silverlight & Flex–MVVM vs Presentation Model Brian Genisio finished the year off with this post in his on-going Silverlight/Flex seris comparing MVVM vs Presentation Model .. lots of good MVVM/ViewModel tips and code in this post. Sending Windows Phone Screenshots in an Email René Schulte is the perfect guy to be doing this... how about emailing a screenshot directly from inside an app, for instance Laurent's taking a screenshot from inside an app... too cool, Rene! Windows Phone 7 Application Development Tips Andy Schwam has a post up with tips he learned while creating his first WP7 app... lots of good tips, Gestures, Camera, ISO... check it out, could save you some time and tears :) WP7 Tip: Using the CameraCaptureTask for Windows Phone 7 Andy Schwam's most recent post is WP7 dev as well, and has a bunch of tips and code for using the camera, such as capturing an image, resizing, saving... good stuff. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • What arguments do I send a function being called by a button in python?

    - by Jared
    I have a UI, in that UI is 4 text fields and 1 int field, then I have a function that calls to another function based on what's inside of the text fields, this function has (self, *args). My function that is being called to takes five arguments and I don't know what to put in it to make it actually work with my UI because python button's send an argument of their own. I have tried self and *args, but it doesn't work. Here is my code, didn't include most of the UI code since it is self explanatory: def crBC(self, IKJoint, FKJoint, bindJoint, xQuan, switch): ''' You should have a controller with an attribute 'ikFkBlend' - The name can be changed after the script executes. Controller should contain an enum - FK/DYN(0), IK(1). Specify the IK joint, then either the dynamic or FK joint, then the bind joint. Then a quantity of joints to pass through and connect. Tested currently on 600 joints (200 x 3), executed in less than a second. Returns nothing. Please open your script editor for details. ''' import itertools # gets children joints of the selected joint chHipIK = cmds.listRelatives(IKJoint, ad = True, type = 'joint') chHipFK = cmds.listRelatives(FKJoint, ad = True, type = 'joint') chHipBind = cmds.listRelatives(bindJoint, ad = True, type = 'joint') # list is built backwards, this reverses the list chHipIK.reverse() chHipFK.reverse() chHipBind.reverse() # appends the initial joint to the list chHipIK.append(IKJoint) chHipFK.append(FKJoint) chHipBind.append(bindJoint) # puts the last joint at the start of the list because the initial joint # was added to the end chHipIK.insert(0, chHipIK.pop()) chHipFK.insert(0, chHipFK.pop()) chHipBind.insert(0, chHipBind.pop()) # pops off the remaining joints in the list the user does not wish to be blended chHipBind[xQuan:] = [] chHipIK[xQuan:] = [] chHipFK[xQuan:] = [] # goes through the bind joints, makes a blend colors for each one, connects # the switch to the blender for a, b, c in itertools.izip(chHipBind, chHipIK, chHipFK): rotBC = cmds.shadingNode('blendColors', asUtility = True, n = a + 'rotate_BC') tranBC = cmds.shadingNode('blendColors', asUtility = True, n = a + 'tran_BC') scaleBC = cmds.shadingNode('blendColors', asUtility = True, n = a + 'scale_BC') cmds.connectAttr(switch + '.ikFkSwitch', rotBC + '.blender') cmds.connectAttr(switch + '.ikFkSwitch', tranBC + '.blender') cmds.connectAttr(switch + '.ikFkSwitch', scaleBC + '.blender') # goes through the ik joints, connects to the blend colors cmds.connectAttr(b + '.rotate', rotBC + '.color1', force = True) cmds.connectAttr(b + '.translate', tranBC + '.color1', force = True) cmds.connectAttr(b + '.scale', scaleBC + '.color1', force = True) # connects FK joints to the blend colors cmds.connectAttr(c + '.rotate', rotBC + '.color2') cmds.connectAttr(c + '.translate', tranBC + '.color2') cmds.connectAttr(c + '.scale', scaleBC + '.color2') # connects blend colors to bind joints cmds.connectAttr(rotBC + '.output', a + '.rotate') cmds.connectAttr(tranBC + '.output', a + '.translate') cmds.connectAttr(scaleBC + '.output', a + '.scale') ------------------- def execCrBC(self, *args): g.crBC(cmds.textField(self.ikJBC, q = True, tx = True), cmds.textField(self.fkJBC, q = True, tx = True), cmds.textField(self.bindJBC, q = True, tx = True), cmds.intField(self.bQBC, q = True, v = True), cmds.textField(self.sCBC, q = True, tx = True)) ------------------- self.bQBC = cmds.intField() cmds.text(l = '') self.sCBC = cmds.textField() cmds.text(l = '') cmds.button(l = 'Help Docs', c = self.crBC.__doc__) cmds.setParent('..') cmds.button(l = 'Create', c = self.execCrBC) Here is the code causing the problem as requested: import maya.cmds as cmds import jtRigUI.createDummyRig as dum import jtRigUI.createSkeleton as sk import jtRigUI.generalUtilities as gu import jtRigUI.createLegRig as lr import jtRigUI.createArmRig as ar class RUI(dum.Dict, dum.Dummy, sk.Skel, sk.FiSkel, lr.LeanLocs, lr.LegRig, ar.ArmRig, gu.Gutils): def __init__(self, charNameUI, gScaleUI, fingButtonGrp, thumbCheckBox, spineButtonGrp, neckButtonGrp, ikJBC, fkJBC, bindJBC, bQBC, sCBC): rigUI = 'rigUI' if cmds.window(rigUI, exists = True): cmds.deleteUI(rigUI) rigUI = cmds.window(rigUI, t = 'JT Rigging UI', sizeable = False, tb = True, mnb = False, mxb = False, menuBar = True, tlb = True, nm = 5) form = cmds.formLayout() tabs = cmds.tabLayout(innerMarginWidth = 1, innerMarginHeight = 1) rigUIMenu = cmds.menu('Help', hm = True) aboutMenu = cmds.menuItem('about') cmds.popupMenu('about', button = 1) deleteUIMenu = cmds.menu('Delete', hm = True) cmds.menuItem('dummySkeleton') cmds.formLayout(form, edit = True, attachForm = ((tabs, 'top', 0), (tabs, 'left', 0), (tabs, 'bottom', 0), (tabs, 'right', 0)), w = 30) tab1 = cmds.rowColumnLayout('Dummy') #cmds.columnLayout(rowSpacing = 10) #cmds.setParent('..') cmds.frameLayout(l = 'A: Dummy Skeleton Setup', w = 400) self.charNameUI = cmds.textFieldGrp (label="Optional Character Name:", ann="Insert a name for the character or leave empty.", tx = '', w = 1) fingJUI = cmds.frameLayout(l = 'B: Number of Fingers', w = 10) cmds.text('\n', h = 5) self.fingButtonGrp = cmds.radioButtonGrp('fingRadio', p = fingJUI, l = 'Fingers: ', sl = 4, w = 1, numberOfRadioButtons = 4, labelArray4 = ['One', 'Two', 'Three', 'Four'], ct2 = ('left', 'left'), cw5 = [60,60,60,60,60]) self.thumbCheckBox = cmds.checkBoxGrp(l = 'Thumb: ', v1 = True) cmds.text('\n', h = 5) spineJUI = cmds.frameLayout(l = 'C: Number of Spine Joints') cmds.text('\n', h = 5) self.spineButtonGrp = cmds.radioButtonGrp('spineRadio', p = spineJUI, l = 'Spine Joints: ', sl = 2, w = 1, numberOfRadioButtons = 3, labelArray3 = ['Three', 'Five', 'Ten'], ct2 = ('left', 'left'), cw4 = [95,95,95,95]) cmds.text('\n', h = 5) neckJUI = cmds.frameLayout(l = 'D: Number of Neck Joints') cmds.text('\n', h = 5) self.neckButtonGrp = cmds.radioButtonGrp('neckRadio', p = neckJUI, l = 'Neck Joints: ', sl = 0, w = 1, numberOfRadioButtons = 3, labelArray3 = ['Two', 'Three', 'Four'], ct2 = ('left', 'left'), cw4 = [95,95,95,95]) cmds.text('\n', h = 5) cmds.setParent('..') cmds.setParent('..') cmds.setParent('..') cmds.frameLayout('E: Creation') cmds.text('SAVE FIRST: CAN NOT UNDO', bgc = (0.2,0.2,0.2)) cmds.button(l = '\nCreate Dummy Skeleton\n', c = self.build) # also have it make char name field grey cmds.text('Elbows and Knees must have bend.', bgc = (0.2,0.2,0.2)) cmds.columnLayout() cmds.setParent('..') cmds.setParent('..') cmds.setParent('..') cmds.setParent('..') tab2 = cmds.rowColumnLayout('Skeleton') cmds.columnLayout(columnAttach = ('both', 5), rowSpacing = 10, columnWidth = 150) cmds.setParent('..') cmds.frameLayout(l = 'A: Skeleton Setup') cmds.text('SAVE FIRST: CAN NOT UNDO', bgc = (0.2,0.2,0.2)) cmds.button(l = '\nConvert to Skeleton - Orient - Set LRA\n', c = self.buildSkel) self.gScaleUI = cmds.textFieldGrp (label="Scale Multiplier:", ann="Scale multipler of Character: basis for all further base controllers", tx = '1.0', w = 1, ed = False, en = False, visible = True) cmds.frameLayout('B: Manual Orientation') cmds.text('You must manually check finger, thumb, leg, foot orientation specifically.\nConfirm rest of joints.\nSpine: X aim, Y point backwards from spine, Z to the side.\nFingers: X is aim, Y points upwards, Z to the side - Spread on Y, curl on Z.\nFoot: Pivots on Y, rolls on Z, leans on X.') cmds.columnLayout() cmds.setParent('..') cmds.frameLayout('C: Finalize Creation of Skeleton') cmds.button(l = '\nFinalize Skeleton\n', c = self.finishS) cmds.setParent('..') cmds.setParent('..') cmds.setParent('..') cmds.setParent('..') tab3 = cmds.rowColumnLayout('Legs') cmds.columnLayout(columnAttach = ('both', 5), rowSpacing = 10, columnWidth = 150) cmds.setParent('..') cmds.frameLayout(l = 'A: Leg Rig Setup') cmds.button(l = '\nGenerate Foot Lean Locators\n', c = self.makeLean) cmds.text('Place on either side of the foot.\nDo not rotate: Automatic orientation in place.') cmds.frameLayout(l = 'B: Rig Legs') cmds.button(l = '\nRig Legs\n', c = self.makeLegs) cmds.setParent('..') cmds.setParent('..') cmds.setParent('..') tab4 = cmds.rowColumnLayout('Arms') cmds.columnLayout(columnAttach = ('both', 5), rowSpacing = 10, columnWidth = 150) cmds.setParent('..') cmds.frameLayout(l = 'A: Arm Rig Setup') cmds.button(l = '\nA: Rig Arms\n', c = self.makeArms) cmds.setParent('..') cmds.setParent('..') tab5 = cmds.rowColumnLayout('Spine and Head') cmds.columnLayout(columnAttach = ('both', 5), rowSpacing = 10, columnWidth = 150) cmds.setParent('..') cmds.frameLayout(l = 'Spine Rig Setup') cmds.setParent('..') cmds.setParent('..') tab6 = cmds.rowColumnLayout('Stretchy IK') cmds.columnLayout(columnAttach = ('both', 5), rowSpacing = 10, columnWidth = 150) cmds.setParent('..') cmds.frameLayout(l = 'Stretchy Setup') cmds.setParent('..') cmds.setParent('..') tab6 = cmds.rowColumnLayout('Extras') cmds.scrollLayout(saw = 600, sah = 600, cr = True) cmds.columnLayout(columnAttach = ('both', 5), rowSpacing = 10, columnWidth = 150) cmds.setParent('..') cmds.frameLayout(l = 'General Utitlities') cmds.text('\nHere are all my general utilities for various things') cmds.frameLayout(l = 'Automatic Blend Colors Creation and Connection') cmds.rowColumnLayout(nc = 5, w = 10) cmds.text('IK Joint:') cmds.text(l = '') cmds.text('FK/Dyn Joint:') cmds.text(l = '') cmds.text('Bind Joint:') self.ikJBC = cmds.textField() cmds.text(l = '') self.fkJBC = cmds.textField() cmds.text(l = '') self.bindJBC = cmds.textField() cmds.text(' \nBlend Quantity:') cmds.text(l = '') cmds.text(' \nSwitch Control:') cmds.text(l = '') cmds.text(l = '') self.bQBC = cmds.intField() cmds.text(l = '') self.sCBC = cmds.textField() cmds.text(l = '') cmds.button(l = 'Help Docs', c = self.crBC.__doc__) cmds.setParent('..') cmds.button(l = 'Create', c = self.execCrBC) cmds.text(l = '') cmds.setParent('..') cmds.frameLayout(l = 'Make Spline IK Curve Stretch And Squash') cmds.rowColumnLayout(nc = 5, w = 10) cmds.text('Curve Name:') cmds.text(l = '') cmds.text('Setup Name:') cmds.text(l = '') cmds.text('Joint Quantity:') self.ikJBC = cmds.textField() cmds.text(l = '') self.fkJBC = cmds.textField() cmds.text(l = '') self.bindJBC = cmds.textField() cmds.text(' \nSwitch Control:') cmds.text(l = '') cmds.text(' \nGlobal Control:') cmds.text(l = '') cmds.text(l = '') self.bQBC = cmds.intField() cmds.text(l = '') self.sCBC = cmds.textField() cmds.text(l = '') cmds.button(l = 'Help Docs', c = self.crBC.__doc__) cmds.setParent('..') cmds.button(l = 'Create', c = self.execCrBC) cmds.setParent('..') cmds.showWindow(rigUI) r = RUI('charNameUI', 'gScaleUI', 'fingButtonGrp', 'thumbCheckBox', 'spineButtonGrp', 'neckButtonGrp', 'ikJBC', 'fkJBC', 'bindJBC', 'bQBC', 'sCBC') # last modified at 6.20 pm 29th June 2011

    Read the article

  • Silverlight Cream for March 08, 2011 -- #1056

    - by Dave Campbell
    In this Issue: Joost van Schaik, Manas Patnaik, Kevin Hoffman, Jesse Liberty, Deborah Kurata, Dhananjay Kumar, Dennis Delimarsky, Samuel Jack, Peter Kuhn, WindowsPhoneGeek, and Jfo. Above the Fold: Silverlight: "How I let the trees grow" Peter Kuhn WP7: "Simple Windows Phone 7 / Silverlight drag/flick behavior" Joost van Schaik Shoutouts: SilverlightShow has their top 5 from last week posted, plus the ECOContest is ready to be voted on: SilverlightShow for Feb 28 - March 06, 2011 Drew DeVault is a young man involved with the Microsoft Student Insiders. He gave a WP7 presentation at RMTT and has posted his material: Post-Session: Windows Phone 7 @ RMTT Rui Marinho has an app in the ECO Contest called Forest Findr. is based on the BIng Map Control for silverlight and Sql Spatial data, and helps you find Forests and get geolocated pictures and wikipedia information, and has a post up with a bunch of info on it here: Forest Findr. my entry on the SilverlightShow EcoContest From SilverlightCream.com: Simple Windows Phone 7 / Silverlight drag/flick behavior Joost van Schaik has a behavior that makes *anything* draggable and 'flickable' in WP7 ... read the intro, scroll to the bottom to watch the demo, and then grab up the code... cool stuff, Joost! Data Aggregation Using Presentation Model in RIA and Silverlight 4 Manas Patnaik sent me a link to his blog, and it appears he's got lots of Silverlight goodness out there so you'll be hearing more about him. This first post is on the Presentation Model in RIA and Silverlight 4... good discussion, diagrams and code... good job, Manas! WP7 for iPhone and Android Developers - Advanced UI Kevin Hoffman has part 3 of an ambitious 12-part tutorial series up on WP7 development ... this go-around is concentrating on Advanced UI - Panorama/Pivot controls, DataBinding, ObservableCollections, and Converters... whew! Sterling DB on top of Isolated Storage – 2 Jesse Liberty has part 2 of his Sterling series up... this time setting up the database in App.xaml so it can be used for dealing with tombstoning. Silverlight Charting: Formatting the Tick Marks Deborah Kurata's next chart tutorial is all about showing you how to continue to dress up your charts.. this time by formatting the tick marks... if you don't know what that is... check out the first image in the post. Stored Procedure in WCF Data Service Dhananjay Kumar has a very nice tutorial up on using a stored proc with WCF Data Services... I happen to know someone working on just that at this time. If you have this in mind, here's a step-by-step guide to getting it done. Windows Phone 7 – Episode 5 – Pages Dennis Delimarsky has part 5 of his WP7 tutorial series up and is discussing Pages in this 17 minute video. Unpacking Simon Squared: My mini framework-independent animation library Samuel Jack has not only Open-Sourced the WP7 game he built and blogged about, but he's now explaining some of the structure of the game in posts such as this one about the animation library he wrote that his game is built on. How I let the trees grow Peter Kuhn shares with us the code he used for the tree animation in his ECO Contest entry. There's a lot to learn in this post about performance ... the fully-animated tree has about 20K elements... 5K branches and 20K leaves... check it out. WP7 ToastPrompt in depth WindowsPhoneGeek takes a deep dive into the ToastPrompt control in the Coding4fun Toolkit... everything you need to completely use the control including sample code. Beware the loaded event Jfo talks about another frustration point she had with WP7 development, and that is around the use of the loaded event... read these tips from someone that's been there. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

< Previous Page | 1 2