Daily Archives

Articles indexed Monday October 15 2012

Page 16/19 | < Previous Page | 12 13 14 15 16 17 18 19  | Next Page >

  • Wordpress theme for user generated content website

    - by iamjonesy
    I'm looking for a wordpress theme that I can work from. I'm basically creating a website like the following two http://www.damnyouautocorrect.com/ and http://icanhas.cheezburger.com/ - both are wordpress based websites which I guess are custom made themes. I'm looking for a theme that will let users enter content without beign logged in. Basically the post type has a title and a description and the name of the author. The homepage will show one post with a "Next" button. Clicking that will load the next post. The user content input just needs a title, description, and a name of the author. I'd also like to add voting up/down. I'm just asking first before I start hacking away at a theme.

    Read the article

  • Site returning 404 header to google, not sure why

    - by Damon
    A Drupal site that works fine for regular users returns a 404 not found error when I try to use the W3C validator on it; it is also not being indexed by google at all (which is the main issue but I suspect there is a connection). It is a https:// site with .htaccess rule to redirect any http:// request to the https://. I had had it running in google webmaster tools and thought it was fine, but it turns out I had not added the https domain. After adding the https domain it's also returning the header as HTTP/1.1 404 Not Found Date: Mon, 15 Oct 2012 19:37:43 GMT Server: Apache Expires: Sun, 19 Nov 1978 05:00:00 GMT Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0 Robots.txt just has User-agent: * Crawl-delay: 10 # Files Disallow: /cron.php How can I check what the issue is here?

    Read the article

  • Which is the way to pass parameters in a drawableGameComponent in XNA 4.0?

    - by cad
    I have a small demo and I want to create a class that draws messages in screen like fps rate. I am reading a XNA book and they comment about GameComponents. I have created a class that inherits DrawableGameComponent public class ScreenMessagesComponent : Microsoft.Xna.Framework.DrawableGameComponent I override some methods like Initialize or LoadContent. But when I want to override draw I have a problem, I would like to pass some parameters to it. Overrided method does not allow me to pass parameters. public override void Draw(GameTime gameTime) { StringBuilder buffer = new StringBuilder(); buffer.AppendFormat("FPS: {0}\n", framesPerSecond); // Where get framesPerSecond from??? spriteBatch.DrawString(spriteFont, buffer.ToString(), fontPos, Color.Yellow); base.Draw(gameTime); } If I create a method with parameters, then I cannot override it and will not be automatically called: public void Draw(SpriteBatch spriteBatch, int framesPerSecond) { StringBuilder buffer = new StringBuilder(); buffer.AppendFormat("FPS: {0}\n", framesPerSecond); spriteBatch.DrawString(spriteFont, buffer.ToString(), fontPos, Color.Yellow); base.Draw(gameTime); } So my questions are: Is there a mechanism to pass parameter to a drawableGameComponent? What is the best practice? In general is a good practice to use GameComponents?

    Read the article

  • How was 20Q made?

    - by Dan the Man
    Ever since I was a kid, I've wondered how they made the 20Q electronic game. In this game, which is it's on device, you think of an object, thing, or animal (e.g. a potato or a donkey), once you mentally choose your thing, the device goes through a series of questions such as: Is it larger than a loaf of bread? Is it found outdoors? Is it used for recreation? For each of the questions you can answer yes, no, maybe, or unknown. The way I've always thought of it to work was with immense, nested conditionals (if statements). But, I don't think that would be very likely as it would be terribly difficult to understand while coding it. I'm not looking for a discussion as SE doesn't allow it; I'm looking for concrete knowledge or solutions.

    Read the article

  • Shadow mapping: what is the light looking at?

    - by PgrAm
    I'm all set to set up shadow mapping in my 3d engine but there is one thing I am struggling to understand. The scene needs to be rendered from the light's point of view so I simply first move my camera to the light's position but then I need to find out which direction the light is looking. Since its a point light its not shining in any particular direction. How do I figure out what the orientation for the light point of view is?

    Read the article

  • How do I draw a texture to a MSTerrain object?

    - by Brad
    I'm using Farseer to make a game in XNA and I can't seem to figure this out. I've decided to use MSTerrain for making my game's terrain because I wanted destructible terrain and MSTerrain seemed like the best bet. Unfortunately, I'm stumped on how to actually show the terrain. When I generate the terrain it's visible in debug view, but MSTerrain does not have a Draw method, so I'm wondering how it is supposed to be drawn to the screen? Is it worth pursuing? I'm starting to think that MSTerrain is more trouble than it's worth, is there another better way to do this with bodies?

    Read the article

  • Is this a reliable method of parsing glGetShaderInfoLog()?

    - by m4ttbush
    I want to get a list of errors and their line numbers so I can display the error information differently from how it's formatted in the error string and also to show the line in the output. It looks easy enough to just parse the result of glGetShaderInfoLog(), look for ERROR:, then read the next number up to :, and then the next, and finally the error description up to the next newline. However, the OpenGL docs say: Application developers should not expect different OpenGL implementations to produce identical information logs. This makes me worry that my code may behave incorrectly on different systems. I don't need them to be identical, I just need them to follow the same format. So is there a better way to get a list of errors with the line number separate, is it safe to assume that they'll always follow the "ERROR: 0:123:" format, or is there simply no reliable way to do this?

    Read the article

  • Replacing symbol from object file at compile time. For example swapping out main

    - by Anthony Sottile
    Here's the use case: I have a .cpp file which has functions implemented in it. For sake of example say it has the following: [main.cpp] #include <iostream> int foo(int); int foo(int a) { return a * a; } int main() { for (int i = 0; i < 5; i += 1) { std::cout << foo(i) << std::endl; } return 0; } I want to perform some amount of automated testing on the function foo in this file but would need to replace out the main() function to do my testing. Preferably I'd like to have a separate file like this that I could link in over top of that one: [mymain.cpp] #include <iostream> #include <cassert> extern int foo(int); int main() { assert(foo(1) == 1); assert(foo(2) == 4); assert(foo(0) == 0); assert(foo(-2) == 4); return 0; } I'd like (if at all possible) to avoid changing the original .cpp file in order to do this -- though this would be my approach if this is not possible: do a replace for "(\s)main\s*\(" == "\1__oldmain\(" compile as usual. The environment I am targeting is a linux environment with g++.

    Read the article

  • Firefox error for signalR, but does not effect anything

    - by anthonypliu
    I get the 2 following errors in firefox when using signalR and I do not know why: Timestamp: 10/15/2012 3:53:48 PM Error: The connection to http://localhost:81/signalr/connect?transport=serverSentEvents&connectionId=84a7f433-0cc8-4baf-93e9-d4c3ca968466&connectionData=%5B%7B%22name%22%3A%22Chat%22%7D%5D&tid=7 was interrupted while the page was loading. Source File: http://localhost:81/Scripts/jquery.signalR-0.5.3.min.js Line: 9 and Timestamp: 10/15/2012 3:53:50 PM Error: no element found Source File: http://localhost:81/signalr/abort?transport=serverSentEvents&connectionId=84a7f433-0cc8-4baf-93e9-d4c3ca968466 Line: 1 Everything seems to work fine with SignalR and my application works as expected across all browsers, but I just get these errors in firefox only. Any ideas?

    Read the article

  • Unwanted character being added to string in C

    - by Church
    I have a program that gives you shipping addresses from an input file. However at the beginning of one of the strings, order.add_one, a number is being added to the beginning of the string, that number is equivalent to the variable "choice" every time. Why is it doing this? #include <stdio.h> #include <math.h> #include <string.h> //structure typedef struct {char cust_name[25]; char cust_id[3]; char add_one[30]; char add_two[30]; char bike; char risky; int number_ordered; char cust_information[500]; }ORDER; ORDER order; int main(void){ fflush(stdin); system ( "clear" ); //initialize variables float price; float m = 359.95; float s = 279.95; //while loop, runs until user declares they no longer wish to input orders while (1==1){ printf("Options: \nEnter Customer information manually : 1 \nSearch Customer by ID(input.txt reader) : 2 \n"); int option = 0; scanf(" %d", &option); if (option == 1){ //Print and scan statements printf("Enter Customer Information\n"); printf("Customer Name: "); scanf(" %[^\n]s", &order.cust_name); printf("\nEnter Address Line One: "); scanf(" %[^\n]s", &order.add_one); printf("\nEnter Addres Line Two: "); scanf(" %[^\n]s", &order.add_two); printf("\nHow Many Bicycles Are Ordered: "); scanf(" %d", &order.number_ordered); printf("\nWhat Type Of Bike Is Ordered\n M Mountain Bike \n S Street Bike"); printf("\nChoose One (M or S): "); scanf(" %c", &order.bike); printf("\nIs The Customer Risky (Y/N): "); scanf(" %c", &order.risky); system ( "clear" ); } if (option == 2){ FILE *fpt; fpt = fopen("input.txt", "r"); if (fpt==NULL){ printf("Text file did not open\n"); return 1; } printf("Enter Customer ID: "); scanf("%s", &order.cust_id); char choice; choice = order.cust_id[0]; char x[3]; int w, u, y, z; char a[10], b[10], c[10], d[10], e[20], f[10], g[10], i[1], j[1]; int h; printf("%s value of c", c); if (choice >='1'){ while ((w = fgetc(fpt)) != '\n' ){ } } if (choice >='2'){ while ((u = fgetc(fpt)) != '\n' ){ } } if (choice >='3'){ while ((y = fgetc(fpt)) != '\n' ){ } } if (choice >= '4'){ while ((z = fgetc(fpt)) != '\n' ){ } } printf("\n"); fscanf(fpt, "%s", x); fscanf(fpt, "%s", a); printf("%s", a); strcat(order.cust_name, a); fscanf(fpt, " %s", b); printf(" %s", b); strcat(order.cust_name, " "); strcat(order.cust_name, b); fscanf(fpt, "%s", c); printf(" %s", c); strcat(order.add_one, "\0"); strcat(order.add_one, c); fscanf(fpt, "%s", d); printf(" %s", d); strcat(order.add_one, " "); strcat(order.add_one, d); fscanf(fpt, "%s", e); printf(" %s", e); strcat(order.add_two, e); fscanf(fpt, "%s", f); printf(" %s", f); strcat(order.add_two, " "); strcat(order.add_two, f); fscanf(fpt, "%s", g); printf(" %s", g); strcat(order.add_two, " "); strcat(order.add_two, g); strcat(order.add_two, "\0"); fscanf(fpt, "%d", &h); printf(" %d", h); order.number_ordered = h; fscanf(fpt, "%s", i); printf(" %s", i); order.bike = i[0]; fscanf(fpt, "%s", j); printf(" %s", j); order.risky = j[0]; fclose(fpt); printf("%s %s %s %d %c %c", order.cust_name, order.add_one, order.add_two, order.number_ordered, order.bike, order.risky); }

    Read the article

  • How to Get SharePoint PowerShell to use .NET 2

    - by EoRaptor013
    I'm having a couple of problems with PowerShell. First, the PS configuration installed by SharePoint 2010 keeps popping this message: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered. I've googled that, and given everybody and their second cousin Sharepoint_Shell_Access to the config DB, with no luck. So, I wanted to try some of the PS commands. In this case, however, I'm getting a different error: Microsoft SharePoint is not supported with version 4.0.30319.17929 of the Microsoft .Net Runtime. I get that SP can't use .NET 4.0 or 4.5, but I can't find any suggestions on how to get PS to use the "right" version of .NET. I've found some references for something called PowerGUI, and changing the psgui.exe.config, but I don't have that. Does anybody have any suggestions on how to solve the .NET version problem? Thanks.

    Read the article

  • How To Add Custom ModelValidatorProviders To Web API Project?

    - by Mark S.
    I'm moving some MVC code to Web API and I need to update my custom ModelValidatorProviders. It seems as though my validators can stay much the same only they should inherit the System.Web.Http.Validation namespace. What I can't figure out is how to add the provider to Web API. When using MVC I can just add the following to my global.asax: ModelValidatorProviders.Providers.Add(new CustomModelValidatorProvider()); How do I use the custom provider with Web API?

    Read the article

  • Gearman client doBackground always returns GEARMAN_TIMEOUT

    - by Ascherer
    So, ive got a simple gearman system running right now, with a worker running. The worker basically just takes the payload (a random number in this case, and is supposed to echo it back to the screen. Literally an echo, not returning to the client. The client sends the random number. Im trying to do a $client->doBackground( 'post', 65482, md5(uniqid())); but its coming back with a 47 error (GEARMAN_TIMEOUT) every time. getErrNo() returns 0, error() returns something about GEARMAN_TIMEOUT However, when i change it to just $client->do(blah, blah, blah), it works just fine. I've even occasionally seen it where the worker still echo's the number, even after getting the timeout error... public function execute() { $method = 'do'; if( !$this->getBlock() ) { $method .= ( $this->getPriority() == 'Normal' ? '' : $this->getPriority() ) . 'Background'; } else { $method .= $this->getPriority(); } echo "Method: $method \t Worker: {$this->getName()} \t Payload: {$this->getPayload()} \t Hash: {$this->getHash()}\n"; $this->setResult( $this->getClient() ->$method( $this->getName(), $this->getPayload(), $this->getHash() ) ); if( $this->getClient()->returnCode() != GEARMAN_SUCCESS ) { echo "Code: " . $this->getClient()->returnCode() . "\t" . GEARMAN_TIMEOUT . "\n"; } }

    Read the article

  • NSPredicate always gives back the same data

    - by Stef Geelen
    I am trying to work with NSPredicates. But it always give me back the same array. Here you can see my predicate. NSFetchRequest *request = [[NSFetchRequest alloc] init]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"whichAlbum.album_id == %d", AlbumId]; [request setEntity:[NSEntityDescription entityForName:@"Picture" inManagedObjectContext:self.genkDatabase.managedObjectContext]]; [request setPredicate:predicate]; Also when I try it hardcoded. It gives back the same array. NSPredicate *predicate = [NSPredicate predicateWithFormat:@"whichAlbum.album_id == 5"]; Here you can see my database model. And here you can see how I put data in my database for entity Picture. + (Picture *)pictureWithGenkInfo:(NSDictionary *)genkInfo inManagedObjectContext:(NSManagedObjectContext *)context withAlbumId:(int)albumId withPictureId:(int)pictureId; { Picture *picture = nil; picture = [NSEntityDescription insertNewObjectForEntityForName:@"Picture" inManagedObjectContext:context]; picture.url = [genkInfo objectForKey:PICTURES_URL]; picture.pic_album_id = [NSNumber numberWithInt:albumId]; picture.picture_id = [NSNumber numberWithInt:pictureId]; return picture; } Anybody can help me ? Kind regards

    Read the article

  • Select lowest nested selector when clicked

    - by rikAtee
    I would like to click $('.sub-menu') selector and return the lowerst nested item that was clicked, rather than the highest. e.g., when I click "enlish", "root" is returned becasue "english" is a child of "root". I want "english" returned when I select "english". <div ID="browse_container"> <div class="sub-menu">Root <div class="sub-menu">English</div> <div class="sub-menu">Maths <div class="sub-menu">Year 1</div> <div class="sub-menu">Year 2</div> </div> <div class="sub-menu">? Science</div> </div> </div> my script is simply: $('.sub-menu, #root').on('click', function(event){ alert($(this).text()) });

    Read the article

  • Aligning left and right in a simple footer

    - by Wolfram
    I'm currently working on a simple footer, and I would like to align one line of text left and the other to the right. This is what I have so far: <div id="footer"> Last Updated: October 15, 2012 <!--left align--> Contact Us Login <!--right align (these will be links)--> </div> #footer { font-family: Arial; font-size: .9em; color: #24ACAE; border-top: 1px solid #24ACAE; margin-left: 90px; margin-right: 90px; padding-top: 5px; } The above code results in the two lines of text being next to each other and I've tried various ways of fixing this such as putting the the 2nd line in a span and aligning right and even putting the lines into a table. None of what I have tried has resulted in both lines being properly aligned. Using a margin-left alone does not work because when the first line is updated and becomes longer, it will push the second line downwards. Relative positioning seems to have the same issue. Hopefully there's something simple that I'm overlooking.

    Read the article

  • How would I rspec/test an updated_at field without using sleep() in ruby?

    - by Kamilski81
    How do i write my spec without using the sleep(1.second) method? When I remove the sleep then my tests break because they are returning the same time stamp? I have the following class method: def skip qs = find_or_create_by(user_id: user_id) qs.set_updated_at qs.n_skip += 1 qs.save! end and following spec: qs = skip(user.id) sleep(1.second) qs2 = skip(user.id) qs.should_not be_nil qs2.should_not be_nil (qs.updated_at < qs2.updated_at).should be_true

    Read the article

  • As2 loading swf instance

    - by user1748474
    I have a .swf which loads an external .swf: this.createEmptyMovieClip("container_mc", this.getNextHighestDepth()); var my_listener:Object = new Object(); my_listener.onLoadComplete = function(target_mc:MovieClip) { target_mc._x = 50; target_mc._y = 50; addChild(my_loader); var blocker = my_loader.content.test blocker._visible = false; } my_listener.onLoadProgress = function(target_mc:MovieClip) { trace(target_mc.getBytesLoaded() + " out of " + target_mc.getBytesTotal()); } var my_loader:MovieClipLoader = new MovieClipLoader(); my_loader.addListener(my_listener); my_loader.loadClip("child_as2.swf", container_mc); I want to acces the external swf and make the movieclip with instance name test visible = false; but it won't work. I have tried a lot of codes and right now it throws me this error: Scene=Escena 1, layer=Capa 1, frame=1, Line 9 There is no property with the name 'content'. Any idea? If you have a better code i will thank you so much.

    Read the article

  • wp trim function

    - by Juliver Galleto
    Ok i have this code currently. <?php query_posts('category_name=widgets2'); echo "<div id='widgets-wrapper2'><div id='marginwidgets' style='overflow: auto; max- width: 100%; height: 450px; max-height: 100%; margin: 0 auto;'>"; while (have_posts()) : the_post(); echo "<div class='thewidgets2'>"; echo wp_trim_words( the_content(), $num_words = 0, $more = "..." ); echo '<div style="height: 20px;"></div><a class="button2" href="'.get_permalink().'">Read More</a></div>'; endwhile; echo "</div></div>"; ?> as you can see, it gets all the post from the category name widgets2 and then it should display it. and this line echo wp_trim_words( the_content(), $num_words = 100, $more = "..." ); should trim the words from the_content() to 100 and add a excerpt at the end character but unfortunately it doesnt work, instead it just display the entire contents that looks untrim at all. Hope someone here could figured out. Im open in any suggestions, recommendations and all relevant ideas, thank you.

    Read the article

  • nested for-each loops in xml

    - by user1748443
    I'm new to XML. I'm trying to create table containing item details and another table to contain customer details for each order on a picklist. It seems like it should be straightforward but I just get a list of all items on all orders repeated by the number of orders. What am I doing wrong? (XSL code below...) <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" doctype-system="about:legacy-compat"/> <xsl:template match="/"> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"/> <link rel="stylesheet" type="css/text" href="style.css"/> <title>Orders</title> </head> <body> <xsl:for-each select="//order"> <table> <caption><h3>Order Information</h3></caption> <thead> <th align="left">Item Id</th> <th align="left">Item Description</th> <th align="left">Quantity</th> <th align="left">Price</th> </thead> <xsl:for-each select="//item"> <tr> <td align="left"><xsl:value-of select="itemId"/></td> <td align="left"><xsl:value-of select="itemName"/></td> <td align="left"><xsl:value-of select="quantity"/></td> <td align="left"><xsl:value-of select="price"/></td> </tr> </xsl:for-each> </table> <table> <caption><h3>Customer Information</h3></caption> <thead> <th align="left">Customer Name</th> <th align="left">Street</th> <th align="left">City</th> </thead> <xsl:for-each select="//item"> <tr> <td align="left"><xsl:value-of select="customerName"/></td> <td align="left"><xsl:value-of select="street"/></td> <td align="left"><xsl:value-of select="city"/></td> </tr> </xsl:for-each> </table> </xsl:for-each> </body> </html> </xsl:template> </xsl:stylesheet> This is the XML: <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="Orders.xsl"?> <orders xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Orders.xsd"> <order> <orderId>123</orderId> <items> <item> <itemId>001</itemId> <itemName>Nylon Rope</itemName> <quantity>1</quantity> <price>3.50</price> </item> <item> <itemId>002</itemId> <itemName>Shovel</itemName> <quantity>1</quantity> <price>24.95</price> </item> </items> <customerAddress> <customerName>Larry Murphy</customerName> <street>Shallowgrave Lane</street> <city>Ballymore Eustace, Co. Kildare</city> </customerAddress> </order> <order> <orderId>124</orderId> <items> <item> <itemId>001</itemId> <itemName>Whiskey</itemName> <quantity>1</quantity> <price>18.50</price> </item> <item> <itemId>002</itemId> <itemName>Shotgun</itemName> <quantity>1</quantity> <price>225</price> </item> <item> <itemId>003</itemId> <itemName>Cartridge</itemName> <quantity>1</quantity> <price>1.85</price> </item> </items> <customerAddress> <customerName>Enda Kenny</customerName> <street>A Avenue</street> <city>Castlebar, Co. Mayo</city> </customerAddress> </order> </orders>

    Read the article

  • "render as JSON" is display JSON as text instead of returning it to AJAX call as expected

    - by typoknig
    I'm navigating to the index action of MyController. Some of the on the index page I'm making an AJAX call back to myAction in MyController. I expect myAction action to return some data as JSON to my AJAX call so I can do something with the data client side, but instead of returning the data as JSON like I want, the data is being displayed as text. Example of my Grails controller: class MyController { def index() { render( view: "myView" ) } def myAction { def mapOfStuff = [ "foo": "foo", "bar":] render mapOfStuff as JSON } } Example of my JavaScript: $( function() { function callMyAction() { $.ajax({ dataType: 'json', url: base_url + '/myController/myAction', success: function( data ) { $(function() { if( data.foo ) { alert( data.foo ); } if( data.bar ) { alert( data.bar ); } }); } }); } }); What I expect is that my page will render, then my JavaScript will be called, then two alerts will display. Instead the JSON array is displayed as text in my browser window: {"foo":"foo","bar":"bar"} At this point the last segment of the URL in my address bar is myAction and not index. Now if I manually enter the URL of the index page and press refresh, all works as expected. I have half a dozen AJAX calls I do the exact same way and none of them are having problems. What is the deal here? UPDATE: I have noticed something. When I set a break point in the index action of MyController and another one in the myAction action, the break point in myAction gets hit BEFORE the break point in index, even though I am navigating to the index. This is obviously closer to the root cause of my problem, but why is it happening?

    Read the article

  • removing image tag from memory

    - by Chapsterj
    I have seen some code to check if a background image on a div is loaded. What they are doing is adding a img tag to memory but storing it in a variable and using that to see if the image is loaded with the load event. My question is does the $img tag stay in memory and how would I be able to remove that tag when the load event has been called. var $div = $('div'), bg = $div.css('background-image'); if (bg) { var src = bg.replace(/(^url\()|(\)$|[\"\'])/g, ''), $img = $('<img>').attr('src', src).on('load', function() { // do something, maybe: $div.fadeIn(); }); } }); I got this code above from this post

    Read the article

  • Typical text encoding and EOL behavior on mobile devices

    - by Dan W
    Typical things to worry about when dealing with text are the BOM/signature, encoding, and the end of line (EOL) char/chars. I know that Windows often favours \r\n (CR+LF) and Mac/Linux favours \n (LF), but how about popular mobile devices such as the iPhone and Android? Do typical apps on those platforms favour one or the other (or maybe even \r for iOS)? I'll supply both types to the user just in case, but I'd like to choose one as default. Also, which text encodings are mobiles most likely to use - UTF-8, iso-8859-1, Windows 1252 (or other default codepage) or maybe even UTF-16? And if they use UTF-8/16, are they likely to need (or require not having) a BOM/signature? What is the typical behavior here? Once again, I'll supply a range of encodings to the user just in case, but I'd like to prioritize or use certain encodings as default if it's appropriate.

    Read the article

  • Jackson XML globally set element name for container types

    - by maxenglander
    I'm using Jackson 1.9.2 with the XML databind module. I need to tweak the way that Jackson serializes arrays, lists, collections. By default, with an int array property called myProperty containing a couple numbers, Jackson / XML is producing the following: <myProperty> <myProperty>1</myProperty> <myProperty>2</myProperty> </myProperty> What I need to produce is: <myProperty> <item>1</item> <item>2</item> </myProperty> I can do this on a per-POJO basis using a combination of JacksonXmlElementWrapper and JacksonXmlProperty like so: @JacksonXmlElementWrapper(localname='myProperty') @JacksonXmlProperty(localname='item') public int[] myProperty; This solution, however, would require that I manually apply these annotations to every array, list, collection in my POJOs. A much better solution would allow me to apply a solution once, globally, for all array, list, collection types. Any ideas on how to implement such a solution? Thanks!

    Read the article

  • Make graphics on left and right side of text change width depending on the amount of text?

    - by Dustin McGrew
    I need to have an H1 tag centered between two graphics on the left and right of the text. The H1 text will be various widths depending on what page you are on. The dot on the left should stay on the left edge of the site and the line should extend until it reaches the edge of the text. Same for the right side. Is there a way to accomplish this by using CSS or even some jquery/javascript? In the attached graphic, if the text was just "WHO YOU ARE" I'd need the bars on the left and right to grow wider to bump up against the edges of the text.

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19  | Next Page >