FAQ Database Discussion Community


Dynamic UI & Accessing Data (Shiny)

r,dynamic,shiny
I've a problem with my shiny code which is somewhat related with the two questions I linked below. So i've made a dynamic UI : output$hmgroupsmean <-renderUI({ numGroups <- as.integer(input$HMgroups) lapply(1:numGroups, function(i) { numericInput(paste0("group_", i), label= paste("Mean", i), min=0, max=1000, value= 10) }) }) that display N numericInput depending on...

saving matlab file (.mat) with dynamic name

matlab,dynamic,save
for m = 1:length(lst_region) out=cellfun(@(x) str2double(x(1:strfind(x,'_')-1)),lst_region(m)); str=[num2str(out(1)) '.mat']; save ( str ,distance); end Error using save Argument must contain a string. Line 3 I want to save files like '1.mat' '2.mat' etc.. but i have error can you please help me to fix it...

Make dynamic links (with ?) return error 404 not found

apache,.htaccess,dynamic,hyperlink,http-status-code-404
Using .htaccess (are there any other solutions?) is there a way to make all dynamic links (links containing the sign ?) of a site return a 404 not found response header? For example: http://www.example.com/?bla_bla - will return 404 http://www.example.com/test/index.html?no_redirect=true - will return 404...

How to handle different event handlers with same parent?

c#,winforms,dynamic,parent
The following program is actually not my project, but it makes it easier to understand what I want later in my real program. Here a .gif to see the current functionality: What I want? I want add a label total points. Which includes the points of the checkboxes and textboxes,...

Java dynamic, static casting

java,dynamic,static,polymorphism
import javax.swing.*; public class Toast { static Object[] objects = { new JButton(), new String("Example"), new Object() }; public static void main(String[] args) { System.out.println( new Count(objects) ); for (Object o : objects) System.out.println(o); } } class Count { int b, s, o; public Count(Object[] objects) { for (int i=0;...

How can I access an use the objects in my List when they are each passed into an Action? [closed]

c#,.net,dynamic,lambda,expandoobject
Apologies if this is a duplicate but I can't find it. Here is the essence of my problem. Let's assume I have a List<T> containing dynamic objects: var collection = new List<dynamic> { new { Foo = 1, Bar = "Test Text..."}, new { Foo = 2, Bar = "Test...

Compiler says dynamic property is missing but I can see it

c#,.net,dynamic,reflection,metaprogramming
I'm starting to dive into the world of C# Dynamics and Metaprogramming, and having some trouble. I managed to create a CodeDom tree, and generate the following code: namespace Mimsy { using System; using System.Text; using System.Collections; internal class JubJub { private int _wabeCount; private ArrayList _updates; public JubJub(int wabeCount)...

Meteor helper function exception when retrieving the count of all users

javascript,html,dynamic,meteor,helper
On my website I'm trying to display the number of users registered. The problem is that I get a long exception on render. My question is how do you do this dynamically instead of statically? The code works on start up but if I switch pages and come back it...

getting an div ID, passing to a variable, then unhiding that div using jquery

javascript,jquery,dynamic
I'm trying to capture a button ID and to pass it to a function that associates it with a div that has the same value. I want to then dynamically have jquery change the css on that div. Everything works (I can dynamically create the div ID and show it,...

FieldBuilder - Ho do you set the default value?

c#,dynamic,default-value,typebuilder
I'm using TypeBuilder to create types at runtime, but can't seem to figure out how you set the default value of a field. For example, say I wanted to create the following layout at runtime, using a TypeBuilder, how do I set the default value of 'm_number' (to 64)? public...

Team Page With Dynamic Content - Need Help Using JQuery to Pull Image Content

javascript,jquery,html,css,dynamic
I'm using the following HTML / CSS and JQuery in this example (http://codepen.io/jakestuts/pen/qIdkF/) to create a team page that when you click on the head shot of the team member, it displays the details about that person which includes a larger version of the headshot, title and bio. Right now,...

How to wrap 2 dynamic html element using jquery?

jquery,dynamic,wrap
I have the below jquery where i have created the dynamic html structure var data = [{"name": "Afghanistan", "code": "A"},{"name": "AndorrA", "code": "A"},{"name": "Bouvet Island", "code": "B"},{"name": "Cook Islands", "code": "C"}]; $.each(data, function(key, val) { if (!$("#aZContent ul." + val.code).is("*")) { $("<ul />", { "class": val.code, "html": "<li>" + val.name...

Adding subview to cell dynamically is causing layout constraint error output

ios,dynamic,autolayout
I have a table cell view that consists of a couple of buttons and some details. The details are hidden until one of the buttons is touched, and removed when the other button is touched. I am using auto layout. Here is the code for adding the controls and configuring...

javascript dynamic structure with array or object

javascript,arrays,object,dynamic
Im trying to create a structure with Javascript as follows: var users = { user.id: { session.id1: session.id1, session.id2: session.id2, session.id3: session.id3 }, user.id2: { session.id1: session.id1, session.id2: session.id2, session.id3: session.id3 }, }; What i need: add new sessions and remove them, removing okay, but how should i define object...

How to create popup's for dynamic tables

javascript,jquery,html,css,dynamic
Html function toggle_visibility(id) { var e = document.getElementById(id); if(e.style.display == 'block') e.style.display = 'none'; else e.style.display = 'block'; } //--> </script> <!--To display JSON data in the tables--> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script> $(function() { var dmJSON = "data.json"; $.getJSON( dmJSON, function(data) { $.each(data.records, function(i, f) { var $table="<table class='mystyles' table...

IDynamicMetaObjectProvider set property using literal name

c#,dynamic
I need to set DynamicObject property using string propertyName. I found the way to get property value using this answer, but when it comes to setValue I'm not quite sure how to rewrite the code in order to set the property. I receive runtime errors and not quite sure about...

Create list of runtime-known type from object list and call generic method

c#,linq,dynamic,reflection
I have IEnumerable<object> in memory. Let's say this: IEnumerable<object>() addedEntities = // ... some Linq-To-Object query Also, I have a method with this signature: public static IEnumerable<TSource> FilterByUniqueProp<TSource> (this IEnumerable<TSource> query, TSource model) { // Do something according to this type var type = model.GetType(); } As you see, this...

Trying to dynamically create divs that can also be closed

javascript,html,dynamic
I'm trying to create a simple note taking application. Right now I am trying figure out how to dynamically create and delete DIV elements. I can create DIVs, but each time I add a new div it adds a "Close" "X" to each previous div. So my question is how...

Create a new dynamically named list in groovy

list,variables,dynamic,groovy
I have a list of items that looks like this items = ["a", "b", "c"] I also have a list of values that looks like this values = ["a1", "a2", "a3", "b1", "b2", "c1", "c2", "c3"] my items list is static, but my values list will change often. my code...

Asp.net MVC 4 dynamic connection string

asp.net-mvc-4,dynamic,connection-string
I am learning Asp.net mvc 4 at work and modifying an asp.net mvc 4 project. Currently, the connection to the database is set in the web.config of each project. The project uses entity framework which I am also still trying to understand (I come from a java Apache Wicket background)....

How to build dynamic controls in angular js using json?

html,json,angularjs,dynamic,controls
I am working on a angular js project. Right now the controls are static. But client wants to create the html controls based on database. I have a table with controls specification For eg: type : text/dropdown/radio/checkbox events : onchange/onblur/onfocus attributes:"color:red" How can I generate the dynamic model which can...

Delete item “Object required” excel VBA

excel,vba,excel-vba,dynamic,delete
I understand what the problem is, but i don't have a clue on how to solve it... So what I am doing is that I click on a button (addSceneButton) in my worksheet("costing") and it is going to insert a copy of another sheet("Scene Template") just above of the...

Dynamic Array Size in C++

c++,arrays,dynamic,int,sizeof
I am looking for a way to dynamically set the size of an integer array depending on the passed parameter. For example this in pseudocode: int MyFunction(int number) { int myarr[amount of digits in number]; } So when the input is 13456 then the int array[] size should be 5....

How to deal with value of text input created dynamically?

javascript,jquery,dynamic,input
Here's a link <form onsubmit="return false"></form> <label for="quantity">qantity</label> <select name="quantity"> <script> for (var i = 1; i < 81; i++) { document.write("<option value='"+i+"'>"+i+"</option>"); }; </script> </select> <button id="next">next</button> <form id="itemform" onsubmit="return false"></form> <script> $('#next').click(function(){ var quantity = ($('select[name=quantity]').val()); $('#itemform').html(""); for (var i = 0; i...

Deleting dynamic char** in C++

c++,arrays,dynamic,delete,char
Disclosure: Hi, I'm trying to solve a challenge with strict time and memory limits. I would normally use vectors and strings, but here I need the fastest and smallest solution (with vectors it actually ran above the time limit), so I turned to dynamic arrays of char*. The relevant parts...

Dynamically create compiled binary with go

dynamic,go,compilation,dynamically-generated
First sorry for perhaps a bad title - I imagine a lot of the difficulty I'm experiencing relates to not knowing the correct terminology for what I'm trying to achieve. In Go, I wish to have a program which when run can dynamically create a secondary binary. To illustrate with...

get value from the dynamic create textbox

c#,dynamic,value
I am quite new in asp.net. I am wonder how can I get the value of the textbox that create dynamically from C#. this code is the way i create the textbox from page load event... for( int i =0; i<30; i++){ TextBox txt = new TextBox(); txt.Text = "ASDASDASD";...

How to check in python if some class (by string name) exists?

python,class,dynamic
Is it possible to check if some class exists? I have class names in a json config file. I know that I can simply try to create an object by class name string but that is actually a bad idea because the class constructor can do some unexpected stuff while...

Extjs building form on metadata

json,extjs,model-view-controller,dynamic
I will build a FormPanel with ExtJs 4 configured by metadata received from server. The meta data (json array) looks like this: { "metaData": { [ { "allowBlank:": false, "fieldLabel:": "labelText1", "name:": "labelName1", "emptyText:": "null" }, { "allowBlank:": false, "fieldLabel:": "labelText1", "name:": "labelName1", "emptyText:": "null" } ] }, "success": true,...

How do i create a dynamic array of function pointers?

c,function,dynamic
i wasn't able to do a dynamic array of function pointers, i have troubles understanding how to work with a dynamic array of function pointers when having a pointer to the func_cmp pointer. int(*func_cmp[])(void *,void*); numElements++; func_cmp=(func_cmp*)realloc(func_cmp, numElements*sizeof(func_cmp*)); func_cmp[numElements-1]=*func_cmp; i'm not sure about the realloc line. ...

How can I rewrite this LINQ query with reflection

c#,linq,dynamic,reflection
So I had written this LINQ query using reflection, and later found out it isn't supported. What would be the best way to get the same functionality from this code? List<Profile> profilesFromUUID = await MobileService.GetTable<Profile>().Where(p => typeof(Profile) .GetProperty(handler.Name + "UUID").GetValue(p) == obj.uuid).ToListAsync(); ...

Passing pointer to dynamically allocated array by copy to function has unexpected result

c++,arrays,pointers,memory,dynamic
I was just messing around with passing pointers to functions to wrap my head around how it works and I came across some behavior that was unexpected. I have the following code: #include <iostream> #include <string> #include <fstream> #include <sstream> #include <cmath> #include <iomanip> using namespace std; struct t {...

What are the limits on dynamic/double dispatch in Kotlin?

dynamic,dispatch,kotlin
I'm just starting to explore Kotlin, and I'm curious about how far it moves beyond Java's core dynamic binding/dispatch semantics. Let's say I write code that looks something like this: class Animal { fun add(x:Animal) = Animal() } object Horse : Animal object Donkey : Animal object Mule : Animal...

Int& to const int -static vs dynamic-

c++,dynamic,reference,const
class A { public: A(int i = 25) {x = i;y=new int[i];for(int j=0;j<i;j++) y[j]=j;} int& f() const {return x;} int& operator[](int i) const {return y[i];} private: int x,*y; }; int main() { A a(15); cout << a[5]; cout << a.f(); return 0; } When I'm trying to compile the code...

Dynamic lambda wrapped with try catch

c#,linq,dynamic,lambda
I want to filter an IEnumerable<ModuleItem> by an Where calls defined by the user (so the expression is given by a String object) So far I am able to create my filters with DynamicLinq with this code Expression<Func<ModuleItem, bool>> expr = System.Linq.Dynamic.DynamicExpression.ParseLambda<ModuleItem, bool>(value, null); The problem is that the overall...

Android : Creating GUI programmatically at run time in java

java,android,user-interface,dynamic
I have to create number of buttons and textbox, etc. depending upon a certain number. For ex: if the number = 5, I need to create 5 buttons, and if its value is 10, I need to create 10 buttons. To achieve such a functionality, the conventional xml GUI won't...

Creating dynamic amount of components in FXML

java,dynamic,javafx,fxml
I made a note card program that can help you study with JavaFX. It saves the class through XML and on boot up, it finds the XML files and adds them to an ArrayList called allProjects of type NoteCardSet, an ArrayList of NoteCards. With this, I made a dynamic amount...

Generating Custom Object from ArrayList in C# at runtime

c#,asp.net,.net,dynamic,functional-programming
I have the following content stored in ArrayList as pure string each line represents the value of an item in the list , is there a way to generate a dynamic object in the following style : [left operand is the property] = [right operand is the value of that...

Initialize array of structures

c,arrays,dynamic,struct,initialization
I am having trouble initializing an array of structures in C. Here is my structure : typedef struct Voie { int num; int sem_num[3]; int crois[3]; } Voie; The two arrays will contain 0, 2 or 3 integers. I have an array of 12 "Voie" : Voie voies[12]; And I...

Call dynamic method from string

c#,dynamic,methods,reflection
I'm trying to call a method from a dynamic without knowing its name. I have difficulties to explain this in english so there's the code: public void CallMethod(dynamic d, string n) { // Here I want to call the method named n in the dynamic d } I want something...

Python argparse, provide different arguments based on parent argument value

python,dynamic,argparse,subparsers
here is what i would like to do : A command that looks like git command behavior. You don't get the same options whether you typed git commit or git checkout. But in my case i want to provide different arguments based on an argument value (a file name) like...

AngularJS - Dynamic URLs for new page

angularjs,url,dynamic
I am AngularJS beginner so sorry for this silly question. I am working on a page called menu.html which has severals links of food categories such as Noodle, Soup, Sandwiches. When user click on any of those links it will lead to a page that list the food that are...

SQL Server - Can I dynamically create multiple parameters from the results of a SELECT query on another table?

sql-server,variables,dynamic,parameters
So I have my 'Chaplains' table: CREATE TABLE Chaplaincy_Chaplains ( ChaplainID INTEGER IDENTITY PRIMARY KEY, ChaplainName VARCHAR(50), FaithID INTEGER, Telephone VARCHAR(50), Email VARCHAR(255), Notes VARCHAR(255), FOREIGN KEY (FaithID) REFERENCES Chaplaincy_Faiths(FaithID) ); Into which I have inserted four records: INSERT INTO Chaplaincy_Chaplains VALUES ('Robin Richardson',1,'555-123456',[email protected]',NULL) INSERT INTO Chaplaincy_Chaplains VALUES ('Peter Jackson',8,'555-123-456',[email protected]',NULL)...

C# Delete Row with Dynamic Textbox/Button/Grid

c#,wpf,button,dynamic,textbox
I've tested some thinks with Dynamic Textboxes and Buttons, Adding Items to my Grid works very well, but if I want to Delete it there are some Bugs, sometimes 1 Row is empty and my Add Button disappears or my Program crashs. What did I wrong or what did I...

Query mongodb collection as dynamic

c#,mongodb,dynamic
I'm saving a dynamic object in my database but I would also like to retrieve it as a dynamic object. How can this be done? I tried it like so: public dynamic GetItemById(ObjectId id) { dynamic result = Db.GetCollection<dynamic>("Items").Find(x => x.Id == id).FirstOrDefaultAsync().Result; return result; } But this gives me...

How to dynamically pull MYSQL date queries?

mysql,date,dynamic
I am trying to select data from two periods (Last 30 days and Previous 30 days) So two 30 day periods. I have the last 30 day period down: SELECT ProductID, ProductIDintarget,date_format(Date,'%m/%d/%Y'),SUM(Rev) FROM datatable WHERE Date BETWEEN CURDATE()-1 - INTERVAL 31 DAY AND CURDATE() GROUP BY ProductIDintarget That is working...

How can I restrict the number of characters entered into an HTML Input with CSS (or jQuery, if necessary)?

jquery,html,css,dynamic,restrict
I can manipulate a control based on the state of another control, as shown in this jsfiddle, where the state of a Checkbox alters the width and background color of a Textbox. The HTML is: <input type="checkbox" id="ckbxEmp" >czech Bachs <input type="text" id="txtbxSSNOrITIN"> The jQuery is: $(document).on("change", '[id$=ckbxEmp]', function ()...

Adding event code to checkbox in PowerPoint VBA

vba,dynamic,powerpoint,powerpoint-vba,buttonclick
I am developing a PowerPoint 2010 deck that presents the user with a series of pages containing one statement, one checkbox (built from a label element to enable changing the size of the checkbox) and forward/back arrows on each page. Since this will be used on numerous projects with varying...

Can I dynamically set the recipient of mailto: using only HTML and JavaScript depending on URL used to access the site?

javascript,html,email,dynamic,mailto
I have 5 different websites that all use the same privacy html page but depending on which site they accessed it from I want the email to change dynamically. For example, lets say I access the privacy page from Site A and click the [email protected] to send an email I...

Linux C++ Dynamic Libs and static initialization order

c++,linux,dynamic,initialization,shared-libraries
Forgive me on the long post. Its a complicate problem I wanted a complete description. On Linux Fedora 21 (g++ 4.9.2) and like. I'm working on a C++ database wrapper library using a base class of "database" and inherited classes of Oracle and Sybase. Beyond that, I wanted some of...

AS3 Dynamic variable naming

actionscript-3,flash,variables,dynamic
Is dynamic variable naming like this possible in ActionScript 3? for (var xz=0;xz<10;xz++){ var this['name' + xz]:Number = xz; } ...

Deallocating member pointer

c++,pointers,memory,dynamic,heap
#include <iostream> using namespace std; class myClass{ public: char * pointer; char * pointerToPointer; myClass(){ pointer = new char; char x = 'x'; pointer = &x; pointerToPointer = new char[3]; char y[3] = {'x', 'y', 'z'}; pointerToPointer = y; } ~myClass(){ delete pointer; delete[] pointerToPointer; }}; int main(){ myClass myclass;...

Android : Unable to change width of dynamic button

java,android,button,dynamic,layoutparams
I am trying to make dynamic buttons of fixed dimensions. I am able to alter the height but unable to change the width. The width of the button seems to MATCH_PARENT (it takes up whole screen width. If there are two buttons, each button width is half screen width and...

Defining Stack dynamically in class constructor, which is private member

c++,dynamic,stack
Friends I defined a stack class, which makes stack of a structure, and an other class which uses stack (creating dynamically) like below struct A{ int a; ..... }; class stack{ private: int head,max; A* data; // pointer of structure 'A' public: stack(int length){ // constructor to allocate specified memory...

Dynamic forecasting (arima) with multiple regressors in Stata

dynamic,stata,forecasting
I have a small time series dataset, a sample of which is below: year AvgU5MR AvgPov AvgEnrol 2000 126.9307 41.0109 67.11833 2001 123.4138 39.9748 68.66798 2002 119.93 45.85194 65.82739 2003 116.4923 55.3706 69.17756 2004 113.1362 32.63662 70.83884 2005 109.9008 41.08603 75.35649 2006 106.816 43.45722 75.98755 2007 103.8878 19.19114 76.86299 2008...

Oracle Apex dynamically enable/disable text field depending on LOV selected value

javascript,dynamic,action,oracle-apex,lov
I am trying to enable/disable text field depending on LOV selected value but it works just on page load, and I want to do it dynamically on client side when the LOV selected value change. I tried with a dynamic action but it only fire on page load. Any help?...

TypeBuilder - Adding attributes

c#,dynamic,properties,custom-attributes,typebuilder
I have a helper class that uses a TypeBuilder to construct a dynamic type. It is used as follows : var tbh = new TypeBuilderHelper("MyType"); tbh.AddProperty<float>("Number", 0.0f); tbh.AddProperty<string>("String", "defaultStringValue"); tbh.Close(); var i1 = tbh.CreateInstance(); var i2 = tbh.CreateInstance(); I now want to add support for property attributes (existing attribute types,...

Abstract class not generating with CodeDom

c#,.net,dynamic,metaprogramming,codedom
I have this class definition: CodeTypeDeclaration helloWorldClass = new CodeTypeDeclaration("HelloWorld") { Attributes = MemberAttributes.Abstract | MemberAttributes.Public }; Why does this declaration generates a non-abstract class? public class HelloWorld { } ...

Dynamically assigning sub class dependent decorators

python-3.x,dynamic,decorator
I have a class that has a basic method, and subclasses that have the same base functionality, but additional behaviour, which can be implemented with decorators. class cls_with_basic_method: #if...exec("@decoratorA") #if...exec("@decoratorB") #... def basic_method(arg): #... return arg class cls_with_basic_method_and_decoratorA(class_with_basic_method): #... class cls_with_basic_method_and_decoratorB(class_with_basic_method): #... #... It seems the quickest solution would be...

How can I set a Button's type to “Button” (as opposed to the default “Submit”) in C#?

c#,dynamic,sharepoint-2010,submit-button,htmlbutton
According to an answer here, I can prevent a button from submitting the form by setting its type value to "Button", like so in HTML: <button type="button">Cancel changes</button> ...but how can I do this in C#? I am creating my controls dynamically, something like this (pseudocode, as I'm away from...

dijit/Tree is not updated when connected to a dojo/store/JsonRest

dynamic,dojo,notify,dijit.tree,jsonreststore
I have modified the dojo tutorial at http://dojotoolkit.org/documentation/tutorials/1.10/store_driven_tree/demo/demo.html to read from a JsonRest store. The problem is that the tree display doesn't update when I click "Add new child to selected item" e.g. on the root element, although the update worked in the original tutorial. I have compared what dojo/store/Memory...

Django 1.8.1 load template file with dynamic javascript

javascript,django,dynamic
Can I load template file with dynamic javascript file. For example when I render a.html, I want to load a.js How can I do this?...

R Knitr PDF: Is there a posssibility to automatically save PDF reports (generated from .Rmd) through a loop?

r,pdf,dynamic,report,knitr
I would like to create a loop, which allows me to automatically save PDF reports, which were generated from a .Rmd file. For instance, if a variable "ID" has 10 rows, I would like R to automatically save me 10 reports, into a specific directory. These reports shall vary based...

add data before sending in android dynamic listview

android,json,listview,dynamic,android-listview
I have dynamic listview activity it transfer the item to another activity that have edit text(name,phone,table) and another dynamic listview under that. the each item have edit text it should send with each item. public class OrderAdapter extends BaseAdapter { private Context ctx; private LayoutInflater mInflater; private List<Item> orderItems; private...

How to alter dynamic/live element attributes - (replaceWith()) used

jquery,dynamic,replace,live
I am having a hard time wrapping my head around how to access and alter attributes of HTML content added in place of a placeholder element using replaceWith. Here is the scenario: Here is the HTML (kept in a php file) that replaces the '#null_item' element in the subsequent HTML...

Method declared with dynamic input parameter and object as return type in fact returns dynamic

c#,.net,dynamic,visual-studio-2013
namespace ConsoleApplication1 { class Program { static void Main(string[] args) { var objectGetter = new ObjectGetter(); var obj = objectGetter.GetItem(); //Visual Studio shows that obj type is System.Object } } public class ObjectGetter { public object GetItem() { dynamic dObj = "123"; var obj = this.Convert(dObj);//Visual Studio shows that obj...

At most k adjacent 1s (Maximum Value limited neighbors)

arrays,algorithm,dynamic,dynamic-programming
In my algorithms course, there's a question in the book that goes as follows: "You are given an array a[1..n] of positive numbers and an integer k. You have to produce an array b[1..n], such that: for each j, b[j] is either 1 or 0. Array b has adjacent 1s...

how to loop through a four level json array using jquery

javascript,jquery,arrays,json,dynamic
Four level JSON data { "Asia": [ { "continentCode": "GT113", "regionList": [ { "regionName": "Eastern Asia", "regionCode": "GR128", "Countrylist": [ { "countryName": "China", "countryCode": "GC302", "subCountryList": [ { "subCountryName": "Southern China", "subCountryCode": "GR206" } ] }, { "countryName": "Hong Kong", "countryCode": "GC303" } ] }, { "regionName": "Southern Asia", "regionCode":...

Dynamically creating buttons in html with mysql row value

javascript,php,html,mysql,dynamic
I am drawing all my information from my sql database and displaying it in a table in html. I want to be able to click on a button at the end of each row, or somewhere on the row, and display another set of things relating to the uniqueID in...

Javascript dynamic inputs calculation

javascript,jquery,dynamic
I have a form which is dynamic and it calculates duration time. I can insert rows by clicking on Add a new row. My problem starts from the second row which can not be calculated because it is dynamic. Could you please help me with that. Thanks $(document).ready(function() { var...

Dynamic navigation links with Mysql, Php and Javascript

javascript,php,mysql,dynamic,navigation
My Javascript function actually works, but not on this code. I get all the content displayed, but the Navigation Links wont target my Iframe. Could anybody explain me what is wrong with my code? Here is my code: function goto(url) { document.getElementById("contentFrame").contentWindow.location.replace(url); } </script> <title>SOLSTEN</title> </head> <body> <div id="rubrik"><h1>SOLSTEN</h1></div> <?php...

Comparing dates using Dynamic Action on DatePicker Oracle Apex

oracle,dynamic,datepicker,action,oracle-apex
I have a date picker where the user simply chooses a date then a Dynamic Action is suppose to send an alert if the user clicks tomorrow(sysdate+1). The Datepicker term is the simple layout. The Dynamic Action--> Name: Valid Date Event: Change Selection type: Item(s) Item(s): datepicker_name Condition: equal to...

Set value for Spinner with custom Adapter in Android

android,dynamic,android-arrayadapter,android-spinner
I am developing a android application with spinner in a form. The spinner items and spinner values are different. I want to collect all the value from the from including spinner and set a rest api service to web back end. here is the response array. {"Status":true,"errorType":null,"countryList":[{"Code":"US","Name":"United States"},{"Code":"CA","Name":"Canada"},{"Code":"AU","Name":"Australia"},{"Code":"GB","Name":"United Kingdom"}]} I...

How to use Dynamic Variables?

excel-vba,variables,dynamic
Alright what did I do wrong? Found this on the web, tried it and got a type mismatch. Just trying to make my code more concise by having the variables define themselves, for e.g. Y(10), Y(11), Y(12), Y(13), or Y10 ... Y13, so I'll have 4 variables at the end...

I am getting error in this code as “invalid indirection”

c,memory,dynamic,indirection
I am trying to dynamically allocate a contiguous block of memory, store some integer value and display it. #include<stdio.h> #include<conio.h> void main() { int i; int *ptr; ptr=(void *)malloc(sizeof(int)*5); //allocation of memory for(i=0;i<5;i++) { scanf("%d",&ptr[i]); } for(i=0;i<5;i++) { printf("%d",*ptr[i]); //error is found here`` } } } ...

Can I access a control by the last portion of its ID in jQuery?

jquery,dynamic,sharepoint-2010
I have a dynamically-created control which I gave the ID "ckbxEmp" As I discovered by "Viewing Source," Sharepoint (or Chrome, or "somebody") impertinently and presumptuously re-Ids (and names it, and "for"s it) this control, giving it the Welsh-esque "ctl00_ctl24_g_1caf4ad1_092d_4224_bd10_28ab028aab50_ctl00_ckbxEmp" And so (I assume this is the reason), all attempts to...

Instantiate JS Object that take array of arguments from String name

javascript,class,object,dynamic
I have a JS class that takes in several arguments: var MyClassName = function(arg1, arg2, arg3){ // Do stuff }; I have a String that represents the class's name, and an array of arguments. var class = "MyClassName" var args = ["1", "2", "3"] Using the String of the class...

Grails Form Submission Fails with Dynamic Fields using JQuery

jquery,forms,grails,dynamic
I am using JQuery to show/hide divs that contain form fields. If a certain value from one drop down is selected, the div corresponding to the dependent form field is shown, otherwise it isn't. Grails does not allow the form to be submitted unless the dependent form field is shown....

Dynamic CTE's as part of a SProc in DB2/400

sql,dynamic,common-table-expression,ibm-midrange,db2400
I'm trying to write a SProc in db2/400 in a V7R2 environment which creates a CTE based on the parameters passed. I then need to perform a recursive query on the CTE. I'm running issues into creating and executing the dynamic CTE. According to http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_72/db2/rbafzpreph2.htm the prepare statement does not...

Multiple UILabels in UITAbleViewCell with dynamic height

uitableview,swift,dynamic,ios8,autolayout
In an empty UITableViewCell i have two UILabels aligned like this: |--label1----label2--|. Both of them will be populated dynamically. I need to set the constraints in a way that both labels remain center-aligned but the cell's height be determined by the label that has the most content. So far: Labels'...

Dynamically access methods from scala object

scala,dynamic,reflection
In Scala, what's the best way to dynamically call an object and invoke a method using reflection? The method corresponding to the object is to be called but the object name is known dynamically. I was able to instantiate a scala class dynamically from this SO question however I need...

Winforms RadPageView find control

c#,winforms,dynamic,telerik,tabcontrol
I have nested controls inside RadPageView control on a Winform application. RadPageView has a child RadPageViewPage. These two controls are on the form however a tab control and inside that tab control some other controls are added dynamically. How can I find and change the value of the Textbox inside...

Insert Dynamic PHP form into MySQL

php,mysql,dynamic
I have a form which is dynamic and user can add more rows to insert different hours, I wonder which is the best way to add those data to MySQL database. <input style="margin-left:28px;" type="image" class="add_field_button" src="img/add.png" /> <table id="dataTable" width="900" style="margin-left:25px; margin-top:10px;"> <tr style="text-align:center;"> <td width="70">From</td> <td>To</td> <td>Duration Hours</td> <td>Code</td>...

Angular range input value changing with seconds

angularjs,dynamic,range
I have an input that looks like this and it's hooked up to a controller that's increasing the value every second. If I set value to a number the page will reflect that when it loads but it won't reflect changes that are made dynamically. Do I have to use...

Hook into wpf xmlns namespace import

c#,wpf,xaml,dynamic,xmlns
Is it possible in WPF, to define a custom area from where xmlns-packages (namespaces) will be loaded. My aim is to define something like: xmlns:customUI="db-ui:IronPythonControl" so that i can load my control from the database and use it in xaml like this: <IronPythonControl x:Name="..." ... /> Thank you!...

C++: Two dynamic arrays causes memory allocation error

c++,arrays,dynamic
Here is my code: int main() { int length = 10; int* H = new int(length); for(int i=0;i<length;i++) { H[i] = 0; } for(int i=0;i<length;i++) cout << i << ": " << "\t" << H[i] << "\n"; double* dos = new double(length); for(int i=0;i<length;i++) { dos[i] = 1.0; } for(int...

What is the good way to create dynamic check boxes in list view and write click event in Android?

android,listview,dynamic,listactivity
Here is my scenario. I have a class that extended ListActivity class. In that class I receive a JSON String. Using that I make HashMapto include those values. Then I add those HashMap objects to the ArrayList. Then I make my list view. To create ListView I extend ArrayAdapter class....

Ripple effect over colored ImageButton?

java,android,android-layout,dynamic
I have a dynamically created ImageButton. Here is my code - ImageButton bar = new ImageButton(this); ... //some code parentView.addView(bar); Ripple effect appears when I click the ImageButton. But when I add the following line - bar.setBackgroundColor(Color.RED); The ripple effect doesn't appear anymore. Is there any way to make the...

EDIT/UPDATE comma seperated values into mysql rows and add new

php,jquery,ajax,dynamic,mysqli
EDIT/UPDATE comma seperated values into rows and add new Hello i am trying to edit products with ajax in different rows then update and add new rows from a form creating dynamic fields using the same name[] but dont know how to pull them to edit them then update them...

AngularJS : How to make dynamic field button only for last button?

javascript,angularjs,dynamic,angularjs-ng-repeat
In the dynamic input field is there any option to implement plusSign = true only for the last item ? (function() { var app = angular.module('managementApp', []); // var app = angular.module('managementApp', ['ngRoute']); app.controller('phonebookController', function($scope, $http) { $scope.dynamicField = function(buttonStatus, inputIndex) { if (!buttonStatus) { $scope.currentContact.contacts.push({ "phone": "" }); }...

C#: Call overloaded method in external assembly from generic

c#,generics,dynamic
I have a project that references a 3rd party c# assembly containing several overloaded instance methods. I want to invoke one of these methods via a generic in my code, calling the instance method whose parameter type matches the type of the generic: void GetVal<T>(ref T val) { VendorLib v...

Convert Apache VirtualHost to nginx Server Block for Dynamic Subdomains

apache,dynamic,nginx,vhosts
I have a web app running on Apache where the virtual hosts file is configured to route requests to subdomains to specific folders. Rather than having to modify the host file every time a subdomain is created, this allows me to dynamically route URLs to the relevant folder (with a...

why does the following code crash. (dynamic memory)?

c++,memory,dynamic
My program counts the occurrence of each digit from 0 to 9 in a string. It seems to me that i have done everything correctly, but a problem still persists. int main(){ string word = "23456745"; int* ReturnArray = count(word); for(int i =0; i < 10; i++){ cout << i...

Give arguments to function in a dynamic way

php,dynamic
I'm currently looking for a way to give arguments to a function dynamically. Some code to explain: //Class: ClassXY PUBLIC function function1($arg1, $arg2, $arg3); PUBLIC function function2($arg1); I currently call it like this: // $method = 'function1' or 'function2' echo ClassXY :: {$method}($parameter_string); My problem is, that parameter_string either is...

Getting index of clicked row that's dynamically created

jquery,events,table,dynamic,row
I've created a table with three rows that can be expanded with the use of an add button. I want to know the index of every row I click. I have a piece of code that works just fine on the three automatically generated rows, but not on the rows...

How to define events dynamically in backbone.js

javascript,events,backbone.js,dynamic
I have more click events inside my view like events:{ 'click #link1':'showDetails', 'click #link2':'showDetails', 'click #link3':'showDetails', 'click #link4':'showDetails', 'click #link5':'showDetails', 'click #link6':'showDetails', 'click #link7':'showDetails', 'click #link8':'showDetails', 'click #link9':'showDetails', 'click #link10':'showDetails', 'click #link11':'showDetails', 'click #link12':'showDetails', 'click #link13':'showDetails', 'click #link14':'showDetails', 'click #link15':'showDetails', 'click #link16':'showDetails',...

Basic C++ dynamic allocation issue

c++,dynamic
There is some basic facet of this that I'm completely missing. I have an object containing a set PropertyContainer::PropertyContainer(string comFile, string resFile) { set<Property*>* prCont = new set<Property*>(); ... } In my main I'm calling PropertyContainer* ptrPropertySet = new PropertyContainer(comFile, resFile); This constructor goes through and populates the set with...

How to find and check all dynamic child checkboxes in tree using jquery?

javascript,jquery,dom,dynamic,tree
I have added check-boxes dynamically to all the element and successfully added the functionality to select all checkboxes but not able to do the selection for the parent child checkboxes in tree structure means if i select the "Asia" it should select all "Estern Asia" and "Southern Asia", if i...

How to Dynamically name a Hash key in Ruby

ruby,dynamic,hash,key,erb
I'm trying to make a 'render' call in an erb file where the key of the hash is dynamically named. For example... <% object_type_abbr = ["pos", "job_description", "policy", "procedure", "step", "task", "product"] %> <%= render path.to_s, model_id: @model.id, object_type_abbr[i]: orphan, row_no: row_no, is_orphan: true %> The problem is this syntax...

How can I convert a hierarchical tree to parent-child relationships?

php,dynamic,menu,nested,hierarchical
At the moment, i'm creating a dynamic menu for my own CMS (practising) in PHP, but I don't know to save the data in my database. Database structure: menuitem_id menu_id menuitem_order menuitem_name menuitem_page_id parent_menuitem_id I do get this output as a hierarchical tree, but that isn't the desired format for...