Search Results

Search found 6463 results on 259 pages for 'market news'.

Page 92/259 | < Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >

  • Spring MVC return ajax response using Jackson

    - by anshumn
    I have a scenario where I am filling a dropdown box in JSP through AJAX response from the server. In the controller, I am retuning a Collection of Product objects and have annotated the return type with @ResponseBody. Controller - @RequestMapping(value="/getServicesForMarket", method = RequestMethod.GET) public @ResponseBody Collection<Product> getServices(@RequestParam(value="marketId", required=true) int marketId) { Collection<Product> products = marketService.getProducts(marketId); return products; } And Product is @Entity @Table(name = "PRODUCT") public class Product implements Serializable { private static final long serialVersionUID = 1L; private int id; private Market market; private Service service; private int price; @Id @GeneratedValue(strategy = GenerationType.AUTO) public int getId() { return id; } public void setId(int id) { this.id = id; } @ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name = "MARKET_ID") public Market getMarket() { return market; } public void setMarket(Market market) { this.market = market; } @ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name = "SERVICE_ID") public Service getService() { return service; } public void setService(Service service) { this.service = service; } @Column(name = "PRICE") public int getPrice() { return price; } public void setPrice(int price) { this.price = price; } } Service is @Entity @Table(name="SERVICE") public class Service implements Serializable { /** * */ private static final long serialVersionUID = 1L; private int id; private String name; private String description; @Id @GeneratedValue @Column(name="ID") public int getId() { return id; } public void setId(int id) { this.id = id; } @Column(name="NAME") public String getName() { return name; } public void setName(String name) { this.name = name; } @Column(name="DESCRIPTION") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } } In the JSP, I need to get the data from the service field of Product also. So I in my JQuery callback function, I have written like product.service.description to get the data. It seems that by default Jackson is not mapping the associated service object (or any other custom object). Also I am not getting any exception. In the JSP, I do not get the data. It is working fine when I return Collection of some object which does not contain any other custom objects as its fields. Am I missing any settings for this to work? Thanks!

    Read the article

  • Need help in displaying data insider marquee

    - by user59637
    Hi all, I want to display news inside the marquee markup in my banking application but its not happening.Please somebody help me what is the error in my code.Here is my code: <marquee bgcolor="silver" direction="left" id="marq1" runat="server" behavior="scroll" scrolldelay="80" style="height: 19px" width="565"> <% String se = Session["countnews"].ToString(); for (int i = 0; i < int.Parse("" +se); i++) { %> <strong><%Response.Write("&nbsp;&nbsp;" + Session["news"+i] + "&nbsp;&nbsp;"); %></strong> <% } %> </marquee> public class News { DataSet ds = new DataSet("Bank"); SqlConnection conn; String check; SqlDataAdapter sda; int i; public string News_Name; public int Count_News; public int newsticker() { conn = new SqlConnection(ConfigurationManager.ConnectionStrings["BankingTransaction"].ConnectionString.ToString()); check = "Select NewsTitle from News where NewsStatus = 'A'"; sda = new SqlDataAdapter(check, conn); sda.Fill(ds, "News"); if (ds.Tables[0].Rows.Count > 0) { for (i = 0; i < ds.Tables[0].Rows.Count; i++) { News_Name =i+ ds.Tables[0].Rows[i].ItemArray[0].ToString(); } Count_News = ds.Tables[0].Rows.Count; } else { News_Name =0+ "Welcome to WestSide Bank Online Web site!"; Count_News = 1; } return int.Parse(Count_News.ToString()); } protected void Page_Load(object sender, EventArgs e) { News obj = new News(); try { obj.newsticker(); Session["news"] = obj.News_Name.ToString(); Session["countnews"] = obj.Count_News.ToString(); } catch (SqlException ex) { Response.Write("Error in login" + ex.Message); Response.Redirect("Default.aspx"); } finally { obj = null; } }

    Read the article

  • Where to place logic in a rich domain model

    - by Fino
    I have a model "news item" which contains text, image etc to display as latest news on several pages in a website. This "news item" can also be posted to Twitter or Facebook. Is it clean to implement a method post inside the news item model and inject the different post implementations as a strategy? Or is it better to have a separate application service for this? Thanks

    Read the article

  • Passing input value thru XML loop and return value

    - by Mike Dyer
    "X" is reading the form value, but it is still passing and older "var thisMarket" value. The objective is to take a zip code via HTML form: <form id="market" name="market" onSubmit="return validateZIP(this.zip.value);" method="get" action=""> <input type="text" name="zip" id="zip" value="zipcode" onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;" style="float:left; width:100px; margin-top:5px;"> <input type="image" style="float:left; margin-top:5px; border: 0pt none ; width: 22px; height:17px;" src="images/nav/bottom/linkbar/btn_search_btn.gif" onClick="findLda();"> </form> The script being passed thru is: function findLda(x){ marketName = new Array(); marketURL = new Array(); zip = new Array(); zip_temp = new Array(); zipMatch = false; var shareZip = "Shared Zips"; var thisMarket = "Market value"; xmlDoc=loadXML("/_includes/market.xml"); var Offer,node; document.getElementById('market').innerHTML=''; for(var j=0; j<xmlDoc.getElementsByTagName('market').length; j++){ node = xmlDoc.getElementsByTagName('market')[j]; marketName.push(node.childNodes[3].textContent); marketURL.push(node.childNodes[5].textContent); for(var k=0; k<node.getElementsByTagName('zip').length; k++){ if(node.getElementsByTagName('zip')[k].textContent!=null){ zip_temp.push(node.getElementsByTagName('zip')[k].textContent); } } zip.push(zip_temp); zip_temp = new Array(); } //loop the zip Array to find a match for the query Zip. for(k=0; k<zip.length; k++){ for(m=0; m<zip[k].length; m++){ if(x == zip[k][m].toString()){ zipMatch=true; thisMarket=marketName[k].toString(); } } } alert(thisMarket); } The objective naturally is to take field input (A), pass it thru market.xml - initialize a loop and match a zip (B), alert the result (C). Looking for any direction with what is existing or a completely new direction. Thanks!

    Read the article

  • fetching only new rows from mysql with jquery ajax

    - by testkhan
    i have a table named news with 3 fields i.e (id, news, time) and i have a setInterval after every 3mints to fetch news from google or any news site .... now i want to fetch only new rows inserted after every 5 minutes...with jquery $.ajax()...how can i do that... do i reload the whole table or there is a way to fetch only the new ones...

    Read the article

  • Extracting pure content / text from HTML Pages by excluding navigation and chrome content

    - by Ankur Gupta
    Hi, I am crawling news websites and want to extract News Title, News Abstract (First Paragraph), etc I plugged into the webkit parser code to easily navigate webpage as a tree. To eliminate navigation and other non news content I take the text version of the article (minus the html tags, webkit provides api for the same). Then I run the diff algorithm comparing various article's text from same website this results in similar text being eliminated. This gives me content minus the common navigation content etc. Despite the above approach I am still getting quite some junk in my final text. This results in incorrect News Abstract being extracted. The error rate is 5 in 10 article i.e. 50%. Error as in Can you Suggest an alternative strategy for extraction of pure content, Would/Can learning Natural Language rocessing help in extracting correct abstract from these articles ? How would you approach the above problem ?. Are these any research papers on the same ?. Regards Ankur Gupta

    Read the article

  • how relate one table to another for future records

    - by Sinan
    I have a games table which holds the data about a game. Then another table which holds the data about news. So far so good. First I thought about creating a junction table for game_news so I could relate news to games. This way works as intended when the game exists. So whenever I insert a news I can relate it to a game using the junction table. However there are cases when there is news about game but the game isn't published and it doesn't exists. So my question would be; is there a way to relate these news to a particular game when the game record is created. What is the best way to do this? Any ideas?

    Read the article

  • Drupal: Content in blocks from node_reference fields?

    - by Marco
    After only a few weeks of working with Drupal I've come up with a recurring problem, which I don't really have an optimal solution to, so I'm hoping that someone here might be able to give some best practice pointers. What I have is a region inside my node.tpl.php, which is populated with blocks that display content from two different CCK fields of the type node_reference. This works fine when displaying a single node. The problem appears when I need to use a view. For example, lets say I have a news listing, and a single news item view. When I display the single news item I can use the news node node_reference field to reference whatever material I would like to have in my sidebar, but when on the news listing view I would like to reference nodes separately. What would be the best practice to solve this? I'm having a few ideas, but none seem like the logical choice, how would you do?

    Read the article

  • WSS 3.0 navigation structure

    - by Dante
    Hi all, I'm a beginner in WSS 3.0 and I'm having some problems with the navigation setup. I can't find any documentation that clearly recommends best practices in this area. I'm trying to create an intranet, custom look and feel, that should have a structure similar to: Company - News - News type 1 - News type 2 - Organogram - ... Employees - Employees 1 - Employees 2 - Employees 2_1 - ... How to properly set this up? Company, News, are sites/subsites? And News type 1 and 2 are pages within a site? I created as described above and in the master page of the main site I added some scripts that will be used by web parts, like jquery. The subsites will have their own master page and will not recognize the scripts, I need to add them there which is annoying. Any recommendations? Or some resource that provides best practices setting up these structures? Thx in advance

    Read the article

  • how do i use MySql ENUM type? (and is it right for a news feed)

    - by Haroldo
    I'm creating a table called news_feed, this will log all the actions a user performs. Lets say I want to store user1234 deleted article412 at midday I then need a table like so timestamp | user_id | subject_type | subject_id | method . there would be 5 potential methods to log, methods = add/edit/delete/update/report and lets say 2 possible subject_type subjects = article/comment I know i could make my own key where 0=add, 1=delete etc etc but this would make my queries cumbersome to use/write as i'd need to keep consulting the key. Is there a MySql type which can read lots of identially values quickly? is this ENUM? how do i use it?!!

    Read the article

  • I want to use facebook connect in my website to register, login and comment on news articles or posts made by other users

    - by sasi kiran
    I would like to implement the following things in my website. I have done some extensive search over the internet but couldnt find and specific examples on how to implement them I am developing this site in php using a mvc framework Would like to have facebook registration on my website - users who have an account in facebook will get an option to use the details to register in my site, using their authentication I would pull the relavant details from their account and create a new account for them in my website. I would like to use facebook register fbml/fbjs in this case Would like to have facebook login used to login into my site. How to use the sessions is what I would like to know? I would like to make posts to the facebook-wall of the users registered in my site. Also if possible sent messages to them through my code whenever a new post is made to my site. Thanks for your help.

    Read the article

  • Pull news from an RDF Feed using Ruby and Nokogiri?

    - by Christian
    I would like to pull the titleand description fields from the newsfeed at http://www.tagesschau.de/newsticker.rdf to feed them to the Mac's Text-to-Speech engine. My search for a nice Ruby Gem to do this has brought me to Nokogiri, but all examples that "pull something out" of a given XML seem to be centered around CSS somehow. Does anyone have any idea how to save the titleand description fields in an array?

    Read the article

  • How to show related content using like in mysql?

    - by halocursed
    I currently have a table for products with it's own set of tags and a table for news with it's own set of tags. I wanted to add related news to the products page so I was thinking of using like but since the column tags in the products page is something like (Products) tags- manutd, man utd, football (news) tags - manutd, blah, bruha [this one is related] (news) tags - man, utd, bruha [this one is not related] I wanted to use a query to show all news containing any of the tags(from products) seperated by commas using mysql. How should I go about constructing such a query? If there is a better way of doing this a little explanation would be helpful too. Thanks

    Read the article

  • Is there a way to automatically update application on Android?

    - by Levara
    Hi, I'm developing an application that will most likely be preinstalled on devices. It will be also available on Market. Is there a way to update those instances that are not downloaded through Market, since Market won't notify users about an update. I was thinking about, as suggested here, trying to contact my site periodically, and when update is available, download it. I'm wondering if there is a way to do this update automatically, so that user doesn't have to do anything (like running the package manually). Or, when my site shows update is available, to offer users an update through Market, even though it's not installed through Market. Thanks!

    Read the article

  • help with php MVC problem

    - by aprencai
    hello, I have groups on my site and the urls have the following hierarchy: / groups / {id_group} / / groups / {id_group} / news / groups / {id_group} / gallery / groups / {id_group} / events / groups / {id_group} / events / {id_event} / groups / {id_group} / events / {id_event} / news / groups / {id_group} / events / {id_event} / gallery / groups / {id_group} / events / {id_event} / news As you can see a group can have news, gallery, etc. and in turn an event that is in a group can also have news, gallery, etc. How to implement this approach in a framework without specifying any specific one?, ie I would like some guidance on what would have modules, controllers, etc. Thanks.

    Read the article

  • SEO: Nested List vs List, Split Over Divs vs Definition List

    - by Jon P
    From an SEO perspective which, if any, is better: Option 1: Nested lists with h2 tags <ul id="mainpoints"> <li><h2>Powerful Analysis</h2> <ul> <li>Charting and indicators</li> <li>Daily trading signals</li> <li>Company health checks</li> </ul> </li> <li><h2>World Market Data</h2> <ul> [List Items removed for brevity] </ul> </li> <li><h2>Daily Market Data</h2> <ul> [List Items removed for brevity] </ul> </li> </ul> Option 2: Divs with h2 and lists <div id="mainpoints"> <div> <h2>Powerful Analysis</h2> <ul> <li>Charting and indicators</li> <li>Daily trading signals</li> <li>Company health checks</li> </ul> </div> <div> <h2>World Market Data</h2> <ul> [List Items removed for brevity] </ul> </div> <div> <h2>Daily Market Data</h2> <ul> [List Items removed for brevity] </ul> </div> </div> Option 3: Definition List <dl id="mainpoints"> <dt>Powerful Analysis</dt> <dd>- Charting and indicators</dd> <dd>- Daily trading signals</dd> <dd>- Company health checks</dd> <dt>World Market Data</dt> [List Items removed for brevity] <dt>Daily Market Data</dt> [List Items removed for brevity] </dl> My instincts tell me that semanticaly the pure list options (1 & 3) are the best and that h2 may be more SEO friendly (1 & 2) which would point to option 1 as being the best option. I do love the lean makeup of the definition list but will I take an SEO hit by losing the h2 tags? Before anyone asks, h2 is not valid markup in a dt tag. Are my instincts right with a nested list being the way to go?

    Read the article

  • Oracle Announces Oracle Insurance Policy Administration for Life and Annuity 9.4

    - by helen.pitts(at)oracle.com
    Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;} Today's global insurers require the ability to provide higher levels of service and quickly bring to market life insurance and annuity products that not only help them stand out from the competition, but also stay current with local legislation. To succeed, they require agile and flexible core systems that enable them to meet the unique localization requirements of the markets in which they operate, whether in North America, Asia Pacific or the Pan-European Region. The release of Oracle Insurance Policy Administration for Life and Annuity 9.4, announced today, helps insurers meet this need with expanded international market capabilities that enable them to reduce risk and profitably compete wherever their business takes them. It offers expanded multi-language along with unit-linked product and fund processing capabilities that enable regional and global insurers to rapidly configure and deliver localized products – along with providing better service for end users through a single policy admin solution. Key enhancements include: Kanji/Kana language support, pre-defined content, and imperial date processing for the Japanese market New localization flexibility for configuring and managing international mailing addresses along with regional variations for client information Enhanced capability to calculate unit-linked pricing and valuation, in addition to market-based processing and pre-configured unit linked content Expanded role-based security and masking capability to further protect sensitive customer data Enhanced capability to restrict processing specified activities based on time of day and user role, reducing exposure to market timing risks Further capability to eliminate duplicate client records, helping to reduce underwriting risks and enhance servicing through a single view of the client "The ability to leverage a single, rules-driven policy administration system for multiple global operation centers can help insurers realize significant improvements in speed to market, customer service, compliance with regional regulations, and consolidation efforts,” noted Celent's Craig Weber, senior vice president, Insurance. “We believe such initiatives are necessary to help the industry address service and distribution imperatives." Helping our customers meet these mission-critical business imperatives is a key objective for Oracle Insurance. Active, ongoing dialogue with our customers is an important part of the process to help understand how our solutions are and can continue to help them achieve success in the marketplace. I had the opportunity to meet with several of our insurance customers at the Oracle Insurance Policy Administration Client Advisory Board meeting last week in Philadelphia, Penn. (View photos on the Oracle Insurance Facebook page.)   It was a great forum for Oracle Insurance and our clients. Discussion centered on the latest business and IT trends, with opportunities to learn more about the latest release of Oracle Insurance Policy Administration for Life and Annuity and other Oracle Insurance solutions such as data warehousing / business intelligence, while exchanging best practices for product innovation and servicing customers and sales channels. Helen Pitts is senior product marketing manager for Oracle Insurance's life and annuities solutions.

    Read the article

  • Insurers Pushed to Transform Their Business

    - by Calvin Glenn
    Everyone in the P&C industry has heard it “We can’t do it.” “Nobody wants to do it.” “We can’t afford to do it.”  Unfortunately, what they’re referencing are the reasons many insurers are still trying to maintain their business processing on legacy policy administration systems, attempting to bide time until there is no other recourse but to give in, bite the bullet, and take on the monumental task of replacing an entire policy administration system (PAS). Just the thought of that project sends IT, Business Users and Management reeling. However, is that fear real?  It is a bit daunting when one realizes that a complete policy administration system replacement will touch most every function an insurer manages, from quoting and rating, to underwriting, distribution, and even customer service. With that, everyone has heard at least one horror story around a transformation initiative that has far exceeded budget and the promised implementation / go-live timeline.    But, does it have to be that hard?  Surely, in the age where a person can voice-activate their DVR to record a TV program from a cell phone, there has to be someone somewhere who’s figured out how to simplify this process. To be able to help insurers, of all sizes, transform and grow their business while also delivering on their overall objectives of providing speed to market, straight-through-processing for applications, quoting, underwriting, and simplified product development. Maybe we’re looking too hard and the answer is simple and straight-forward. Why replace the entire machine when all it really needs is a new part…a single enterprise rating system? This core, modular piece of the policy administration system is the foundation of product development and rate management that enables insurers to provide the right product at the right price to the right customer through the best channels at any given moment in time. The real benefit of a single enterprise rating system is the ability to deliver enhanced business capabilities, such as improved product management, streamlined underwriting, and speed to market. With these benefits, carriers have accomplished a portion of their overall transformation goal. Furthermore, lessons learned from the rating project can be applied to the bigger, down-the-road PAS project to support the successful completion of the overall transformation endeavor. At the recent Oracle OpenWorld Conference in San Francisco, information was shared with attendees about a recent “go-live” project from an Oracle Insurance Tier 1 insurer who did what is proposed above…replaced just the rating portion of their legacy policy administration system with Oracle Insurance Insbridge Rating and Underwriting.  This change provided the insurer greater flexibility to set rates that better reflect risk while enabling the company to support its market segment strategy. Using the Oracle Insurance Insbridge enterprise rating solution, the insurer was able to reduce processing time for agents and underwriters, gained the ability to support proprietary rating models and improved pricing accuracy.      There is mounting pressure on P&C insurers to produce growth and show net profitability in the midst of modest overall industry growth, large weather-related losses and intensifying competition for market share.  Insurers are also being asked to improve customer service, offer a differentiated value proposition and simplify insurance processes.  While the demands are many there is an easy answer…invest in and update the most mission critical application in your arsenal, the single enterprise rating system. Download the Podcast to listen to “Stand-Alone Rating Engine - Leading Force Behind Core Transformation Projects in the P&C Market,” a podcast originally recorded in October 2013. Related Resources: White Paper: Stand-Alone Rating Engine: Leading Force Behind Core Transformation Projects in the P&C Market Webcast On Demand: Stand-Alone Rating Engine and Core Transformation for P&C Insurers Don’t forget to keep up with us year-round: Facebook: www.facebook.com/oracleinsurance Twitter: www.twitter.com/oracleinsurance YouTube: www.youtube.com/oracleinsurance

    Read the article

  • Php sting handling triks

    - by Dam
    Hi my question Need to get the 10 word before and 10 words after for the given text . i mean need to start the 10 words before the keyword and end with 10 word after the key word. Given text : "Twenty-three" The main trick the having some html tags tags need to keep that tag with this content only the words from 10before - 10after content is bellow : <div id="hpFeatureBoxInt"><h2><span class="dy">Top News Story</span></h2><h3><a href="/go/homepage/i/int/news/world/1/-/news/1/hi/world/europe/8592190.stm">Suicide bombings hit Moscow Metro</a></h3><p>Past suicide bombings in Moscow have been blamed on Islamist rebels At least 35 people have been killed after two female suicide bombers blew themselves up on Moscow Metro trains in the morning rush hour, officials say.<img height="150" width="201" alt="Emergency services carry a body from a Metro station in Moscow (29 March 2010)" src="http://wwwimg.bbc.co.uk/feedengine/homepage/images/_47550689_moscowap203_201x150.jpg">Twenty-three died in the first blast at 0756 (0356 GMT) as a<a href="#"> train stood </a>at the central Lubyanka station, beneath the offices of the FSB intelligence agency.About 40 minutes later, a second explosion ripped through a train at Park Kultury, leaving another 12 dead.No-one has said they carried out the worst attack in the capital since 2004. </p><p id="fbilisten"><a href="/go/homepage/i/int/news/heading/-/news/">More from BBC News</a></p></div> Thank you

    Read the article

  • Rails NoMethodError in loop when method exists

    - by Kevin Whitaker
    Good day all. I'm running into a bit of a problem getting a script running on my production environment, even though it works just fine on my dev box. I've verified that all the requisite gems and such are the same version. I should mention that the script is intended to be run with the script/runner command. Here is a super-condensed version of what I'm trying to do, centered around the part that's broken: def currentDeal marketTime = self.convertToTimeZone(Time.new) deal = Deal.find(:first, :conditions = ["start_time ? AND market_id = ? AND published = ?", marketTime, marketTime, self.id, 1]) return deal end markets = Market.find(all) markets.each do |market| deal = market.currentDeal puts deal.subject end Now convertToTimeZone is a method attached to the model. So, this code works just fine on my dev machine, as stated. However, attempting to run it on my production machine results in: undefined method `subject' for nil:NilClass (NoMethodError) If, however, I go into the console on the production box and do this: def currentDeal marketTime = self.convertToTimeZone(Time.new) deal = Deal.find(:first, :conditions = ["start_time ? AND market_id = ? AND published = ?", marketTime, marketTime, self.id, 1]) return deal end market = Market.find(1) deal = market.currentDeal puts deal.subject It returns the correct value, no problem. So what is going on? This is on rails v 2.3.5, on both machines. Thanks for any help

    Read the article

  • Content Management Systems for Adaptive Content [closed]

    - by andrewap
    Content management systems (CMS) allow us to easily maintain blogs, news sites, general websites, and so on. Many of them are designed to manage pages of content, and provide tools to organize and customize how that content is displayed on the web. However, as explained by Mark Boulton in his Adaptive Content Management article, and by Karen McGrane in her talk on Adapting Ourselves to Adaptive Content, we are increasingly delivering content not just to the web, but also to other platforms and channels. We need tools to manage pieces of content with meaningful metadata attached. Create once, publish everywhere. The main idea is to store content cleanly, without intertwining it with presentation markup specific to the web. Because pieces of content is compartmentalized semantically, it can easily adapt to fit in different platforms and channels. Hence, it's called adaptive content. Let's look at a quick example to compare: Say I manage news articles and events. To create a news article, I would tell the CMS the type of content I'm creating, and be asked to fill in a form with individual fields tailored to news articles (e.g. headline, subtitle, full text, short snippet, and images). — i.e. pieces of content With a traditional web publishing tool, I would probably have had to create a new page under News, and then type in and format the news article in a blank WYSIWYG text editor. — i.e. pages of content As you can see, the first design allows me to individually specify content in its smallest semantic unit. When I want to display or consume it, the system can easily provide the pieces I need. So here's my question: Is there a CMS that is designed specifically with adaptive content in mind, and that is decoupled with the presentation layer? Note: This is not a discussion about the best CMS, or which CMS I should use. I am asking whether a very specific type of tool — CMS designed for adaptive content — exists for developers to use.

    Read the article

  • Query next/previous record

    - by Rob
    I'm trying to find a better way to get the next or previous record from a table. Let's say I have a blog or news table: CREATE TABLE news ( news_id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, news_datestamp DATETIME NOT NULL, news_author VARCHAR(100) NOT NULL, news_title VARCHAR(100) NOT NULL, news_text MEDIUMTEXT NOT NULL ); Now on the frontend I want navigation buttons for the next or previous records, if i'm sorting by news_id, I can do something rather simple like: SELECT MIN(news_id) AS next_news_id FROM news WHERE news_id > '$old_news_id' LIMIT 1 SELECT MAX(news_id) AS prev_news_id FROM news WHERE news_id < '$old_news_id' LIMIT 1 But the news can be sorted by any field, and I don't necessarily know which field is sorted on, so this won't work if the user sorts on news_author for example. I've resorted to the rather ugly and inefficient method of sorting the entire table and looping through all records until I find the record I need. $res = mysql_query("SELECT news_id FROM news ORDER BY `$sort_column` $sort_way"); $found = $prev = $next = 0; while(list($id) = mysql_fetch_row($res)) { if($found) { $next = $id; break; } if($id == $old_news_id) { $found = true; continue; } $prev = $id; } There's got to be a better way.

    Read the article

  • Php string handling triks

    - by Dam
    Hi my question Need to get the 10 word before and 10 words after for the given text . i mean need to start the 10 words before the keyword and end with 10 word after the key word. Given text : "Twenty-three" The main trick : content having some html tags etc .. tags need to keep that tag with this content only . need to display the words from 10before - 10after content is bellow : <div id="hpFeatureBoxInt"><h3><a href="/go/homepage/i/int/news/world/1/-/news/1/hi/world/europe/8592190.stm">Suicide bombings hit Moscow Metro</a></h3><p>Past suicide bombings in Moscow have been blamed on Islamist rebels At least 35 people have been killed after two female suicide bombers blew themselves up on Moscow Metro trains in the morning rush hour,<h2><span class="dy">Top News Story</span></h2> officials say.<img height="150" width="201" alt="Emergency services carry a body from a Metro station in Moscow (29 March 2010)" src="http://wwwimg.bbc.co.uk/feedengine/homepage/images/_47550689_moscowap203_201x150.jpg">Twenty-three died in the first blast at 0756 (0356 GMT) as a<a href="#"> train stood </a>at the central Lubyanka station, beneath the offices of the FSB intelligence agency.About 40 minutes later, a second explosion ripped through a train at Park Kultury, leaving another 12 dead.No-one has said they carried out the worst attack in the capital since 2004. </p><p id="fbilisten"><a href="/go/homepage/i/int/news/heading/-/news/">More from BBC News</a></p></div> Thank you

    Read the article

  • spaces or %20 in links turn into + signs when page is sent as an email

    - by Obay
    I am creating a web app that accepts input of news items (title, article, url). It has a page news.php which creates a summary of all news items inputted for specified dates, like so: News 4/25/2010 Title 1 [URL 1] Article 1 Title 2 [URL 2] Article 2 and so on... I have two other pages, namely preview.php and send.php , both of which call news.php through a file_get_contents() call. Everything works fine except when the URL contains spaces. During Preview, the urls get opened (FF: spaces are spaces, Chrome: spaces are %20). However, during Send, when received as emails, the urls don't get opened, because the spaces are converted into + signs. For example: 1. Preview in FF: http://www.example.com/this is the link.html 2. Preview in Chrome: http://www.example.com/this%20is%20the%20link.html 3. Viewed as email in both browsers: http://www.example.com/this+is+the+link.html Only #3 doesn't work (link doesn't get opened). Why are the spaces in the urls correct (spaces or %20) when previewed, but incorrect (+) when received in the emails, when in fact, the same page is generated by the same news.php? Any help appreciated :)

    Read the article

< Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >