Search Results

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

Page 10/365 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Running a cronjob

    - by Ed01
    've been puzzling over cronjobs for the last few hours. I've read documentation and examples. I understand the basics and concepts, but haven't gotten anything to work. So I would appreciate some help with this total noob dilemma. The ultimate goal is to schedule the execution of a django function every day. Before I get that far, I want to know that I can schedule any old script to run, first once, then on a regular basis. So I want to: 1) Write a simple script (perhaps a bash script) that will allow me to determine that yes, it did indeed run successfully, or that it failed. 2) schedule this script to run at the top of the hour I tried writing a bash script that simple output some text to the terminal: #!/bin/bash echo "The script ran" Then I dropped this into a .txt file MAILTO = *****.******@gmail.com 05 * * * * /home/vadmin/development/test.sh But nothing happened. I'm sure I did many things wrong. Where do I start to fix all of this?

    Read the article

  • How to close all, or only some, tabs in Safari using AppleScript?

    - by Form
    I have made a very simple AppleScript to close all tabs in Safari. The problem is, it works, but not completely. The problem is that only a couple of tabs are closed. Here's the code: tell application "Safari" repeat with aWindow in windows repeat with aTab in tabs of aWindow if [some condition is encountered] then aTab close end if end repeat end repeat end tell I've also tried this script: tell application "Safari" repeat with i from 0 to the number of items in windows set aWindow to item i of windows repeat with j from 0 to the number of tabs in aWindow set aTab to item j of tabs of aWindow if [some condition is encountered] then aTab close end if end repeat end repeat end tell ... but it does not work either (same behavior). I tried that on my system (MacBook Pro jan 2008), as well as on a Mac Pro G5 under Tiger and the script fails on both, albeit with a much less descriptive error on Tiger. Running the script a few times closes a few tab each time until none is left, but always fails with the same error after closing a few tabs. Under Leopard I get an out of bounds error. Since I am using fast enumeration (not using "repeat from 0 to number of items in windows") I don't see how I can get an out of bounds error with this... My goal is to use the Cocoa Scripting Bridge to close tabs in Safari from my Objective-C Cocoa application but the Scripting Bridge fails in the same manner. The non-deletable tabs show as NULL in the Xcode debugger, while the other tabs are valid objects from which I can get values back (such as their title). In fact I tried with the Scripting Bridge first then told myself why not try this directly in AppleScript and I was surprised to see the same results. I must have a glaring omission or something in there... (seems like a bug in Safari AppleScript support to me... :S) I've used repeat loops and Obj-C 2.0 fast enumeration to iterate through collections before with zero problems, so I really don't see what's wrong here. Anyone can help? Thanks in advance!

    Read the article

  • EC2 hosted service multi-tenant dynamic DNS solution

    - by accidental admin
    I want to change the model of my EC2 hosted service to have a separate sub domain for each tenant (ie. .example.com). My primary DNS is now with dnsmadeeasy.com, but their dynamic DNS offering seem pretty weak: it requires the API to use my full dnsmadeeasy.com account credentials, I rather have the API use a limited privilege credential that can only add/remove/modify subdomain records from what I gather it only allows to modify existing records, does not allow me to dynamically add/remove records for new tenant subdomains My question what are my alternatives? Is there something in the dnsmadeeasy API offering I misunderstood and I should just use them? Is there some other similar DNS service that has a DDNS offering that satisfies my requirements? Or should I just bite the bullet and host my own DNS (my fear is not configuration/learning/know how, my fear is reliability). If you recommend the latter, can you detail the necessary steps or a link to a good tutorial how to?

    Read the article

  • dynamic routing between openvpn tunnels

    - by pQd
    i'm thinking about using dynamic routing [ OSPF or RIP ] via OpenVPN tunnels. right now i have few offices connected in full mesh, but this is not scalable solution as we add more locations. i would like to avoid situation when plenty of internal traffic is affected if one of two vpn termination points that i plan to use is down. do you have similar configuration working in production? if so - what routing daemon did you use - quagga? something else? did you encounter any problems? thanks!

    Read the article

  • Godaddy hosting with dynamic ip?

    - by Razor Storm
    I bought a domain name on godaddy.com let's call it www.website.com, but my server has a dynamic ip, how do I resolve this issue? What I've tried: get a dns account at dyndns.com let's call it dns.dyndns.com, so I set up godaddy to forward the domain to dns.dyndns.com. problem: When the user goes to www.website.com, they see dns.dyndns.com in the url bar. Bad So then I set up the forwarding on godaddy to forward with domain masking, but then the problem is now that users can't even see url paths/get queries/ or hash marks anymore! `www.website.com/folder/search?id=4#ajax=4` becomes just www.website.com in the url bar. bad! What do I do?

    Read the article

  • Dual boot Windows 7 with Windows 8- Dynamic Disk

    - by MeetM
    Its a long explanation. I have a HP Pavilion dm4 notebook. It has pre installed Windows 7 Home Pre. Recently, I tried to install Windows 8 developer preview on my notebook, but while installing, it only allowed me to insatll it on my primary Windows 7 drive I.e. drive C. I had kept 1 empty partition for Windows 8 but when I selectced that option, the next button at the bottom of the window just grey with some error saying Windows cannot boot from this drive....blah blah blah So I googled and found another way of doing it by VHD(virtual hard disk). This seemed to work but on restarting gave me "VHD_BOOT_INITIALIZATION_FAILED" error. After trying all possible ways for around 10 times, I gave up. I noticed that d only thing difference in d tutorials and my notebook is the Disk type. They all had Basic and I have Dynamic. Is that the reason m not able to boot Windows 8? Any suggestions?

    Read the article

  • Change location of RSS Dynamic Desktops

    - by Andy
    I'm currently using CCleaner to take care of my computer, but I also have a dynamic desktop background provided by Bing (I'm running Windows 7 HP) - and unfortunately the two conflict. Whenever I 'clean' my computer using CCleaner it messes up my destop backgrounds as they are stored in the temporary internet files directory, and for some reason I don't appear to be able to get as far as the 'Enclosures' sub directory in order to tell CCleaner to exclude the directory (I can see it in Windows Explorer but not in CCleaner's directory browser). Therefore, I am looking for an alternative solution to this problem and wondered if I could change the directory to which the images were downloaded on the RSS feed. If anybody knows how to do this, I would be grateful if you could share or indeed, I would be equally as greatful if anyone knows any other ways of getting around CCleaner. Please note that I don't want to stop cleaning the whole of my temporary internet files though - I just don't want the wallpapers that have been downloaded to be deleted... Thanks in advance!

    Read the article

  • Running a home mail server using dynamic dns [closed]

    - by Anand
    Hi, Is it possible to run an email server on my home box using dynamic dns? The scenario is, I want to auto cc all incoming and outgoing emails from my one account to another, from some server side config instead of configuring email clients for rules. I have tried Google Apps Mail but it doesn't allow auto cc of outgoing emails. After having read tons of blogs, forum messages etc (hope I have been reading the correct info :) ) the only option to achieve what I am needing is to setup my own mail server, but the cost of getting a static IP doesn't fit my budget. Please can someone point me in the correct direction. Platform doesn't matter, I can setup a Windows or Linux server. Many Thanks

    Read the article

  • Dynamic Subdomains

    - by crash
    On my new site I want to have dynamic subdomains. I'm trying to make it so that the subdomains use the same web root as the main domain, all under a single CodeIgniter installation. For example, subdomain.example.com would lead to example.com/subdomain, which is actually example.com/index.php/subdomain. I've already the DNS, virtual hosts set up but I"m getting caught up on the .htaccess. The effect of the linked htaccess is that when navigating to any subdomain, it gets caught up in an infinite loop. (Error log after one request.) It's the same effect for www., which should just resolve to the main domain.

    Read the article

  • Running a home mail server using dynamic dns

    - by user4009
    Hi, Is it possible to run an email server on my home box using dynamic dns? The scenario is, I want to auto cc all incoming and outgoing emails from my one account to another, from some server side config instead of configuring email clients for rules. I have tried Google Apps Mail but it doesn't allow auto cc of outgoing emails. After having read tons of blogs, forum messages etc (hope I have been reading the correct info :) ) the only option to achieve what I am needing is to setup my own mail server, but the cost of getting a static IP doesn't fit my budget. Please can someone point me in the correct direction. Platform doesn't matter, I can setup a Windows or Linux server. Many Thanks

    Read the article

  • Update a DNS to a for a dynamic IP

    - by zobgib
    I want to use my schools connection as a place to host a small webserver but one problem I have run into is anytime my server reboots I am given a new IP inside the schools range. All of the schools IP are public and therefor I can access my computer directly over WAN just via the IP given in ifconfig. I would like to be able to give my computer a dns which is easy enough when I change the Arecords to match the current IP of my computer. The problem is if my computer ever reboots (my school regularly cycles power at night and over holidays) I am assigned a new IP and have to realize it then update the Arecords This is inconvenient and I figure there must be a better way to keep the DNS records updated either via a script or my own BIND server. That way if there is a power cycle I can still access the server via a Domain Name. If you have any direction to point me in it would be much appreciated. I am running Ubuntu 10.04 if that helps :).

    Read the article

  • zend tool is not working

    - by user362155
    Hi, I've installed ZendStudio 7.2 it creates project normally with no error but when i try to add action(s) in it, it says project profile does not exist. and the error log is as follow: executing zf create action showLatest index-action-included An Error Has Occurred A project profile was not found. Zend Framework Command Line Console Tool v1.10.2 Details for action "Create" and provider "Action" Action zf create action name controller-name[=Index] view-included[=1] module Failed loading ./ZendDebugger.so: (null) PHP Warning: PHP Startup: Unable to load dynamic library './ext/bcmath.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/bz2.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/calendar.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/ctype.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/curl.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/exif.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/fileinfo.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/ftp.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/gd.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/imagick.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/json.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/ldap.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/mbstring.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/mcrypt.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/memcache.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/mhash.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/mime_magic.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/mssql.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/mysql.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/mysqli.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/pcntl.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/pgsql.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/posix.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/shmop.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/soap.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/sockets.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/sqlite.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/sysvmsg.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/sysvsem.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/sysvshm.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/tidy.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/tokenizer.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/wddx.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/xmlreader.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/xmlrpc.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/xsl.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/zip.so' - (null) in Unknown on line 0 please help me to configure latest ZendTool with ZendStudio 7.2 or how can i get rid of this. i am runin ZS 7.2 on my mac os x 10.5.8 thanks.

    Read the article

  • Dynamic fowarding with SOCKS5 proxy [on hold]

    - by bh3244
    I'm building my own SOCKS5 client and HTTP library and am having trouble figuring out how things work with dynamic port forwarding. So far I can connect successfully with my SOCKS5 client, but from there on I am stuck. I am using the ssh -D command. Considering I have my local machine "home" and my server "server" and I wanted to use "server" as proxy for all connections I understand I would type ssh -D "localport" "serverhostname" on my local machine "home". This command I understand has ssh accept connections with the SOCKS5 protocol. So now if I want to connect to google.com(74.125.224.72:80) and issue a GET for the front page, I assume I would send the SOCKS5 client request and the server would respond back with a 0x00 "succeeded" and from then on I am connected and I would send the HTTP GET request and the server would respond back accordingly with the data. Now if I want to navigate to a different website, must I issue another SOCKS5 connection request for that sites IP/hostname? I'm confused if this is the way it is done, or if there is a program listening on the local port of the "server" and handling outgoing and incoming data. To reiterate: Do SOCKS5 proxies work by sending repeated SOCKS5 connection requests for different addresses or is there just one connection to a local port on "server" and another program on "server" handles the outgoing connection to the internet by using that local port to send and receive data to/from "home"?

    Read the article

  • Why can't I renew my dynamic IP address?

    - by qwerty
    So, I'm going to explain this from the start. I've started a project with a friend of mine which includes a webspider, that crawls through all pages on a site and stores them in a DB. Since I've never done this before, I didn't think about the amount of requests I was actually sending to the site, and after a day or two I finally got my IP blocked. I need to be able to visit that site as it's very important to me. Not only for my project, but for other reasons too. (and if I'm able to renew my IP I'm going to set a delay on the crawler so I don't get blocked & DDOS the site) I have a dynamic IP address, at least that's what my router settings say. I've tried ipconfig /flushdns, ipconfig /release, restart computer. No result. I end up with the same IP address. I've also tried renewing it from the router, however, I think it uses the same method which isn't working. Is it possible that site has blocked my mac address? Can a site even access my mac address?

    Read the article

  • Dynamic Objects for ASPxGridview

    - by André Snede Hansen
    I have a dictionary that is populated with data from a table, we are doing this so we can hold multiple SQL tables inside this object. This approached cannot be discussed. The Dictionary is mapped as a , and contains SQL column name and the value, and each dictionary resembles one row entry in the Table. Now I need to display this on a editable gridview, preferably the ASPxGridView. I already figured out that I should use Dynamic Objects(C#), and everything worked perfectly, up to the part where I find out that the ASPxGridview is built in .NET 2.0 and not 4.0 where Dynamic objects where implemented, therefor I cannot use it... As you cannot, to my knowledge, add rows to the gridview programmatically, I am out of ideas, and seek your help guys! protected void Page_Load(object sender, EventArgs e) { UserValidationTableDataProvider uvtDataprovider = _DALFactory.getProvider<UserValidationTableDataProvider>(typeof(UserValidationTableEntry)); string[] tableNames = uvtDataprovider.TableNames; UserValidationTableEntry[] entries = uvtDataprovider.getAllrecordsFromTable(tableNames[0]); userValidtionTableGridView.Columns.Clear(); Dictionary<string, string> firstEntry = entries[0].Values; foreach (KeyValuePair<string, string> kvp in firstEntry) { userValidtionTableGridView.Columns.Add(new GridViewDataColumn(kvp.Key)); } var dynamicObjectList = new List<dynamic>(); foreach (UserValidationTableEntry uvt in entries) { //dynamic dynObject = new MyDynamicObject(uvt.Values); dynamicObjectList.Add(new MyDynamicObject(uvt.Values)); } } public class MyDynamicObject : DynamicObject { Dictionary<string, string> properties = new Dictionary<string, string>(); public MyDynamicObject(Dictionary<string, string> dictio) { properties = dictio; } // If you try to get a value of a property // not defined in the class, this method is called. public override bool TryGetMember(GetMemberBinder binder, out object result) { // Converting the property name to lowercase // so that property names become case-insensitive. string name = binder.Name.ToLower(); string RResult; // If the property name is found in a dictionary, // set the result parameter to the property value and return true. // Otherwise, return false. bool wasSuccesfull = properties.TryGetValue(name, out RResult); result = RResult; return wasSuccesfull; } // If you try to set a value of a property that is // not defined in the class, this method is called. public override bool TrySetMember(SetMemberBinder binder, object value) { // Converting the property name to lowercase // so that property names become case-insensitive. properties[binder.Name.ToLower()] = value.ToString(); // You can always add a value to a dictionary, // so this method always returns true. return true; } } Now, I am almost certain that his "Dynamic object" approach, is not the one I can go with from here on. I hope you guys can help me :)!

    Read the article

  • Serialize C# dynamic object to JSON object to be consumed by javascript

    - by Jeff Jin
    Based on the example c# dynamic with XML, I modified DynamicXml.cs and parsed my xml string. the modified part is as follows public override bool TryGetMember(GetMemberBinder binder, out object result) { result = null; if (binder.Name == "Controls") result = new DynamicXml(_elements.Elements()); else if (binder.Name == "Count") result = _elements.Count; else { var attr = _elements[0].Attribute( XName.Get(binder.Name)); if (attr != null) result = attr.Value; else { var items = _elements.Descendants( XName.Get(binder.Name)); if (items == null || items.Count() == 0) return false; result = new DynamicXml(items); } } return true; } The xml string to parse: "< View runat='server' Name='Doc111'>" + "< Caption Name='Document.ConvertToPdf' Value='Allow Conversion to PDF'></ Caption>" + "< Field For='Document.ConvertToPdf' ReadOnly='False' DisplayAs='checkbox' EditAs='checkbox'></ Field>" + "< Field For='Document.Abstract' ReadOnly='False' DisplayAs='label' EditAs='textinput'></ Field>" + "< Field For='Document.FileName' ReadOnly='False' DisplayAs='label' EditAs='textinput'></ Field>" + "< Field For='Document.KeyWords' ReadOnly='False' DisplayAs='label' EditAs='textinput'></ Field>" + "< FormButtons SaveCaption='Save' CancelCaption='Cancel'></ FormButtons>" + "</ View>"; dynamic form = new DynamicXml(markup_fieldsOnly); is there a way to serialize the content of this dynamic object(name value pairs inside dynamic) form as JSON object and sent to client side(browser)?

    Read the article

  • NHibernate: Mapping different dynamic components based on a discriminator

    - by George Mauer
    My domain entities each have a set of "fixed" properties and a set of "dynamic" properties which can be added at runtime. I handle this by using NHibernate's dynamic-component functionality. public class Product { public virtual Guid Id { get; } public virtual string Name { get; set;} public virtual IDictionary DynamicComponents { get; } } Now I have the following situation public class Customer { public virtual Guid Id { get; } public virtual string Type { get; set;} public virtual IDictionary DynamicProperties { get; } } Where a CustomerType is something like "Online" or "InPerson". Furthermore an Online customer has dynamic properties "Name" and "IPAddress" and an InPerson Customer has dynamic properties "Name" and "Salesman". Which customer types are available and the extra properties on them are configured in meta-data which is used to generate hbm files on application start. I could figure out some way to knock this together using an intermediate DTO layer, but is there any support in NHibernate for this scenario? The only difficulty seems to be that all the different "types" of customer map to the same Customer class.

    Read the article

  • iTorque for a simple arcade game

    - by Herfus
    I have a basic understanding of programming, but I am no programmer. I've had a couple of a semesters with java programming, so we're talking pretty basic here. I have some scripting experience with game editors where I've created a few (simple) encounters, boss AI, abilities, events and so on. I've mostly done level design with UDK, Source and several other toolsets for a few years now, but I'd like to divert some of the focus to iphone-development. I've participated in a few development projects (source, udk, daot) where I've had a variety of roles (yet never beyond simple scripting). I have just finished prototyping an Iphone game (using game maker) and begun a bit more precise planning on what I'll have to do for the real version. The game is fairly simple, perhaps the best comparison in scope and complexity would be Doodlejump for iPhone. The reason I created the prototype was not just to answer a few questions about the gameplay, but to get some insight into what kind of problems I might face when trying to develop the real thing. I've been looking for engines that I can use for this. iTorque looks, so far, like the best option with a scripting language and WYSIWYG-editor. However the price is fairly steep and I'd like to prepare myself as much as possible before jumping into this, which is why I'm going to ask a few questions here. What kind of difficulties do you think I might run into, considering what you've read so far? Not just with torque, but development in general. I'm making this question mostly to have someone to reality check me. I usually achieve to do what I'm trying to do with scripting, but something tells me there's a very big difference between scripting an AI or an event and creating game logic. Will it be too much of a leap? Just how simple is it to use the Torque scripting language? Obviously I don't expect to be prepared, I expect it to be a learning process. However, I'd still like to be at least a bit confident on the time I'll have to dedicate to this first.

    Read the article

  • Scriptable user-interfaces/frameworks for automated UI testing

    - by AareP
    I'm planning on using scripting for automated UI testing. Main application is written in c#, and I want it to be scriptable, so I can do everything end-user can do, but programmatically. What do you think of software that provides an interface for scripting, like VBA macros in Excel? Can this be future of all programming, big and small? What is the best way to build such an interface for your own application, dll-based or by parsing own scripting language?

    Read the article

  • Dynamic programming - Coin change decision problem?

    - by Tony
    I'm reviewing some old notes from my algorithms course and the dynamic programming problems are seeming a bit tricky to me. I have a problem where we have an unlimited supply of coins, with some denominations x1, x2, ... xn and we want to make change for some value X. We are trying to design a dynamic program to decide whether change for X can be made or not (not minimizing the number of coins, or returning which coins, just true or false). I've done some thinking about this problem, and I can see a recursive method of doing this where it's something like... MakeChange(X, x[1..n this is the coins]) for (int i = 1; i < n; i++) { if ( (X - x[i] ==0) || MakeChange(X - x[i]) ) return true; } return false; Converting this a dynamic program is not coming so easily to me. How might I approach this?

    Read the article

  • asp.NET Dynamic Data Site and asp.NET MVC-2 site together

    - by loviji
    Hi, I have created firstly ASP.NET MVC 2. and write more functionality. After I create asp.NET Dynamic Data Site. now, when I click on run button in Visual Studio, mvc app. opened in browser as http://localhost:50062. and asp.NET Dynamic Data Site as http://localhost:58395/cms/. but i want to merge this app. in one. can I use asp.NET Dynamic Data Site and asp.NET MVC-2 at the same time?

    Read the article

  • Dynamic attributes with Rails and Mongoid

    - by japancheese
    Hello, I'm learning MongoDB through the Mongoid Ruby gem with Rails (Rails 3 beta 3), and I'm trying to come up with a way to create dynamic attributes on a model based on fields from another model, which I thought a schema-less database would be a good choice for. So for example, I'd have the models: class Account include Mongoid::Document field :name, :type => String field :token, :type => String field :info_needed, :type => Array embeds_many :members end class Member include Mongoid::Document embedded_in :account, :inverse_of => :members end I'm looking to take the "info_needed" attribute of the Account model and created dynamic attributes on the Member model based on what's inside. If club.info_needed was ["first_name", "last_name"], I'm trying to create a form that would save first_name and last_name attributes to the Member model. However, upon practice, I just keep getting "undefined method first_name=" errors on the Member model when trying to do this. I know MongoDB can handle dynamic attributes per record, but how can I get Mongoid to do this without an undefined method error?

    Read the article

  • how to make dynamic xaml in silverlight

    - by lina
    Good day! I want to make a form - a set of questions with different answer types: some questions have a number of answers and you can check one of the answers using radiobutton, other questions you should answer using a textbox, some answers have a datetime type and you choose answer for them using a DatePicker and so on. I get all information about the questions and answer types from a WCF service. I want to make this form using making a dynamic xaml but i've naver made dynamic xaml and I don't know exactly how to make it. Please, can you give me a council about dynamic xaml or maybe you have any other ideas about how to make this form? Thank you.

    Read the article

  • how to create local dynamic varables

    - by xielingyun
    this is my code, i want to use eval() to get the rule status and eval() nead local varables, there is many classes inherit class base, so i should to rewrite get_stat() in every class.i just want to avoid this, an idea is to create dynamic varables in get_stat(),eg. in class b it dynamic create var a and b how to create dynamic varables in function? or any other way to avoid this stupid idea i use python 3.2.3, locals() does not work class base(object): def check(self): stat = get_stat() def get_stat(self): pass class b(base): rule = 'a > 5 and b < 3' a = 0 b = 0 def update_data(self, a, b): self.a = a self.b = b def get_stat(self): a = self.a b = self.b return eval(rule) class b(base): rule = 'd > 5 and e < 3' d = 0 e = 0 def update_data(self, d, e): self.d = d self.e = e def get_stat(self): d = self.d e = self.e return eval(rule)

    Read the article

  • Pass dynamic data to mvc controller with AJAX

    - by Yustme
    How can I pass dynamic data with an AJAX call to an MVC Controller? Controller: public JsonResult ApplyFilters(dynamic filters){ return null; } The AJAX call: $(':checkbox').click(function (event) { var serviceIds = $('input[type="checkbox"]:checked').map(function () { return $(this).val(); }).toArray(); //alert(serviceIds); $.ajax({ type: 'GET', url: '/home/ApplyFilters', data: JSON.stringify({ name: serviceIds }), contentType: 'application/json', success: function (data) { alert("succeeded"); }, error: function (err, data) { alert("Error " + err.responseText); } }); //return false; }); Ideally would be that the filters would contain the serviceIds as a property For example like this: filters.ServiceIds. I got another filter for a date range and that one would be added like so: filters.DateRange. And server side get the filter as a dynamic object in the ApplyFilters()

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >