Search Results

Search found 1071 results on 43 pages for 'widgets'.

Page 13/43 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Sandbox architecture in ASP.NET?

    - by Srikanth
    Is it possible to develop a web-app in ASP.NET (framework is not a constraint), to have a sandbox architecture, and deploy widgets without disturbing the parent application? I expect both the parent application and the widget to be developed using .NET. EDIT: To elaborate, I want to have an web-app, say App1, and widgets (say wid1 and wid2). wid1 and wid2 should be like a plugin into App1, only difference is that, if I make any changes to wid1, I want to be able to deploy it without disturbing App1 or Wid2. The widgets can be something similar to a flash object, only that it needs to be developed on .net.

    Read the article

  • Windows 7 Seems to break SWT Control.print(GC)

    - by GreenKiwi
    A bug has been filed and fixed (super quickly) in SWT: https://bugs.eclipse.org/bugs/show_bug.cgi?id=305294 Just to preface this, my goal here is to print the two images into a canvas so that I can animate the canvas sliding across the screen (think iPhone), sliding the controls themselves was too CPU intensive, so this was a good alternative until I tested it on Win7. I'm open to anything that will help me solve my original problem, it doesn't have to be fixing the problem below. Does anyone know how to get "Control.print(GC)" to work with Windows 7 Aero? I have code that works just fine in Windows XP and in Windows 7, when Aero is disabled, but the command: control.print(GC) causes a non-top control to be effectively erased from the screen. GC gc = new GC(image); try { // As soon as this code is called, calling "layout" on the controls // causes them to disappear. control.print(gc); } finally { gc.dispose(); } I have stacked controls and would like to print the images from the current and next controls such that I can "slide" them off the screen. However, upon printing the non-top control, it is never redrawn again. Here is some example code. (Interesting code bits are at the top and it will require pointing at SWT in order to work.) Thanks for any and all help. As a work around, I'm thinking about swapping controls between prints to see if that helps, but I'd rather not. import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StackLayout; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.graphics.GC; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; public class SWTImagePrintTest { private Composite stack; private StackLayout layout; private Label lblFlip; private Label lblFlop; private boolean flip = true; private Button buttonFlop; private Button buttonPrint; /** * Prints the control into an image * * @param control */ protected void print(Control control) { Image image = new Image(control.getDisplay(), control.getBounds()); GC gc = new GC(image); try { // As soon as this code is called, calling "layout" on the controls // causes them to disappear. control.print(gc); } finally { gc.dispose(); } } /** * Swaps the controls in the stack */ private void flipFlop() { if (flip) { flip = false; layout.topControl = lblFlop; buttonFlop.setText("flop"); stack.layout(); } else { flip = true; layout.topControl = lblFlip; buttonFlop.setText("flip"); stack.layout(); } } private void createContents(Shell shell) { shell.setLayout(new GridLayout(2, true)); stack = new Composite(shell, SWT.NONE); GridData gdStack = new GridData(GridData.FILL_BOTH); gdStack.horizontalSpan = 2; stack.setLayoutData(gdStack); layout = new StackLayout(); stack.setLayout(layout); lblFlip = new Label(stack, SWT.BOLD); lblFlip.setBackground(Display.getCurrent().getSystemColor( SWT.COLOR_CYAN)); lblFlip.setText("FlIp"); lblFlop = new Label(stack, SWT.NONE); lblFlop.setBackground(Display.getCurrent().getSystemColor( SWT.COLOR_BLUE)); lblFlop.setText("fLoP"); layout.topControl = lblFlip; stack.layout(); buttonFlop = new Button(shell, SWT.FLAT); buttonFlop.setText("Flip"); GridData gdFlip = new GridData(); gdFlip.horizontalAlignment = SWT.RIGHT; buttonFlop.setLayoutData(gdFlip); buttonFlop.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { flipFlop(); } }); buttonPrint = new Button(shell, SWT.FLAT); buttonPrint.setText("Print"); GridData gdPrint = new GridData(); gdPrint.horizontalAlignment = SWT.LEFT; buttonPrint.setLayoutData(gdPrint); buttonPrint.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { print(lblFlip); print(lblFlop); } }); } /** * @param args */ public static void main(String[] args) { Shell shell = new Shell(); shell.setText("Slider Test"); shell.setSize(new Point(800, 600)); shell.setLayout(new GridLayout()); SWTImagePrintTest tt = new SWTImagePrintTest(); tt.createContents(shell); shell.open(); Display display = Display.getDefault(); while (shell.isDisposed() == false) { if (display.readAndDispatch() == false) { display.sleep(); } } display.dispose(); } }

    Read the article

  • F# Extention Methods on Lists, IEnumberable, etc

    - by flevine100
    I have searched StackOverflow (and other sources) for this answer, but can't seem to find anything. In C#, if I had a widget definition, say: class widget { public string PrettyName() { ... do stuff here } } and I wanted to allow for easy printing of a list of Widgets, I might do this: namespace ExtensionMethods { public static PrintAll( this IEnumerable<Widget> widgets, TextWriter writer ) { foreach(var w in widgets) { writer.WriteLine( w.PrettyName() ) } } } How would I accomplish something similar with a record type and a collection (List or Seq preferrably in F#). I'd love to have a list of Widgest and be able to call a function right on the collection that did something like this. Assume (since it's F#) that the function would not be changing the state of the collection that it's attached to, but returning some new value.

    Read the article

  • Multiple classes in body tag, multi-dimensional css structure or blueprint for insanity?

    - by mwiik
    This question is about an approach to css structuring, and so is more discussion oriented. I'm working with some outsourced css where the body tags have multiple classes assigned, up to half a dozen. (To make things a little worse, none of the css selectors include an html tag which is making it confusing to analyze the css.) These body classes are then used to modify classed or id'd widgets within. It seems like this approach is like adding an additional dimension to the css, perhaps in some attempt to create a structured css approach. Documentation might have helped, had we been provided any. This differs from my approach where widgets are styled primarily via id'd divs, perhaps extracting the more generic elements into a class, i.e. div#MyWidget.widgets. Any ideas on whether such an approach is maintainable, especially considering I am dealing with websites with thousands of pages including tons of legacy stuff, all done by different people with different skill levels? Thanks...

    Read the article

  • Can I grant explicit Javascript methods to a different-host iframe?

    - by Matchu
    I'm thinking about a system in which I allow users to create Javascript-empowered widgets for other users to embed in their dashboard on my website. I'd like to limit these widgets fairly strictly, so each would exist as an iframe kept on its own unique hostname: the widget with ID #47 would be accessible at w47.widgets.example.com, for example. It would be helpful, for permission-granting dialogs and the like, to allow the widget to call very specific methods explicitly granted by the parent window, without authorizing the iframe to do whatever it likes with the parent frame on the user's behalf. Is it possible for a parent document to explicitly allow certain method calls to a child document on a different host?

    Read the article

  • What is the best way to store categorical references in SQL tables?

    - by jlafay
    I'm wanting to store a wide array of categorical data in MySQL database tables. Let's say that for instance I want to to information on "widgets" and want to categorize attributes in certain ways, i.e. shape category. For instance, the widgets could be classified as: round, square, triangular, spherical, etc. Should these categories be stored within a table to reference them best from an application? Another possibility, I would imagine, would be to add a column to widgets that contained a shape column that contained a tiny int. That way my application could search shapes by that and then use a coordinating enum type that would map the shape int meanings. Which would be best? Or is there another solution that I'm not thinking of yet?

    Read the article

  • How can I search based on distance with the Google Maps API?

    - by Shamoon
    So here's the issue... I have a field where users can type in their address (which will be GeoCoded via Google Maps API). I have several addresses of widgets in my database (saved as address.. again can easily be geocoded). What I need is for the user to type in their address and for a list of my widgets to come up based on distance from their address. I have THOUSANDS of addresses for my widgets and users have an infinite number of addresses obviously. Any ideas? Thanks.

    Read the article

  • Where do you put non-controller classes in codeigniter?

    - by sprugman
    I've got a class Widgets. Widgets are made up of Doohickies. I'm never going to need to access Doohickies directly via url -- they're essentially a private class, only used by Widgets. Where do you put your code to define the Doohicky class? In /app/controllers/doohicky.php? in app/controllers/widget.php? somewhere else? Obviously, the former seems cleaner, but it's not obvious to me how to make the Doohicky class available to Widget.

    Read the article

  • Analog of Java Form Layout in Qt

    - by Narek
    Once I have programmed GUI with Java and have used Form Layouts. Form layout (if I am not mistaken that is from SWT library) made possible to give right, left, top and bottom adges of any GUI element (widget) with respect to other widgets in the same widget (parent widget) or with respect to the adges of parent widget. So it was possible to control the future of widgets that are inside of another one, when that "another widget" is being resized. In Qt I have find the QFormLayout which is similar to Java one, but seems I can't handle with widgets as flexible in terms of relative positioning, as it was with Java's Form Layout. So are there any other means to give a widget position with respect to the others (without overloading resizeEvent function) as that was in Java? Thanks.

    Read the article

  • How to handle request/response propagation up and down a widget hierarchy in a GUI app?

    - by fig-gnuton
    Given a GUI application where widgets can be composed of other widgets: If the user triggers an event resulting in a lower level widget needing data from a model, what's the cleanest way to be able to send that request to a controller (or the datastore itself)? And subsequently get the response back to that widget? Presumably one wouldn't want the controller or datastore to be a singleton directly available to all levels of widgets, or is this an acceptable use of singleton? Or should a top level controller be injected as a dependency through a widget hierarchy, as far down as the lowest level widget that might need that controller? Or a different approach entirely?

    Read the article

  • Secret Server 7.3 released – store your team’s passwords securely.

    - by thycotic
    The Thycotic team just recently released 7.3 of our enterprise password management system.  The main improvement was the UI – we used lots of jQuery to make a Dashboard-like interface that allows you to create tabs, drag widgets, add/remove widgets etc.  This was a great face lift for a tool that is already the cornerstone for password management in many IT departments. Check out a few videos that show off the new stuff.   Jonathan Cogley is the CEO of Thycotic Software, an agile software services and product development company based in Washington DC.  Secret Server is our flagship enterprise password manager.

    Read the article

  • Quickly, syntax error: media_grid.show()

    - by Alex
    i run the app and get this error. the little arrow points to the 'd', dont know what that means. plus i had the same error just before but on this line: from quickly.widgets.dictionary grid import DictionaryGrid the arrow pointed to the 'd' in grid as well. then i changed it to this: from quickly.widgets.dictionary_grid import DictionaryGrid i added a '_' in the middle. and now i have the syntax error in the question. Thanks for any help that is given! Traceback (most recent call last): File "bin/simple-player", line 32, in <module> import simple_player File "/home/alex/simple-player/simple_player/__init__.py", line 14, in <module> from simple_player import SimplePlayerWindow File "/home/alex/simple-player/simple_player/SimplePlayerWindow.py", line 51 media_grid.show() ^ SyntaxError: invalid syntax

    Read the article

  • How to enable customers to use their own domain for sites hosted by me

    - by Scott
    I am thinking of running a self-site builder. But was wondering how would I allow customers to use their own domains that they already own. Is that even possible? Let's say my site is www.bestsitebuildingwebsite.com and each customer has urls like this www.bestsitebuildingwebsite.com/frances www.bestsitebuildingwebsite.com/eden www.bestsitebuildingwebsite.com/john And a customer has a domain called widgets.com Is it actually possible domain widgets.com to go to my site somehow and have HASHES on the URL still work (my site makes use of hashes for AJAX queries). And their site still have good SEO with Google? Thanks Scott

    Read the article

  • New Information Center - Reviewing Security For FMW 11g

    - by Daniel Mortimer
    Announcing ... Information Center: Reviewing Security For Oracle Fusion Middleware 11g [ID 1458051.2] has been published.  Screenshot of ID 1458051.2 What is an Information Center? Information Centers use widgets to aggregate knowledge content, such as support documents, product documentation, support community threads, which is pertinent to a given task or intent. Widgets either contain static lists or better still some widgets are dynamic. A dynamic widget uses a query criteria to present a list of support documents relevant to the title / subject matter of the widget. The content of a dynamic widget is refreshed automatically every 24 hours. Once you are in an Information Center, you can use the left hand menu to navigate to other Tasks / Intent Information Centers (e.g "Install and Configure", "Patch", "Troubleshoot", "Upgrade" which are available for the chosen product. Are Information Centers easy to find? You can go straight to the new "Reviewing Security" Information Center by using the hyperlink given above. There are, however, two other methods which make Information Centers easier to find. Browse Knowledge Refine Your Search Browse Knowledge The "Browse Knowledge" is currently found in the "Knowledge" Tab Page in My Oracle Support. As illustrated by the screenshots below, you can find Information Centers by choosing a product (e.g "Oracle Fusion Middleware"), a version and an action / intent. If an Information Center exists for your selection the "Advisor Found" button is enabled. Clicking on this button will take you straight to the desired Information Center.Screenshot - Browse Knowledge 1 Screenshot - Browse Knowledge 2 Screenshot - Browse Knowledge 3 Refine Your Search Refine your search is a dialogue which is triggered by certain keywords that you may enter into the Global Search field in the top right hand corner of My Oracle Support. The "Refine Your Search" works in a similar manner to "Browse Knowledge". Choose your product and version. The appropriate Task / Intent should already be selected for you. Thereafter, click the Go button. Screenshot - Refine Your Search 1 Screenshot - Refine Your Search 2 Screenshot - Refine Your Search 3

    Read the article

  • Keybindings for individual letter keys (not modifier-combinations) on a GtkTextView widget (Gtk3 and PyGI)

    - by monotasker
    I've been able to set several keybord shortcuts for a GtkTextView and a GtkTextEntry using the new css provider system. I'm finding, though, that I only seem to be able to establish keybindings for combinations including a modifier key. The widget doesn't respond to any bindings I set up that use: the delete key the escape key individual letter or punctuation keys alone Here's the code where I set up the css provider for the keybindings: #set up style context keys = Gtk.CssProvider() keys.load_from_path(os.path.join(data_path, 'keybindings.css')) #set up style contexts and css providers widgets = {'window': self.window, 'vbox': self.vbox, 'toolbar': self.toolbar, 'search_entry': self.search_entry, 'paned': self.paned, 'notelist_treeview': self.notelist_treeview, 'notelist_window': self.notelist_window, 'notetext_window': self.notetext_window, 'editor': self.editor, 'statusbar': self.statusbar } for l, w in widgets.iteritems(): w.get_style_context().add_provider(keys, Gtk.STYLE_PROVIDER_PRIORITY_USER) Then in keybindings.css this is an example of what works: @binding-set gtk-vi-text-view { bind "<ctrl>b" { "move-cursor" (display-lines, -5, 0) }; /* 5 lines up */ bind "<ctrl>k" { "move-cursor" (display-lines, -1, 0) }; /* down */ bind "<ctrl>j" { "move-cursor" (display-lines, 1, 0) }; /* up */ } Part of what I'm trying to do is just add proper delete-key function to the text widgets (right now the delete key does nothing at all). So if I add a binding like one of these, nothing happens: bind "Delete" { "delete-selection" () }; bind "Delete" { "delete-from-cursor" (chars, 1) }; The other part of what I want to do is more elaborate. I want to set up something like Vim's command and visual modes. So at the moment I'm just playing around with (a) setting the widget to editable=false by hitting the esc key; and (b) using homerow letters to move the cursor (as a proof-of-concept exercise). So far there's no response from the escape key or from the letter keys, even though the bindings work when I apply them to modifier-key combinations. For example, I do this in the css for the text-widget: bind "j" { "move-cursor" (display-lines, 1, 0) }; /* down */ bind "k" { "move-cursor" (display-lines, -1, 0) }; /* up */ bind "l" { "move-cursor" (logical-positions, 1, 0) }; /* right */ bind "h" { "move-cursor" (logical-positions, -1, 0) }; /* left */ but none of these bindings does anything, even if other bindings in the same set are respected. What's especially odd is that the vim-like movement bindings above are respected when I attach them to a GtkTreeView widget for navigating the tree-view options: @binding-set gtk-vi-tree-view { bind "j" { "move-cursor" (display-lines, 1) }; /* selection down */ bind "k" { "move-cursor" (display-lines, -1) }; /* selection up */ } So it seems like there are limitations or overrides of some kind on keybindings for the TextView widget (and for the del key?), but I can't find documentation of anything like that. Are these just things that can't be done with the css providers? If so, what are my alternatives for non-modified keybindings? Thanks.

    Read the article

  • Getting started with ClojureScript and Google Closure

    - by Andrea
    I would like to investigate whether ClojureScript, with the associated Google Closure library is a reasonable tool to build modern, in-browser, Javascript applications. My current Javascript stack consists of jQuery, Backbone and RequireJS with the possible additions of some widgets libraries like jQueryUI or KendoUI. So it will be quite a big leap (I already know how to work in Clojure, although I have little experience). What is a good roadmap to do so? Should I learn the Google Closure library first, or can I grasp it together with ClojureScript? One thing I am concerned about is the overall application structure. Backbone is rather opinionated on how to organize your application. I am not sure whether Google Closure also includes some components to help with the design of the application. And, if this is the case, I do not know how to tell whether this structure will port to ClojureScript or a ClojureScript application will require a different organization anyway, and only use - say - the widgets and DOM manipulation features of Closure.

    Read the article

  • How do you update copyright notices?

    - by James
    So now it's 2011, and as I carry on coding on our active projects it's time to update some copyright notices. eg. Copyright Widgets Ltd 2010 to Copyright Widgets Ltd 2010, 2011 My question is when do you update the copyright notices? Do you change the notice in the head of a file the first time you work on that file? Since a module is one piece of code consisting of many files that work together, do you update all notices in that module when you change a single file in that module? Since a program is one piece of code (maybe consisting of many modules), do you update all notices in that program when you change a single file in that program? Or do you just go through and change en-mass over your morning coffee on the grounds your about to start programming and updateing things?

    Read the article

  • Assessing Relative Maintainability

    - by João Bragança
    We (a contractor, actually) are implementing an off the shelf system to replace a legacy homegrown system for the core domain of the company (designing widgets). Unfortunately both systems will have to run concurrently for some time, as the product just isn't ready yet. Also, the decision was made to only migrate some of the widgets from the legacy system, based on date of last sale activity. Later on a new requirement came down: certain people in the company, most of them outside of the widget development context, want to search all widgets. The search results screen has 3 pieces of data: a GUID, a human readable id that is searchable, and a brief description (may need to be searchable in the future). In the widget details, there will be multiple screens. These screens align very well along SOA / bounded context lines - a screen for marketing data, a screen for sales history, etc. UML ahead! I am probably using the wrong kind of arrows here so please forgive me. The current solution - which is not in production yet - is something like the following: Both systems will be queried and the controller will merge the results. The new system has its own proprietary query language (we've alleviated this a bit with a LINQ provider). It also puts a lot of data on the wire. 15 search results typically run about 60k of unintelligible SOAP-wrapped xml. So I would prefer to avoid querying this system directly. These two systems publish events to help us integrate with other systems, mainly an ERP system. One of these events contains all the data necessary for the search screen. I proposed the following alternative: However I am being told that 'adding another database' will create more maintenance down the road. However, I believe this to be false, as I had to add a relatively simple feature that took several hours longer than anticipated because of this merging code. I want to get a feel for which system is more maintainable in the long run. I personally have not had the burden of maintaining any large system. I want something more than my gut. Specifically I'd like to know if having more, specialized physical databases is more or less maintainable than having less larger physical databases.

    Read the article

  • Share buttons vs sharer urls

    - by TeeOh
    As some people might know, adding share buttons from Facebook and Twitter can cause a page to slow down. I've seen many sites pass on the common iframe implementations that these sites offer and simply create icons that link to a sharer url for better control of page performance. http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.cnn.com%2F&t=CNN%26s+website%27 However, I've also read that Facebook is dropping support for these links. For example, this link now redirects to the Like Button. http://www.facebook.com/facebook-widgets/share.php Here is an article noting that Facebook is deprecating/has deprecated it's share functionality and is sticking with the Like button. http://www.barbariangroup.com/posts/7544-the_facebook_share_button_has_been_deprecated_called_it I'm assuming this is the same for the sharing url. If the sharer url is no longer a reliable option, what other methods are there besides using 3rd party widgets (like Addthis)?

    Read the article

  • Factory for arrays of objects in python

    - by Vorac
    Ok, the title might be a little misleading. I have a Window class that draws widgets inside itself in the constructor. The widgets are all of the same type. So I pass a list of dictionaries, which contain the parameters for each widget. This works quite nicely, but I am worried that the interface to callers is obfuscated. That is, in order to use Window, one has to study the class, construct a correct list of dictionaries, and then call the constructor with only one parameter - widgets_params. Is this good or bad design? What alternatives does the python syntax provide?

    Read the article

  • Un constructeur de code pour jQuery ? L'équipe de développement propose une autre solution

    Un constructeur de code pour jQuery ? L'équipe de développement propose une autre solution Malgré les interactions entre les composants de base (UI Core, Interactions, Effects) et les widgets UI, jQuery UI possède un constructeur de code qui permet de charger une version personnalisée n'incluant que les widgets vraiment utiles pour le projet en cours. Pour jQuery, les dépendances sont encore plus contraignantes, vous devez tenir compte de votre code, mais aussi de celui des plugins. Selon les options du plugin mises en oeuvre, celui-ci peut même utiliser différentes parties du code de jQuery. Pour faciliter ...

    Read the article

  • Is the title attribute (not tag) important to SEO?

    - by JasonBirch
    The title attribute is an HTML standard element available across most tags. e.g. <li><a title="Widgets listed by household function" href="/widgets/by-function.html">by Function</a></li> I've used this attribute on some sites for usability; many browsers pop up a "tooltip" over the link with the more detailed description of what is on the other side. I've been wondering if doing so is having a negative effect on my rankings (hidden text?) or if it has any effect at all on onsite or offsite keyword relevance calculations. Does anyone know of any research done on this?

    Read the article

  • How does one track down an error using the YII Framework?

    - by ian
    I am learning the Yii Framework and I got this error wich does not really point to the specific pages I am working on or as far as i can tell show me where I should start looking for my problem. How do I make sense of this? As far as I can see all my 'type_id' references are typed in correctly. CException Description Property "Project.type_id" is not defined. Source File /Users/user/Dropbox/localhost/yii/framework/db/ar/CActiveRecord.php(107) 00095: */ 00096: public function __get($name) 00097: { 00098: if(isset($this->_attributes[$name])) 00099: return $this->_attributes[$name]; 00100: else if(isset($this->getMetaData()->columns[$name])) 00101: return null; 00102: else if(isset($this->_related[$name])) 00103: return $this->_related[$name]; 00104: else if(isset($this->getMetaData()->relations[$name])) 00105: return $this->getRelated($name); 00106: else 00107: return parent::__get($name); 00108: } 00109: 00110: /** 00111: * PHP setter magic method. 00112: * This method is overridden so that AR attributes can be accessed like properties. 00113: * @param string property name 00114: * @param mixed property value 00115: */ 00116: public function __set($name,$value) 00117: { 00118: if($this->setAttribute($name,$value)===false) 00119: { Stack Trace #0 /Users/user/Dropbox/localhost/yii/framework/db/ar/CActiveRecord.php(107): CComponent->__get('type_id') #1 /Users/user/Dropbox/localhost/trackstar/protected/views/project/_view.php(15): CActiveRecord->__get('type_id') #2 /Users/user/Dropbox/localhost/yii/framework/web/CBaseController.php(119): require('/Users/user/Dro...') #3 /Users/user/Dropbox/localhost/yii/framework/web/CBaseController.php(88): CBaseController->renderInternal('/Users/user/Dro...', Array, true) #4 /Users/user/Dropbox/localhost/yii/framework/web/CController.php(748): CBaseController->renderFile('/Users/user/Dro...', Array, true) #5 /Users/user/Dropbox/localhost/yii/framework/zii/widgets/CListView.php(215): CController->renderPartial('_view', Array) #6 /Users/user/Dropbox/localhost/yii/framework/zii/widgets/CBaseListView.php(152): CListView->renderItems() #7 [internal function]: CBaseListView->renderSection(Array) #8 /Users/user/Dropbox/localhost/yii/framework/zii/widgets/CBaseListView.php(135): preg_replace_callback('/{(\w+)}/', Array, '{summary}?{sort...') #9 /Users/user/Dropbox/localhost/yii/framework/zii/widgets/CBaseListView.php(121): CBaseListView->renderContent() #10 /Users/user/Dropbox/localhost/yii/framework/web/CBaseController.php(174): CBaseListView->run() #11 /Users/user/Dropbox/localhost/trackstar/protected/views/project/index.php(17): CBaseController->widget('zii.widgets.CLi...', Array) #12 /Users/user/Dropbox/localhost/yii/framework/web/CBaseController.php(119): require('/Users/user/Dro...') #13 /Users/user/Dropbox/localhost/yii/framework/web/CBaseController.php(88): CBaseController->renderInternal('/Users/user/Dro...', Array, true) #14 /Users/user/Dropbox/localhost/yii/framework/web/CController.php(748): CBaseController->renderFile('/Users/user/Dro...', Array, true) #15 /Users/user/Dropbox/localhost/yii/framework/web/CController.php(687): CController->renderPartial('index', Array, true) #16 /Users/user/Dropbox/localhost/trackstar/protected/controllers/ProjectController.php(148): CController->render('index', Array) #17 /Users/user/Dropbox/localhost/yii/framework/web/actions/CInlineAction.php(32): ProjectController->actionIndex() #18 /Users/user/Dropbox/localhost/yii/framework/web/CController.php(300): CInlineAction->run() #19 /Users/user/Dropbox/localhost/yii/framework/web/filters/CFilterChain.php(129): CController->runAction(Object(CInlineAction)) #20 /Users/user/Dropbox/localhost/yii/framework/web/filters/CFilter.php(41): CFilterChain->run() #21 /Users/user/Dropbox/localhost/yii/framework/web/CController.php(999): CFilter->filter(Object(CFilterChain)) #22 /Users/user/Dropbox/localhost/yii/framework/web/filters/CInlineFilter.php(59): CController->filterAccessControl(Object(CFilterChain)) #23 /Users/user/Dropbox/localhost/yii/framework/web/filters/CFilterChain.php(126): CInlineFilter->filter(Object(CFilterChain)) #24 /Users/user/Dropbox/localhost/yii/framework/web/CController.php(283): CFilterChain->run() #25 /Users/user/Dropbox/localhost/yii/framework/web/CController.php(257): CController->runActionWithFilters(Object(CInlineAction), Array) #26 /Users/user/Dropbox/localhost/yii/framework/web/CWebApplication.php(320): CController->run('') #27 /Users/user/Dropbox/localhost/yii/framework/web/CWebApplication.php(120): CWebApplication->runController('project') #28 /Users/user/Dropbox/localhost/yii/framework/base/CApplication.php(135): CWebApplication->processRequest() #29 /Users/user/Dropbox/localhost/trackstar/index.php(12): CApplication->run() #30 {main} 2011-10-17 18:17:18 Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8r DAV/2 PHP/5.3.6 Yii Framework/1.1.2

    Read the article

  • Trying to sentinel loop this program.

    - by roger34
    Okay, I spent all this time making this for class but I have one thing that I can't quite get: I need this to sentinel loop continuously (exiting upon entering x) so that the System.out.println("What type of Employee? Enter 'o' for Office " + "Clerical, 'f' for Factory, or 's' for Saleperson. Enter 'x' to exit." ); line comes back up after they enter the first round of information. Also, I can't leave this up long on the (very) off chance a classmate might see this and steal the code. Full code following: import java.util.Scanner; public class Project1 { public static void main (String args[]){ Scanner inp = new Scanner( System.in ); double totalPay; System.out.println("What type of Employee? Enter 'o' for Office " + "Clerical, 'f' for Factory, or 's' for Saleperson. Enter 'x' to exit." ); String response= inp.nextLine(); while (!response.toLowerCase().equals("o")&&!response.toLowerCase().equals("f") &&!response.toLowerCase().equals("s")&&!response.toLowerCase().equals("x")){ System.out.print("\nInvalid selection,please enter your choice again:\n"); response=inp.nextLine(); } char choice = response.toLowerCase().charAt( 0 ); switch (choice){ case 'o': System.out.println("Enter your hourly rate:"); double officeRate=inp.nextDouble(); System.out.println("Enter the number of hours worked:"); double officeHours=inp.nextDouble(); totalPay = officeCalc(officeRate,officeHours); taxCalc(totalPay); break; case 'f': System.out.println("How many Widgets did you produce during the week?"); double widgets=inp.nextDouble(); totalPay=factoryCalc(widgets); taxCalc(totalPay); break; case 's': System.out.println("What were your total sales for the week?"); double totalSales=inp.nextDouble(); totalPay=salesCalc(totalSales); taxCalc(totalPay); break; } } public static double taxCalc(double totalPay){ double federal=totalPay*.22; double state =totalPay*.055; double netPay = totalPay - federal - state; federal =federal*Math.pow(10,2); federal =Math.round(federal); federal= federal/Math.pow(10,2); state =state*Math.pow(10,2); state =Math.round(state); state= state/Math.pow(10,2); totalPay =totalPay*Math.pow(10,2); totalPay =Math.round(totalPay); totalPay= totalPay/Math.pow(10,2); netPay =netPay*Math.pow(10,2); netPay =Math.round(netPay); netPay= netPay/Math.pow(10,2); System.out.printf("\nTotal Pay \t: %1$.2f.\n", totalPay); System.out.printf("State W/H \t: %1$.2f.\n", state); System.out.printf("Federal W/H : %1$.2f.\n", federal); System.out.printf("Net Pay \t: %1$.2f.\n", netPay); return totalPay; } public static double officeCalc(double officeRate,double officeHours){ double overtime=0; if (officeHours>=40) overtime = officeHours-40; else overtime = 0; if (officeHours >= 40) officeHours = 40; double otRate = officeRate * 1.5; double totalPay= (officeRate * officeHours) + (otRate*overtime); return totalPay; } public static double factoryCalc(double widgets){ double totalPay=widgets*.35 +300; return totalPay; } public static double salesCalc(double totalSales){ double totalPay = totalSales * .05 + 500; return totalPay; } }

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >