Search Results

Search found 10789 results on 432 pages for 'ui scripting'.

Page 67/432 | < Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >

  • replace new lines with comas in shell

    - by mpapis
    I want to replace new lines in text with coma or space but do not change the last new line. I know of this question: How to replace new lines with tab characters - but it does produce an tab on end instead of new line. So far I have come with: awk 'NR>1{printf","} {printf $1} END{printf"\n"}' Is there an easier way to do this? This is not an assignment, I am just curious want to level up my scripting.

    Read the article

  • Android Timer update UI between multiple tasks

    - by Rilcon42
    I have tried multiple ways to have a single persistent timer update the ui in multiple activities, and nothing seems to work. I have tried an AsyncTask, a Handler, and a CountDownTimer. The code below does not execute the first Log.i statement.... Is there a better way to start the timer (which must be called from another class) in Main (which is the only persistent class)? public static void MainLawTimer() { MainActivity.lawTimer = new CountDownTimer(MainActivity.timeLeft, 1000) { public void onTick(long millisUntilFinished) { Log.i("aaa","Timer running. Time left: "+MainActivity.timeLeft); MainActivity.timeLeft--; if(MainActivity.timeLeft<=0) { //do stuff } else { //call method in another class } }

    Read the article

  • 'Table' cannot have children of type 'ListViewDataItem'

    - by kazim sardar mehdi
    I was using System.Web.UI.WebControls.Table System.Web.UI.WebControlsTableRow System.Web.UI.WebControls.TableCell objects inside LayoutTemplate’s InstantiateIn method that’s inherited from ITemplateas stated below:Table = new Table(); when compile got the following error on the YPOD(Yellow page of Death) 'Table' cannot have children of type 'ListViewDataItem'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: 'Table' cannot have children of type 'ListViewDataItem'.   Solution:   I Replaced System.Web.UI.WebControls.Table System.Web.UI.WebControls.TableRow System.Web.UI.WebControls.TableCell withSystem.Web.UI.HtmlControls.HtmlTable System.Web.UI.HtmlControls.HtmlTableRow System.Web.UI.HtmlControls.HtmlTableCell and problem solved.

    Read the article

  • Linking LLVM JIT Code to Static LLVM Libraries?

    - by inflector
    I'm in the process of implementing a cross-platform (Mac OS X, Windows, and Linux) application which will do lots of CPU intensive analysis of financial data. The bulk of the analysis engine will be written in C++ for speed reasons, with a user-accessible scripting engine interfacing with the C++ testing engine. I want to write several scripting front-ends over time to emulate other popular software with existing large user bases. The first front will be a VisualBasic-like scripting language. I'm thinking that LLVM would be perfect for my needs. Performance is very important because of the sheer amount of data; it can take hours or days to run a single run of tests to get an answer. I believe that using LLVM will also allow me to use a single back-end solution while I implement different front-ends for different flavors of the scripting language over time. The testing engine itself will be separated from the interface and testing will even take place in a separate process with progress and results being reported to the testing management interface. Tests will consist of scripting code integrated with the testing engine code. In a previous implementation of a similar commercial testing system I wrote, I built a fast interpreter which easily interfaced with the testing library because it was written in C++ and linked directly to the testing engine library. Callbacks from scripting code to testing library objects involved translating between the formats with significant overhead. I'm imagining that with LLVM, I could implement the callbacks into C++ directly so that I could make the scripting code work almost as if it had been written in C++. Likewise, if all the code was compiled to LLVM byte-code format, it seems like the LLVM optimizers could optimize across the boundaries between the scripting language and the testing engine code that was written in C++. I don't want to have to compile the testing engine every time. Ideally, I'd like to JIT compile only the scripting code. For small tests, I'd skip some optimization passes, while for large tests, I'd perform full optimizations during the link. So is this possible? Can I precompile the testing engine to a .o object file or .a library file and then link in the scripting code using the JIT? Finally, ideally, I'd like to have the scripting code implement specific methods as subclasses for a specific C++ class. So the C++ testing engine would only see C++ objects while the JIT setup code compiled scripting code that implemented some of the methods for the objects. It seems that if I used the right name mangling algorithm it would be relatively easy to set up the LLVM generation for the scripting language to look like a C++ method call which could then be linked into the testing engine. Thus the linking stage would go in two directions, calls from the scripting language into the testing engine objects to retrieve pricing information and test state information and calls from the testing engine of methods of some particular C++ objects where the code was supplied not from C++ but from the scripting language. In summary: 1) Can I link in precompiled (either .bc, .o, or .a) files as part of the JIT compilation, code-generation process? 2) Can I link in code using that the process in 1) above in such a way that I am able to create code that acts as if it was all written in C++?

    Read the article

  • Is this an acceptable UI design decision?

    - by DVK
    OK, while I'm on record as stating that StackExchange UI is pretty much one of the best websites and overall GUIs that I have ever seen as far as usability goes, there's one particular aspect of the trilogy that bugs me. For an example, head on to http://meta.stackoverflow.com . Look at the banner on top (the one that says "reminder -- it's April Fool's Day depending on your time zone!"). Personally, I feel that this is a "make the user do the figuring out work" anti-pattern (whatever it's officially called) - namely, instead of making your app smart enough to only present a certain mode of operations in the conditions when that mode is appropriate, you simply turn on the mode full on and put an explanation to the user of why the mode is on when it should not be (in this particular example, the mode is of course displaying the unicorn gravatars starting with 00:00 in the first timezone, despite the fact that some users still live in March 31st). The Great Recalc was also handled the same way - instead of proactively telling the user "your rep was changed from X to Y" the same nearly invisible banner was displayed on meta. So, the questions are: Is there such an official anti-pattern, and if so,m what the heck do i call it? Do you have any other well-known examples of such design anti-pattern? How would you fix either the SO example I made or you your own example? Is there a pattern of fixing or must it be a case-by-case solution?

    Read the article

  • Richfaces - <rich:Editor> inside jQuery ui dialog

    - by Guus
    I use a <rich:editor> inside a JQuery UI dialog: <div id="helpDialog" style="display: none" title="#{messages.help}"> <rich:editor id="helpTextArea" theme="advanced" value="#{helpUtils.test(helpId)}"> <f:param name="theme_advanced_buttons1" value="bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect,|,forecolor,backcolor"/> <f:param name="theme_advanced_buttons2" value=""/> <f:param name="theme_advanced_buttons3" value=""/> <f:param name="theme_advanced_toolbar_location" value="top"/> <f:param name="width" value="90%"/> <f:param name="theme_advanced_toolbar_align" value="left"/> </rich:editor> <p> <button id="editHelpButton">#{messages.edit}</button> <button id="saveHelpButton">#{messages.save}</button> </p> </div> When I click on "font family" or "font size" the dropdown box is shown in the upper left corner of the screen and not inside the dialog. (see screenshot) How can I fix this? screenshot

    Read the article

  • Highlighting dates between two selected dates jQuery UI Datepicker

    - by Ralph
    I have one datepicker with numberOfMonths set to 2. Arrival Date and Departure Date are determined using this logic (within onSelect): if ((count % 2)==0) { depart = $("#datepicker-1").datepicker('getDate'); if (arriv depart) { temp=arriv; arriv=depart; depart=temp; } $("#check-in").val($.datepicker.formatDate("DD, MM d, yy",arriv)); $("#check-out").val($.datepicker.formatDate("DD, MM d, yy",depart)); } else { arriv = $("#datepicker-1").datepicker('getDate'); depart = null; if ((arriv depart)&&(depart!=null)) { temp=arriv; arriv=depart; depart=temp; } $("#day-count").val(''); $("#check-in").val($.datepicker.formatDate("DD, MM d, yy",arriv)); $("#check-out").val($.datepicker.formatDate("DD, MM d, yy",depart)); } if(depart!=null) { diffDays = Math.abs((arriv.getTime() - depart.getTime())/(oneDay)); if (diffDays == 0) { $("#day-count").val((diffDays+1)+' Night/s'); } else { $("#day-count").val(diffDays+' Night/s'); } } Getting the number of days within these 2 dates has no problem What I want now is highlight those dates starting from the Arrival to Departure I tried working around the onSelect but had no luck. I am now using beforeShowDay to highlight these dates but I can't seem to figure it out Got a sample from here Basically, it is customized to highlight 11 or 12 days after the selected date (Here's the code from that link). $('#datePicker').datepicker({beforeShowDay: function(date) { if (selected != null && date.getTime() selected.getTime() && (date.getTime() - selected.getTime()) Since I am new to using the UI, and the logic is not clear to me yet, I can't seem to figure this out. Any ideas on how I can make this highlight dates between the Arrival and Departure using my aforementioned logic used in determining the two?

    Read the article

  • Using Jquery UI Tab control in ASP.NET MVC

    - by mike3333
    I am new to jquery and am trying out UI plugins. For some reason this following code does not work, in the sense, it does not render the tabs and it's just a bunch of text. But when I copy the page source and paste it in the html page, and put it in the views folder, everything looks great, so , I assume all the js paths are good. Any ideas? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Details $(document).ready(function() { $("#tabs").tabs(); }); <div id="tabs"> <ul> <li><a href="#tabs-1">Text 1</a></li> <li><a href="#tabs-2">Text 2</a></li> <li><a href="#tabs-3">Text 3</a></li> </ul> <div id="tabs-1"> <div>tab1 content - adsfadfadsf</div> </div> <div id="tabs-2"> <div>tab 2 content -adfadfadf </div> </div> <div id="tabs-3"> <div>tab 3 content -adfadfadfadf</div> </div> </div> </div>

    Read the article

  • Eclipse Plugin does not work in FlashBuilder/FlexBuilder Standalone

    - by Janosch
    Hi, created an Eclipse plugin that contributes to the UI by a new project wizard a new menu in the context menu of projects in the Package Explorer a new project nature + builder a new preference page for the plugin The plugin works fine when installed in a normal Eclipse instance with Flex/Flashbuilder as plugin. The problem now is, that the plugin never gets activated when i install it in a Flex/Flashbuilder Standalone instance. Neither of the features described above is available. I even have no idea how to debug this, error-log (workspace/.metadata/.log) the following message appears, (but i dont think it is related to the problem) !ENTRY org.eclipse.ui.workbench 2 0 2009-07-20 17:51:17.984 !MESSAGE A handler conflict occurred. This may disable some commands. !SUBENTRY 1 org.eclipse.ui.workbench 2 0 2009-07-20 17:51:17.984 !MESSAGE Conflict for 'org.eclipse.ui.navigate.openResource': HandlerActivation(commandId=org.eclipse.ui.navigate.openResource, handler=ActionDelegateHandlerProxy(null,org.eclipse.ui.internal.ide.handlers.OpenResourceHandler), expression=AndExpression(ActionSetExpression(org.eclipse.ui.NavigateActionSet,org.eclipse.ui.internal.WorkbenchWindow@1c45731),WorkbenchWindowExpression(org.eclipse.ui.internal.WorkbenchWindow@1c45731)),sourcePriority=16640) HandlerActivation(commandId=org.eclipse.ui.navigate.openResource, handler=ActionDelegateHandlerProxy(null,org.eclipse.ui.internal.ide.handlers.OpenResourceHandler), expression=AndExpression(ActionSetExpression(com.adobe.flexbuilder.standalone.navigate,org.eclipse.ui.internal.WorkbenchWindow@1c45731),WorkbenchWindowExpression(org.eclipse.ui.internal.WorkbenchWindow@1c45731)),sourcePriority=16640) In the "Configuration Details" my feature doesn't show up in the *** Features: section and my plugin doesn't show up in the *** Plugin-in Registry: section. But they appear under Configured features and Configured plug-ins. Starting FlashBuilder with -clean didn't solve the problem. (the start command is now "C:\Programme\Adobe\Flash Builder Beta\Gumbo.exe" -clean) My plugin depends on org.eclipse.ui, org.eclipse.core.runtime, org.eclipse.core.resources, com.adobe.flexbuilder.project com.adobe.flexbuilder.project.ui com.adobe.flexbuilder.ui All of these should be available, as i see it. (and an error should be generated if they were not, i hope)

    Read the article

  • Server Error in '/' Application

    - by sweetsecret
    Server Error in '/' Application. Object must implement IConvertible. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidCastException: Object must implement IConvertible. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [InvalidCastException: Object must implement IConvertible.] System.Convert.ChangeType(Object value, TypeCode typeCode, IFormatProvider provider) +2514354 System.Web.UI.WebControls.Parameter.GetValue(Object value, String defaultValue, TypeCode type, Boolean convertEmptyStringToNull, Boolean ignoreNullableTypeChanges) +264 System.Web.UI.WebControls.Parameter.get_ParameterValue() +66 System.Web.UI.WebControls.ParameterCollection.GetValues(HttpContext context, Control control) +254 System.Web.UI.WebControls.SqlDataSourceView.InitializeParameters(DbCommand command, ParameterCollection parameters, IDictionary exclusionList) +276 System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +754 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70 System.Web.UI.WebControls.GridView.DataBind() +4 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82 System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69 System.Web.UI.Control.EnsureChildControls() +87 System.Web.UI.Control.PreRenderRecursiveInternal() +41 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360

    Read the article

  • Problem with WPF Data Binding Defined in Code Not Updating UI Elements

    - by Ben
    I need to define new UI Elements as well as data binding in code because they will be implemented after run-time. Here is a simplified version of what I am trying to do. Data Model: public class AddressBook : INotifyPropertyChanged { private int _houseNumber; public int HouseNumber { get { return _houseNumber; } set { _houseNumber = value; NotifyPropertyChanged("HouseNumber"); } } public event PropertyChangedEventHandler PropertyChanged; protected void NotifyPropertyChanged(string sProp) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(sProp)); } } } Binding in Code: AddressBook book = new AddressBook(); book.HouseNumber = 123; TextBlock tb = new TextBlock(); Binding bind = new Binding("HouseNumber"); bind.Source = book; bind.Mode = BindingMode.OneWay; tb.SetBinding(TextBlock.TextProperty, bind); // Text block displays "123" myGrid.Children.Add(tb); book.HouseNumber = 456; // Text block displays "123" but PropertyChanged event fires When the data is first bound, the text block is updated with the correct house number. Then, if I change the house number in code later, the book's PropertyChanged event fires, but the text block is not updated. Can anyone tell me why? Thanks, Ben

    Read the article

  • Right to Left UI in iPhone (Hebrew)

    - by Reflog
    Hello, I'm struggling in creating a RTL UI in iPhone application. The framework doesn't seem to have any support for RTL languages. The only thing is the alignment inside labels, which is nice, but it conflicts with other controls behaviour. The question is: Is there a working code for a RTL TableView? Something that would handle the disclosure buttons to be on the left, section titles to be right aligned, index view to be left aligned? As far as I understand I cannot move the index view of the tableview, i have to overlay some custom control... Any suggestions/pointers/examples? p.s. this is not a duplication of this question: http://stackoverflow.com/questions/1677988/right-to-left-alignment-for-uitableview since what I am looking for is a deeper customization, not just a new type of CellView. (Update: Mar 10) For now - I've removed support for indexView from the tableView at all, implemented the cells as custom views by myself (with disclosure buttons on the left), and customized the header/footer of the table as well. the only thing that is left is the Index View. Thanks in advance!

    Read the article

  • "The given key was not present in the dictionary" ASP.NET error on IIS7

    - by eugeneK
    Hi, i have this error on one of my sites. Searched thought all project found no Dictionary of some kind. Read somewhere it could be caused by Url Rewrite module on IIS 7 which i'm using for certain redirects. Error appears on all pages thought the site, 99% sure only on pages that use Url Rewriting This is error's stack at System.ThrowHelper.ThrowKeyNotFoundException() at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at System.Data.DataView.System.Collections.IList.get_Item(Int32 recordIndex) at System.Web.UI.WebControls.ListViewPagedDataSource.EnumeratorOnIList.get_Current() at System.Web.UI.WebControls.ListView.CreateItemsWithoutGroups(ListViewPagedDataSource dataSource, Boolean dataBinding, InsertItemPosition insertPosition, ArrayList keyArray) at System.Web.UI.WebControls.ListView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) at System.Web.UI.WebControls.ListView.PerformDataBinding(IEnumerable data) at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) at System.Web.UI.WebControls.DataBoundControl.PerformSelect() at System.Web.UI.WebControls.ListView.PerformSelect() at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() at System.Web.UI.WebControls.ListView.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)HTTP_CONNECTION:Keep-Alive HTTP_ACCEPT:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-icq, / HTTP_ACCEPT_LANGUAGE:en HTTP_COOKIE:__utma=248870149.1673016949.1252234176.1276449788.1276595165.49; __utmz=248870149.1276595165.49.55.utmcsr=search|utmccn=(organic)|utmcmd=organic|utmctr=???%20??; wooTracker=C1T8MWMAZWQVHJXWROHB25SO4S0B7UO0; __utmb=248870149.6.10.1276595165; __utmc=248870149; wooTracker=C1T8MWMAZWQVHJXWROHB25SO4S0B7UO0; machine-id=87.69.44.154%3A1253914747956; wooMeta=ODAwMzkmMSYxJjc1MDE5JjEyNTUyMTQwODEwMjkmMTI1NTIxNDE1NjA0OCYmMTAwJiYzMDAyODQmJiYm; _csoot=1267959625296; _csuid=X4c1ef311c39a67; ASP.NET_SessionId=zzdn5b45uqyhw145ptqhxe20 HTTP_HOST:**** HTTP_REFERER:***** HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB6) HTTP_X_CEPT_ENCODING:gzip, deflate ***** Is anyone familiar with fix or at least where to look for one ?

    Read the article

  • MVC UI with Mock Controllers?

    - by Jaimal Chohan
    I'm working with Aspnet MVC 2 (R2) and at the same time playing about with the whole alt.net stack. One of this things I would like to be able todo is basically write my Views, and be able to interact with them without having to write the controller logic. E.g. I have a view that displays a list of orders and I can click on an order which redirects to another view where I can edit it, but I don't want to get into the nitty gritty of writing the code to actually get a list of orders, or update an existing ordes. I want to do so I can write UI tests in WaitN/AOT/Selenium without having to worry about whats happening underneath, and also It would help drive my controller logic on a need basis as opposed to guess work based of of the supplied screenshots How do you guys accomplish this atm? Can you provide links ot useful blog posts/tools/framework/articles with information on how to accomplish this p.s. I primarly use Rhino Mocks & NUnit but can happliy change to other tools if they support the above better.

    Read the article

  • Workflow UI Integration - is WF a good approach?

    - by AJ
    Somewhat similar to this question, except we haven't decided that we're going with WF yet. I'm working on designing a system that requires a series of decisions and activities on a "work object," so I naturally began to consider workflow, specifically WF. What I'm wondering is if WF is a good solution for a situation like the following (oversimplified for this question) case (please forgive bad ascii art): __________________ | Gather some info | | (web page) | |__________________| | | / \ / \ / \ / \ / cond \ \ 1 / \ / \ / \ / \ / | | ______________|_______________ | | | | | ______|______ ______|________ / do some / | Get more info | / process / | (web page) | /____________/ |_______________| | | / \ / \ / \ / cond. \ \ 2 / \ / \ / \ / | | |__________________ | | | | _____|_____ _____|_____ / some / / another / / process / / process / /__________/ /__________/ The part I'm struggling with is the get more info (web page) step and what happens subsequent, which would mean a halt in the execution of the workflow runtime. I'm aware that this is possible, but I'm not sure that WF is the best approach for this type of code, as the user interaction may be required at many different points through the entire workflow, and the workflow will drive what data entry screens are needed. We are using a WinForms/ASP.NET web forms package for UI, which is homegrown and difficult to push deployments on, so something like SharePoint integration is out of the question. Our back-end is DB2, and the workflow code (whether it's in WF or otherwise) will need to interact with that as well. I guess the bottom line is, should we look into using WF for this, or would we be better served just coding it ourselves? Can WF easily integrate data entry screens to capture information that can be used further on in the workflow?

    Read the article

  • Game architecture: modeling different steps/types of UI

    - by Sander
    I have not done any large game development projects, only messed around with little toy projects. However, I never found an intuitive answer to a specific design question. Namely, how are different types/states of UI modeled in games? E.g. how is a menu represented? How is it different from a "game world" state (let's use an FPS as an example). How is an overlaid menu on top of a "game world" modeled? Let's imagine the main loop of a game. Where do the game states come into play? It it a simple case-by-case approach? if (menu.IsEnabled) menu.Process(elapsedTime); if (world.IsEnabled) world.Process(elapsedTime); if (menu.IsVisible) menu.Draw(); if (world.IsVisible) world.Draw(); Or are menu and world represented somewhere in a different logic layer and not represented at this level? (E.g. a menu is just another high-level entity like e.g. player input or enemy manager, equal to all others) foreach (var entity in game.HighLevelEntities) entity.Process(elapsedTime); foreach (var entity in game.HighLevelEntities) entity.Draw(elapsedTime); Are there well-known design patterns for this? Come to think of it, I don't know any game-specific design patterns - I assume there are others, as well? Please tell me about them.

    Read the article

  • jQuery and jQuery UI (Dual Licensing)

    - by John Hartsock
    OK I have read many posts regarding Dual Licensing using MIT and GPL licenses. But Im curious still, as the wording seems to be inclusive. Many of the Dual Licenses state that the software is licensed using "MIT AND GPL". The "AND" is what confuses me. It seems to me that the word "AND" in the terms, means you will be licensing the product using both licenses. Most of the posts, here on stackoverflow, say you can license the software using one "OR" the other. JQuery specifically states "OR", whereas JQuery UI specifically States "AND". Another Instance of the "AND" would be JQGrid. Im not a lawyer but, it seems to me that a legal interpretation of this would state that use of the software would mean that your using the software under both licenses. Has anyone who has contacted a lawyer gotten clarification or a definitive answer as to what is true? Can you use Dual licensed software products that state "AND" in the terms of agreement under either license?

    Read the article

  • SPRING: How do you programmatically instantiate classes based on information passed from Flex UI

    - by babyangel86
    Imagine the UI passes back an XMl node as such: <properties> <type> Source </type> <name> Blooper </name> <delay> <type> Deterministic </type> <parameters> <param> 4 </param> </parameters> <delay> <batch> <type> Erlang </type> <parameters> <param> 4 </param> <param> 6 </param> </parameters> <batch> And behind the scene what it is asking that you instantiate a class as such: new Source("blooper", new Exp(4), new Erlang(4,6); The problem lies in the fact that you don't know what class you will need to processing, and you will be sent a list of these class definitions with instructions on how they can be linked to each other. I've heard that using a BeanFactoryPostProcessor might be helpful, or a property editor/convertor. However I am at a loss as to how best to use them to solve my problem. Any help you can provide will be much appreciated.

    Read the article

  • How do you keep application logic separate from UI when UI components have built-in functionality?

    - by Al C
    I know it's important to keep user interface code separated from domain code--the application is easier to understand, maintain, change, and (sometimes) isolate bugs. But here's my mental block ... Delphi comes with components with methods that do what I want, e.g., a RichText Memo component lets me work with rich text. Other components, like TMS's string grid not only do what I want, but I paid extra for the functionality. These features put the R in RAD. It seems illogical to write my own classes to do things somebody else has already done for me. It's reinventing the wheel [ever tried working directly with rich text? :-) ] But if I use the functionality built into components like these, then I will end up with lots of intermingled UI and domain code--I'll have a form with most of my code built into its event handlers. How do you deal with this issue? ... Or, if I want to continue using the code others have already written for me, how would you suggest I deal with the issue?

    Read the article

  • Best way to implement game loop without freezing UI thread

    - by Matt H
    I'm trying to make a simple 2D game in Java. So far I have a JFrame, with a menubar, and a class which extends JPanel and overrides it's paint method. Now, I need to get a game loop going, where I will update the position of images and so on. However, I'm stuck at how best to achieve this. Should I use multi-threading, because surely, if you put an infinite loop on the main thread, the UI (and thus my menu bar) will freeze up? Here's my code so far: import java.awt.Color; import java.awt.Graphics; import javax.swing.JPanel; @SuppressWarnings("serial") public class GameCanvas extends JPanel { public void paint(Graphics g) { while (true) { g.setColor(Color.DARK_GRAY); try { Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } } } } import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; @SuppressWarnings("serial") public class Main extends JFrame { GameCanvas canvas = new GameCanvas(); final int FRAME_HEIGHT = 400; final int FRAME_WIDTH = 400; public static void main(String args[]) { new Main(); } public Main() { super("Game"); JMenuBar menuBar = new JMenuBar(); JMenu fileMenu = new JMenu("File"); JMenuItem startMenuItem = new JMenuItem("Pause"); menuBar.add(fileMenu); fileMenu.add(startMenuItem); super.add(canvas); super.setVisible(true); super.setSize(FRAME_WIDTH, FRAME_WIDTH); super.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); super.setJMenuBar(menuBar); } } Any pointers/tips? Also, where should I put my loop? In my main class, or my GameCanvas class? Any help is appreciated, thanks.

    Read the article

  • synchronize threads - no UI

    - by UshaP
    I'm trying to write multithreading code and facing some synchronization questions. I know there are lots of posts here but I couldn't find anything that fits. I have a System.Timers.Timer that elapsed every 30 seconds it goes to the db and checks if there are any new jobs. If he finds one, he executes the job on the current thread (timer open new thread for every elapsed). While the job is running I need to notify the main thread (where the timer is) about the progress. Notes: I don't have UI so I can't do beginInvoke (or use background thread) as I usually do in winforms. I thought to implement ISynchronizeInvoke on my main class but that looks a little bit overkill (maybe I'm wrong here). I have an event in my job class and the main class register to it and I invoke the event whenever I need but I'm worrying it might cause blocking. Each job can take up to 20 minutes. I can have up to 20 jobs running concurrently. My question is: What is the right way to notify my main thread about any progress in my job thread? Thanks for any help.

    Read the article

  • jQuery UI Autocomplete and CodeIgniter

    - by Kere Puki
    I am trying to implement a simple autocomplete script using jQuery UI and CodeIgniter 2 but my model keeps telling me there is an undefined variable so I dont know if my setup is right. My view $(function() { $("#txtUserSuburb").autocomplete({ source: function(request, response){ $.ajax({ url: "autocomplete/suggestions", data: { term: $("#txtUserSuburb").val() }, dataType: "json", type: "POST", success: function(data){ response(data); } }); }, minLength: 2 }); }); My controller function suggestions(){ $this->load->model('autocomplete_model'); $term = $this->input->post('term', TRUE); $rows = $this->autocomplete_model->getAutocomplete($term); echo json_encode($rows); } My Model function getAutocomplete() { $this->db->like('postcode', $term, 'after'); $query = $this->db->get('tbl_postcode'); $keywords = array(); foreach($query->result() as $row){ array_push($keywords, $row->postcode); } return $keywords; } There arent any errors except it doesn't seem to be passing the $term variable to the model.

    Read the article

  • Grid related UI design question

    - by younevertell
    Grid related UI design question I want some 16-grid (4 rows and 4 columns) user interface, and fill the grid with some round shapes. I also want to use the MouseOver, mouse left button down, and Mouse Left Button Up events to set the state of grids as selected or not selected. My questions: 1. How fill the grid with some round shapes? by SetColumn and SetRow? 2. How to make the grids respond to the mouse please? Thanks <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions>

    Read the article

  • Changing a Select dropdown with a jquery ui slider

    - by Chris J. Lee
    Trying to set a select dropdown with a slider. You move the jquery ui slider and then it will change the selection of the other two dropdowns. is there a current method in jquery that would set these options? Current dropdown: <select id="alert-options-frequency-opts"> <option value=""></option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select>

    Read the article

< Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >