Search Results

Search found 9122 results on 365 pages for 'dynamic scripting'.

Page 88/365 | < Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >

  • Can I add elements to a Java GUI?

    - by Asj
    I want to know how I can make a java program where an unknown amount of objects can be added to a GUI depending on user input. I can program in objects one at a time within the program, but I haven't seen a more dynamic program. Can I do that with Java? If not, what can I do it with? For more information, here's a picture. http://i6.photobucket.com/albums/y223/Asj127/CapProjIdea.jpg There can be more than one question per question block, and each question can have it's own question block.

    Read the article

  • Best approch to dynamically filter .net objects

    - by maxba
    The project i´m working currently on has a way to define a filter to filter objects from a database. This filter is a pretty straitforward class containing filtercriteria that will be combined to a sql where-clause. The goal now is to use this filter class to filter .net objects as well. So the filter for example defines, that the title property of the object that it is applied to must contain some userdefined string etc. What are ways to approch this problem? What should the filter return instead of the sql where-clause and how can it be applied to the object? I´m thinking about this for hours and don´t yet have even a slight idea how to solve this. Been thinking about reflection, dynamic code execution, building expressions but still haven´t found an acutal starting point.

    Read the article

  • are runtime linking library globals shared among plugins loaded with dlopen?

    - by conejoroy
    I've a C++ program that links at runtime with, lets say, mylib.so. then, the same program uses dlopen()/dlsym() to load a function from myplugin.so, dynamic library that in turn has dependencies to mylib.so. My question is: will the program AND the function in the plugin access the same globals defined in mydlib.so in the same memory area reserved for the program, or each will be assigned different, unrelated copies in its own memory space? if the latter is the default behaviour, is it possible to change that? Thanks in advance =)!

    Read the article

  • Adding buttons dynamically to a uitableviewcell - iPhone app

    - by alan
    I have a verb conjugation app that displays verb translations in the first cell of a table. At present the translation list is just a string (comma-separated list) but I'd like to change it to have clickable buttons. I had a play around adding buttons to the cell view without too much success but my only experience with custom cells has been using specific positioning so I'm unsure as to how to achieve a dynamic list of buttons (varying widths) within a cell. Any help greatly appreciated. Cheers.

    Read the article

  • Given a number N, find the number of ways to write it as a sum of two or more consecutive integers

    - by hilal
    Here is the problem (Given a number N, find the number of ways to write it as a sum of two or more consecutive integers) and example 15 = 7+8, 1+2+3+4+5, 4+5+6 I solved with math like that : a + (a + 1) + (a + 2) + (a + 3) + ... + (a + k) = N (k + 1)*a + (1 + 2 + 3 + ... + k) = N (k + 1)a + k(k+1)/2 = N (k + 1)*(2*a + k)/2 = N Then check that if N divisible by (k+1) and (2*a+k) then I can find answer in O(N) time Here is my question how can you solve this by dynamic-programming ? and what is the complexity (O) ? P.S : excuse me, if it is a duplicate question. I searched but I can find

    Read the article

  • How do I make a new div with a specific Id + n?

    - by Noor
    I've got a button and when it's pushed this code launches: var nrDivs = "1" var neuDiv = document.createElement("div"); neuDiv.setAttribute("Id","theDiv" + nrDivs); neuDiv.innerHTML = "Text"; $('#allDivs').append(neuDiv); newfeed.draw(neuDiv); I know that right now the script creates a new div with the ID: theDiv1. What I'm trying to do is when I click the button a second time, it creates a div with the ID: theDiv2. Each time the user presses the button there should be a new div drawn and I'm trying to target that new div and insert dynamic text. Thanks, Noor

    Read the article

  • Where does memory dynamically allocated reside?

    - by Summer_More_More_Tea
    Hello everyone: We know that malloc() and new operation allocate memory from heap dynamically, but where does heap reside? Does each process have its own private heap in the namespace for dynamic allocation or the OS have a global one shared by all the processes. What's more, I read from a textbook that once memory leak occurs, the missing memory cannot be reused until next time we restart our computer. Is this thesis right? If the answer is yes, how can we explain it? Thanks for your reply. Regards.

    Read the article

  • how to get a constant in java with class

    - by vincent
    basically I need to get a constant for a class however I have no instance of the object but only its class. In PHP I would do constant(XYZ); Is there a similar way of retrieving a constant in JAVA? I need it to facilitate a dynamic getMethod call Class parameterType = Class.forName(class_name); object.setProperty(field name, field value, parameterType); the set property method would then get the correct method and set the specified property, however I cant get a method which has int as parameter type without using Interger.TYPE

    Read the article

  • Can't access variables from dynamically loaded javascript

    - by Menno
    I'm using a fairly simple system to load javascript dynamically: include = function (url) { var e = document.createElement("script"); e.src = url; e.type="text/javascript"; document.getElementsByTagName("head")[0].appendChild(e); }; Let's say I have a file test.js which has the following contents: var foo = 4; Now, in my original script, I want to use include(test.js); console.log(foo); However, I get a 'foo has not been defined' error on this. I'm guessing it has to do with the dynamic script being included as the last child of the <head> tag. How can I get this to work?

    Read the article

  • dynamically create greasemonkey script

    - by qwertymk
    I'm trying to create a dynamic GM script. Here's what I thought would do it win = window.open('myScript.user.js'); win.document.writeln('// ==UserScript=='); win.document.writeln('// @name sample script'); win.document.writeln('// @description alerts hi'); win.document.writeln('// @include http://www.google.com/*'); win.document.writeln('// ==/UserScript=='); win.document.writeln(''); win.document.writeln('(function(){alert("hi");})()'); win.document.close(); Well it doesn't. Anyone have any ideas how to go about doing this?

    Read the article

  • Using database default values with Linq to SQL codewise

    - by Ivo
    I am using Dynamic Data with linq to SQL and SQL Server 2008. I have a GUID column that gets his value from the default value with newguid(). When I set IsDbGenerated to true in the designer it works like a charm. But when I renew table this property is set back to false again. So I added it to the metadata. For some reason it's not being pickup, "00000000-0000-0000-0000-000000000000" is being inserted in database. The displayname and readonly change are being pick up. What am I missing? [MetadataType(typeof(CMS_Data_HistoryMetadata))] public partial class CMS_Data_History { } [TableName("Content")] public class CMS_Data_HistoryMetadata { [DisplayName("Pagina Title")] public object pageTitleBar { get; set; } [ReadOnly(true)] [DisplayName("Versie")] public object version_date { get; set; } [ColumnAttribute(IsDbGenerated = true)] public object entity_id; }

    Read the article

  • Why does C++ allow variable length arrays that aren't dynamically allocated?

    - by Maulrus
    I'm relatively new to C++, and from the beginning it's been drilled into me that you can't do something like int x; cin >> x; int array[x]; Instead, you must use dynamic memory. However, I recently discovered that the above will compile (though I get a -pedantic warning saying it's forbidden by ISO C++). I know that it's obviously a bad idea to do it if it's not allowed by the standard, but I previously didn't even know this was possible. My question is, why does g++ allow variable length arrays that aren't dynamically allocated if it's not allowed by the standard? Also, if it's possible for the compiler to do it, why isn't it in the standard?

    Read the article

  • Disable Foreign Key Exposure in Entity Framework?

    - by davemackey
    When I originally created a Dynamic Data project I told it to expose the foreign keys, but now I can't make mappings between two entities b/c of the foreign keys. When I click on mapping details while focused on my association I receive the message: Mappings are not allow for an association over exposed foreign keys. So I'd like to disable the exposure of the foreign keys but am unsure how to do this without creating a new Entity Model from scratch. I'm not far along - so that wouldn't be hard, but I imagine there must be a programmatic switch for this?

    Read the article

  • Writing complex records to file

    - by DrSobhani
    Hi I have defined some records in my project which may be consisted of other records and also dynamic arrays of normal data types and other records , it is n example of a record type Type1=record x:integer; end; Type2=record Y:array of X; str:string; end; When I tried to save one of variables of these records type to file with blockwrite function like this : var Temp1:Type2; begin setlength(temp1.y,100); blockwrite(MyFile,Temp1,sizeOf(Temp1); it just wrote as much as the size of pure record is ,but temp1 has a dynmic arrays which is resized , Could someone please tell me how I can write a complex record to a file , I mean something like what is used in VB6 . Thanks

    Read the article

  • Adding code to the beginning / end of methods in runtime dynamically

    - by Irchi
    I know instrumentation is a technique to add trace code dynamically into the methods to enable tracing and debugging. I was wondering if this is only a "Trace" option, hard coded into the CLR to add only trace code, or is there the ability to add any code to the methods? For example, I want to check for a condition in the beginning of every single method call in a certain class (say for permissions). Can I do this via adding dynamic code to the beginning of the methods in execution time? I'm not sure how this trace "instrumentation" thing works, but I'm wondering if this can be used for other goals too, or not.

    Read the article

  • Rails - How do you dynamically call the request methods "get put destroy etc" at runtime in tests

    - by adam
    I'm always writing tests to check my controller restricts people from certain actions depending on their status i.e. logged in, admin? etc Regardless of whether its a get to :index or a puts to :create the code is always the same. I'm trying to refactor this so that i have one method such as should_redirect_unauthenticated_to_login_action(request, action) and call it like so should_redirect_unauthenticated_to_login_action(:get, :index) = get :index But not sure how to dynamically call the various response methods rails provides for functional tests which seem to live in the module ActionController I mucked around with module = Kernel.const_get("ActionController") module::TestProcess.get NoMethodError: undefined method `get' for ActionController::TestProcess:Module can anyone help (im very new to dynamic calling in ruby)

    Read the article

  • How to create custom CSS "on the fly" based on account settings in a Django site?

    - by sdolan
    So I'm writing a Django based website that allows users select a color scheme through an administration interface. I already have middleware/context processors that links the current request (based on domain) to the account. My question is how to dynamically serve the CSS with the account's custom color scheme. I see two options: Add a CSS block to the base template that overrides the styles w/variables passed in through a context processors. Use a custom URL (e.g. "/static/dynamic/css//styles.css") that gets routed to a view that grabs all the necessary values and creates the css file. I'm content with either option, but was wondering if anyone else out there has dealt with similar problems and could give some insight as to "Best Practices".

    Read the article

  • Browsing to Subversion repository location indicated in Apache conf file

    - by sonrael
    I have Subversion 1.6.6 and Apache 2.2.14 installed and working. I have made the following changes to the Apache httpd.conf file: #Uncommented by me for Subversion installation LoadModule dav_module modules/mod_dav.so LoadModule dav_fs_module modules/mod_dav_fs.so #Added by me for subversion installation LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so < Location /svn DAV svn SVNPath C:\Users\RED\Repositories < /Location ...When I navigate to localhost Apache is working properly, but if I try to go to localhost/svn the browser just hangs waiting for a response from the server. What is supposed to happen here? Does it have to do with the fact that I'm behind a wireless router on a dynamic IP address (although I can access localhost no problem so...)? As you can see I'm on windows (Vista)

    Read the article

  • Aside from performance concerns, is Java still chosen over Groovy/JRuby etc.?

    - by yar
    [This is an empirical question about the state-of-the-art: I am NOT asking if Java is cooler or less cool than the dynamic languages that work in the JVM.] Aside from cases where performance is a main decision factor, do companies/developers still willingly chose Java over Groovy, JRuby or JPython? Personal Note: The reason I am asking is that, while I do some subset of my professional work in Ruby (not JRuby, for now), in my personal projects I use Java. While I have written non-trivial apps in Groovy, I prefer Java, but I wonder if I should just get over it and do everything in Groovy. I like Java because I feel that static typing saves me time and aids refactoring. (No, I am not familiar with Scala.) However, I feel that this very empirical, on-topic programming question may inform my decision.

    Read the article

  • AppEngine: Can I write a Dynamic property (db.Expando) with a name chosen at runtime?

    - by MarcoB
    If I have an entity derived from db.Expando I can write Dynamic property by just assigning a value to a new property, e.g. "y" in this example: class MyEntity(db.Expando): x = db.IntegerProperty() my_entity = MyEntity(x=1) my_entity.y = 2 But suppose I have the name of the dynamic property in a variable... how can I (1) read and write to it, and (2) check if the Dynamic variable exists in the entity's instance? e.g. class MyEntity(db.Expando): x = db.IntegerProperty() my_entity = MyEntity(x=1) # choose a var name: var_name = "z" # assign a value to the Dynamic variable whose name is in var_name: my_entity.property_by_name[var_name] = 2 # also, check if such a property esists if my_entity.property_exists(var_name): # read the value of the Dynamic property whose name is in var_name print my_entity.property_by_name[var_name] Thanks...

    Read the article

  • How to setup custom CSS based on account settings in a Django site?

    - by sdolan
    So I'm writing a Django based website that allows users select a color scheme through an administration interface. I already have middleware/context processors that links the current request (based on domain) to the account. My question is how to dynamically serve the CSS with the account's custom color scheme. I see two options: Add a CSS block to the base template that overrides the styles w/variables passed in through a context processors. Use a custom URL (e.g. "/static/dynamic/css//styles.css") that gets routed to a view that grabs all the necessary values and creates the css file. I'm content with either option, but was wondering if anyone else out there has dealt with similar problems and could give some insight as to "Best Practices".

    Read the article

  • Silverlight 4 Binding to ConverterParameter

    - by FrEEzE2046
    Hello everybody, I have a ValueConverter which needs to be called with a dynamic parameter, depending on a property. I can't see a way to do this ... Width="{Binding ActualWidthValue, Source={StaticResource VisibleSize}, Converter={StaticResource Fraction}}" The "Fraction" converter get's (or should get) a parameter of type System.Size, which contains a numerator and denumerator. This value (should) depend on a ItemCollection.Count. Resetting the ItemCollection should reinvoke the Converter with the new values. My first idea was to manually change the ConverterParameter in CodeBehind on the PropertyChanged event of my ItemCollection DependencyProperty. But, as I know now, Silverlight has no GetBinding() method. I heard about GetBindingExpression and tried to do. But MyGrid.GetBindingExpression(Grid.ActualHeightProperty) is always returning null, although the Binding is already established. So, what can I do to reach my target?

    Read the article

  • Socket.io Duplicate clients on a namespace

    - by Servernumber
    Hi I'm trying to use dynamic namespace to create them on demand. It's working except that I get duplicate or more client for some reason Server side : io.of("/" + group ).on("connection", function(socket_group) { socket_group.groupId = group; socket_group.on("infos", function(){ console.log("on the group !"); }) socket_group.on('list', function () { Urls.find({'group' : '...'}).sort({ '_id' : -1 }).limit(10).exec(function(err, data){ socket_group.emit('links', data); }); }) [...] }) Client Side : socket.emit('list', { ... }); On the client side only one command is sent but the server is always responding with 2 or more responses. Every time I close/open my app the response is incremented. Thanks if you find out.

    Read the article

  • How to extract $lastexitcode from c# powershell script execution.

    - by scope-creep
    Hi, I've got a scipt executing in C# using the powershell async execution code on code project here: http://www.codeproject.com/KB/threads/AsyncPowerShell.aspx?display=PrintAll&fid=407636&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2130851#xx2130851xx I need to return the $lastexitcode and Jean-Paul describes how you can use a custom pshost class to return it. I can't find any method or property in pshost that returns the exit code. This engine I have needs to ensure that script executes correctly. Any help would be appreciated. regards Bob. Its the $lastexitcode and the $? variables I need to bring back. Hi, Finally answered. I found out about the $host variable. It implements a callback into the host, specifically a custom PSHost object, enabling you to return the $lastexitcode. Here is a link to an explanation of $host. http://mshforfun.blogspot.com/2006/08/do-you-know-there-is-host-variable.html It seems to be obscure, badly documented, as usual with powershell docs. Using point 4, calling $host.SetShouldExit(1) returns 1 to the SetShouldExit method of pshost, as described here. http://msdn.microsoft.com/en-us/library/system.management.automation.host.pshost.setshouldexit(VS.85).aspx Its really depends on defining your own exit code defintion. 0 and 1 suffixes I guess. regards Bob.

    Read the article

  • jQuery/JSONP widget and jquery version conflict

    - by geraud
    I would like to create a widget so that my visitors can display it on their blog/website. I would like to use jquery and jsonp to develop this widget. I know how to avoid conflicts between jQuery and other libraries (like prototype). But what will happen if jquery is already installed on my visitors' websites and if their version is different from my version ? What I mean is: what if, for example, they run a script using an older jquery version and which is not compatible with my jquery library ? Does it stop working ? Is their any workaround ?

    Read the article

< Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >