Search Results

Search found 288 results on 12 pages for 'margins'.

Page 10/12 | < Previous Page | 6 7 8 9 10 11 12  | Next Page >

  • What goes into main function?

    - by Woltan
    I am looking for a best practice tip of what goes into the main function of a program using c++. Currently I think two approaches are possible. (Although the "margins" of those approaches can be arbitrarily close to each other) 1: Write a "Master"-class that receives the parameters passed to the main function and handle the complete program in that "Master"-class (Of course you also make use of other classes). Therefore the main function would be reduced to a minimum of lines. #include "MasterClass.h" int main(int args, char* argv[]) { MasterClass MC(args, argv); } 2: Write the "complete" program in the main function making use of user defined objects of course! However there are also global functions involved and the main function can get somewhat large. I am looking for some general guidelines of how to write the main function of a program in c++. I came across this issue by trying to write some unit test for the first approach, which is a little difficult since most of the methods are private. Thx in advance for any help, suggestion, link, ...

    Read the article

  • jQuery validation plugin - no error messages instead custom backgrounds

    - by Skoota
    I am using the jQuery validation plugin. The form which is being validated has custom background images for the text input fields, so instead of showing an error message for invalid fields I would like to change the background image. Making things a bit trickier is that the background image for the fields is on a different div absolutely positioned behind the text field (which has a transparent background and no border). I will spare going into the reasons for this design decision here (it's related to margins within the text field) but I thought it should be mentioned since it is critical to this question. Therefore, I have two questions: How can I stop the display of the error messages all-together? How can I instead tell the validation plugin if, for example, the name field (e.g. <input id=name ... />) is invalid then it should change the background for the relevant div (e.g. <div id=name-bg... ></div>)? Thanks for any assistance!

    Read the article

  • Center container horizontally and vertically

    - by Joey
    Looking over other question on this site, I used a method of setting all the positions to 0 with auto margins, but this has some unwanted behavior. If you resize the window vertically, the top of the container moves off of the top of the page. It needs to stop when it hits the top. JSFIDDLE: http://jsfiddle.net/jd67ca5y/ HTML: <div id="container"> <p>This is the container.</p> <p>If you resize the JSFiddle window horizontally, you will see that the left edge of the box doesn't move past the left edge of the window. This is correct behaviour.</p> <p>Now if you move the window vertically, the top of this container will disappear off of the top of the window. This is wrong.</p> </div> CSS: #container { margin:auto; height:300px; width:300px; top:0; bottom:0; left:0; right:0; position:absolute; border:1px solid; padding:10px; }

    Read the article

  • How to style "form" field labels in Windows Phone 7?

    - by Jeremy Bell
    Is there any standards guidance on how to style field labels next to form fields in windows phone 7 silverlight applications? For example, let's say I have a StackPanel with the TextBlock label and a TextBox for data entry. Currently I am using the default TextBlock Margin included in the PhoneTextSubtleStyle ("12,0,12,0"), and using a Margin of "0,-12,0,0" to push the TextBox up closer to the label: <StackPanel HorizontalAlignment="Left"> <TextBlock VerticalAlignment="Center" Text="Name" Style="{StaticResource PhoneTextSubtleStyle}" /> <TextBox Text="{Binding ItemName, Mode=TwoWay}" TextChanged="TextBox_TextChanged" VerticalAlignment="Center" Width="433" Margin="0,-12,0,0" /> </StackPanel> Note that the TextBox seems to have some internal padding of 12 pixels to the left and right, so that the TextBlock label and the TextBox control visually line up perfectly on the left. The problem is, I see existing apps with widely varying conventions for field label styling. Some do not do the negative margin adjustment, like I have above. Some don't. Some appear to override the label TextBlock Margin so that it is indented an additional 12 pixels on the left (i.e. "24,0,12,0" instead of the default "12,0,12,0"). Some apps put the labels to the left of the fields themselves (I hate that). Is there some standard design guidance on field labels in Windows Phone 7? I read through the design template PDF and could only determine that the field labels should be upper case on the first word (preferably only one word labels), and should NOT have a colon at the end. I didn't see anything with regards to margins or alignment between the label and the field.

    Read the article

  • Layout: how to make image to change its width and height proportionally?

    - by Exterminator13
    I have such layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" android:layout_toLeftOf="@+id/my_image" android:ellipsize="end" android:singleLine="true" android:text="Some text" android:textAppearance="?android:attr/textAppearanceMedium" /> <ImageView android:id="@+id/my_image" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/title" android:layout_alignBottom="@+id/title" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:adjustViewBounds="true" android:src="@drawable/my_bitmap_image" /> This layout does almost what I need: it makes image view height the same as text view. The image graphic contents stretched also keeping aspect ratio. But, the width of the image view does not change! As a result, I have a wide gap between text and the image view! As a temporal solution, I override View#onLayout. The question: how to change image width in xml layout? UPDATE: This is a final layout I need (text + a few images). Look at the first image: its width should be exactly the same as scaled image in it with no paddings and margins:

    Read the article

  • How to speed up drawing of scaled image? Audio playback chokes during window resize.

    - by Paperflyer
    I am writing an audio player for OSX. One view is a custom view that displays a waveform. The waveform is stored as a instance variable of type NSImage with an NSBitmapImageRep. The view also displays a progress indicator (a thick red line). Therefore, it is updated/redrawn every 30 milliseconds. Since it takes a rather long time to recalculate the image, I do that in a background thread after every window resize and update the displayed image once the new image is ready. In the meantime, the original image is scaled to fit the view like this: // The drawing rectangle is slightly smaller than the view, defined by // the two margins. NSRect drawingRect; drawingRect.origin = NSMakePoint(sideEdgeMarginWidth, topEdgeMarginHeight); drawingRect.size = NSMakeSize([self bounds].size.width-2*sideEdgeMarginWidth, [self bounds].size.height-2*topEdgeMarginHeight); [waveform drawInRect:drawingRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1]; The view makes up the biggest part of the window. During live resize, audio starts choking. Selecting the "big" graphic card on my Macbook Pro makes it less bad, but not by much. CPU utilization is somewhere around 20-40% during live resizes. Instruments suggests that rescaling/redrawing of the image is the problem. Once I stop resizing the window, CPU utilization goes down and audio stops glitching. I already tried to disable image interpolation to speed up the drawing like this: [[NSGraphicsContext currentContext] setImageInterpolation:NSImageInterpolationNone]; That helps, but audio still chokes during live resizes. Do you have an idea how to improve this? The main thing is to prevent the audio from choking.

    Read the article

  • Why does setting the margin on a div not affect the position of child content?

    - by DanM
    I'd like to understand a little more clearly how css margins work with divs and child content. If I try this... <div style="clear: both; margin-top: 2em;"> <input type="submit" value="Save" /> </div> ...the Save button is right up against the User Role (margin fail): If I change it to this... <div style="clear: both;"> <input style="margin-top: 2em;" type="submit" value="Save" /> </div> ...there is a gap between the Save button and the User Role (margin win): Questions: Can someone explain what I'm observing? Why doesn't putting a margin on the div cause the input to move down? Why must I put the margin on the input itself? There must be some fundamental law of css I am not grasping.

    Read the article

  • Does IE6 Really not Allow Me to set width/height from left/right/top/bottom???

    - by viatropos
    Building a site super quick and having it work on all my Mac browsers, I thought I'd take a gander on a friends old dell laptop with Windows XP and IE6. Nothing looks remotely correct. It's because I used lots of left/right/top/bottom (constraint) declarations to size elements proportionally to their parent's size (I didn't use percent sizes because the percents refer to the parent's size before margins and padding are applied, left/right/top/bottom refer to them after with position:absolute. I'm asking about that here :)). I've read lots these past few weeks on how horrible IE6 (and IE) is in general, but because of all the reasons people say to support it (large market share and the fear of installing better software), and because half the people in the company we're building a site for use IE6 (getting them to upgrade to Chrome slowly but surely), I thought if I could just get IE6 to render my constraints, that might help. So I am messing around with simple layouts here, and they work fine in my latest versions of Firefox, Safari, Chrome, and Opera, but IE6 is basically saying: If you haven't set a width or height on me, I'm assuming it's zero. But position:absolute; left:0px; right:0px; top:0px; bottom:0px; on a container that's width:1000px; height:1000px; should be the same as setting width:1000px; height:1000px on the child, no? Taking a quick look at the source for this, why won't IE6 render the constraint based absolutely positioned AND SIZED elements? (note: I will be messing around with that file for a while) Thanks

    Read the article

  • Merging multiple docx files to one

    - by coding
    I am developing a desktop application in C#. I have coded a function to merge multiple docx files but it does not work as expected. I don't get the content exactly as how it was in the source files. A few blank lines are added in between. The content extends to the next pages, header and footer information is lost, page margins gets changed, etc.. How can I concatenate docs as it is without and change in it.Any suggestions will be helpful. This is my code. public bool CombineDocx(string[] filesToMerge, string destFilepath) { Application wordApp = null; Document wordDoc = null; object outputFile = destFilepath; object missing = Type.Missing; object pageBreak = WdBreakType.wdPageBreak; try { wordApp = new Application { DisplayAlerts = WdAlertLevel.wdAlertsNone, Visible = false }; wordDoc = wordApp.Documents.Add(ref missing, ref missing, ref missing, ref missing); Selection selection = wordApp.Selection; foreach (string file in filesToMerge) { selection.InsertFile(file, ref missing, ref missing, ref missing, ref missing); selection.InsertBreak(ref pageBreak); } wordDoc.SaveAs( ref outputFile, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing); return true; } catch (Exception ex) { Msg.Log(ex); return false; } finally { if (wordDoc != null) { wordDoc.Close(); } if (wordApp != null) { wordApp.DisplayAlerts = WdAlertLevel.wdAlertsAll; wordApp.Quit(); Marshal.FinalReleaseComObject(wordApp); } } }

    Read the article

  • CSS 100% height with padding/margin

    - by Toji
    This has been driving me crazy for a couple of days now, but in reality it's a problem that I've hit off and on for the last few years: With HTML/CSS how can I make an element that has a width and/or height that is 100% of it's parent element and still has proper padding or margins? By "proper" I mean that if my parent element is 200px tall and I specify 100% height with 5px padding I would expect that I should get a 190px high element with 5px "border" on all sides, nicely centered in the parent element. Now, I know that that's not how the standard box model specifies it should work (although I'd like to know why, exactly...), so the obvious answer doesn't work: #myDiv { width: 100% height: 100%; padding: 5px; } But it would seem to me that there must be SOME way of reliably producing this effect for a parent of arbitrary size. Does anyone know of a way of accomplishing this (seemingly simple) task? Oh, and for the record I'm not terribly interested in IE compatibility so that should (hopefully) make things a bit easier. EDIT: Since an example was asked for, here's the simplest one I can think of: <html style="height: 100%"> <body style="height: 100%"> <div style="background-color: black; height: 100%; padding: 25px"></div> </body> </html> The challenge is then to get the black box to show up with a 25 pixel padding on all edges without the page growing big enough to require scrollbars.

    Read the article

  • Oracle Announces New Oracle Exastack Program for ISV Partners

    - by pfolgado
    Oracle Exastack Program Enables ISV Partners to Leverage a Scalable, Integrated Infrastructure to Deliver Their Applications Tuned and Optimized for High-Performance News Facts Enabling Independent Software Vendors (ISVs) and other members of Oracle Partner Network (OPN) to rapidly build and deliver faster, more reliable applications to end customers, Oracle today introduced Oracle Exastack Ready, available now, and Oracle Exastack Optimized, available in fall 2011 through OPN. The Oracle Exastack Program focuses on helping ISVs run their solutions on Oracle Exadata Database Machine and Oracle Exalogic Elastic Cloud -- integrated systems in which the software and hardware are engineered to work together. These products provide partners with a lower cost and high performance infrastructure for database and application workloads across on-premise and cloud based environments. Leveraging the new Oracle Exastack Program in which applications can qualify as Oracle Exastack Ready or Oracle Exastack Optimized, partners can use available OPN resources to optimize their applications to run faster and more reliably -- providing increased performance to their end users. By deploying their applications on Oracle Exadata Database Machine and Oracle Exalogic Elastic Cloud, ISVs can reduce the cost, time and support complexities typically associated with building and maintaining a disparate application infrastructure -- enabling them to focus more on their core competencies, accelerating innovation and delivering superior value to customers. After qualifying their applications as Oracle Exastack Ready, partners can note to customers that their applications run on and support Oracle Exadata Database Machine and Oracle Exalogic Elastic Cloud component products including Oracle Solaris, Oracle Linux, Oracle Database and Oracle WebLogic Server. Customers can be confident when choosing a partner's Oracle Exastack Optimized application, knowing it has been tuned by the OPN member on Oracle Exadata Database Machine or Oracle Exalogic Elastic Cloud with a goal of delivering optimum speed, scalability and reliability. Partners participating in the Oracle Exastack Program can also leverage their Oracle Exastack Ready and Oracle Exastack Optimized applications to advance to Platinum or Diamond level in OPN. Oracle Exastack Programs Provide ISVs a Reliable, High-Performance Application Infrastructure With the Oracle Exastack Program ISVs have several options to qualify and tune their applications with Oracle Exastack, including: Oracle Exastack Ready: Oracle Exastack Ready provides qualifying partners with specific branding and promotional benefits based on their adoption of Oracle products. If a partner application supports the latest major release of one of these products, the partner may use the corresponding logo with their product marketing materials: Oracle Solaris Ready, Oracle Linux Ready, Oracle Database Ready, and Oracle WebLogic Ready. Oracle Exastack Ready is available to OPN members at the Gold level or above. Additionally, OPN members participating in the program can leverage their Oracle Exastack Ready applications toward advancement to the Platinum or Diamond levels in the OPN Specialized program and toward achieving Oracle Exastack Optimized status. Oracle Exastack Optimized: When available, for OPN members at the Gold level or above, Oracle Exastack Optimized will provide direct access to Oracle technical resources and dedicated Oracle Exastack lab environments so OPN members can test and tune their applications to deliver optimal performance and scalability on Oracle Exadata Database Machine or Oracle Exalogic Elastic Cloud. Oracle Exastack Optimized will provide OPN members with specific branding and promotional benefits including the use of the Oracle Exastack Optimized logo. OPN members participating in the program will also be able to leverage their Oracle Exastack Optimized applications toward advancement to Platinum or Diamond level in the OPN Specialized program. Oracle Exastack Labs and ISV Enablement: Dedicated Oracle Exastack lab environments and related technical enablement resources (including Guided Learning Paths and Boot Camps) will be available through OPN for OPN members to further their knowledge of Oracle Exastack offerings, and qualify their applications for Oracle Exastack Optimized or Oracle Exastack Ready. Oracle Exastack labs will be available to qualifying OPN members at the Gold level or above. Partners are eligible to participate in the Oracle Exastack Ready program immediately, which will help them meet the requirements to attain Oracle Exastack Optimized status in the future. Guidelines for Oracle Exastack Optimized, as well as Oracle Exastack Labs will be available in fall 2011. Supporting Quotes "In order to effectively differentiate their software applications in the marketplace, ISVs need to rapidly deliver new capabilities and performance improvements," said Judson Althoff, Oracle senior vice president of Worldwide Alliances and Channels and Embedded Sales. "With Oracle Exastack, ISVs have the ability to optimize and deploy their applications with a complete, integrated and cloud-ready infrastructure that will help them accelerate innovation, unlock new features and functionality, and deliver superior value to customers." "We view performance as absolutely critical and a key differentiator," said Tom Stock, SVP of Product Management, GoldenSource. "As a leading provider of enterprise data management solutions for securities and investment management firms, with Oracle Exadata Database Machine, we see an opportunity to notably improve data processing performance -- providing high quality 'golden copy' data in a reduced timeframe. Achieving Oracle Exastack Optimized status will be a stamp of approval that our solution will provide the performance and scalability that our customers demand." "As a leading provider of Revenue Intelligence solutions for telecommunications, media and entertainment service providers, our customers continually demand more readily accessible, enriched and pre-analyzed information to minimize their financial risks and maximize their margins," said Alon Aginsky, President and CEO of cVidya Networks. "Oracle Exastack enables our solutions to deliver the power, infrastructure, and innovation required to transform our customers' business operations and stay ahead of the game." Supporting Resources Oracle PartnerNetwork (OPN) Oracle Exastack Oracle Exastack Datasheet Judson Althoff blog Connect with the Oracle Partner community at OPN on Facebook, OPN on LinkedIn, OPN on YouTube, or OPN on Twitter

    Read the article

  • Task-It Webinar - Source Code

    Last week I presented a webinar called "Building a real-world application with RadControls for Silverlight 4". For those that didn't get to see the webinar, you can view it here: Building a read-world application with RadControls for Silverlight 4 Since the webinar I've received several requests asking if I could post the source code for the simple application I showed demonstrating some of the techniques used in the development of Task-It, such as MVVM, Commands and Internationalization. This source code is now available for downloadhere. After downloading the source: Extract it to the location of your choice on your hard-drive Open the solution Right-click ModuleProject.Web and selecte 'Set as StartUp Project'. Right-click ProjectTestPage.aspx and selected 'Set as Start Page' Create a database in SQL Server called WebinarProject. Navigate to the Database folder under the WebinarProject directory and run the .sql script against your WebinarProject database. The last two steps are necessary only for the Tasks page to work properly (using WCF RIA Services). Now some notes about each page: Code-behind This is not the way I recommend coding a line-of-business application in Silverlight, but simply wanted to show how the code-behind approach would look. Command This page introduces MVVM and Commands. You'll notice in the XAML that the Command property of theRadMenuItem and the Button are both bound to a SaveCommand. That comes from the view model. If you look in the code- behind of the user control you'll see that an instance of a CommandViewModel is instantiated and set as the DataContext of the UserControl.There is also a listener for the view model's SaveCompleted event. When this is fired, it tells the view (UserControl) to display the MessageBox. Internationalization This sample is similar to the previous one, but instead of using hard-coded strings in the UI, the strings are obtained via binding toview model properties. The view model gets the strings from the .resx files (Strings.resx or Strings.de.resx) under Assets/Resources. If you uncomment the call to ShowGerman() in App.xaml.cs's Application_Startup method and re-run the application, you will see the UI in German. Note that this code, which sets the CurrentCulture and CurrentUICulture on the current thread to "de" (German) is for testing purposes only. RadWindow Once again, very similar to the previous example.The difference is that we are now using a RadWindow to display the 'Saved' message instead of a MessageBox. The advantage here is that we do not have to hold on to a reference to the view model in our code behind so that we can get the 'Saved' message from it. The RadWindow's DataContext is now also bound to the view model, so within its XAML we can bind directly to properties in the view model. Much nicer, and cleaner. One other thing I introduced in this example is the use of spacer Rectangles. Rather than setting a width and/or height on the rectangles for spacing, I am now referencing a style in my ResourceDictionary called StandardSpacerStyle. I like doing this better than using margins or padding because now I have a reusable way to create space between elements, the Rectangle does not show (because I have not set its Fill color), and I can change my spacing throughout the user interface in one place if I'd like. Tasks This page is quite a bit different than the other four. It is a very simple, stripped-down version of the Tasks page in the Task-It application. The Tasks.xaml UserControl has a ContentControl, and the Content of that control is set based on whether we are looking at the list of tasks or editing a task. So it displays one of two child UserControls, which are called List and Details. List has the RadGridView, Details has the form. In the code-behind of the Tasks UserControl I am once again setting its DataContext to a view model class. The nice thing is, whichever child UserControl is being displayed (List or Details) inherits its DataContext from its parent control (Tasks), so I do not have to explicitly set it. The List UserControl simply displays a RadGridView whose ItemsSource is bound to a property in the view model called Tasks, and its SelectedItem property is bound to a property in the view model called SelectedItem. The SelectedItem binding must be TwoWay so that the view is notified when the SelectedItem changes in the view model, and the view model is notified when something changes in the view (like when a user changes the Name and/or DueDate in the form). You'll also notice that the form's TextBox and RadDatePicker are also TwoWay bound to the SelectedItem property in the view model. You can experiment with the binding by removing TwoWay and see how changes in the form do not show up in the RadGridView. So here we have an example of two different views (List and Details) that are both bound to the same view model...and actually, so is the Tasks UserControl, so it is really three views. WCF RIA Services By the way, I am using WCF RIA Services to retrieve data for the RadGridView and save the data when the user clicks the Save button in the form. I created a really simple ADO.NET Entity Data Model in WebinarProject.Web called DataModel.edmx. I also created a simple Domain Data Service called DataService that has methods for retrieving data, inserting, updating and deleting. However I am only using the retrieval and update methods in this sample. Note that I do not currently have any validation in place on the form, as I wanted to keep the sample as simple as possible. Wrap up Technically, I should move the calls to WCF RIA Services out of the view model and put them into a separate layer, but this works for now, and that is a topic for another day! Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Calling All Agile Customers-Share Your Stories at the Upcoming PLM Summit

    - by Terri Hiskey
    Now that we've closed the door on another Oracle OpenWorld, planning is in full swing for the next PLM Summit, taking place February 4-6, 2013 in San Francisco, in conjunction with the Oracle Value Chain Summit. This event is a must-attend for all Agile PLM customers. We will be holding five tracks with over forty Agile PLM-focused sessions covering a range of topics and industries. If you'd like to be notified once registration is live for this event, be sure to sign up at www.oracle.com/goto/vcs. CALL FOR PRESENTATIONS: We are looking for some fresh, new customer stories to share with attendees. Read below for descriptions of the five tracks, and the suggested topics that we'd like to hear from customers. If you are interested in presenting at the PLM Summit (and getting a FREE pass to attend if your presentation is accepted!) send me an email at terri.hiskey-AT-oracle.com with: Your proposed session title and the track your session fits into 3-5 bullets of takeaways that attendees will get from your presentation Your complete contact information including name, title, company, telephone number and email The deadline for this call for presentations is Thursday, November 15, so get your submission in soon! PLM Track #1:  Product Insights and Best Practices This track will provide executive attendees and line of business managers with an overview of how Agile PLM has been deployed and used at customers to enable and manage critical product-related business processes including enterprise quality and supplier management, compliance, product cost management, portfolio management, commercialization and software lifecycle management. These sessions will also provide details around how to manage the development and rollout of the solutions and how to achieve and track value. Possible session topics: Software Lifecycle Management Enterprise Quality Management New Product Development Integrated Business Planning ECO effectivity planning Rapid Commercialization             Manage the Design to Release Process for Complex Configured Products PLM for Life Sciences Companies I (Compliant Data Set) PLM for Life Sciences Companies II (eMDR, UDI) Discrete CPG – Private Label Mgmt Cost Management and Strategic Sourcing IP Mgmt in the Semiconductor Industry Implementing the Enterprise Training Record using Agile PLM PLM Track #2: Product Deep Dives & Demos This track is aimed at line of business  and IT managers who would like to understand the benefits of expanding their PLM footprint. The sessions in this track will provide attendees with an up-close and in-depth look Agile PLM’s newer and exciting applications, including analytics and innovation management, and will detail features and functionality that are available in the latest version of Agile PLM Possible session topics: Oracle Product Lifecycle Analytics Integrating PLM with Engineering and Supply Chain Systems Streamline PLM Design to Manufacturing Processes with AutoVue Visualization Solutions         Achieve Environmental Compliance (REACH and ROHS) with Agile Product Governance & Compliance PIM Deep Dive Achieving Integrated Change Control with Agile PLM and E-Business Suite Deploying PLM at Small and Midsize Enterprises Enhancing Oracle PQM w/APQP and 8D functionality Advanced Roles and Privileges – Enabling ITAR Model Unit Effectivity Implementing REACH with 9.3.2 Deploying Job Functions, Functional Teams in 9.3.2 to Improve Your Approval Matrix PLM Track #3: Administration & Integrations This track will provide sessions for Agile administrators, managers and daily Agile PLM users who are preparing to upgrade or looking to extend the use of their current PLM implementation through AIA and process extensions. It will include deeper conversation about Agile PLM features and best practices on managing an Agile PLM infrastructure. Possible session topics: Expand the Value of your Agile Investment with Innovative Process Extension Ideas Ensuring Implementation & Upgrade Success Ensure the Integrity and Accuracy of Product Data Across the Enterprise              Maximize the Benefits of an Integrated Architecture with AIA Integrating your PLM Implementation with ERP               Infrastructure Optimization Expanding Your PLM Implementation PLM Administrator Open Forum Q&A/Discussion FDA Validation Best Practices Best Practices for Managing a large Agile Deployment: Clustering, Load Balancing and Firewalls PLM Track #4: Agile PLM for Process This track is aimed at attendees interested in or currently using Agile PLM for Process. The sessions in this track will go over new features and functionality available in the newest version of PLM for Process and will give attendees an overview on how PLM for Process is being used to manage critical business processes such as formulation, recipe and specification management Possible session topics: PLM for Process Strategy, Roadmap and Update New Product Development and Introduction Effective Product Supplier Collaboration             Leverage Agile Formulation and Compliance to Manage Cost, Compliance, Quality, Labeling and Nutrition Menu Management Innovation Data Management Food Safety/ Introduction of P4P Quality Mgmt PLM Track #5: Agile PLM and Innovation Management This track consists of five sessions, and is for attendees interested in learning more about Oracle’s Agile Innovation Management, an exciting new addition to the Agile PLM application family that redefines the industry’s scope of product lifecycle management. Oracle’s innovation solutions enable companies to collaborate in a focused way among various functional groups (marketing, sales, operations, engineering/R&D and sourcing), combining insights of customer needs/requirements, competition, available technologies, alternate design scenarios and portfolio constraints to deliver what customers truly value. The results are better products, higher margins, greater efficiencies, more satisfied customers and the increased ability to continuously innovate. Possible session topics: Product Innovation Management Solution Overview Product Requirements & Ideation Management Concept Design Management Product Lifecycle Portfolio Management Innovation as a Competitive Differentiator

    Read the article

  • The Case of the Extra Page: Rendering Reporting Services as PDF

    - by smisner
    I had to troubleshoot a problem with a mysterious extra page appearing in a PDF this week. My first thought was that it was likely to caused by one of the most common problems that people encounter when developing reports that eventually get rendered as PDF is getting blank pages inserted into the PDF document. The cause of the blank pages is usually related to sizing. You can learn more at Understanding Pagination in Reporting Services in Books Online. When designing a report, you have to be really careful with the layout of items in the body. As you move items around, the body will expand to accommodate the space you're using and you might eventually tighten everything back up again, but the body doesn't automatically collapse. One of my favorite things to do in Reporting Services 2005 - which I dubbed the "vacu-pack" method - was to just erase the size property of the Body and let it auto-calculate the new size, squeezing out all the extra space. Alas, that method no longer works beginning with Reporting Services 2008. Even when you make sure the body size is as small as possible (with no unnecessary extra space along the top, bottom, left, or right side of the body), it's important to calculate the body size plus header plus footer plus the margins and ensure that the calculated height and width do not exceed the report's height and width (shown as the page in the illustration above). This won't matter if users always render reports online, but they'll get extra pages in a PDF document if the report's height and width are smaller than the calculate space. Beginning the Investigation In the situation that I was troubleshooting, I checked the properties: Item Property Value Body Height 6.25in   Width 10.5in Page Header Height 1in Page Footer Height 0.25in Report Left Margin 0.1in   Right Margin 0.1in   Top Margin 0.05in   Bottom Margin 0.05in   Page Size - Height 8.5in   Page Size - Width 11in So I calculated the total width using Body Width + Left Margin + Right Margin and came up with a value of 10.7 inches. And then I calculated the total height using Body Height + Page Header Height + Page Footer Height + Top Margin + Bottom Margin and got 7.6 inches. Well, page sizing couldn't be the reason for the extra page in my report because 10.7 inches is smaller than the report's width of 11 inches and 7.6 inches is smaller than the report's height of 8.5 inches. I had to look elsewhere to find the culprit. Conducting the Third Degree My next thought was to focus on the rendering size of the items in the report. I've adapted my problem to use the Adventure Works database. At the top of the report are two charts, and then below each chart is a rectangle that contains a table. In the real-life scenario, there were some graphics present as a background for the tables which fit within the rectangles that were about 3 inches high so the visual space of the rectangles matched the visual space of the charts - also about 3 inches high. But there was also a huge amount of white space at the bottom of the page, and as I mentioned at the beginning of this post, a second page which was blank except for the footer that appeared at the bottom. Placing a textbox beneath the rectangles to see if they would appear on the first page resulted the textbox's appearance on the second page. For some reason, the rectangles wanted a buffer zone beneath them. What's going on? Taking the Suspect into Custody My next step was to see what was really going on with the rectangle. The graphic appeared to be correctly sized, but the behavior in the report indicated the rectangle was growing. So I added a border to the rectangle to see what it was doing. When I added borders, I could see that the size of each rectangle was growing to accommodate the table it contains. The rectangle on the right is slightly larger than the one on the left because the table on the right contains an extra row. The rectangle is trying to preserve the whitespace that appears in the layout, as shown below. Closing the Case Now that I knew what the problem was, what could I do about it? Because of the graphic in the rectangle (not shown), I couldn't eliminate the use of the rectangles and just show the tables. But fortunately, there is a report property that comes to the rescue: ConsumeContainerWhitespace (accessible only in the Properties window). I set the value of this property to True. Problem solved. Now the rectangles remain fixed at the configured size and don't grow vertically to preserve the whitespace. Case closed.

    Read the article

  • Adventures in Windows 8: Understanding and debugging design time data in Expression Blend

    - by Laurent Bugnion
    One of my favorite features in Expression Blend is the ability to attach a Visual Studio debugger to Blend. First let’s start by answering the question: why exactly do you want to do that? Note: If you are familiar with the creation and usage of design time data, feel free to scroll down to the paragraph titled “When design time data fails”. Creating design time data for your app When a designer works on an app, he needs to see something to design. For “static” UI such as buttons, backgrounds, etc, the user interface elements are going to show up in Blend just fine. If however the data is fetched dynamically from a service (web, database, etc) or created dynamically, most probably Blend is going to show just an empty element. The classical way to design at that stage is to run the application, navigate to the screen that is under construction (which can involve delays, need to log in, etc…), to measure what is on the screen (colors, margins, width and height, etc) using various tools, going back to Blend, editing the properties of the elements, running again, etc. Obviously this is not ideal. The solution is to create design time data. For more information about the creation of design time data by mocking services, you can refer to two talks of mine “Deep dive MVVM” and “MVVM Applied From Silverlight to Windows Phone to Windows 8”. The source code for these talks is here and here. Design time data in MVVM Light One of the main reasons why I developed MVVM Light is to facilitate the creation of design time data. To illustrate this, let’s create a new MVVM Light application in Visual Studio. Install MVVM Light from here: http://mvvmlight.codeplex.com (use the MSI in the Download section). After installing, make sure to read the Readme that opens up in your favorite browser, you will need one more step to install the Project Templates. Start Visual Studio 2012. Create a new MvvmLight (Win8) app. Run the application. You will see a string showing “Welcome to MVVM Light”. In the Solution explorer, right click on MainPage.xaml and select Open in Blend. Now you should see “Welcome to MVVM Light [Design]” What happens here is that Expression Blend runs different code at design time than the application runs at runtime. To do this, we use design-time detection (as explained in a previous article) and use that information to initialize a different data service at design time. To understand this better, open the ViewModelLocator.cs file in the ViewModel folder and see how the DesignDataService is used at design time, while the DataService is used at runtime. In a real-life applicationm, DataService would be used to connect to a web service, for instance. When design time data fails Sometimes however, the creation of design time data fails. It can be very difficult to understand exactly what is happening. Expression Blend is not giving a lot of information about what happened. Thankfully, we can use a trick: Attaching a debugger to Expression Blend and debug the design time code. In WPF and Silverlight (including Windows Phone 7), you could simply attach the debugger to Blend.exe (using the “Managed (v4.5, v4.0) code” option even for Silverlight!!) In Windows 8 however, things are just a bit different. This is because the designer that renders the actual representation of the Windows 8 app runs in its own process. Let’s illustrate that: Open the file DesignDataService in the Design folder. Modify the GetData method to look like this: public void GetData(Action<DataItem, Exception> callback) { throw new Exception(); // Use this to create design time data var item = new DataItem("Welcome to MVVM Light [design]"); callback(item, null); } Go to Blend and build the application. The build succeeds, but now the page is empty. The creation of the design time data failed, but we don’t get a warning message. We need to investigate what’s wrong. Close MainPage.xaml Go to Visual Studio and select the menu Debug, Attach to Process. Update: Make sure that you select “Managed (v4.5, v4.0) code” in the “Attach to” field. Find the process named XDesProc.exe. You should have at least two, one for the Visual Studio 2012 designer surface, and one for Expression Blend. Unfortunately in this screen it is not obvious which is which. Let’s find out in the Task Manager. Press Ctrl-Alt-Del and select Task Manager Go to the Details tab and sort the processes by name. Find the one that says “Blend for Microsoft Visual Studio 2012 XAML UI Designer” and write down the process ID. Go back to the Attach to Process dialog in Visual Studio. sort the processes by ID and attach the debugger to the correct instance of XDesProc.exe. Open the MainViewModel (in the ViewModel folder) Place a breakpoint on the first line of the MainViewModel constructor. Go to Blend and open the MainPage.xaml again. At this point, the debugger breaks in Visual Studio and you can execute your code step by step. Simply step inside the dataservice call, and find the exception that you had placed there. Visual Studio gives you additional information which helps you to solve the issue. More info and Conclusion I want to thank the amazing people on the Expression Blend team for being very fast in guiding me in that matter and encouraging me to blog about it. More information about the XDesProc.exe process can be found here. I had to work on a Windows 8 app for a few days without design time data because of an Exception thrown somewhere in the code, and it was really painful. With the debugger, finding the issue was a simple matter of stepping into the code until it threw the exception.   Laurent Bugnion (GalaSoft) Subscribe | Twitter | Facebook | Flickr | LinkedIn

    Read the article

  • Resizing QT's QTextEdit to Match Text Height: maximumViewportSize()

    - by Aaron
    I am trying to use a QTextEdit widget inside of a form containing several QT widgets. The form itself sits inside a QScrollArea that is the central widget for a window. My intent is that any necessary scrolling will take place in the main QScrollArea (rather than inside any widgets), and any widgets inside will automatically resize their height to hold their contents. I have tried to implement the automatic resizing of height with a QTextEdit, but have run into an odd issue. I created a sub-class of QTextEdit and reimplemented sizeHint() like this: QSize OperationEditor::sizeHint() const { QSize sizehint = QTextBrowser::sizeHint(); sizehint.setHeight(this->fitted_height); return sizehint; } this-fitted_height is kept up-to-date via this slot that is wired to the QTextEdit's "contentsChanged()" signal: void OperationEditor::fitHeightToDocument() { this->document()->setTextWidth(this->viewport()->width()); QSize document_size(this->document()->size().toSize()); this->fitted_height = document_size.height(); this->updateGeometry(); } The size policy of the QTextEdit sub-class is: this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); I took this approach after reading this post. Here is my problem: As the QTextEdit gradually resizes to fill the window, it stops getting larger and starts scrolling within the QTextEdit, no matter what height is returned from sizeHint(). If I initially have sizeHint() return some large constant number, then the QTextEdit is very big and is contained nicely within the outer QScrollArea, as one would expect. However, if sizeHint gradually adjusts the size of the QTextEdit rather than just making it really big to start, then it tops out when it fills the current window and starts scrolling instead of growing. I have traced this problem to be that, no matter what my sizeHint() returns, it will never resize the QTextEdit larger than the value returned from maximumViewportSize(), which is inherited from QAbstractScrollArea. Note that this is not the same number as viewport()-maximumSize(). I am unable to figure out how to set that value. Looking at QT's source code, maximumViewportSize() is returning "the size of the viewport as if the scroll bars had no valid scrolling range." This value is basically computed as the current size of the widget minus (2 * frameWidth + margins) plus any scrollbar widths/heights. This does not make a lot of sense to me, and it's not clear to me why that number would be used anywhere in a way that supercede's the sub-class's sizeHint() implementation. Also, it does seem odd that the single "frameWidth" integer is used in computing both the width and the height. Can anyone please shed some light on this? I suspect that my poor understanding of QT's layout engine is to blame here.

    Read the article

  • Can't Prevent Nested Div's from Overflowing when using Percent Sizes and Padding in CSS?

    - by viatropos
    I want to be able to layout nested divs with these properties: width: 100% height: 100% padding: 10px I want it to be such that, the children are 100% width and height of the remaining space after padding is calculated, not before. Otherwise, when I have a document like the below example, the child makes the scrollbars appear. But the scrollbars are not the main issue, the fact that the child stretches beyond the width of the parent container is. I can use all position: absolute declarations, but that doesn't seem right. Here is the code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=7"> <title>Liquid Layout</title> <style> body, html { width:100%; height:100%; margin:0; padding:0; background-color:black; } #container { position:relative; width:100%; height:100%; background-color:red; opacity:0.7; } #child1 { position:relative; width:100%; height:100%; padding:10px; background-color:blue; } #nested1 { position:relative; background-color: white; width:100%; height:100%; } </style> </head> <body> <div id="container"> <div id="child1"> <div id="nested1"></div> </div> </div> </body> </html> How do I make it so, using position:relative or position:static, and percent sizes, the percents size the children according to the parent's width/height minus padding and margins? Do I have to resort to position:absolute and left/right/top/bottom? Thanks for the help, Lance

    Read the article

  • extremely small gap between two divs that are width 100%

    - by Naomi K
    hi I have two container divs one of them has a div with an image background and i think this is the div that is causing problem. I tried removing both container divs and the gap was still here. there are no margins no paddings, and i know it is not the image that has this line its not there when i open it in photoshop. I am also using css reset Where is this space coming from? css .container{ width:100%; } .container2{ width:100%; } .first-image{ width:1430px; height:497px; background-image:url('../images/introimg.jpg'); background-repeat:no-repeat; background-size: 100%; border:none; } .jamey{ width:35%; } .second-image{ width:1430px; height:430px; background-image:url('../images/secondimg.jpg'); background-repeat:no-repeat; background-size: 100%; } html <div class="container"> <div class="wrapper"> <div id="overlay"></div> <div class="first-image"> <div class="jamey"> <p class="def"> JAMEY </p> <p class="rip-date">03.02.1997 - 09.18.2011</p> <p class="def2">Anonymous hate messages were posted on his Formspring account including one that claimed:</p> </div> </div> </div> </div> <div class="container2"> <div class="intro-div"> <div class="end-hate"> <h1>PUT AN END TO HATE.</h1> <p> ANYTHING WRITTEN ONLINE can become viral </p> <p> We believe that the way we behave online should be no different from the way that we behave in </p> <button type="button">JOIN CAMPAIGN</button> </div> </div>

    Read the article

  • how to align floats in IE6

    - by rei
    Good day! I am having problems displaying floated paragraphs and images in IE6. There was no problem displaying those in Opera and Firefox,though. I have three divs inside a container. Each div has its own paragraph and image either floated to the left or right. In order for me to achieve a desired layout, I set negative margins on most of the paragraphs and images. Here is how I aligned the floats: ----- CSS code for the first div ----- .row1 { float:left; width:790px; height:460px; margin:5px 0 0 40px; } .pic1 { float:right; height:460px; width:382px; margin:-100px -50px 0 -60px; } h2, p { font-family:Arial, Helvetica, sans-serif; } .row1 p { font-size:12px; text-indent:20px; font-weight:bold; text-align:justify; margin:-10px -25px 0 0; position:relative; } ----------- code for the 2nd div ------------- .row2 { float:left; width:790px; height:234px; margin:-185px 0 0 28px; position:relative; } .row2 p { float:right; font-size:12px; font-weight:bold; text-align:justify; text-indent:20px; margin:-195px 258px 0 175px; position:relative; } .pic2 { float:left; } --------- code for the 3rd div --------------- .row3 { float:left; width:790px; height:203px; margin:-10px 0 0 40px; position:relative; } .row3 p { float:left; font-size:12px; font-weight:bold; text-indent:20px; text-align:justify; margin:-180px 265px 0 10px; position:relative; } .pic3 { float:right; } ///////// The paragraphs seem to be far away from the images when viewed in IE6. Some paragraphs are overlapping with other images. I hope you can help me with this one. Thanks, Rei

    Read the article

  • Bullet indents in PowerPoint 2007 compatibility mode via .NET interop issue

    - by L. Shaydariv
    Hello. I've got a really difficult bug and I can't see the fix. The subject drives me insane for real for a long time. Let's consider the following scenario: 1) There is a PowerPoint 2003 presentation. It contains the only slide and the only shape, but the shape contains a text frame including a bulleted list with a random textual representation structure. 2) There is a requirement to get bullet indents for every bulletted paragraph using PowerPoint 2007. I can satisfy the requirement opening the presentation in the compatibility mode and applying the following VBA script: With ActivePresentation Dim sl As Slide: Set sl = .Slides(1) Dim sh As Shape: Set sh = sl.Shapes(1) Dim i As Integer For i = 1 To sh.TextFrame.TextRange.Paragraphs.Count Dim para As TextRange: Set para = sh.TextFrame.TextRange.Paragraphs(i, 1) Debug.Print para.Text; para.indentLevel, sh.TextFrame.Ruler.Levels(para.indentLevel).FirstMargin Next i End With that produces the following output: A 1 0 B 1 0 C 2 24 D 3 60 E 5 132 Obviously, everything is perfect indeed: it has shown the proper list item text, list item level and its bullet indent. But I can't see the way of how I can reach the same result using C#. Let's add a COM-reference to Microsoft.Office.Interop.PowerPoint 2.9.0.0 (taken from MSPPT.OLB, MS Office 12): // presentation = ...("presentation.ppt")... // a PowerPoint 2003 presentation Slide slide = presentation.Slides[1]; Shape shape = slide.Shapes[1]; for (int i = 1; i<=shape.TextFrame.TextRange.Paragraphs(-1, -1).Count; i++) { TextRange paragraph = shape.TextFrame.TextRange.Paragraphs(i, 1); Console.WriteLine("{0} {1} {2}", paragraph.Text, paragraph.IndentLevel, shape.TextFrame.Ruler.Levels[paragraph.IndentLevel].FirstMargin); } Oh, man... What's it? I've got problems here. First, the paragraph.Text value is trimmed until the '\r' character is found (however paragraph.Text[0] really returns the first character O_o). But it's ok, I can shut my eyes to this. But... But, second, I can't understand why the first margins are always zero and it does not matter which level they belong to. They are always zero in the compatibility mode... It's hard to believe it... :) So is there any way to fix it or just to find a workaround? I'd like to accept any help regarding to the solution of the subject. I can't even find any article related to the issue. :( Probably you have ever been face to face with it... Or is it just a bug with no fix and must it be reported to Microsoft? Thanks you.

    Read the article

  • Scrolling RelativeLayout- white border over part of the content

    - by Tanis.7x
    I have a fairly simply Fragment that adds a handful of colored ImageViews to a RelativeLayout. There are more images than can fit on screen, so I implemented some custom scrolling. However, When I scroll around, I see that there is an approximately 90dp white border overlapping part of the content right where the edges of the screen are before I scroll. It is obvious that the ImageViews are still being created and drawn properly, but they are being covered up. How do I get rid of this? I have tried: Changing both the RelativeLayout and FrameLayout to WRAP_CONTENT, FILL_PARENT, MATCH_PARENT, and a few combinations of those. Setting the padding and margins of both layouts to 0dp. Example: Fragment: public class MyFrag extends Fragment implements OnTouchListener { int currentX; int currentY; RelativeLayout container; final int[] colors = {Color.BLACK, Color.RED, Color.BLUE}; @Override public View onCreateView(LayoutInflater inflater, ViewGroup fragContainer, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_myfrag, null); } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); container = (RelativeLayout) getView().findViewById(R.id.container); container.setOnTouchListener(this); // Temp- Add a bunch of images to test scrolling for(int i=0; i<1500; i+=100) { for (int j=0; j<1500; j+=100) { int color = colors[(i+j)%3]; ImageView image = new ImageView(getActivity()); image.setScaleType(ImageView.ScaleType.CENTER); image.setBackgroundColor(color); LayoutParams lp = new RelativeLayout.LayoutParams(100, 100); lp.setMargins(i, j, 0, 0); image.setLayoutParams(lp); container.addView(image); } } } @Override public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: { currentX = (int) event.getRawX(); currentY = (int) event.getRawY(); break; } case MotionEvent.ACTION_MOVE: { int x2 = (int) event.getRawX(); int y2 = (int) event.getRawY(); container.scrollBy(currentX - x2 , currentY - y2); currentX = x2; currentY = y2; break; } case MotionEvent.ACTION_UP: { break; } } return true; } } XML: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" tools:context=".FloorPlanFrag"> <RelativeLayout android:id="@+id/container" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </FrameLayout>

    Read the article

  • Changing an Action Type="click" to an auto action in SVG

    - by Dustin Myers
    I have a SVG document that I exported from Visio 2003 that would like to edit. This file has an action where you click a button it will navigate to a new screen. What I would like to do is have the navigation be based off of a data point rather than having to click the button. As an example I have a dynamic point data being brought into the SVG file and when that value changes from 0 to 1, I want this screen to automatically navigate to another screen. Below is the code I for clicking the button. <title content="structured text">Sheet.1107</title> <desc content="structured text">Button 1</desc> <v:custProps> <v:cp v:ask="false" v:langID="1033" v:invis="false" v:cal="0" v:val="VT4(Test Graphic 2)" v:type="0" v:prompt="" v:nameU="ObjRef" v:sortKey="" v:lbl="" v:format=""/> <v:cp v:ask="false" v:langID="1033" v:invis="false" v:cal="0" v:val="VT4(SF-S)" v:type="0" v:prompt="" v:nameU="DataPt" v:sortKey="" v:lbl="" v:format=""/> </v:custProps> <v:userDefs> <v:ud v:prompt="" v:nameU="NAVIGATE" v:val="VT4(NAVIGATE Test Graphic 2,&apos;&apos;,)"/> </v:userDefs> <v:textBlock v:margins="rect(4,4,4,4)"/> <v:textRect width="125.01" height="35" cx="62.5" cy="517.5"/> <rect x="0" width="125" y="500" height="35" class="st3"/> <text x="40.15" y="521.1" v:langID="1033" class="st4"><v:paragraph v:horizAlign="1"/><v:tabList/>Button 1</text> <jci:action type="click" count="1">if(evt.button == 0) nav(&apos;Test Graphic 2&apos;,&apos;&apos;,&apos;&apos;);</jci:action></g></a> In the above code I am bringing in the data value from SF-S. Once that value is equal to 1 I want this screen to automatically navigate to Test Graphic 2. I don't have any experience with coding so I am hoping someone here will be able to help me. Thanks, DMyers

    Read the article

  • HTML-like GUI Framework in Java

    - by wintermute
    I was recently brought onto a project where we are developing a lot GUI elements for BlackBerry devices. The standard RIM APIs are pretty basic, almost never do what is required and are difficult or impossible to extend, so we end up re-implementing chunks of it. Currently the code we have isn't super organized and factored so there are lots of little tricks that get implemented over and over again. I had a thought about how to aid development efforts on this platform and wanted to see if the community could tell me if I'm still sane or if I've gone totally nuts. By far, the biggest organizational problem I've run into is making sure that each screen is laid out properly with proper padding and such. The current approach is to manually keep track of padding like so: protected void sublayout(int width, int height) { final int padding = 5; int y = padding; int x = padding; layoutChild(_someChild, width - padding * 2, height / 3 - padding * 2); setPositionChild(_someChild, x, y); y += _someChild.getHeight() + padding; // Calculate where to start drawing next. /* ... snipped ... */ } As you can see, positioning elements on a screen is a nightmare due to the tedium. I have investigated other GUI frameworks but, for a variety of reasons, it is difficult to find one that suites our purposes. One potential solution that came to me is to create a GUI framework who's API resembles HTML/CSS. This would allow for things like padding, margins, borders and colours to be handled through a sort of CSS API while the content would be organized using the HTML part of the API. It might look something like this: public class OptionsScreen extends Document { public OptionsScreen() { // You would set the style (like CSS style) through the constructor. Div content = new Div(new Style(new Padding(5), Color.BLACK)); // Then build up a tree of elements which can each have their own style's. // Each element knows how to draw itself, but it doesn't have to worry about // manually handling things like padding. // content.addChild(new P("This is a paragraph", new Style(new Padding(), Color.RED))); Ul list = new Ul(); list.addChild(new Li("item 1")); list.addChild(new Li("item 2")); content.addChild(list); addChild(content); } } I can imagine this making it easier to customize the UI of our app (which is very important) with different fonts, colours and layouts. Does this idea belong on The Daily WTF or do you think there is some promise?

    Read the article

  • problem with JsonStore and JsonReader

    - by kalan
    Hello, In my ExtJS application I use EditorGridPanel to show data from server. var applicationsGrid = new Ext.grid.EditorGridPanel({ region: 'west', layout: 'fit', title: '<img src="../../Content/img/app.png" /> ??????????', collapsible: true, margins: '0 0 5 5', split: true, width: '30%', listeners: { 'viewready': { fn: function() { applicationsGridStatusBar.setText('??????????: ' + applicationsStore.getTotalCount()); } } }, store: applicationsStore, loadMask: { msg: '????????...' }, sm: new Ext.grid.RowSelectionModel({ singleSelect: true, listeners: { 'rowselect': { fn: applicationsGrid_onRowSelect} } }), viewConfig: { forceFit: true }, tbar: [{ icon: '../../Content/img/add.gif', text: '????????' }, '-', { icon: '../../Content/img/delete.gif', text: '???????' }, '-'], bbar: applicationsGridStatusBar, columns: [{ header: '??????????', dataIndex: 'ApplicationName', tooltip: '???????????? ??????????', sortable: true, editor: { xtype: 'textfield', allowBlank: false } }, { header: '<img src="../../Content/img/user.png" />', dataIndex: 'UsersCount', align: 'center', fixed: true, width: 50, tooltip: '?????????? ????????????? ??????????', sortable: true }, { header: '<img src="../../Content/img/role.gif" />', dataIndex: 'RolesCount', align: 'center', fixed: true, width: 50, tooltip: '?????????? ????? ??????????', sortable: true}] }); When I use JsonStore without reader it works, but when I try to update any field it uses my 'create' url instead of 'update'. var applicationsStore = new Ext.data.JsonStore({ root: 'applications', totalProperty: 'total', idProperty: 'ApplicationId', messageProperty: 'message', fields: [{ name: 'ApplicationId' }, { name: 'ApplicationName', allowBlank: false }, { name: 'UsersCount', allowBlank: false }, { name: 'RolesCount', allowBlank: false}], id: 'app1234', proxy: new Ext.data.HttpProxy({ api: { create: '/api/applications/getapplicationslist1', read: '/api/applications/getapplicationslist', update: '/api/applications/getapplicationslist2', destroy: '/api/applications/getapplicationslist3' } }), autoSave: true, autoLoad: true, writer: new Ext.data.JsonWriter({ encode: false, listful: false, writeAllFields: false }) }); I believe that the problem is that I don't use reader, but when I use JsonReader grid stops showing any data at all. var applicationReader = new Ext.data.JsonReader({ root: 'applications', totalProperty: 'total', idProperty: 'ApplicationId', messageProperty: 'message', fields: [{ name: 'ApplicationId' }, { name: 'ApplicationName', allowBlank: false }, { name: 'UsersCount', allowBlank: false }, { name: 'RolesCount', allowBlank: false}] }); var applicationsStore = new Ext.data.JsonStore({ id: 'app1234', proxy: new Ext.data.HttpProxy({ api: { create: '/api/applications/getapplicationslist1', read: '/api/applications/getapplicationslist', update: '/api/applications/getapplicationslist2', destroy: '/api/applications/getapplicationslist3' } }), reader: applicationReader, autoSave: true, autoLoad: true, writer: new Ext.data.JsonWriter({ encode: false, listful: false, writeAllFields: false }) }); So, does anyone know what the problem might be and how to solve it. The data returned from my server is Json-formated and seams to be ok {"message":"test","total":2,"applications":[{"ApplicationId":"f82dc920-17e7-45b5-98ab-03416fdf52b2","ApplicationName":"Archivist","UsersCount":6,"RolesCount":3},{"ApplicationId":"054e2e78-e15f-4609-a9b2-81c04aa570c8","ApplicationName":"Test","UsersCount":1,"RolesCount":0}]}

    Read the article

  • Planning to create PDF files in Ruby on Rails

    - by deau
    Hi there, A Ruby on Rails app will have access to a number of images and fonts. The images are components of a visual layout which will be stored separately as a set of rules. The rules specify document dimensions along with which images are used and where. The app needs to take these rules, fetch the images, and generate a PDF that is ready for local printing or emailing. The fonts will also be important. The user needs to customize the layout by inputting text which will be included in the PDF. The PDF must therefore also contain the desired font so that the document renders identically across different machines. Each PDF may have many pages. Each page may have different dimensions but this is not essential. Either way, the ability to manipulate the dimensions and margins given by the PDF is essential. The only thing that needs to be regularly changed is the text. If this is takes too much development then the app can store the layouts in 3rd party PDFs and edit the textual content directly. Eventually though, this will prove too restrictive on the apps intended functionality so I would prefer the app to generate the PDF's itself. I have never worked with PDFs before and, for the most part, I've never had to output anything to the user outside their monitor. A printed medium could require a very different approach to get the best results. If anyone has any advice on how to model the PDF format this it would be really appreciated. The technical aspects of printing such as bleed, resolution and colour have already been factored in to the layouts and images. I am aware that PDF is a proprietary file format and I want to use free or open source software. I have seen a number of Ruby libraries for generating PDF files but because I am new on this scene I have no way to reliably compare them and too little time to implement and test them all. I also have the option of using C to handle this feature and if this is process intensive then that might be preferred. What should I be thinking about and how should I be planning to implement this?

    Read the article

< Previous Page | 6 7 8 9 10 11 12  | Next Page >