Search Results

Search found 8536 results on 342 pages for 'indexed fields'.

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

  • Overriding unique indexed values

    - by Yeti
    This is what I'm doing right now (name is UNIQUE): SELECT * FROM fruits WHERE name='apple'; Check if the query returned any result. If yes, don't do anything. If no, a new value has to be inserted: INSERT INTO fruits (name) VALUES ('apple'); Instead of the above is it ok to insert the value into the table without checking if it already exists? If the name already exists in the table, an error will be thrown and if it doesn't, a new record will be inserted. Right now I am having to insert 500 records in a for loop, which results in 1000 queries. Will it be ok to skip the "already-exists" check?

    Read the article

  • Dynamic CCK fields population

    - by boogie
    Hi, How can I create two CCK fields where the latter has values based on the first selection? In my case I have a few programs which can be selected and then projects that are related to programs. I need to have two separate fields for them. Example: Programs: Program1 Program2 Projects: Project1 (related to Program1) Project2 (related to Program2) Project3 (related to Program2) If program "Program1" is selected, then the user should only be able to select "Project1" and in case of "Program2" is selected, the options should be "Project2" or "Project3". I'm using Drupal 6.20 and I've already tried using Conditional Fields and Computed Fields modules, but they don't really solve my problem. Any help is much appreciated!

    Read the article

  • Comparing 2 objects and retrive a list of fields with different values

    - by ajj
    Hi given a class with 35 fields and 2 objects with a certain number of different fields value. is there an clever way to get a list with the fields name where the objext Say obj1.Name = "aaa"; obj1.LastName = "bbb"; obj1.Address = "xcs"; obj2.Name = "aaa"; obj2.LastName = "ccc"; obj2.Address = "jk"; objective: list containing 2 strings LastName and Address I see reflection as the way to go but with 35 fields I am afraid it s to heavy. Any other idea, like linq? Thanks, a.

    Read the article

  • jQuery validation plugin for two fields

    - by jonathan p
    I am using the Jquery Validation plug-in, however i need to add a "custom rule", i have 2 date fields and i need to ensure that the end date is not less than the start date. My problem is how to pass the two fields in as elements. As i understand u set up a custom function something like this : function customValidationMethod(value, element, params){ } But can't see how i could use it with two fields, if anyone has any ideas it would be greatly appreciated.

    Read the article

  • Cross-update Word Fields

    - by Brent Arias
    I want to change a date in a field within my word document, and have it update a couple other fields automatically within the same document. The behavior I'm seeking is basically the same as what a spreadsheet can do. Is this possible? More specifically, if the first page of the document has the date Jan 20 2012, I want to be able to change it, and then watch a couple other dates elsewhere automatically change to either the same date or the same date plus six days. I would also "settle" for having all three fields updated from a central document property (though I don't know how to create one of those properties). Regardless of which approach is used, I want one of the dates to be <value> plus six days such as Jan 26 2012 based on the earlier example I gave.

    Read the article

  • Do I need to include all fields in my entity framework model

    - by Jim B
    Quick question for everyone: Do I need to include all the database table fields on my EF model? For example; I've created a sub-model that only deals with tblPayment and associated tables. Now, I need to write a LINQ query to get some information about items. I would typically get this by joining tblPayment to tblInvoice to tblInvoiceItem to finally tblOrderItem. I'm wondering if when I add in those other tables, do I need to include all the fields for tblInvoice and tblInvoiceItem? Ideally; I'd just like to keep the fields I'd need to join on, as that would limit the possibility of my sub-model breaking if other fields on those tables are modified/deleted. Can I do this?

    Read the article

  • Writing custom Django fields and widgets

    - by hekevintran
    Django has very good documentation that describes how to write custom database fields and custom template tags and filters. I cannot find the document that describes how to write custom form fields and widgets. Does this document exist? The way I've been able to write custom form fields and widgets is by reading the Django source code and imitating what I see there. I know that there are still things about implementing fields and widgets that I do not completely understand because I have not read any high level document that describes their interfaces.

    Read the article

  • Lotus Notes: Searching email by fields

    - by themel
    I'm using Lotus Notes 8.5.2 in a large corporate deployment. I'm trying to figure out how to search my email in a structured manner, e.g. by specifying criteria on fields. The help seems to suggest that I can use fields in square brackets and a list of operators, e.g. to find all mail where the From field contains John, I'd search for /[From] CONTAINS John However, I can't get this to work - any operator style query I've tried returns zero documents. "Web-style" queries (e.g. typing John into the search dialog) work, but I'd really prefer a way that would let me search more precisely. Potential issues: I'm assuming that the field names can be taken from the list of things I see when I open a mail and look at its Document Properties. Full text indexing is turned off for my mailbox, and all my attempts to create my own have failed. Does anyone have better information on searching by from/date/subject conditions in Notes?

    Read the article

  • CakePHP - Paginate / Query: find lowest of multiple fields & order by it

    - by Atea
    I am using CakePHP for a price-comparison website. I have a table products with fields: id, pride_regular, price_action. I would like to combine the fields price_regular and price_action into a dynamic field: price. The lowest value of these two fields should be the value of the new price field. Also I want to order on it Ascending. Should I use a custom MySQL-query?

    Read the article

  • Writing custom Django form fields and widgets

    - by hekevintran
    Django has very good documentation that describes how to write custom database fields and custom template tags and filters. I cannot find the document that describes how to write custom form fields and widgets. Does this document exist? The way I've been able to write custom form fields and widgets is by reading the Django source code and imitating what I see there. I know that there are still things about implementing fields and widgets that I do not completely understand because I have not read any high level document that describes their interfaces.

    Read the article

  • Showing fields as readonly in Edit Form of List Item in SharePoint

    - by Graeme
    I have a list which has 5 columns in it. Some of these fields help the user fill in the data but I don't want the user to modify these fields. I have tried changing the field to readonly but that ends up hiding the field completely from the form. Is there a way to get the field to render out to the form as just text? Maybe I need to use javascript to disable the fields programmatically - would prefer not to go down that route though..

    Read the article

  • Adding date to multiple fields via datepicker

    - by Andy
    i have a form in drupal with jquery based date module. there are multiple fields with date picker enabled. i want to set the value of all of them (they all have class .date-popup-init) to the value of the first field (#edit-field, the 'from' date) when that field is set. my code so far: <script type="text/javascript"> var DatePicked = function() { var firstdate = $("#edit-field"); var updater = firstdate.datepicker("getDate"); $(".date-popup-init").each(function(){ $(this).datepicker("setDate", updater); }); } $(function() { $("#edit-field").datepicker({ onSelect: DatePicked }); }); </script> this seems to randomly work; it sets the date of some fields to the value of #edit-field, seemingly different fields each time. also, the form adds more datepicker-enabled fields via ajax. is there any way to ensure that all these new fields, when they load, pick up the value of #edit-field as well? disclaimer: last night was my first attempt at javascript of any kind. i have a basic idea now. the above was cobbled through countless google examples.

    Read the article

  • Codeigniter: Controller URI with Library

    - by Kevin Brown
    I have a working controller and library function, but I now need to pass a URI segment to the library for decision making, and I'm stuck. Controller: function survey($method) { $id = $this->session->userdata('id'); $data['member'] = $this->home_model->getUser($id); //Convert the db Object to a row array $data['manager'] = $data['member']->row(); $manager_id = $data['manager']->manager_id; $data['manager'] = $this->home_model->getUser($manager_id); $data['manager'] = $data['manager']->row(); if ($data['manager']->credits == '0') { flashMsg('warning',"You can't complete the assessment until your manager has purchased credit."); redirect('home','location'); } elseif ($data['manager']->test_complete == '3'){ flashMsg('warning',"You already completed the Assessment."); redirect('home','location'); } else{ $data['header'] = "Home"; $this->survey_form_processing->survey_form($this->_container,$data); } } Library: function survey_form($container) { if($method ==1){ $id = $this->CI->session->userdata('id'); // Setup fields for($i=1;$i<18;$i++){ $fields["a_".$i] = 'Question '.$i; } for($i=1;$i<17;$i++){ $fields["b_".$i] = 'Question '.$i; } $fields["company_name"] = "Company Name"; $fields['company_address'] = "company_address"; $fields['company_phone'] = "company_phone"; $fields['company_state'] = "company_state"; $fields['company_city'] = "company_city"; $fields['company_zip'] = "company_zip"; $fields['job_title'] = "job_title"; $fields['job_type'] = "job_type"; $fields['job_time'] = "job_time"; $fields['department'] = "department"; $fields['supervisor'] = "supervisor"; $fields['vision'] = "vision"; $fields['height'] = "height"; $fields['weight'] = "weight"; $fields['hand_dominance'] = "hand_dominance"; $fields['areas_of_fatigue'] = "areas_of_fatigue"; $fields['injury_review'] = "injury_review"; $fields['job_positive'] = "job_positive"; $fields['risk_factors'] = "risk_factors"; $fields['job_improvement_short'] = "job_improvement_short"; $fields['job_improvement_long'] = "job_improvement_long"; $fields["c_1"] = "Near Lift"; $fields["c_2"] = "Middle Lift"; $fields["c_3"] = "Far Lift"; $this->CI->validation->set_fields($fields); // Set Rules for($i=1;$i<18;$i++){ $rules["a_".$i]= 'hour|integer|max_length[2]'; } for($i=1;$i<17;$i++){ $rules["b_".$i]= 'hour|integer|max_length[2]'; } // Setup form default values $this->CI->validation->set_rules($rules); if ( $this->CI->validation->run() === FALSE ) { // Output any errors $this->CI->validation->output_errors(); } else { // Submit form $this->_submit(); } // Modify form, first load $this->CI->db->from('be_user_profiles'); $this->CI->db->where('user_id' , $id); $user = $this->CI->db->get(); $this->CI->db->from('be_survey'); $this->CI->db->where('user_id' , $id); $survey = $this->CI->db->get(); $user = array_merge($user->row_array(),$survey->row_array()); $this->CI->validation->set_default_value($user); // Display page $data['user'] = $user; $data['header'] = 'Risk Assessment Survey'; $data['page'] = $this->CI->config->item('backendpro_template_public') . 'form_survey'; $this->CI->load->view($container,$data); } else{ redirect('home','location'); } } My library function doesn't know what to do with Method...and I'm confused. Does it have something to do with instances in my library?

    Read the article

  • Jquery Ketchup Form Validation not initializing required fields

    - by Aaron R
    We are trying to implement jquery ketchup demos.usejquery.com/ketchup-plugin/ and use required fields for the name, email and phone fields we have included all the markup and I think I have it setup properly but the form fields are not validating... You can see my sample here... thx for any assistance I have been staring at this for hours... http://c5.dealercontrol.net/service/service-appointment/

    Read the article

  • Find duplicates lines based on some delimited fileds on line

    - by Oliv
    Hello, I have a file with lines having some fields delimited by "|". I have to extract the lines that are identical based on some of the fileds (i.e. find lines which contain the same values for fields 1,2,3 12,and 13) Other fields contents have no importance for searching but the whole extracted lines have to be complete. Can anyone tell me how I can do that in KSH scripting (By exemple a script with some arguments (order dependent) that define the fileds separator and the fields which have to be compared to find duplicates lines in input file ) Thanks in advance and kind regards Oli

    Read the article

  • Windows 8 Google Contacts Sync doesn't sync custom fields

    - by Nishant
    I installed Windows 8 Pro a couple days ago. In the in-built "People" app, since there were options to sync contacts with several third party services like Facebook, Linkedin etc., I wanted to sync my Google contacts to the People app. The sync was successful and all my contacts migrated properly. However, the age old problem of custom fields not syncing between Google/Apple/Windows apps is still present. If a field label in my Google contacts is 'iPhone', it doesn't sync! Nor do any other custom fields except 'home' or 'work' with numbers. Is there a solution to this or any other workaround?

    Read the article

  • Multiple fields from LINQ to Text Box

    - by Chuki2
    how can I pass value from selected field (LINQ) to textbox in winforms? If single fields, I just do like this var result = from row in dtValueBranch.AsEnumerable() where row.Field<int>("branchID") == idBranch select row.Field<string>("branchName"); StringBuilder sb = new StringBuilder(); foreach (string s in result) { sb.Append(s + Environment.NewLine); } tbBranch.Text = sb.ToString(); So this is the code LINQ to many fields var result = from row in dtValueBranch.AsEnumerable() where row.Field<int>("branchID") == idBranch select new { BranchName = row["branchName"].ToString(), branchTel = row["branchTel1"].ToString(), // And many more fields }; How can I to implement each fields to each textbox?

    Read the article

  • Office 2007 Mail Merge: How do I view field names instead of data?

    - by One Monkey
    I've just received a document which forms the basis of a mail merge as an attachment and I need to view the field names like they display in 2003 with the double chevrons e.g. <<titles>><<initials>><<surname>> However even though I get a dialogue as I open the docx file saying that it is going to attempt to merge from a file (which I don't have) and I cancel that operation the document still displays merge data e.g. Mr A Test Instead of the field names. I have clicked on the fields which turn grey to demonstrate that they are fields but I can't find a way to make it display the field names not the data. I don't even know where it's getting the data from as I don't have the data source file for the document to use.

    Read the article

  • MySQL PHP | "SELECT FROM table" using "alphanumeric"-UUID. Speed vs. Indexed Integer / Indexed Char

    - by dropson
    At the moment, I select rows from 'table01' using: SELECT * FROM table01 WHERE UUID = 'whatever'; The UUID column is a unique index. I know this isn't the fastest way to select data from the database, but the UUID is the only row-identifier that is available to the front-end. Since I have to select by UUID, and not ID, I need to know what of these two options I should go for, if say the table consists of 100'000 rows. What speed differences would I look at, and would the index for the UUID grow to large, and lag the DB? Get the ID before doing the "big" select 1. $id = "SELECT ID FROM table01 WHERE UUID = '{alphanumeric character}'"; 2. $rows = SELECT * FROM table01 WHERE ID = $id; Or keep it the way it is now, using the UUID. 1. SELECT FROM table01 WHERE UUID '{alphanumeric character}'; Side note: All new rows are created by checking if the system generated uniqueid exists before trying to insert a new row. Keeping the column always unique. The "example" table. CREATE TABLE Table01 ( ID int NOT NULL PRIMARY KEY, UUID char(15), name varchar(100), url varchar(255), `date` datetime ) ENGINE = InnoDB; CREATE UNIQUE INDEX UUID ON Table01 (UUID);

    Read the article

  • In google app engine, how to iterate through form fields (python, wsgiref.handlers)

    - by MarcoB
    Using python and wsgiref.handlers, I can get a single variable from a form with self.handler.request.get(var_name), but how do I iterate through all form variables, be they from GET and POST? Is it something like this? for field in self.handler.request.fields: value = self.handler.request.get(field) Again, it should include both fields included in the POST and fields from the query string, as in a GET request. Thanks in advance folks...

    Read the article

  • Displaying conditional amount of fields in UI (Android)

    - by Sochin
    I am using layout xml documents for my ui controls. I need to create and remove these controls (input fields) on the fly, based on how many results I get back from my database. For each group, there can be 0..* fields and these are prepopulated from the database. Also, it would be good if I can invoke a method to create an additional field; something like the address book, where you can click + or - to add or remove a phone or other detail. In a "psuedo" style, I'm guessing something like this: Check database - How many of X are there [y]? Create Y fields. The user may then add new fields, so once I click submit i need to apply all of that to database. Any examples or hints greatly welcomed. Hope this make sense! :)

    Read the article

  • Relating text fields to check boxes in Java

    - by Finzz
    This program requires the user to login and request a database to access. The program then gets a connection object, searches through the database storing the column names into a vector for later use. The problem comes with implementing text fields to allow the user to search for specific values within the database. I can get the check boxes and text fields to appear using a gridlayout and add them to a panel. How do I relate the text fields to their appropriate check box? I've tried adding them to a vector, but then they can't also be added to the panel as well. I've searched for a way to name the text fields as the loop cycles through the column names, but it seems impossible to do without having them declared ahead of time. This can't be done either, as it's impossible to determine the attributes that the user will request. I just need to be able to know the names of the text fields so I can test to see if the user entered information and perform the necessary logic. Let me know if you have to see the rest of the code to give an answer, but hopefully you get the general idea of what I'm trying to accomplish. Picture of UI: try { ResultSet r2 = con.getMetaData().getColumns("", "", rb.getText(), ""); colNames1 = new Vector<String>(); columns1 = new Vector<JCheckBox>(); while (r2.next()) { colNames1.add(r2.getString(4)); JCheckBox cb = new JCheckBox(r2.getString(4)); JTextField tf = new JTextField(10); columns1.add(cb); p3.add(cb); p3.add(tf); } }

    Read the article

  • Disable Dojo validation on certain fields

    - by Eric LaForce
    I would like to disable client side validation on certain fields in my user form. Currently I have two sets of fields that are displayed depending on the value of a previous drop down list. i.e. if the drop down list is set to value "A" 1 new field appears in the form. If the drop down list is set to value "B" 3 new fields appear in the form (mutually exclusive from the new form field when "A" is selected). Currently my Dojo client side validation fails because the fields that are not shown to the user (and thus no data can be inserted into those fields) fails to validate. Currently I determined that I can set the "validate" attribute to return true like so: <input type="text" id="companycity" name="companycity" class="textinput" value="<?php echo set_value('companycity'); ?>" style="<?php if(isset($errorData['companycity'])){echo $errorData['companycity'];} ?>" dojotype="dijit.form.ValidationTextBox" required="true" trim="true" validate='return true'" regexp="([a-zA-Z]{1,25})" invalidMessage="Invalid value. Must be between 1 and 25 alphabetic characters long."> This fixes my issue for hidden fields. However this now means that no validation is performed when this field becomes visible to the user (i.e. the validate attribute is still set to return true). I have tried removing the validate property when a field is displayed to the user like so: dijit.byId('companycode').attr('validate',''); This just set the attribute to nothing. This however gives errors in firebug saying validate method not found, so I take that to mean I did not remove this attribute correctly or removing this attribute is not the appropriate way to do this. I have also looked at overriding the validator method here but this doesnt seem like what I want either. I do not want to have to rewrite all the validation methods in place of dojo's. I just want dojo not to validate if the field is not visible to the user. Thanks for any advice or help.

    Read the article

  • merging indexed array in Python

    - by leon
    Suppose that I have two numpy arrays of the form x = [[1,2] [2,4] [3,6] [4,NaN] [5,10]] y = [[0,-5] [1,0] [2,5] [5,20] [6,25]] is there an efficient way to merge them such that I have xmy = [[0, NaN, -5 ] [1, 2, 0 ] [2, 4, 5 ] [3, 6, NaN] [4, NaN, NaN] [5, 10, 20 ] [6, NaN, 25 ] I can implement a simple function using search to find the index but this is not elegant and potentially inefficient for a lot of arrays and large dimensions. Any pointer is appreciated.

    Read the article

  • j query validation plugin for two fields

    - by jonathan p
    I am using the Jquery Validation plug-in, however i need to add a "custom rule", i have 2 date fields and i need to ensure that the end date is not less than the start date. My problem is how to pass the two fields in as elements. As i understand u set up a custom function something like this : function customValidationMethod(value, element, params){ } But can't see how i could use it with two fields, if anyone has any ideas it would be greatly appreciated.

    Read the article

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