Search Results

Search found 1491 results on 60 pages for 'inputs'.

Page 37/60 | < Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >

  • improve my jquery validation plugin code

    - by Jared
    Hi All Just hoping soemone can help me to write better code than I can come up with on my own. I am using the jquery validation plugin. I have some fields that are mandatory ONLY if certain options are chosen. The below code works fine. But the thing is, is that that my list of 'OR's is much longer than I've put here. and it needs to be applied not just to 'directorsName' but a whole long list of inputs, selects etc. My question is.. how can I wrap up the code contained inside the RETURN? (so I dont have to keep repeating my 'OR's. I'm guessign I need a function but I'm unsure of the syntax) $("#myForm").validate({ rules: { directorsName : { required: function(element) { return ( $('#account_for').val() == "Joint" || $('#directors_number').val() == "2" || $('#directors_number').val() == "3" ); } } } }); Thanks in advance

    Read the article

  • Writing WCF messages to a text log in configurable directory.

    - by Arsh
    Hello everyone, I have a WCF web service that is deployed at IIS. Part of the web service is to validate the inputs using EntLib 4.1 For ex, the string values can be of specific length and so on. In case of the validation being failed a fault exception is raised and the service is supposed to write the message in log file. How do I go about creating the log file to a location that can be configured from a config file. Basically how do we write messages from IIS (since the service is hosted at IIS, I am assuming that that will be the source !!!!) Regards.

    Read the article

  • Need Java Swing equivalent of "scrollIntoView" from Browser DOM

    - by bgould
    I have a JPanel with several levels of child components, also with a JScrollPane. I'm placing a focus listener on some of the child components to add some behavior to those components, but I would also like to have that component scroll into the JPanel's viewport when focus is gained. My question is, does anyone have a general purpose function to do this, similar to the browser DOM function "scrollIntoView"? I've tried muddling through this with various inputs to JComponent.scrollRectToVisible but I guess I haven't figured out the magic word. Thanks in advance.

    Read the article

  • Excel - Programming Cells

    - by Andrew
    I just started programming in Excel and I have a problem figuring some code out. I have created a work schedule in Excel with lists in order to add new people. I wanted to create a macro in which the user inputs a value in a cell (I chose B3) and depending on that 'start time' in cell B3, the headers for the lists all change to correspond with that starting time. For example: B3 says 5:00 am. All the headers will follow with: 5:00 am, 6:00 am, 7:00 am, etc. of course the headers will move at some point so I'm wondering how do you point to a cell that moves too?

    Read the article

  • Java multidimensional array and scanner novice Q

    - by Max
    I'm new to Java and trying to in essence implement a grid with a character, and if the user inputs 'w' 'a' 's' or 'd' the character moves up/down/left/right within the plane. I created a multidimensional array sized 10x10 public static String[][] grid = new String[10][10]; And then just used a for loop to print "*"s in a 10x10 grid, except for grid[a][b] which is equal to character "A" i.e. my thing to be moved around. That seemed to work alright, then I needed to detect the 'wasd' input from the user so I set up a: Scanner in = new Scanner (System.in); while (in.hasNext()) And I had then: String s = in.next(); char ch = s.charAt(0); switch (ch) but I couldn't make this work, and it wasn't because I didn't complete the "switch" statement, I did, I just see it void copying and pasting the entire thing. I'm sure its incredibly easy slight thing I am missing, can you please point it out for me?

    Read the article

  • Complexity in using Binary search and Trie

    - by user121196
    given a large list of alphabetically sorted words in a file,I need to write a program that, given a word x, determines if x is in the list. Preprocessing is ok since I will be calling this function many times over different inputs. priorties: 1. speed. 2. memory I already know I can use (n is number of words, m is average length of the words) 1. a trie, time is O(log(n)), space(best case) is O(log(n*m)), space(worst case) is O(n*m). 2. load the complete list into memory, then binary search, time is O(log(n)), space is O(n*m) I'm not sure about the complexity on tri, please correct me if they are wrong. Also are there other good approaches?

    Read the article

  • How to use Crypto++ to extract the textual information in a file?

    - by JL
    I have a file that is signed with a certificate located here. CrytoAPI has not worked out for me because of server differences in 2003 / 2008+, and different file inputs. I am now considering using Crypto++ to get the job done. Essentially, all I would like to do is extract the text information from this file, and others like it, and save it as XML. There are some bits in the XML that are marked as < encoded data but those sections are just base64 encoded, so before I can get to the XML envelope, I need to deal with the certificate thats obfuscating the plain text. Anyone with experience in Crypto++ know how this is done? With CrytoAPI, I was doing something like this : byte[] fileContents = File.ReadAllBytes(outFileName); var contentInfo = new ContentInfo(fileContents); var signedCms = new SignedCms(contentInfo); signedCms.Decode(fileContents); signedCms.RemoveSignature(0); byte[] outfileContent = signedCms.ContentInfo.Content;

    Read the article

  • What jquery code or plugin would I use to update the position of an element created by a plugin

    - by Breadtruck
    I am using a jquery plugin from [ FilamentGroup ] called DateRangePicker. I have a simple form with two text inputs for the start and end date that I bind the DateRangePicker to using this $('input.tbDate').daterangepicker({ dateFormat: 'mm/dd/yy', earliestDate: new Date(minDate), latestDate: new Date(maxDate), datepickerOptions: { changeMonth: true, changeYear: true, minDate: new Date(minDate), maxDate: new Date(maxDate) } }); I have a collapsible table above this form that when shown, moves the form and the elements that the daterangepicker plugin is bound to, down lower on the page, but the daterangepicker appears to keep the position from when it was actually created. What code could I put in the daterangepicker's onShow Callback to update its position to be next to the element is was initially bound to? Or is there some specific jquery method or plugin that I could chain to the daterangepicker plugin so that it will update its position correctly. This would come in handy for some other plugins that I use that don't seem to keep their position relative to other elements correctly either.

    Read the article

  • Get back the default browser styling for input fields

    - by meo
    I need to style all the input fields but one. So i have set a rule for all the inputs on the site. For the seachfield i need to use the browser default, so i was thinking i could just inherit all the values i have set for the general input fields. (have tried border: none to) This does not work in FF nor Safari :( The border just gets transparent. http://jsfiddle.net/N5KKH/1/ Any idea how i could get the default browser styling back? EDIT: i need the first input field look like the second one: http://jsfiddle.net/N5KKH/2/

    Read the article

  • How to create a reusable form using COCOA bindings.

    - by Juliano Sott
    hi. I want to make a user interface in which the user can edit two objects at the same time. The main window would have a vertical split view and a form on each side of the view. The problem is that the two forms are identical and I don't want to duplicate the view components in the interface builder. I want to create the form one time and add a reference to it in each side of the split view, each one using a different object source. I could use a NSForm, but the form is not a simple grid of outputTexts and inputText. They have a master table, and diverse kinds of inputs types, like combos, in the detail. How do I create the reusable form using the interface builder? Or how can I do it programmatically? Do I have to create a subclass of NSView and add the individual components in the code? Thanks, Juliano

    Read the article

  • Separate config file for Providers

    - by Vivek
    Hi, In a small test project, I currently have the provider sections in the web.config. I want to move that to a separate config file, like providers.config. My current provider instantiation code is like: //Get the feature's configuration info ProviderConfiguration pc = (ProviderConfiguration)ConfigurationManager.GetSection(DATA_PROVIDER_NAME); This code works if the provider info is in web.config, but how to I read this info from another file (like providers.condfig) because it seems that the ConfigurationManager "reads" only web.config file. I may be missing something very simple here :) Would love to get more inputs on this. Thanks V

    Read the article

  • Is a safe accumulator really this complicated?

    - by Martin
    I'm trying to write an accumulator that is well behaved given unconstrained inputs. This seems to not be trivial and requires some pretty strict planning. Is it really this hard? int naive_accumulator(unsigned int max, unsigned int *accumulator, unsigned int amount) { if(*accumulator + amount >= max) return 1; // could overflow *accumulator += max; // could overflow return 0; } int safe_accumulator(unsigned int max, unsigned int *accumulator, unsigned int amount) { // if amount >= max, then certainly *accumulator + amount >= max if(amount >= max) { return 1; } // based on the comparison above, max - amount is defined // but *accumulator + amount might not be if(*accumulator >= max - amount) { return 1; } // based on the comparison above, *accumulator + amount is defined // and *accumulator + amount < max *accumulator += amount; return 0; }

    Read the article

  • how to add values in array

    - by nhoyti
    hi guys, i just want to ask help again. I've created a method to read values in gridview, i was able to get and read values from the gridview. The problem now, is how can i store the values inside an array and i want it to pass on the other page. here's the code i've created private void getrowvalues() { string combinedvalues; foreach (GridViewRow row in gvOrderProducts.Rows) { string prodname = ((Label)row.FindControl("lblProductName")).Text; string txtvalues = ((TextBox)row.FindControl("txtQuantity")).Text; combinedvalues = prodname + "|" + txtvalues; } } i want the result string combinedvalues to be put in an array or collection of strings which i can be access in other page. Is there a way to do it? Any inputs will be greatly appreciated. thanks!!

    Read the article

  • How do I pass custom action data from a Visual Studio Setup MSI to an output project via a Merge mod

    - by Lex
    I have a fully working Setup project within Visual Studio 2008 that takes inputs from a UI and passes them via a Custom Action to the output - this works perfectly. Now I have to change this so that the UI is still in a setup project but that the output is within a merge module. The current Custom Action Data looks much like the following with EditHostUrl coming from a UI dialog editbox. /HostUrl="[EditHostUrl]" I now need to pass this value to the merge module and then from there use it as an input for the custom action data to the project output but there does not seem to be any documentation on how to achieve this. To be clear Wix/InstallShield etc... are not currently options. I would also rather not embed the UI within the merge module (for reasons of separation and also it's not supported out of the box with visual studio).

    Read the article

  • Make the Enter key act like the submit button

    - by Michael Quiles
    How can I make it where some one presses the enter key on my form it will submit this code ? Ive tried the ligtning bolt events etc... but I can't seem to figure it out. private void xTripSubmitButton_Click(object sender, EventArgs e) { // Calculates the numbers from the input and output boxes/labels Miles = double.Parse(this.xTripDestinationTextBox.Text); Mpg = double.Parse(this.xTripMpgTextBox.Text); Price = double.Parse(this.xTripPricepgTextBox.Text); Output = Miles / Mpg; Coutput = Output * Price; //displays a message and the result for the numbers the user inputs this.xTripOutputLabel.Text = "Total gallons you would use: " + Output.ToString("0") + Environment.NewLine + "Total amount it will cost you: " + Coutput.ToString("C"); }

    Read the article

  • Simple Javascript question

    - by Rachel
    I have products : offer_id in javascript and am getting value of offer_id dynamically. Let say I get products : 12345 but now instead of that I want it to be as products : ;12345, than how can this be achieved in javascript. I have tried : products : ';'.offer_id products : ';'."offer_id" products : ';'.'offer_id' products : ";".offer_id But all of my above trials have failed and am getting syntax error for each one of those. I am newbie to Javascript and so would really appreciate any inputs.

    Read the article

  • Javascript Replace Child/Loop issue

    - by Charles John Thompson III
    I have this really bizarre issue where I have a forloop that is supposed to replace all divs with the class of "original" to text inputs with a class of "new". When I run the loop, it only replaces every-other div with an input, but if I run the loop to just replace the class of the div and not change the tag to input, it does every single div, and doesn't only do every-other. Here is my loop code, and a link to the live version: live version here function divChange() { var divs = document.getElementsByTagName("div"); for (var i=0; i<divs.length; i++) { if (divs[i].className == 'original') { var textInput = document.createElement('input'); textInput.className = 'new'; textInput.type = 'text'; textInput.value = divs[i].innerHTML; var parent = divs[i].parentNode; parent.replaceChild(textInput, divs[i]); } } }

    Read the article

  • Rapid Web Application Development ASP.net vs. Open Source Platforms

    - by Yaaqov
    Good morning - I'm an intermediate-level developer who wants to build on online data-driven app (CRUD with a few calculations and basic HTML form inputs, nothing fancy) that keeps track of user sessions, and looks "professional" (or at least not "homemade"). I'm looking to development something with the look-and-feel that users get from sites like: http://www.datamasher.org/ http://www.thisweknow.org/ (About page says it was made with Ruby on Rails, which I'm unfamiliar with) (stackoverflow.com) Any pointers on whether I should just go the Miscrosoft route, and develop in ASP.net with WebForms, or if there's a quick qay to do this kind of development (with a WYSIWYG environment) on an open-source platform? I'm willing to learn, if it's somethat I can use to quickly drag/drop, add code, and publish online. Templates would be a plus, too. I apologize is the question seems a bit vague.

    Read the article

  • Simple integer encryption

    - by tloflin
    Is there a simple algorithm to encrypt integers? That is, a function E(i,k) that accepts an n-bit integer and a key (of any type) and produces another, unrelated n-bit integer that, when fed into a second function D(i,k) (along with the key) produces the original integer? Obviously there are some simple reversible operations you can perform, but they all seem to produce clearly related outputs (e.g. consecutive inputs lead to consecutive outputs). Also, of course, there are cryptographically strong standard algorithms, but they don't produce small enough outputs (e.g. 32-bit). I know any 32-bit cryptography can be brute-forced, but I'm not looking for something cryptographically strong, just something that looks random. Theoretically speaking it should be possible; after all, I could just create a dictionary by randomly pairing every integer. But I was hoping for something a little less memory-intensive.

    Read the article

  • MVC way of handling data input

    - by korki
    I have a data input module where I add the information of my product and its sub information like: product basic info product price info product price details price info and price details are related to product and are lists In my web forms approach I would store my main product object on the view state and I would populate it's pricing info and details while doing ajax postbacks. This way I can create a compact module that is very user friendly in terms of defining a lot of data from one place without the need to enter these data from seperate modules. And when I am done I would do one product.save() and that would persist all the data to the respective tables on db. Now I am building similar app on .net mvc framework and pondering on what would be the good way of handling this on mvc. I don't resonate towards storing all this on client side till I click save. And saving to the db after each action makes me remember the days I was coding on asp. Will appreciate your inputs on ways to approach this on mvc framework

    Read the article

  • Help with PHP MySQL join

    - by kester martinez
    Please help me to understand proper join syntax. I have table named inventory which has: trans_id trans_items items -> item_id trans_user employees -> person_id trans_date trans_comment trans_inventory As you can see above, trans_items is a foreign key in items table, and trans_user is a foreign key in employees table. Now what I want to do is to display in HTML the inventory table, but instead of displaying the item id, I want the ITEM NAME to be displayed. Here is what I have done. Please note I'm using CodeIgniter. public function getData(array $inputs) { $this->db->select('trans_items, trans_user, trans_date, trans_inventory, trans_comment'); $this->db->from('inventory'); $this->db->order_by('trans_date desc'); return $this->db->get()->result_array(); }

    Read the article

  • Download manager for joomla

    - by anwar
    hi there everyone i have a question on joomla, i have made a site using joomla and in my site on the left navigation part there is my items and packages and on that left nav under that i want a download manager where the visitors can download all the case studys,wallpapers,questionnaires,showreels etc.. which iam having on my site and also on the left nav part i want a ip based messages like if any user from france enters the site it should say "welcome to our friends of France" so i want to know is there any specific component for doing all this or just need the inputs from u all on how to do all this through joomla and what will b the logic and it will b helpful u guys have any ideas about doing this in a different way. thanks a lot in advance...

    Read the article

  • Read Velocity Tokens/Tag from .vm file

    - by user1801660
    I have an application where in I am trying to create a velocity template repository which will help me centralise all my email templates and will allow me to create a communication hub. All templates will be called at runtime and populates with data via services. My problem is that I need to provide users with optional and compulsory params list when they define the template inputs for the velocity template. Is there a way to read the tokens/tags from the velocity template file and extract them?? Like I want a list of tokens $name.address.streetName to be available to me from .vm file. I do not want to go for Regex . I do not have to cache or reuse them , its just going to be a one time read and store the default,compulsory & optional params in the database. I am following these patterns : http://kickjava.com/src/org/apache/velocity/test/view/TemplateNodeView.java.htm How to use String as Velocity Template? Please advice.

    Read the article

  • OS monitoring using JAVA

    - by Puneri
    I'm planning to implement a framework for monitoring OS level resources: process network stats cpu info etc using JAVA. I see there is SIGAR API by Spring, which is implemented in native language and JAVA API being provided on top. But I will prefer not to have native stuff in my framework, rather for each OS will write a Java Class which will fetch required OS info by running system commands via JAVA Runtime. So I would like to have inputs/suggestions that one may have seen of not doing this in JAVA and use native app/api/jni. Any example will help for sure. I agree each OS has different commands to get these stats, but will prefer to have a Java Class per OS than have/load native code.

    Read the article

  • jquery find method

    - by yoda
    Hi, I have a function called using an anchor inside a form, and I need to get the values of the inputs inside the same form to perform certain actions. Problem is, the result is always undefined. Here's the code : $('#create_alert').live('click', function(e) { var form = $(this).parent().get(0); var id = $(form).find('input[name="id"]').val(); alert(id); }); .. and the context : <form name="create_alert"> <input type="hidden" name="id" value="1" /> <a href="#" type="text" id="create_alert" class="search-submit">CRIAR ALERTA</a> </form> Thoughts?

    Read the article

< Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >