Search Results

Search found 7104 results on 285 pages for 'dynamic usercontrols'.

Page 55/285 | < Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >

  • Does the 'dynamic' keyword and the DLR promote C# to a first class citizen as a dynamically typed la

    - by Quigrim
    I understand that the new ‘dynamic’ keyword in C# 4.0 facilitates interaction with dynamic .NET languages, and can help to cut code by using it instead of reflection. So usage is for very specific situations. However, what I would like to know is if it will give C# all the dynamic benefits that one would get in other dynamic languages such is the IronXXX languages? In other words, will it be possible to write a entire application in C# in a dynamic language style? And if it is possible, would it be recommended or not. And why, or why not respectively? Will I get all the benefits of a dynamic language without switching to another language?

    Read the article

  • Grails domain class initialization

    - by Don
    Hi, My Grails app has the following Spring bean defined in spring/resources.groovy calendarService(CalendarService) { bean -> bean.initMethod = "init" } This method looks something like: class CalendarService { void init() { User.findByEmail("[email protected]") } } When I call the dynamic finder findByEmail I get a MissingMethodException. My guess is that I'm trying to call this method too early, i.e. before the domain classes have had the dynamic finders added to their metaclass. One solution would be to call CalendarService.init() myself from Bootstrap.init, rather than instructing Spring to call it, but is there a better solution? Thanks, Don

    Read the article

  • Save/Load jFreechart TimeSeriesCollection chart from XML

    - by IMAnis_tn
    I'm working with this exemple wich put rondom dynamic data into a TimeSeriesCollection chart. My problem is that i can't find how to : 1- Make a track of the old data (of the last hour) when they pass the left boundary (because the data point move from the right to the left ) of the view area just by implementing a horizontal scroll bar. 2- Is XML a good choice to save my data into when i want to have all the history of the data? public class DynamicDataDemo extends ApplicationFrame { /** The time series data. */ private TimeSeries series; /** The most recent value added. */ private double lastValue = 100.0; public DynamicDataDemo(final String title) { super(title); this.series = new TimeSeries("Random Data", Millisecond.class); final TimeSeriesCollection dataset = new TimeSeriesCollection(this.series); final JFreeChart chart = createChart(dataset); final ChartPanel chartPanel = new ChartPanel(chart); final JPanel content = new JPanel(new BorderLayout()); content.add(chartPanel); chartPanel.setPreferredSize(new java.awt.Dimension(500, 270)); setContentPane(content); } private JFreeChart createChart(final XYDataset dataset) { final JFreeChart result = ChartFactory.createTimeSeriesChart( "Dynamic Data Demo", "Time", "Value", dataset, true, true, false ); final XYPlot plot = result.getXYPlot(); ValueAxis axis = plot.getDomainAxis(); axis.setAutoRange(true); axis.setFixedAutoRange(60000.0); // 60 seconds axis = plot.getRangeAxis(); axis.setRange(0.0, 200.0); return result; } public void go() { final double factor = 0.90 + 0.2 * Math.random(); this.lastValue = this.lastValue * factor; final Millisecond now = new Millisecond(); System.out.println("Now = " + now.toString()); this.series.add(new Millisecond(), this.lastValue); } public static void main(final String[] args) throws InterruptedException { final DynamicDataDemo demo = new DynamicDataDemo("Dynamic Data Demo"); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); while(true){ demo.go(); Thread.currentThread().sleep(1000); } } }

    Read the article

  • Select a Column Dynamically using LINQ?

    - by vsj
    Hi all I am trying to do a very simple dynamic query which will select a column dynamically I mean the selection of column would depend upon another query so I would select x col if cond1 and y if cond2 so I tried using query.Select(colname) using the extension method also tried using Func< but I am not sure how to go about this I have read about dynamic extension for linq and also reflection but woth reflection to the GetValue function does not return value for my column in database. please help me out I am jus trying to select a column dynamically at runtime and no condtions really on it.

    Read the article

  • Count the number of ways in which a number 'A' can be broken into a sum of 'B' numbers such that all numbers are co-prime to 'C'

    - by rajneesh2k10
    I came across the solution of a problem which involve dynamic-programming approach, solved using a three dimensional matrix. Link to actual problem is: http://community.topcoder.com/stat?c=problem_statement&pm=12189&rd=15177 Solution to this problem is here under MuddyRoad2: http://apps.topcoder.com/wiki/display/tc/SRM+555 In the last paragraph of explanation, author describes a dynamic programming approach to count the number of ways in which a number 'A' can be broken into a sum of 'B' numbers (not necessarily different), such that every number is co-prime to 3 and the order in which these numbers appear does matter. I am not able to grasp that approach. Can anyone help me understand how DP is acting here. I can't understand what is a state here and how it is derived from the previous state.

    Read the article

  • How to dynamically add a Javascript function (and invoke)

    - by whitey
    Based on a click event on the page, via ajax I fetch a block of html and script, I am able to take the script element and append it to the head element, however WebKit based browsers are not treating it as script (ie. I cannot invoke a function declared in the appended script). Using the Chrome Developer Tools I can see that my script node is indeed there, but it shows up differently then a script block that is not added dynamically, a non-dynamic script has a text child element and I cannot figure out a way to duplicate this for the dynamic script. Any ideas or better ways to be doing this? The driving force is there is potentially a lot of html and script that would never be needed unless a user clicks on a particular tab, in which case the relevant content (and script) would be loaded. Thanks!

    Read the article

  • looping through object properties in actionscript

    - by asawilliams
    I have a dynamic class that I have created public dynamic class SiteZoneFileUploadVO { public var destination:String = "sitezone"; public var siteZoneId:uint; public var fileType:String; public var fileContents:String; public function SiteZoneFileUploadVO() { } } when I try to iterate over this object's properties it only iterates the dynamically added properties. parameters.dynVar= "value"; for(var name:String in parameters) { trace(name); } Even though the object has all the properties equal to a value (ive checked this in the debugger) the only property that will be traced is dynVar. How can I iterate over all the properties and not just the dynamically added ones?

    Read the article

  • looping through object property names in actionscript

    - by asawilliams
    I have a dynamic class that I have created public dynamic class SiteZoneFileUploadVO { public var destination:String = "sitezone"; public var siteZoneId:uint; public var fileType:String; public var fileContents:String; public function SiteZoneFileUploadVO() { } } when I try to iterate over this object's property names it only iterates the dynamically added properties. parameters.dynVar= "value"; for(var name:String in parameters) { trace(name); } Even though the object has all the properties equal to a value (ive checked this in the debugger) the only property name that will be traced is dynVar. How can I iterate over all the property names and not just the dynamically added ones?

    Read the article

  • Accessing facebook sdk result Object using .NET 3.5 API?

    - by John K
    Consider the following in .NET 3.5 (using the Bin\Net35\Facebook*.dll assemblies): using Facebook; var app = new FacebookApp(); var result = app.Get("me"); // want to access result properties with no dynamic ... in the absence of the C# 4.0 dynamic keyword this provides only generic object members. How best should I access the facebook properties of this result object? Are there helper or utility methods or stronger types in the facebook C# SDK, or should I use standard .NET reflection techniques?

    Read the article

  • How to implement a download for dynamic files in asp.net with masterpages

    - by Tim
    Hello, the title says it all. I have seen some similar questions on SO like this or this, but either i have overlooked something or my requirement is different, neither works. My situation is following: i have a Masterpage one of its contentpage is called MasterData.aspx MasterData has an asp.net ajax tabcontainer control with one usercontrol in every tabpanel these usercontrols(f.e. MD_Customer.ascx)hold the main content(like a normal page) they all have GridViews in it and i want to provide an Excel-Export-Button What i've tried is is to use an iframe like here. But the function that adds the iframe to the document gets never called and therefore i never see the save-as-dialog. Maybe this is caused by using a MasterPage. Does somebody has an idea on how to provide a button in an UpdatePanel that causes an async postback, so that i can generate a CSV dynamically in codebehind and write it to the response? Thank you in advance. aspx-markup: <asp:UpdatePanel ID="UpdGridInfo" runat="server" > <ContentTemplate> <asp:Label ID="LblInfo" Font-Underline="false" runat="server" CssClass="content" ></asp:Label>&nbsp;&nbsp; <asp:ImageButton ToolTip="export to Excel" style="vertical-align:bottom" ID="BtnExcelExport" ImageUrl="~/images/excel2007logo.png" runat="server" /> </ContentTemplate> </asp:UpdatePanel> and the BtnExportExcel codebehind handler(of course it cannot work to write the csv to the response of this page): Private Sub BtnExcelExport_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles BtnExcelExport.Click Dim csv As String = tableToCsv(DirectCast(Me.GridSource, DataTable)) Response.AddHeader("Content-disposition", "attachment; filename=RuleConfigurationFile.csv") Response.ContentType = "application/octet-stream" Response.Write(csv) Response.End() End Sub

    Read the article

  • Creating WCF Services using Dynamic Languages and DLR

    - by Perpetualcoder
    I was curious how anyone would go about creating WCF based services using a dynamic language like IronPython or IronRuby. These languages do not have the concept of interfaces. How would someone define service contracts? Would we need to rely on static languages for such kind of tasks? I am a big fan of Python in particular and would like to know if this can be done at this point.

    Read the article

  • making class accessible from class path in dynamic class loading

    - by Noona
    I have a project created in Eclipse, and I defined an interface and a class for dynamic class loading, the class is in the project directory, so I have this code in my project: if (handlerClassName != null) { TypeHandler typeHandler = null; try { typeHandler = (TypeHandler) (Class.forName(handlerClassName).newInstance()); but I get this exception: java.lang.ClassNotFoundException: "handlerClassName" what should I do to make the JVM recognize the class "handlerClassName" in my project? thanks

    Read the article

  • setwidth of a dynamic textview

    - by sairam333
    For Example , I am using name.setWidth(100) for giving width to dynamic text view name .But this width is adjusted only android but in droid this space is not adjusted how we give the setwidth value that will adjust to both droid and android

    Read the article

  • Using dynamic parameters in email publisher subjectSettings block with CruiseControl.Net

    - by Joe
    I am trying to get dynamic parameters to be used in the email publisher's subjectSettings block. For example, <project> ... <parameters> <textParameter> <name>version</name> <display>Version to install</display> <description>The version to install.</description> <required>true</required> </textParameter> </parameters> <tasks> ... </tasks> <publishers> .... <email includeDetails="TRUE"> <from>buildmaster</from> <mailhost>localhost</mailhost> <users> <user name="Joe" group="buildmaster" address="jdavies" /> </users> <groups> <group name="buildmaster"> <notifications> <notificationType>Always</notificationType> </notifications> </group> <group name="users"> <notifications> <notificationType>Success</notificationType> <notificationType>Fixed</notificationType> </notifications> </group> </groups> <subjectSettings> <subject buildResult="Success" value="Version ${version} installed." /> <subject buildResult="Fixed" value="Version ${version} fixed and installed." /> </subjectSettings> <modifierNotificationTypes> <notificationType>Success</notificationType> </modifierNotificationTypes> </email> </project> I have tried using ${version} and $[version]. When I use $[version], the entire subject line is empty! Are dynamic parameters supported in this case, and if so, what am I doing wrong?

    Read the article

  • Rails has_many with dynamic conditions

    - by Fabiano PS
    Hello! What I want is to create a Model that connects with another using a has_many association in a dynamic way, without the foreign key like this: has_many :faixas_aliquotas, :class_name => 'Fiscal::FaixaAliquota', :conditions => ["regra_fiscal = ?", ( lambda { return self.regra_fiscal } ) ] But I get the error: : SELECT * FROM "fis_faixa_aliquota" WHERE ("fis_faixa_aliquota".situacao_fiscal_id = 1 AND (regra_fiscal = E'--- !ruby/object:Proc {}')) Is this possible?

    Read the article

  • Dynamic Overlays slowing down Google Maps (Android 2.1) on Nexus One

    - by Soumya Simanta
    Hi, I'm trying to create a dynamic ItemizedOverylay (please see the code below) on Google Maps (Android 2.1) on a Nexus One. In my Activity (that extends MapActivity) I'm creating a data thread that is receiving data from the network. A 'handler' is used to communicate the data from the receiving thread to map activity. This data contains the locations (lat, lon) of the markers that I want to overlay on my map. The location of each marker is dynamic (i.e., it changes every time I receive new data from the network.) refreshItems(ArrayList<OverlayItem> newItems) method in invoked inside the handleMessage() of the handler. There are around 11 markers in the ArrayList that is passed to refreshItems I can see the markers overlayed on the map. However, I've two issues: The old markers are not removed from the map. After a while I see a trail of markers. The map doesn't respond to any touch commands. I cannot move the map or zoom in or zoom out. After a while I see a system warning that my app is not responding message. Any idea what's wrong here ? Thanks. public class MyItemizedOverlay extends ItemizedOverlay { private ArrayList<OverlayItem> overlayItems; public CoTItemizedOverlay(Drawable defaultMarker) { super(boundCenter(defaultMarker)); overlayItems = new ArrayList<OverlayItem>(); populate(); } public void addNewItem(GeoPoint location, String markerText, String snippet) { overlayItems.add(new OverlayItem(location, markerText, snippet)); populate(); } public void removeItem(int index) { overlayItems.remove(index); populate(); } public void refreshItems(ArrayList<OverlayItem> newItems) { // remove all existing items for (int i = 0; i < cotoverlayItems.size(); i++) { overlayItems.remove(i); } // copy all the times if (newItems != null && cotoverlayItems.size() == 0) { overlayItems.addAll(newItems); } populate(); } @Override protected OverlayItem createItem(int index) { return overlayItems.get(index); } @Override public int size() { return overlayItems.size(); } }

    Read the article

  • Performing dynamic sorts on EF4 data

    - by Jaxidian
    I'm attempting to perform dynamic sorting of data that I'm putting into grids into our MVC UI. Since MVC is abstracted from everything else via WCF, I've created a couple utility classes and extensions to help with this. The two most important things (slightly simplified) are as follows: public static IQueryable<T> ApplySortOptions<T, TModel, TProperty>(this IQueryable<T> collection, IEnumerable<ISortOption<TModel, TProperty>> sortOptions) where TModel : class { var sortedSortOptions = (from o in sortOptions orderby o.Priority ascending select o).ToList(); var results = collection; foreach (var option in sortedSortOptions) { var currentOption = option; var propertyName = currentOption.Property.MemberWithoutInstance(); var isAscending = currentOption.IsAscending; if (isAscending) { results = from r in results orderby propertyName ascending select r; } else { results = from r in results orderby propertyName descending select r; } } return results; } public interface ISortOption<TModel, TProperty> where TModel : class { Expression<Func<TModel, TProperty>> Property { get; set; } bool IsAscending { get; set; } int Priority { get; set; } } I've not given you the implementation for MemberWithoutInstance() but just trust me in that it returns the name of the property as a string. :-) Following is an example of how I would consume this (using a non-interesting, basic implementation of ISortOption<TModel, TProperty>): var query = from b in CurrentContext.Businesses select b; var sortOptions = new List<ISortOption<Business, object>> { new SortOption<Business, object> { Property = (x => x.Name), IsAscending = true, Priority = 0 } }; var results = query.ApplySortOptions(sortOptions); As I discovered with this question, the problem is specific to my orderby propertyName ascending and orderby propertyName descending lines (everything else works great as far as I can tell). How can I do this in a dynamic/generic way that works properly?

    Read the article

  • Dynamic Jasper Report

    - by pramod
    Hi, i need to create dynamic jasper report . my scenario is i have nearly 60 tables in database,so i can't create 60 jasper reports.i want a template jasper report which should be modified automatically by program.The data will come dynamically from the database and will be stored in an arraylist. iterating the arraylist i need to upload the data to jasper report. is that possible in java + jasper Reports. if so please give an example or any idea. thanks pramod

    Read the article

  • Flash Dynamic TextFiled Font Issue on BOLD

    - by coderex
    Hi, am using AS3 and i have one dynamic text filed. The properties Fontname "verdana" size "14" style "Bold" it is shown the correct font in BOLD if there is no value if i assign values like priceText.text=" Hello Wold" It will not show the correct font properties am not getting the bold style :( What need to change?

    Read the article

  • Dynamic LINQ OrderBy

    - by John Sheehan
    I found an example in the VS2008 Examples for Dynamic LINQ that allows you to use a sql-like string (e.g. OrderBy("Name, Age DESC")) for ordering. Unfortunately, the method included only works on IQueryable<T>. Is there any way to get this functionality on IEnumerable<T>?

    Read the article

  • WebCrawling Dynamic Links

    - by Jojo
    Hi Everyone, Anybody has any idea on crawling websites that have dynamic pages/queries? I mean if I click a certain link, it has different values every I try to reload it in a web browser. Now my webcrawler could not download the contents of these pages. Please advise.

    Read the article

  • webservice request issue with dynamic request inputs

    - by nanda
    try { const string siteURL = "http://ops.epo.org/2.6.1/soap-services/document-retrieval"; const string docRequest = "<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'><soap:Body><document-retrieval id='EP 1000000A1 I ' page-number='1' document-format='SINGLE_PAGE_PDF' system='ops.epo.org' xmlns='http://ops.epo.org' /></soap:Body></soap:Envelope>"; var request = (HttpWebRequest)WebRequest.Create(siteURL); request.Method = "POST"; request.Headers.Add("SOAPAction", "\"document-retrieval\""); request.ContentType = " text/xml; charset=utf-8"; Stream stm = request.GetRequestStream(); byte[] binaryRequest = Encoding.UTF8.GetBytes(docRequest); stm.Write(binaryRequest, 0, docRequest.Length); stm.Flush(); stm.Close(); var memoryStream = new MemoryStream(); WebResponse resp = request.GetResponse(); var buffer = new byte[4096]; Stream responseStream = resp.GetResponseStream(); { int count; do { count = responseStream.Read(buffer, 0, buffer.Length); memoryStream.Write(buffer, 0, count); } while (count != 0); } resp.Close(); byte[] memoryBuffer = memoryStream.ToArray(); System.IO.File.WriteAllBytes(@"E:\sample12.pdf", memoryBuffer); } catch (Exception ex) { throw ex; } The code above is to retrieve the pdf webresponse.It works fine as long as the request remains canstant, const string docRequest = "<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'><soap:Body><document-retrieval id='EP 1000000A1 I ' page-number='1' document-format='SINGLE_PAGE_PDF' system='ops.epo.org' xmlns='http://ops.epo.org' /></soap:Body></soap:Envelope>"; but how to retrieve the same with dynamic requests. When the above code is changed to accept dynamic inputs like, [WebMethod] public string DocumentRetrivalPDF(string docid, string pageno, string docFormat, string fileName) { try { ........ ....... string docRequest = "<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'><soap:Body><document-retrieval id=" + docid + " page-number=" + pageno + " document-format=" + docFormat + " system='ops.epo.org' xmlns='http://ops.epo.org' /></soap:Body></soap:Envelope>"; ...... ........ return "responseTxt"; } catch (Exception ex) { return ex.Message; } } It return an "INTERNAL SERVER ERROR:500" can anybody help me on this???

    Read the article

  • GWT Table that supports dynamic filtering

    - by Holograham
    This question is similar to http://stackoverflow.com/questions/161686/gwt-table-that-supports-sorting-scrolling-and-filtering However I would prefer open source and I am looking for snappy performance. I want a good way to perform dynamic filtering on rows. SmartGWT's adaptive filter looks interesting. http://www.smartclient.com/smartgwt/showcase/#grid_adaptive_filter_featured_category Anyone have any experience with this?

    Read the article

< Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >