Search Results

Search found 11632 results on 466 pages for 'field'.

Page 15/466 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Longer Form Fields in Drupal

    - by Slinger Jansen
    I have a really silly problem that has cost me a load of time already. I have created a content template with a URL in there. When I look at the HTML code for it, I see a big fat "maxlength=256" in the form tag. I'd like to expand the length of this field, because my customer wishes to enter really long links (over 500 characters). Any idea how I can change it? When I do a generic search through the code I see so many occurences of 256, but the length might just as well be in the database somewhere. I have of course made the database field a longer varchar (1024 sounded poetic to me), so that's something I don't have to worry about. I think it's silly, but the customer's always right, as we know. I am using Drupal 6.14.

    Read the article

  • Error editing a blob field in ArcGIS Engine

    - by Victor Grigoriu
    I have a GIS layer backed by a MSSQL db. The features on the layer have, say, one field of type esriFieldTypeString and one of type esriFieldTypeBlob. I can edit the string field just fine, but, when I try to edit a blob, StopEditOperation() throws a very generic exception (message: "Error HRESULT E_FAIL has been returned from a call to a COM component.", error code: -2147467259). I couldn't find anything related in the server log. Does anyone have any idea what's going on? IServerContext serverContext = GetServerContext(agsConn, serviceName); ILayer layer = GetILayer(layerName, serverContext); IWorkspace workspace = GetIWorkspace(layer); var feature = GetIFeature(objectId, workspace, layer); var workspaceEdit = (IWorkspaceEdit)workspace; workspaceEdit.StartEditing(false); workspaceEdit.StartEditOperation(); var index = feature.Fields.FindField(featureDetailName); IField field = feature.Fields.get_Field(index); byte[] byteArray = {1, 2, 3}; MemoryBlobStream blob = new MemoryBlobStream(); ((IMemoryBlobStreamVariant)blob).ImportFromVariant(byteArray); if (field.CheckValue(blob)) { feature.set_Value(index, blob); } feature.Store(); workspaceEdit.StopEditOperation(); workspaceEdit.StopEditing(true); serverContext.RemoveAll(); serverContext.ReleaseContext();

    Read the article

  • How do I use jquery validate remote validation on a field that depends on another field in the form?

    - by Kevin J
    I have a form in which I am using remote validation to check if an email address already exists in the database. However, the catch is that on this form, the user can select between several different "groups", and each group has its own distinct set of email addresses (thus the same email can exist once in each group). The group selection is a dropdown on the form, and the email address is an input field with remote validation. I have a couple issues. First, I have set up my remote rule like this: remote: { url: 'remote_script.php', data: { group_id: $('select.group_id').val() } } However, this seems to statically set the group_id parameter to whatever the first value in the select is. Meaning, if I change the select, then trigger the remote validation again, the group_id parameter does not change First, how can I make this parameter dynamic, depending on the value of a select in the form? Secondly, how do I manually trigger the remote validation on the email address field? When the group_id select is changed, I want to re-trigger the remote validation on the email address field (without changing the value of the field). I tried using $(selector).validate().element('.email_addr') But this appears to only trigger the standard validation (required, email), and not the remote call.

    Read the article

  • Styling an Input Field

    - by John
    Hello, How can I give the input field below the characteristics listed below? Characteristics: -Text typed into the field starts in the upper left corner and starts on another line (wraps?) when the right border of the field is reached. -A scroll bar appears if the text is more than what can fit into the field. -The text is in Courier font. Thanks in advance, John echo '<form action="http://www...com/sandbox/comments/comments2.php" method="post"> <input type="hidden" value="'.$_SESSION['loginid'].'" name="uid"> <input type="hidden" value="'.$submissionid.'" name="submissionid"> <input type="hidden" value="'.$submission.'" name="submission"> <label class="addacomment" for="title">Add a comment:</label> <input class="commentsubfield" name="comment" type="comment" id="comment" maxlength="1000"> <div class="commentsubbutton"><input name="submit" type="submit" value="Submit"></div> </form> '; Some relevant CSS: .commentsubfield {margin-left: 30px; margin-top: 30px; width: 390px; height: 90px; border: 1px solid #999999; padding: 5px; }

    Read the article

  • Rails validation error messages: Displaying only one per field

    - by Sergio Oliveira Jr.
    Rails has an annoying "feature" which displays ALL validation error messages associated with a given field. So for example if I have 3 validates_XXXXX_of :email, and I leave the field blank I get 3 messages in the error list. This is non-sense. It is better to display one messages at a time. If I have 10 validation messages for a field does it mean I will get 10 validation error messages if I leave it blank? Is there an easy way to correct this problem? It looks straightforward to have a condition like: If you found an error for :email, stop validating :email and skip to the other field. Ex: validates_presence_of :name validates_presence_of :email validates_presence_of :text validates_length_of :name, :in = 6..30 validates_length_of :email, :in = 4..40 validates_length_of :text, :in = 4..200 validates_format_of :email, :with = /^([^@\s]+)@((?:[-a-z0-9]+.)+[a-z]{2,})$/i <%= error_messages_for :comment % gives me: 7 errors prohibited this comment from being saved There were problems with the following fields: Name can't be blank Name is too short (minimum is 6 characters) Email can't be blank Email is too short (minimum is 4 characters) Email is invalid Text can't be blank Text is too short (minimum is 4 characters)

    Read the article

  • Mapping issue with multi-field primary keys using hibernate/JPA annotations

    - by Derek Clarkson
    Hi all, I'm stuck with a database which is using multi-field primary keys. I have a situation where I have a master and details table, where the details table's primary key contains fields which are also the foreign key's the the master table. Like this: Master primary key fields: master_pk_1 Details primary key fields: master_pk_1 details_pk_2 details_pk_3 In the Master class we define the hibernate/JPA annotations like this: @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "idGenerator") @Column(name = "master_pk_1") private long masterPk1; @OneToMany(cascade=CascadeType.ALL) @JoinColumn(name = "master_pk_1", referencedColumnName = "master_pk_1") private List<Details> details = new ArrayList<Details>(); And in the details class I have defined the id and back reference like this: @EmbeddedId @AttributeOverrides( { @AttributeOverride( name = "masterPk1", column = @Column(name = "master_pk_1")), @AttributeOverride(name = "detailsPk2", column = @Column(name = "details_pk_2")), @AttributeOverride(name = "detailsPk2", column = @Column(name = "details_pk_2")) }) private DetailsPrimaryKey detailsPrimaryKey = new DetailsPrimaryKey(); @ManyToOne @JoinColumn(name = "master_pk_1", referencedColumnName = "master_pk_1", insertable=false) private Master master; The goal of all of this was that I could create a new master, add some details to it, and when saved, JPA/Hibernate would generate the new id for master in the masterPk1 field, and automatically pass it down to the details records, storing it in the matching masterPk1 field in the DetailsPrimaryKey class. At least that's what the documentation I've been looking at implies. What actually happens is that hibernate appears to corectly create and update the records in the database, but not pass the key to the details classes in memory. Instead I have to manually set it myself. I also found that without the insertable=true added to the back reference to master, that hibernate would create sql that had the master_pk_1 field listed twice in the insert statement, resulting in the database throwing an exception. My question is simply is this arrangement of annotations correct? or is there a better way of doing it?

    Read the article

  • Laravel 4 showing all field from one to one relationship in

    - by rivai04
    I'm trying to show all field of the chosen row from one to one relationship... Route Route::get('relasi-pasien', function() { $pasien = PasienIri::where('no_ipd', '=', '100')->first(); foreach($pasien->keadaanumum as $temp) { echo'<li> Name : '.$temp->name. 'Tekdar: '.$temp->tekdar. 'Nadi : '.$temp->nadi. '</li>'; } }); Relation at PasienIri's model public function keadaanumum() { return $this->hasOne('KeadaanUmum', 'no_ipd'); } Relation at KeadaanUmum's Model public function pasieniri() { return $this->belongsTo('PasienIri', 'no_ipd'); } When I used that way, it showed error: 'Trying to get property of non-object' But if I just trying to show only one of the field, it works, showing one field: Route::get('relasi-pasien', function() { $pasien = PasienIri::where('no_ipd', '=', '100')->first(); return $pasien->keadaanumum->name; }); anyone could help me to show all field with one to one relationship or I really have to change it to one to many relationship? cause if I change it to one to many relationship, it works

    Read the article

  • Efficient splitting of elements in a field

    - by Gary
    I have a field in a text file exported from a database. The field contains addresses but sometimes they are quite long and the database allows them to contain multiple lines. When exported, the newline character gets replaced with a dollar sign like this: first part of very long address$second part of very long address$third part of very long address Not every address has multiple lines and no address contains more than three lines. The length of each line is variable. I'm massaging the data for import into MS Access which is used for a mailmerge. I want to split the field on the $ sign if it's there but if the field only contains 1 line, I want to set my two extra output fields to a zero length string so that I don't wind up with blank lines in the address when it gets printed. I have an awk file that's working correctly on all the other data in the textfile but I need to get this last bit working. I tried the below code. Aside from the fact that I get a syntax error at the else, I'm not sure this is a good way to do what I want. This is being done with gawk on Windows. BEGIN { FS = "|" } $1 != "HEADER" { if ($6 ~ /\$/) split($6, arr, "$") address = arr[1] addresstwo = arr[2] addressthree = arr[3] addressLength = length(address) addressTwoLength = length(addresstwo) addressThreeLength = length(addressthree) else { address = $6 addressLength = length($6) addresstwo = "" addressTwoLength = length(addresstwo) addressthree = "" addressThreeLength = length(addressthree) } printf("%*s\t%*s\t\%*s\n", addressLength, address, addressTwoLength, addresstwo, addressThreeLength, addressthree) }

    Read the article

  • SSIS - Bulk Update at Database Field Level

    - by Adam
    Hello, Here's our mission: Receive files from clients. Each file contains anywhere from 1 to 1,000,000 records. Records are loaded to a staging area and business-rule validation is applied. Valid records are then pumped into an OLTP database in a batch fashion, with the following rules: If record does not exist (we have a key, so this isn't an issue), create it. If record exists, optionally update each database field. The decision is made based on one of 3 factors...I don't believe it's important what those factors are. Our main problem is finding an efficient method of optionally updating the data at a field level. This is applicable across ~12 different database tables, with anywhere from 10 to 150 fields in each table (original DB design leaves much to be desired, but it is what it is). Our first attempt has been to introduce a table that mirrors the staging environment (1 field in staging for each system field) and contains a masking flag. The value of the masking flag represents the 3 factors. We've then put an UPDATE similar to... UPDATE OLTPTable1 SET Field1 = CASE WHEN Mask.Field1 = 0 THEN Staging.Field1 WHEN Mask.Field1 = 1 THEN COALESCE( Staging.Field1 , OLTPTable1.Field1 ) WHEN Mask.Field1 = 2 THEN COALESCE( OLTPTable1.Field1 , Staging.Field1 ) ... As you can imagine, the performance is rather horrendous. Has anyone tackled a similar requirement? We're a MS shop using a Windows Service to launch SSIS packages that handle the data processing. Unfortunately, we're pretty much novices at this stuff.

    Read the article

  • Form Validation - IF field is blank THEN automatically selection option

    - by shovelshed
    Hi I need help to automatically select an option to submit with a form: When the 'form-email' field is blank i want it to select 'option 1' and, When the field is not blank i want it to select 'option 2'. Here's my form code <form method="post" onsubmit="return validate-category(this)" action="tdomf-form-post.php" id='tdomf_form1' name='tdomf_form1' class='tdomf_form'> <textarea title="Post Title" name="content-title-tf" id="form-content" >Say it...</textarea> <input type="text" value="" name="content-text-ta" id="form-email"/> <select name='categories' class='form-category' type="hidden"> <option value="3" type="hidden">Anonymous</option> <option value="4" type="hidden" selected="selected">Competition</option> </select> <input type="submit" value="Say it!" name="tdomf_form1_send" id="form-submit"/> </form> I have an idea that the javascript would go something like this, but can't find what the code is to change the value. <script type="text/javascript"> function validate-category(field) { with (field) { if (value==null||value=="") { select category 1 } else { select category 2 return true; } } } </script> Any help on this would be great. Thanks in advance.

    Read the article

  • Query notation for the sitecore 'source' field in template builder

    - by M.R.
    I am trying to set the the source field of a template using the query notation (or xpath - whichever works), but none of them seems to be working. My content tree is a multisite content tree: France --Page 1 ----Page1A -------Page1AA --Page 2 --Page 3 --METADATA ----Regions US --Page 1 ----Page1A -------Page1AA --Page 2 --Page 3 --METADATA ----Regions Each site has its own METADATA folder, and I want it so that when adding a page inside each of the main country nodes, I want the values to reflect whatever is in the METADATA of that site. I have two different fields for now - a droplink and a treelistex field. So I thought I can just get the parent item that is a country site, and get the metadata folder for that. When I put the following query in both the fields, I get different results: query:./ancestor::*[@@templatename='CountryHome']/METADATA/Regions/* For the droplink field, I get only the first Region (one item) For the treelistex field, I get the entire content tree I then tried to modify the query a little bit and took the 'query' notation out ./ancestor::*[@@templatename='CountryHome']/METADATA/Regions/* If I go to the developer center/xpath builder, and set the context node to any item underneath the main country site, it returns me exactly what I need, but when I put this in the source, I get the entire content tree in both the cases. Help!

    Read the article

  • Using a join with three tables when a field might be null

    - by John
    Hello, The code below works great. It combines data from two MySQL tables. I would like to modify it by pulling in some data from a third MySQL table called "comment." In the HTML table below, "title" is a field in the MySQL table "submission." Every "title" has a corresponding "submissionid" field. The field "submissionid" is also found in the "comment" MySQL table. In the HTML table below, I would like "countComments" to equal the number of times a field called "commentid" appears in the MySQL table "comment" for any given "submissionid," where the "submissionid" is the same in both the "submission" and "comment" tables, and where the "submissionid" corresponds to the "title" being used. Here's the catch: if there is no row in the MySQL table "comment" that corresponds with the "submissionid" being used for "table", I would like "countComments" to equal to zero. How can I do this? Thanks in advance, John $sqlStr = "SELECT s.loginid, s.title, s.url, s.displayurl, l.username FROM submission AS s, login AS l WHERE s.loginid = l.loginid ORDER BY s.datesubmitted DESC LIMIT 10"; $result = mysql_query($sqlStr); $arr = array(); echo "<table class=\"samplesrec\">"; while ($row = mysql_fetch_array($result)) { echo '<tr>'; echo '<td class="sitename1"><a href="http://www.'.$row["url"].'">'.$row["title"].'</a></td>'; echo '</tr>'; echo '<tr>'; echo '<td class="sitename2"><a href="http://www...com/sandbox/members/index.php?profile='.$row["username"].'">'.$row["username"].'</a><a href="http://www...com/sandbox/comments/index.php?submission='.$row["title"].'">'.$row["countComments"].'</a></td>'; echo '</tr>'; } echo "</table>";

    Read the article

  • Use of properties vs backing-field inside owner class

    - by whatispunk
    I love auto-implemented properties in C# but lately there's been this elephant standing in my cubicle and I don't know what to do with him. If I use auto-implemented properties (hereafter "aip") then I no longer have a private backing field to use internally. This is fine because the aip has no side-effects. But what if later on I need to add some extra processing in the get or set? Now I need to create a backing-field so I can expand my getters and setters. This is fine for external code using the class, because they won't notice the difference. But now all of the internal references to the aip are going to invoke these side-effects when they access the property. Now all internal access to the once aip must be refactored to use the backing-field. So my question is, what do most of you do? Do you use auto-implemented properties or do you prefer to always use a backing-field? What do you think about properties with side-effects?

    Read the article

  • Disabling Text field with Javascript when value in drop down box is from mysql

    - by SteveJ313
    Hi I have a simple script in HTML, using a dropdown menu. When the value 1 is selected, the user can write in the text field, if value 2 is selected, it disables the text field. However, i changed the values of the dropdown menu, so that one value was from a mysql table(using PHP) and the other remained 'option value='1''. Yet now neither text field is disabled. Below is the code. `<script type="text/javascript"> function findselected() { if (document.form.selmenu.value == <?php echo $id; ?>) { document.form.txtField.disabled=true; // return false; // not sure this line is needed } else { document.form.txtField.disabled=false; // return false; // not sure this line is needed } } ` And the PHP section if(mysql_num_rows($SQL) == 1) { echo "<select name='selmenu' onChange='findselected()'>"; echo "<label>TCA_Subject</label>"; while ($row=mysql_fetch_array($SQL)) { echo "<option value='$id'>$thing</option>"; echo "<option value='2'>Choice 2</option>"; } } echo "<option value=$userid>'Choice 1'</option>"; ?> <option value='2'>Choice 2</option>"; </select> I have tried taking the second option value out of the loop, putting it into html, editing the variable in the javascript function. There is not a fault with the PHP as it is retrieving the right results and displaying it, yet the text field doesnt become disabled. Does anyone know of a possible solution? Thanks

    Read the article

  • task_current redundant field

    - by user341940
    Hi, I'm writing a kernel module that reads from a /proc file. When someone writes into the /proc file the reader will read it, but if it reads again while there is no "new" write, it should be blocked. In order to remember if we already read, i need to keep a map of the latest buffer that process read. To avoid that, I was told that there might be some redundant field inside the current- (task_struct struct) that i can use to my benefits in order to save some states on the current process. How can I find such fields ? and how can i avoid them being overwritten ? I read somewhere that i can use the offset field inside the struct in order to save my information there and i need to block lseek operations so that field will stay untouched. How can I do so ? and where is that offset field, i can't find it inside the task_Struct. Thanks and I need to save for each process some information in order to map it against other information. I can write a ma

    Read the article

  • How to embed a text field on my desktop in osx

    - by mechko
    How would I go about embedding a text field on my desktop? That is, I want to be able to type into it, but it needs to sit behind my windows at all times. I know I can use geektool to display text. Is there a similar program or piece of code that would allow me to do what I want? I am trying to hack together a twitter/fb/chat client which will not take up a separate window.

    Read the article

  • some clarification on accept field in http request

    - by Salvador Dali
    Can anyone enlighten me on the following question: What do different fields in accept field in HTTP request mean? I can understand the basics that through accept the client is telling the server what type of information it is waiting to receive, so for example: Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 This way the client will tell the server that it can understand three following formats: text/html application/xhtml+xml application/xml But can someone tell me what this q values mean and that / Also if I have any flaws in my understanding - please tell me.

    Read the article

  • Nagios NDOUtils config_type field

    - by danilo
    Can someone tell me what the config_type field in the nagios_hosts table of the Nagios NDOUtils Database means? Unfortuntely, it is not included in the database model documentation. http://nagios.sourceforge.net/docs/ndoutils/NDOUtils_DB_Model.pdf

    Read the article

  • Nagios NDOUtils config_type field

    - by danilo
    Can someone tell me what the config_type field in the nagios_hosts table of the Nagios NDOUtils Database means? Unfortuntely, it is not included in the database model documentation. http://nagios.sourceforge.net/docs/ndoutils/NDOUtils_DB_Model.pdf

    Read the article

  • Intermittent 400 bad request header field is missing ':' with Apache and SSL

    - by David Tinker
    Apache is returning rare intermittent 400 "bad request header field is missing ':' olhuaqv3o1t29flvr0 (random string)" errors. This seems to be related to https access and happens from Firefox, IE, Chrome etc. I am using a certificate from rapidssl. Apache/2.2.14 (Ubuntu) DAV/2 SVN/1.6.6 mod_jk/1.2.28 PHP/5.3.2-1ubuntu4.5 with Suhosin-Patch mod_ssl/2.2.14 OpenSSL/0.9.8k Anyone know how to fix this?

    Read the article

  • excel - generate a username from a full name field

    - by mheavers
    I'm trying to generate a username using a single name field in excel which has the person's first name and last name. I'm open to what the username would be, as long as its intuitive for the user. The name fields can be tricky, as the data looks like this: Albert Abongo (2 names) Stephen Michael Essuah Ackah (4 names) Alhaji Iddrisu Abdul-KArim (3 names) I guess my ideal usernames for these people would be aabongo sackah aabdul-karim

    Read the article

  • Keyboard Shortcut for Navigating to a Text Field in Google Chrome

    - by Micky McQuade
    I am trying to use keyboard shortcuts more and more and have run across something I've not been able to figure out. If there is a text box on the page that I want to enter text into, how can I navigate to that field quickly without actually clicking on it with the mouse? I know I can just start tabbing and eventually get to it I've tried using Ctrl-F to find text near it and then tab to it Any ideas?

    Read the article

  • WMI Win32_OperatingSystem OSArchitecture field causes exception

    - by Andrew J. Brehm
    I am trying to get information on the version of Windows installed from WMI. Most fields work. I can get the operating system "Name" as well as the "Version", both are fields of the Win32_OperatingSystem object I have. But another field "OSArchitecture" generates an exception ("Not found"). strScope = "\\" + strServer + "\root\CIMV2" searcher = New ManagementObjectSearcher(strScope, "SELECT * FROM Win32_OperatingSystem") For Each mo In searcher.Get strOSName = mo("Name") strOSVersion = mo("Version") strOSArchitecture = mo("Architecture") strStatus = mo("Status") strLastBoot = mo("LastBootUpTime") Next Ignore the for each loop, I don't think it has anything to do with the field missing. The documentation says that the field ought to exist and is a String: http://msdn.microsoft.com/en-us/library/aa394239(VS.85).aspx Any ideas?

    Read the article

  • Database entries existence depends on time / boolean value of a field changed automatically

    - by lisak
    Hey, I have this situation here. An auction system listing orders that are "active" (their deadline didn't occur yet) There is a lot of orders so it is better to have a field "active" instead of listing them based on time queries I'm not a database expert, just a user. What is the best way to implement this scenario ? Do I have to manually check the "deadLine" field and change "active" status every once in a while ? Is Mysql able to change the field automatically ? How demanding are queries of type "select orders where "deadline" has passed " Do I need to use TIMESTAMP (long data type of number of milisecond since UTC epoch time or DATETIME for the queries to the database to be more efficient ? Finally I have to move old order entries to a different backup table .

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >