Search Results

Search found 10804 results on 433 pages for 'attribute keys'.

Page 57/433 | < Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >

  • What are the repercussions of not checking existing data when adding a foreign key?

    - by scottm
    I've inherited a database that doesn't exactly strive for data integrity. I am trying to add some foreign keys to change that, but there is data in some tables that doesn't fit the constraints. Most likely, the data won't be used again so I want to know what problems I might face by leaving it there. The other option I see is to move it into some kind of table without referential constraints, just for historical purposes. So, what are the repercussions of not checking existing data? If I create a foreign key constraint on a table and don't check existing data, will all new data inserted into the table be enforced?

    Read the article

  • jquery .attr('alt','logo').css('display','none') not working !!!

    - by Cesar Lopez
    I have the three following lines and the first two line gets all the images on the document and hides all, but then when I add the third line shows all the images. What I need its to hide only the images with the attribute alt=minimize and alt=maximize but for some reason hides all the images. $('img').attr('alt', 'minimize').css("display","none"); $('img').attr('alt', 'maximize').css("display","none"); $('img').attr('alt', 'logo').css("display","inline"); I am using IE7, but it should be compatible with IE6 and IE8. Any help would be very much appreciated. Thanks.

    Read the article

  • Error 1005 when adding a foreign key constraint on mysql table

    - by luc
    Hello, I have a problem when upgrading a django and mysql app with south. I've tried to make a sql-based upgrade with the code generated by the django sqlall command and I have a similar problem. Here is the sql code: CREATE TABLE `programmations_basissupport` ( `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `value` numeric(6, 0) NOT NULL ) ALTER TABLE `programmations_concert` ADD `basis_support_id` integer AFTER program_status_id; ALTER TABLE `programmations_concert` ADD CONSTRAINT `basis_support_id_refs_id_1e4ed8d7` FOREIGN KEY (`basis_support_id`) REFERENCES `programmations_basissupport` (`id`); An error is raised when adding the FK constraint: ERROR 1005 (HY000): Can't create table 'apidev_mnl.#sql-106e_632b00a' (errno: 150) Does anybody have an idea? Update: DEFAULT values where missing but even if I add the default='' in the django model, the creation of foreign keys fails. Thanks for your help

    Read the article

  • jQuery update link

    - by Happy
    Here is html: <a href="http://site.com/any/different/folders/picture_name.jpg">Go and win</a> <a href="http://site.com/not/similar/links/some_other_name.png">Go and win</a> How to add some text after last "/" in href attribute (before picture_name.jpg) of each link? The script should give something like: <a href="http://site.com/any/different/folders/user_picture_name.jpg">Go and win</a> <a href="http://site.com/not/similar/links/user_some_other_name.png">Go and win</a> Here user_ is added. There can be any length of the link.

    Read the article

  • Sql server Stored Procedure

    - by user177883
    I m passing a variable to stored procedure, i want the proc to make a look up to another table and get the primary key of the table and insert that value to the table. Table A: pk_id int, user varchar Table B: userKey int When i invoke sp_howto, and pass user to it, i want to it to get the pk_id from table A and insert it to table B userKey. @res = select userKey from TableA where user=@user insert into tableB (userKey) values (@res) Does this work? and what if I have many keys I want to populate like this?

    Read the article

  • PHP modifying and combining array

    - by Industrial
    Hi everyone, I have a bit of an array headache going on. The function does what I want, but since I am not yet to well acquainted with PHP:s array/looping functions, so thereby my question is if there's any part of this function that could be improved from a performance-wise perspective? I tried to be as complete as possible in my descriptions in each stage of the functions which shortly described prefixes all keys in an array, fill up eventual empty/non-valid keys with '' and removes the prefixes before returning the array: $var = myFunction ( array('key1', 'key2', 'key3', '111') ); function myFunction ($keys) { $prefix = 'prefix_'; $keyCount = count($keys); // Prefix each key and remove old keys for($i=0;$i<$keyCount; $i++){ $keys[] = $prefix.$keys[$i]; unset($keys[$i]); } // output: array('prefix_key1', 'prefix_key2', 'prefix_key3', '111) // Get all keys from memcached. Only returns valid keys $items = $this->memcache->get($keys); // output: array('prefix_key1' => 'value1', 'prefix_key2' => 'value2', 'prefix_key3'=>'value3) // note: key 111 was not found in memcache. // Fill upp eventual keys that are not valid/empty from memcache $return = $items + array_fill_keys($keys, ''); // output: array('prefix_key1' => 'value1', 'prefix_key2' => 'value2', 'prefix_key3'=>'value3, 'prefix_111' => '') // Remove the prefixes for each result before returning array to application foreach ($return as $k => $v) { $expl = explode($prefix, $k); $return[$expl[1]] = $v; unset($return[$k]); } // output: array('key1' => 'value1', 'key2' => 'value2', 'key3'=>'value3, '111' => '') return $return; } Thanks a lot!

    Read the article

  • How to use multiple DisplayName attribute using Entity Framework and ASP.Net Mvc 2

    - by Picflight
    Depending on where I use my Class, I want to be able to show a different DisplayName. I have the following class: [MetadataType(typeof(PortalMetaData))] [System.Web.Mvc.Bind(Exclude = "PortalId")] public partial class Portal { public Portal() { this.Created = DateTime.Now; } } public class PortalMetaData { [Required(ErrorMessage = "Portal name is required")] [StringLength(50, ErrorMessage = "Portal name must be under 50 characters")] public object PortalName { get; set; } [Required(ErrorMessage = "Description is required")] public object Description { get; set; } } I have a corresponding Table in the database Portal I use the Portal table with a PortalController for the Site Admin to update the records in the Portal Table. I want another user with a different Role (AsstAdmin) to be able to update this table as well. To facilitate that I am thinking of creating a separate partial class that somehow links back to the Portal Model. This would allow me to display limited Fields for update by the AsstAdmin and I can display a different name for the Field as well. How can I accomplish this task? If I add the following class which inherits from Portal than I get an exception: Unable to cast object of type 'Project1.Mvc.Models.Portal' to type 'Prpject1.Mvc.Models.Site'. [MetadataType(typeof(SiteMetaData))] public class Site : Portal { public Site() { } } public class SiteMetaData { [Required(DisplayName = "Site Description")] public object Description { get; set; } }

    Read the article

  • JQuery problem IE8 name attribute

    - by Parhs
    Hello... In IE8 this input.attr("name","exam.exam_Normal['" +normal_id_unique + "'].boolean_v"); Outputs this only in IE8.... <input propdescname="exam.exam_Normal['1'].boolean_v" type="hidden" value="0"/> WHY WHY?? Why everywhere are problems... why

    Read the article

  • Facebook, iframe app, fb:request-form, action attribute problem

    - by Unreality
    Hi all, I'm making a facebook iframe application I'm making a request form with my own form data. What should I do in order to process the data? If I put action="http://apps.facebook.com/[appName]/abc.php" , i.e. <fb:serverfbml> <script type="text/fbml"> <fb:fbml> <fb:request-form action="http://apps.facebook.com/[appName]/abc.php" method="post" type="abc" content="abc"> <textarea name="pm" fb_protected="true" ></textarea> <fb:multi-friend-selector showborder="false" max="35" actiontext="test" email_invite="true" bypass="cancel" /> </fb:request-form> </fb:fbml> </script> </fb:serverfbml> Then the result is funny... A facebook page inside the facebook app's iframe ! but if I put action="http://[my own domain / facebook connect url]/abc.php" , i.e. <fb:serverfbml> <script type="text/fbml"> <fb:fbml> <fb:request-form action="http://[my own domain / facebook connect url]/abc.php" method="post" type="abc" content="abc"> <textarea name="pm" fb_protected="true" ></textarea> <fb:multi-friend-selector showborder="false" max="35" actiontext="test" email_invite="true" bypass="cancel" /> </fb:request-form> </fb:fbml> </script> </fb:serverfbml> Then the result page will be rendered WITHOUT facebook template (that means losing all top facebook banner and bottom facebook bar like the facebook chats etc) Anyone knows what's wrong? Thanks a lot for reading

    Read the article

  • Unique Keys not recognized by Entity Framework

    - by David Pfeffer
    I have two tables, Reports and Visualizations. Reports has a field, VisualizationID, which points to Visualization's field of the same name via a foreign key. It also has a unique key declared on the field. VisualizationID is not nullable. This means the relationship has to be 0..1 to 1, because every Reports record must have a unique, not null Visualizations record associated with it. The Entity Framework doesn't see it this way. I'm getting the following error: Error 113: Multiplicity is not valid in Role 'Report' in relationship 'FK_Reports_Visualizations'. Because the Dependent Role properties are not the key properties, the upper bound of the multiplicity of the Dependent Role must be *. What's the problem here? How can I make the EF recognize the proper relationship multiplicity?

    Read the article

  • Avoid extra xmlns:xsi while adding an attribute to XML root

    - by Rakesh kumar
    I am creating an xml file using this code: XmlDocument d = new XmlDocument(); XmlDeclaration xmlDeclaration = d.CreateXmlDeclaration("1.0", "utf-8", null); d.InsertBefore(xmlDeclaration,d.DocumentElement); XmlElement root = d.CreateElement("ITRETURN","ITR","http://incometaxindiaefiling.gov.in/ITR1"); XmlAttribute xsiNs = d.CreateAttribute("xsi:schemaLocation", "http://www.w3.org/2001/XMLSchema-instance"); xsiNs.Value = "http://incometaxindiaefiling.gov.in/main ITRMain10.xsd"; root.SetAttributeNode(xsiNs); //root.SetAttribute("xsi:schemaLocation", "http://www.w3.org/2001/XMLSchema-instance"); root.SetAttribute("xmlns:ITR1FORM", "http://incometaxindiaefiling.gov.in/ITR1"); root.SetAttribute("xmlns:ITR2FORM", "http://incometaxindiaefiling.gov.in/ITR2"); root.SetAttribute("xmlns:ITR3FORM", "http://incometaxindiaefiling.gov.in/ITR3"); root.SetAttribute("xmlns:ITR4FORM", "http://incometaxindiaefiling.gov.in/ITR4"); d.AppendChild(root); d.Save("c://myxml.xml"); and I am getting an output like this <?xml version="1.0" encoding="utf-8" ?> - <!-- Sample XML file generated by XMLSpy v2007 sp2 (http://www.altova.com) --> - <ITRETURN:ITR xsi:schemaLocation="http://incometaxindiaefiling.gov.in/main ITRMain10.xsd" xmlns:ITR1FORM="http://incometaxindiaefiling.gov.in/ITR1" xmlns:ITR2FORM="http://incometaxindiaefiling.gov.in/ITR2" xmlns:ITR3FORM="http://incometaxindiaefiling.gov.in/ITR3" xmlns:ITR4FORM="http://incometaxindiaefiling.gov.in/ITR4" xmlns:xsi="http://incometaxindiaefiling.gov.in/main ITRMain10.xsd" xmlns:ITRETURN="http://incometaxindiaefiling.gov.in/ITR1"> <ITR1FORM:ITR1>root node</ITR1FORM:ITR1> </ITRETURN:ITR> But my requirement is like <ITRETURN:ITR xsi:schemaLocation="http://incometaxindiaefiling.gov.in/main ITRMain10.xsd" xmlns:ITR1FORM="http://incometaxindiaefiling.gov.in/ITR1" xmlns:ITR2FORM="http://incometaxindiaefiling.gov.in/ITR2" xmlns:ITR3FORM="http://incometaxindiaefiling.gov.in/ITR3" xmlns:ITR4FORM="http://incometaxindiaefiling.gov.in/ITR4" xmlns:ITRETURN="http://incometaxindiaefiling.gov.in/main" xmlns:ITRForm="http://incometaxindiaefiling.gov.in/master" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <ITR1FORM:ITR1>any value </ITR1FORM:ITR1> </ITRETURN:ITR> What do I need to change in my code to get the desired output?

    Read the article

  • XSS attack to bypass htmlspecialchars() function in value attribute

    - by Setzer
    Let's say we have this form, and the possible part for a user to inject malicious code is this below ... <input type=text name=username value=<?php echo htmlspecialchars($_POST['username']); ? ... We can't simply put a tag, or a javascript:alert(); call, because value will be interpreted as a string, and htmlspecialchars filters out the <,,',", so We can't close off the value with quotations. We can use String.fromCode(.....) to get around the quotes, but I still unable to get a simple alert box to pop up. Any ideas?

    Read the article

  • Using MVC2 to update an Entity Framework v4 object with foreign keys fails

    - by jbjon
    With the following simple relational database structure: An Order has one or more OrderItems, and each OrderItem has one OrderItemStatus. Entity Framework v4 is used to communicate with the database and entities have been generated from this schema. The Entities connection happens to be called EnumTestEntities in the example. The trimmed down version of the Order Repository class looks like this: public class OrderRepository { private EnumTestEntities entities = new EnumTestEntities(); // Query Methods public Order Get(int id) { return entities.Orders.SingleOrDefault(d => d.OrderID == id); } // Persistence public void Save() { entities.SaveChanges(); } } An MVC2 app uses Entity Framework models to drive the views. I'm using the EditorFor feature of MVC2 to drive the Edit view. When it comes to POSTing back any changes to the model, the following code is called: [HttpPost] public ActionResult Edit(int id, FormCollection formValues) { // Get the current Order out of the database by ID Order order = orderRepository.Get(id); var orderItems = order.OrderItems; try { // Update the Order from the values posted from the View UpdateModel(order, ""); // Without the ValueProvider suffix it does not attempt to update the order items UpdateModel(order.OrderItems, "OrderItems.OrderItems"); // All the Save() does is call SaveChanges() on the database context orderRepository.Save(); return RedirectToAction("Details", new { id = order.OrderID }); } catch (Exception e) { return View(order); // Inserted while debugging } } The second call to UpdateModel has a ValueProvider suffix which matches the auto-generated HTML input name prefixes that MVC2 has generated for the foreign key collection of OrderItems within the View. The call to SaveChanges() on the database context after updating the OrderItems collection of an Order using UpdateModel generates the following exception: "The operation failed: The relationship could not be changed because one or more of the foreign-key properties is non-nullable. When a change is made to a relationship, the related foreign-key property is set to a null value. If the foreign-key does not support null values, a new relationship must be defined, the foreign-key property must be assigned another non-null value, or the unrelated object must be deleted." When debugging through this code, I can still see that the EntityKeys are not null and seem to be the same value as they should be. This still happens when you are not changing any of the extracted Order details from the database. Also the entity connection to the database doesn't change between the act of Getting and the SaveChanges so it doesn't appear to be a Context issue either. Any ideas what might be causing this problem? I know EF4 has done work on foreign key properties but can anyone shed any light on how to use EF4 and MVC2 to make things easy to update; rather than having to populate each property manually. I had hoped the simplicity of EditorFor and DisplayFor would also extend to Controllers updating data. Thanks

    Read the article

  • Nullable One To One Relationships with Integer Keys in LINQ-to-SQL

    - by Craig Walker
    I have two objects (Foo and Bar) that have a one-to-zero-or-one relationship between them. So, Foo has a nullable foreign key reference to Bar.ID and a (nullbusted) unique index to enforce the "1" side. Bar.ID is an int, and so Foo.BarID is a nullable int. The problem occurs in the LINQ-to-SQL DBML mapping of .NET types to SQL datatypes. Since int is not a nullable type in .NET, it gets wrapped in a Nullable<int>. However, this is not the same type as int, and so Visual Studio gives me this error message when I try to create the OneToOne Association between them: Cannot create an association "Bar_Foo". Properties do not have matching types: "ID", "BarID". Is there a way around this?

    Read the article

  • Confused about encryption with public and private keys (which to use for encryption)

    - by jax
    I am making a licensing system when clients ask my server for a license and I send them a license if they are permitted to have one. On my current system I encrypt the license using a single private key and have the public key embedded into the client application that they use to decrypt the license. It works! Others have told me that I should be encrypting with the public key on the server and distributing the private key to clients. I have searched the web and can see that sometimes they use the private key to encrypt and other times they use the public key to encrypt. In this case what am I supposed to do?

    Read the article

  • Cannot convert the value in attribute '[attr]' to object of type 'System.Windows.TemplateBindingExte

    - by Krimson
    Hi, I get this error when I define my attached dependency properties in a class outside the class hierarchy and set the owner to a common parent class. Attached dependency property in WindowBase class (outside class hierarchy = generated error): public static readonly DependencyProperty AreaColorProperty = DependencyProperty.RegisterAttached("AreaColor", typeof(AreaColor), typeof(Window)); TemplateBinding that fails {TemplateBinding local:WindowBase.AreaColor} If I instead define the attached dependency property in a class within the class heirarchy and set the owner to this class, then I don't get any errors, why is this? Attached dependency property in WindowBase (within class hierarchy = no errors): public static readonly DependencyProperty AreaColorProperty = DependencyProperty.RegisterAttached("AreaColor", typeof(AreaColor), typeof(WindowBase)); Best Regards, Jesper

    Read the article

  • Wordpress SQL Select Multiple Meta Values / Meta Keys / Custom Fields

    - by Wes
    I am trying to modify a wordpress / MySQL function to display a little more information. I'm currently running the following query that selects the post, joins the 'postmeta' and gets the info where the meta_key = _liked function most_liked_posts($numberOf, $before, $after, $show_count) { global $wpdb; $request = "SELECT ID, post_title, meta_value FROM $wpdb->posts, $wpdb->postmeta"; $request .= " WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id"; $request .= " AND post_status='publish' AND post_type='post' AND meta_key='_liked' "; $request .= " ORDER BY $wpdb->postmeta.meta_value+0 DESC LIMIT $numberOf"; $posts = $wpdb->get_results($request); foreach ($posts as $post) { $post_title = stripslashes($post->post_title); $permalink = get_permalink($post->ID); $post_count = $post->meta_value; echo $before.'<a href="' . $permalink . '" title="' . $post_title.'" rel="nofollow">' . $post_title . '</a>'; echo $show_count == '1' ? ' ('.$post_count.')' : ''; echo $after; } } The important part being: $post_count = $post->meta_value; But now I want to also grab a value that is attached to each post called wbphoto How do I specify that $post_count = _liked and $photo = wbphoto ? Here is a screen cap of my Phpmyadmin

    Read the article

  • dotnetopenid attribute extensions just not working for me!

    - by Rob Ellis
    So here's some code on the request:- IAuthenticationRequest req = openid.CreateRequest(Request.Form["openid_identifier"]); //add extention requests here req.AddExtension(new ClaimsRequest { Email = DemandLevel.Request, BirthDate = DemandLevel.Request, Country = DemandLevel.Request, FullName = DemandLevel.Request, Gender = DemandLevel.Request, Language = DemandLevel.Request, Nickname = DemandLevel.Request, PostalCode = DemandLevel.Request, TimeZone = DemandLevel.Request } ); //get the request from openid return req.RedirectingResponse.AsActionResult(); And here's some on the pickup:- //get attributes from site var sreg = response.GetExtension<ClaimsResponse>(); string sreg_email = "Unknown Email"; DateTime sreg_birthdate; string sreg_birthdateraw; Gender sreg_gender; Version sreg_version; string sreg_timezone; string sreg_nickname; string sreg_postalcode; System.Globalization.CultureInfo sreg_culture; string sreg_country; string sreg_fullname; System.Net.Mail.MailAddress sreg_mailaddress; string sreg_language; if (sreg != null) { sreg_email = sreg.Email; sreg_birthdate = sreg.BirthDate.Value; sreg_birthdateraw = sreg.BirthDateRaw; sreg_country = sreg.Country; sreg_culture = sreg.Culture; sreg_fullname = sreg.FullName; sreg_gender = sreg.Gender.Value; sreg_language = sreg.Language; sreg_mailaddress = sreg.MailAddress; sreg_nickname = sreg.Nickname; sreg_postalcode = sreg.PostalCode; sreg_timezone = sreg.TimeZone; sreg_version = sreg.Version; } But it's all coming back as null no matter which OpenId provider I use... Am I missing something obvious? Rob

    Read the article

  • Using SDL to replace colors using SDL Color Keys

    - by Shawn B
    Hey, I am working an a simple Roguelike game, and using SDL as the display. The Graphics for the game is an image of Codepage 437, with the background being black, and the font white. Instead of using many seperate image files that are already colored, I want to use one image file, and replace the colors when it is being loaded into memory. The code to split the codepage into a sprite sheet works properly, but when attempting to print in color, everything comes out in white. I had it working the past, but somehow I broke the code when changing it from change the color at print, to change the color on load. Here is the code to load the image: SDL_Surface *Screen,*Font[2]; SDL_Rect Character[256]; Uint8 ScreenY,ScreenX; Uint16 PrintX,PrintY,ScreenSizeY,ScreenSizeX; Uint32 Color[2]; void InitDisplay() { if(SDL_Init(SDL_INIT_VIDEO) == -1) { printf("SDL Init failed\n"); return; } ScreenSizeY = 600; ScreenSizeX = 800; Screen = SDL_SetVideoMode(ScreenSizeX,ScreenSizeY,32,SDL_HWSURFACE | SDL_RESIZABLE); SDL_WM_SetCaption("Alpha",NULL); SDL_Surface *Load; Load = IMG_Load("resource/font.png"); Font[0] = SDL_DisplayFormat(Load); SDL_FreeSurface(Load); Color[0] = SDL_MapRGB(Font[0]->format,255,255,255); Color[1] = SDL_MapRGB(Font[0]->format,255,0,0); Uint8 i,j,k = 0; PrintX = 0; PrintY = 0; for(i = 0; i < 16; i++) { for(j = 0; j < 16; j++) { Character[k].x = PrintX; Character[k].y = PrintY; Character[k].w = 8; Character[k].h = 12; k++; PrintX += 8; } PrintX = 0; PrintY += 12; } PrintX = 0; PrintY = 0; for(i = 1; i < 2; i++) { Font[i] = SDL_DisplayFormat(Font[0]); SDL_SetColorKey(Font[i],SDL_SRCCOLORKEY,Color[i]); SDL_FillRect(Font[i],&Font[i]->clip_rect,Color[i]); SDL_BlitSurface(Font[0],NULL,Font[i],NULL); SDL_SetColorKey(Font[0],0,Color[0]); } } The problem is with the last for loop above. I can't figure out why it isn't working. Any help is greatly appreciated!

    Read the article

  • Remove a child with a specific attribute, in SimpleXML for PHP

    - by TimTowdi
    I have several identical elements with different attributes that I'm accessing with SimpleXML: <data> <seg id="A1"/> <seg id="A5"/> <seg id="A12"/> <seg id="A29"/> <seg id="A30"/> </data> I need to remove a specific seg element, with an id of "A12", how can I do this? I've tried looping through the seg elements and unsetting the specific one, but this doesn't work, the elements remain. foreach($doc->seg as $seg) { if($seg['id'] == 'A12') { unset($seg); } }

    Read the article

  • Entity Framework, Foreign Keys and EntityKeys

    - by Greg
    I've got a problem with the Entity Framework and the ForeignKeys. I've got a table "BC_Message_Assets" which has 3 FK's (MessageId, AssetId and StatusId). I create my "MessageAsset" like this MessageAsset messageAsset = new MessageAsset(); messageAsset.MessageStatusReference.EntityKey = new EntityKey("MyEntities.MessageStatusSet", "Id", 1); messageAsset.AssetReference.EntityKey = new EntityKey("MyEntities.AssetSet", "Id", 1); messageAsset.MessageReference.EntityKey = new EntityKey("MyEntities.MessageSet", "Id", messageId); context.AddToMessageAssetSet(messageAsset); context.SaveChanges(); But I got the following exception : The INSERT statement conflicted with the FOREIGN KEY constraint \"FK_BC_Message_Assets_BC_Assets\". The conflict occurred in database \"Test\", table \"dbo.BC_Assets\", column 'Id'.\r\nThe statement has been terminated. When I look at the query, I notice that the parameter value for AssetId is "0" despite that I provided "1" to the EntityKey. Here's the generated query : exec sp_executesql N'insert [dbo].[BC_Message_Assets]([MessageId], [AssetId], [CompletionTime], [StatusId]) values (@0, @1, null, @2) ',N'@0 int,@1 int,@2 int',@0=47,@1=0,@2=1 I can't explain what happens. I hardcoded "1" in the EntityKey and I received "0" in the query ?

    Read the article

  • oracle's pro*C compiler and gnu C (__builtin_va_list, __attribute__, etc)

    - by Charles Ma
    I'm compiling a database library with pro*C which converts the .ppc library file to a .c file that gcc can use. However, I'm getting a lot of errors in pro*C like the following PCC-S-02201, Encountered the symbol "__ attribute__ " when expecting one of the following ... , Encountered the symbol "__builtin_va_list" when expecting one of the following The missing symbols are from a chain of standard includes like stdio.h and stdlib.h. How do I get around this issue? The library I'm compiling came from an old solaris system that we're now upgrading (to a new solaris 10 system) and the header files don't seem to use these symbols. e.g. the newer .h files has typedef __builtin_va_list va_list while the old .h files has typedef void* va_list There are a lot of things like this so I'm reluctant to go and fix all of them manually with a typedef

    Read the article

  • Oracle analytic functions for "the attribute from the row with the max date"

    - by tpdi
    I'm refactoring a colleague's code, and I have several cases where he's using a cursor to get "the latest row that matches some predicate": His technique is to write the join as a cursor, order it by the date field descending, open the cursor, get the first row, and close the cursor. This requires calling a cursor for each row of the result set that drives this, which is costly for many rows. I'd prefer to be able to join, but what something cheaper than a correlated subquery: select a.id_shared_by_several_rows, a.foo from audit_trail a where a.entry_date = (select max(a.entry_date) from audit_trail b where b.id_shared_by_several_rows = a.id_shared_by_several_rows ); I'm guessing that since this is a common need, there's an Oracle analytic function that does this?

    Read the article

  • jQuery selector issue finding image with usemap attribute

    - by Greg K
    I have an image map in my page: <div id="books"> <img src="images/books.png" width="330" height="298" border="0" \ usemap="#map_books" /> <map name="map_books" id="map_books" alt="books"> <area shape="poly" coords="17,73,81,288,210,248,254,264, ..." \ href="/about" alt="books" /> </map> </div> I have a function that tries to find the image in the document using this map: function(elemId) { // elemId = "#map_books" if ($(elemId).attr("tagName") == "MAP") { // find image using this map var selector = "img [usemap=\\" + elemId + "]"; var img = $(selector); if (img.length == 0) { console.log("Could not find image using " + selector); } } It fails to find the image. Could not find image using img [usemap=\#map_books] I've escaped the elemId because it starts with a hash and tried variations of selectors. $("img [usemap$=" + elemId.substring(1) + "]") $("img").find("[usemap=\\" + elemId + "]") Neither find the image. Any ideas?

    Read the article

  • Symbol '#' in XML attribute name produses DOMException

    - by kilonet
    the following code (using iText library): PdfStamper stamp = new PdfStamper(reader, outputStream); AcroFields form = stamp.getAcroFields(); String name = "form1[0].#subform[0].Table1[0].#subformSet[0].Row[2].#field[0]"; form.setField(name, ""); produces the following error: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.checkQName(CoreDocumentImpl.java:2571) at com.sun.org.apache.xerces.internal.dom.ElementNSImpl.setName(ElementNSImpl.java:117) at com.sun.org.apache.xerces.internal.dom.ElementNSImpl.<init>(ElementNSImpl.java:80) at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createElementNS(CoreDocumentImpl.java:2084) at com.lowagie.text.pdf.XfaForm$Xml2SomDatasets.insertNode(Unknown Source) at com.lowagie.text.pdf.AcroFields.setField(Unknown Source) at com.lowagie.text.pdf.AcroFields.setField(Unknown Source) obviously this is because of '#' sign in field name. This field's name come from AcroFields.getFields() collection and it seems very strange that setting back this value produces an error. Are there any ways of dealing with this error without changing real field name?

    Read the article

< Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >