Search Results

Search found 4286 results on 172 pages for 'spliced news'.

Page 139/172 | < Previous Page | 135 136 137 138 139 140 141 142 143 144 145 146  | Next Page >

  • How to create a custom admin configuration panel in Django?

    - by Matteo
    Hi, I would like to create a configuration panel for the homepage of the web-app I'm designing with Django. This configuration panel should let me choose some basic options like highlighting some news, setting a showcase banner, and so on. Basically I don't need an app with different rows, but just a panel page with some configuration options. The automatically generated administration area created by Django doesn't seem to handle this feature as far as I can see, so I'm asking you for some directions. Any hint is highly appreciated. Thank you in advance. Matteo

    Read the article

  • How to produce a merged RSS feed (from DokuWiki and Serendipity)

    - by symcbean
    Hi, I've got an application developed on top of DokuWiki. I'd like to provide a 'News' page providing the latest updates from the internal RSS feed, some other feeds maintained in Serendipity and potentially other locations. Although its trivial to attach feed parsers to each one individually, I'd like to aggregate this into a single list (possibly a single RSS feed). Both the DokuWiki and Serendipity servers are not connected to the internet - so I can't use an external service for this - looking for code. Anybody got any ideas? TIA C.

    Read the article

  • how to open a .pdf file in a panel or iframe using asp.net c#

    - by rahul
    I am trying to open a .pdf file on a button click. I want to open a .pdf file into a panel or some iframe. With the following code i can only open .pdf file in a separate window or in a save as mode. string filepath = Server.MapPath("News.pdf"); FileInfo file = new FileInfo(filepath); if (file.Exists) { Response.ClearContent(); Response.AddHeader("Content-Disposition", "inline; filename=" + file.Name); Response.AddHeader("Content-Length", file.Length.ToString()); Response.ContentType = ReturnExtension(file.Extension.ToLower()); Response.TransmitFile(file.FullName); Response.End(); } how to assign a iframe to the below line Response.AddHeader("Content-Disposition", "inline; filename=" + file.Name);

    Read the article

  • .htacces - moving all posts in root to a new category

    - by Chris
    Could anyone please help me? I am at the last chance saloon and losing a lot of traffic. Any help would be greatfully received. After a year based on my permalink structure, all posts were in the root so have been picked up by Google as: snowmenu.com/postname Since changing my categories and permalink structure, I need the years worth of posts on Google to be redirected to: snowmenu.com/ski-snowboard-winter-sports-news/postname Is there a way to make this happen via .htaccess? Thank you very much to anyone who's able to help me.

    Read the article

  • Create a helper or something for haml with ruby on rails

    - by Lisinge
    Hello, i am using haml with my rails application and i have a question how the easiest way to insert this haml code into a html file: <div clas="holder"> <div class=top"></div> <div class="content"> Content into the div goes here </div> <div class="bottom"></div> </div> And i want to use it in my haml document like this: %html %head %body Maybee some content here. %content_box #I want to get the code i wrote inserted here Content that goes in the content_box like news or stuff %body I hope you understand what i want to acomplish here. And if there is a easier way to do it please answer how. Thanks!

    Read the article

  • Like Html.RenderAction() but without reinstantiating the controller object

    - by Jørn Schou-Rode
    I like to use the RenderAction extension method on the HtmlHelper object to render sidebars and the like in pages, as it allows me to keep the data access code for each such part in separate methods on the controller. Using an abstract controller base, I can define a default "sidebar strategy", which can then be refined by overriding the method in a concrete controller, when needed. The only "problem" I have with this approach, is that the RenderAction is built in a way where it always creates a news instance of the controller class, even when rendering actions from the controller already in action. Some of my controllers does some data lookup in their Initialize method, and using the RenderAction method in the view causes this to occur several times in the same request. Is there some alternative to RenderAction which will reuse the controller object if the action method to be invoked is on the same controller class as the "parent" action?

    Read the article

  • how do i make my own P2P software ?

    - by wefwgeweg
    how can i make my own napster ? which library are these p2p programs using ? i am not too familiar with the concept of socket programming. could you make p2p program using Qt4 ? i've been wondering about this question since the Napster days. how would you also go about creating the next "bitorrent" ? is this by using similar socket libraries ? what's the latest in p2p technology ? are there any news sites? what's the future hold for p2p ?

    Read the article

  • Get list of users belonging to a role using Authorization Manager (AzMan)

    - by Sam
    Using ASP.NET (C#) I have set up Authorization Manager to allow me to handle roles on a website. Added users to roles is simple Roles.AddUserToRole("DOMAIN\\UserName", "role"). However I want to list the users belonging to a role, but since they are stored as SID's, displaying them would not be that helpful. To get the users, I am thinking XML would have to be used, although is it possible to use COM Interop to both do that and get the user name? Either way, how can I get the users belonging to a role? The table to manage roles would basically be like this: Role User ---- ---- admin DOMAIN\UserName [delete] DOMAIN\UserName2 [delete] [add user text box] news DOMAIN\UserName3 [delete] [add user text box]

    Read the article

  • Perl SDL Windows Installation

    - by Blaise Roth
    I'm using Windows and I need the SDL Library to start using SDL with Perl. I've been pointed to http://www.libsdl.org/ to download it. My first queston is, which library do I want from that page? There's 3 to choose from... Then I've been pointed to 4 other SDL extensions by this page: http://arstechnica.com/gaming/news/2006/02/games-perl.ars. From those I've found there's a normal Win32 version and also a devel one. Which do I want? Thanks.

    Read the article

  • Annotation Title/Subtitle under Pins

    - by ludo
    Hi, I use the Map to display some pin location from my database, everything is working fine. After that I use a pickerView to let the user display some specific pins. So I remove all the Pins first with [mapView removeAnnotations:mapView.anotations]; and display new Pins. There is like 100 of news pins, my problem is when I click on a Pin, the Title and subtitle are display under the others pins. Someone got the same problem? Thanks, P.S: Don't know if its relevant but I add a custom image for the pins.

    Read the article

  • Will Apple's new "originally written in" clause affect your decision to target the iPhone?

    - by Michael Aaron Safyan
    So, you've probably heard about Apple's change to its agreement to prohibit source-to-source translation, thereby blocking translation from Flash (in CS5) and also from Android (via XMLVM). You may also have read about a response by a well-known Adobe developer, and calls to boycott development for the iPhone. Given that this audience is a better representative of the developer community than those who post comments on the NYT, Digg, and other news sites, I was wondering what your opinions were about this decision. Will any of you switch to Android from the iPhone or avoid development on the iPhone as a result of this? Since this is fairly subjective, I am making this a community wiki. Also, please, keep things civil.

    Read the article

  • WPF TextBox Custom Dictionary Support

    - by Tom Allen
    Has anyone found a workaround yet for getting custom dictionary support working for the built in spellchecking on WPF TextBoxes/RichTextBoxes? We've been probing the spelling stuff with reflector hoping to find where the dictionary entries are coming from, but it's looking very much like it's going to be a COM object.... I know it's not currently supported and that Microsoft were looking into supporting it in a future release, but that was quite a while ago and I can't seem to find any recent news about it. Clutching at staws, I've posted a suggestion up on Connect: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=470233

    Read the article

  • Why Banks or Financial Companies prefer Oracle than other RDBMS for their "Core" systems?

    - by edwin.nathaniel
    I'd like to know why most Banks or Financial companies prefer Oracle than other RDBMS for their core systems (the absolutely minimum features that a Bank must support). I found a few answers that didn't satisfy me. For example: Oracle has more features. But features for what? Can't you implement that in application level if you were not using Oracle? Could someone please describe a bit more technical but still on high-level overview of what the bank needs and how Oracle would solve it and the others can't or don't have the features yet? I came from the web-app (web 2.0) crowd who normally hear news about MySQL, PostgreSQL or even key-value/column-oriented storage solution. I have almost zero knowledge on how Banks or Financial companies operates from technical perspective. Thank you, Ed

    Read the article

  • Mutating the expression tree of a predicate to target another type

    - by Jon
    Intro In the application I 'm currently working on, there are two kinds of each business object: the "ActiveRecord" type, and the "DataContract" type. So for example, we have: namespace ActiveRecord { class Widget { public int Id { get; set; } } } namespace DataContracts { class Widget { public int Id { get; set; } } } The database access layer takes care of "translating" between hierarchies: you can tell it to update a DataContracts.Widget, and it will magically create an ActiveRecord.Widget with the same property values and save that. The problem I have surfaced when attempting to refactor this database access layer. The Problem I want to add methods like the following to the database access layer: // Widget is DataContract.Widget interface DbAccessLayer { IEnumerable<Widget> GetMany(Expression<Func<Widget, bool>> predicate); } The above is a simple general-use "get" method with custom predicate. The only point of interest is that I 'm not passing in an anonymous function but rather an expression tree. This is done because inside DbAccessLayer we have to query ActiveRecord.Widget efficiently (LINQ to SQL) and not have the database return all ActiveRecord.Widget instances and then filter the enumerable collection. We need to pass in an expression tree, so we ask for one as the parameter for GetMany. The snag: the parameter we have needs to be magically transformed from an Expression<Func<DataContract.Widget, bool>> to an Expression<Func<ActiveRecord.Widget, bool>>. This is where I haven't managed to pull it off... Attempted Solution What we 'd like to do inside GetMany is: IEnumerable<DataContract.Widget> GetMany( Expression<Func<DataContract.Widget, bool>> predicate) { var lambda = Expression.Lambda<Func<ActiveRecord.Widget, bool>>( predicate.Body, predicate.Parameters); // use lambda to query ActiveRecord.Widget and return some value } This won't work because in a typical scenario, for example if: predicate == w => w.Id == 0; ...the expression tree contains a MemberAccessExpression instance which has a MemberInfo property (named Member) that point to members of DataContract.Widget. There are also ParameterExpression instances both in the expression tree and in its parameter expression collection (predicate.Parameters); After searching a bit, I found System.Linq.Expressions.ExpressionVisitor (its source can be found here in the context of a how-to, very helpful) which is a convenient way to modify an expression tree. Armed with this, I implemented a visitor. This simple visitor only takes care of changing the types in member access and parameter expressions. It may not be complete, but it's fine for the expression w => w.Id == 0. internal class Visitor : ExpressionVisitor { private readonly Func<Type, Type> dataContractToActiveRecordTypeConverter; public Visitor(Func<Type, Type> dataContractToActiveRecordTypeConverter) { this.dataContractToActiveRecordTypeConverter = dataContractToActiveRecordTypeConverter; } protected override Expression VisitMember(MemberExpression node) { var dataContractType = node.Member.ReflectedType; var activeRecordType = this.dataContractToActiveRecordTypeConverter(dataContractType); var converted = Expression.MakeMemberAccess( base.Visit(node.Expression), activeRecordType.GetProperty(node.Member.Name)); return converted; } protected override Expression VisitParameter(ParameterExpression node) { var dataContractType = node.Type; var activeRecordType = this.dataContractToActiveRecordTypeConverter(dataContractType); return Expression.Parameter(activeRecordType, node.Name); } } With this visitor, GetMany becomes: IEnumerable<DataContract.Widget> GetMany( Expression<Func<DataContract.Widget, bool>> predicate) { var visitor = new Visitor(...); var lambda = Expression.Lambda<Func<ActiveRecord.Widget, bool>>( visitor.Visit(predicate.Body), predicate.Parameters.Select(p => visitor.Visit(p)); var widgets = ActiveRecord.Widget.Repository().Where(lambda); // This is just for reference, see below Expression<Func<ActiveRecord.Widget, bool>> referenceLambda = w => w.Id == 0; // Here we 'd convert the widgets to instances of DataContract.Widget and // return them -- this has nothing to do with the question though. } Results The good news is that lambda is constructed just fine. The bad news is that it isn't working; it's blowing up on me when I try to use it (the exception messages are really not helpful at all). I have examined the lambda my code produces and a hardcoded lambda with the same expression; they look exactly the same. I spent hours in the debugger trying to find some difference, but I can't. When predicate is w => w.Id == 0, lambda looks exactly like referenceLambda. But the latter works with e.g. IQueryable<T>.Where, while the former does not (I have tried this in the immediate window of the debugger). I should also mention that when predicate is w => true, it all works just fine. Therefore I am assuming that I 'm not doing enough work in Visitor, but I can't find any more leads to follow on. Can someone point me in the right direction? Thanks in advance for your help!

    Read the article

  • remove json attribute where attribute is a variable

    - by pedalpete
    I have a news feed where items in the feed are created from JSON returned from a server. When the user takes an action on an item, I want to remove it from the object via javascript. The feed looks like this: {"newsFeed":[{"feedId":"1", "title":"item1 title", "desc":"description of the item"}, {"feedId":"2", "title":"item2 title", "desc":"description of the item"}]} I'm trying to remove a JSON attribute or entry where the feedId is passed in via a variable using jQuery. I'm not sure exactly where I'm going wrong here, but when I alert the feed before and after the removal of the object, I'm getting the same response: function removeFromFeed(feedId){ var newsFeed=jQuery('div#newsFeed').data('newsFeed'); alert(newsFeed.toSource()); delete newsFeed.feedId[feedId] jQuery('div#newsFeed').data('newsFeed',newsFeed); alert(newsFeed.toSource()); }

    Read the article

  • Implementing website messaging services

    - by Alex
    There's a website which currently has only web interfaces for all the users. However, new requirement has emerged which says that there is a need in providing an alternative interface for a certain group of website users who want to regularly receive pushed notifications(messages) that would inform them about new events(news) in their field of interest. What sort of interface would it be?Is it all about using a MOM(message-oriented middleware) like JMS and deploying it withing an application server on a website using publish/subscribe model?Is it the correct way how to meet these sort of requirements?And if it's not a web-based interface,would kind of interface would it be then for the users? Thanks

    Read the article

  • How to impelement messaging services in a website?

    - by Alex
    There's a website which currently has only web interfaces for all the users. However, new requirement has emerged which says that there is a need in providing an alternative interface for a certain group of website users who want to regularly receive pushed notifications(messages) that would inform them about new events(news) in their field of interest. What sort of interface would it be?Is it all about using a MOM(message-oriented middleware) like JMS and deploying it withing an application server on a website using publish/subscribe model?Is it the correct way how to meet these sort of requirements?And if it's not a web-based interface,would kind of interface would it be then for the users? Thanks

    Read the article

  • Consuming RSS Feed In PHP

    - by mrduclaw
    I'm trying to use an RSS feed from my blog on the news section on another site. Everything seems to be working fine until I use something like an ellipsis on my blog. The expected output is: One more time…less fail Although this is no joking matter… The actual output is: One more time?less fail Although this is no joking matter… The problem is that ? should be a .... The code I'm using is the same for the first line (the blog title) and the second line (the blog contents) and that code is: $a = utf8_decode($a); print("$a"); Where $a is the string from the RSS feed. Can anyone point in the right direction why that code would work correctly for the body (second line) and not for the title (first line)? Or suggest a better way to do this? Thanks!

    Read the article

  • How to create a BBC style (facebox?) help popup

    - by Ian Batten
    Hi guys, I have tried to take apart the code, but can't seem to replicate it. On the BBC weather homepage, http://news.bbc.co.uk/weather/, you will see a little help quetionmark in a circle in the top right corner or some of the boxes. When you click on it, it brings up a nice help popup, that looks a little like facebox. The main thing I like about this, is the little arrow that points back to the help button to the right of the container. Facebox is just a standard square. If anyone knows how to replicate this, some help would be greatly appreciated. Regards, Ian

    Read the article

  • Is there an equivalent to Java's ClassFileTransformer in .NET? (a way to replace a class)

    - by Alix
    I've been searching for this for quite a while with no luck so far. Is there an equivalent to Java's ClassFileTransformer in .NET? Basically, I want to create a class CustomClassFileTransformer (which in Java would implement the interface ClassFileTransformer) that gets called whenever a class is loaded, and is allowed to tweak it and replace it with the tweaked version. I know there are frameworks that do similar things, but I was looking for something more straightforward, like implementing my own ClassFileTransformer. Is it possible? EDIT #1. More details about why I need this: Basically, I have a C# application and I need to monitor the instructions it wants to run in order to detect read or write operations to fields (operations Ldfld and Stfld) and insert some instructions before the read/write takes place. I know how to do this (except for the part where I need to be invoked to replace the class): for every method whose code I want to monitor, I must: Get the method's MethodBody using MethodBase.GetMethodBody() Transform it to byte array with MethodBody.GetILAsByteArray(). The byte[] it returns contains the bytecode. Analyse the bytecode as explained here, possibly inserting new instructions or deleting/modifying existing ones by changing the contents of the array. Create a new method and use the new bytecode to create its body, with MethodBuilder.CreateMethodBody(byte[] il, int count), where il is the array with the bytecode. I put all these tweaked methods in a new class and use the new class to replace the one that was originally going to be loaded. An alternative to replacing classes would be somehow getting notified whenever a method is invoked. Then I'd replace the call to that method with a call to my own tweaked method, which I would tweak only the first time is invoked and then I'd put it in a dictionary for future uses, to reduce overhead (for future calls I'll just look up the method and invoke it; I won't need to analyse the bytecode again). I'm currently investigating ways to do this and LinFu looks pretty interesting, but if there was something like a ClassFileTransformer it would be much simpler: I just rewrite the class, replace it, and let the code run without monitoring anything. An additional note: the classes may be sealed. I want to be able to replace any kind of class, I cannot impose restrictions on their attributes. EDIT #2. Why I need to do this at runtime. I need to monitor everything that is going on so that I can detect every access to data. This applies to the code of library classes as well. However, I cannot know in advance which classes are going to be used, and even if I knew every possible class that may get loaded it would be a huge performance hit to tweak all of them instead of waiting to see whether they actually get invoked or not. POSSIBLE (BUT PRETTY HARDCORE) SOLUTION. In case anyone is interested (and I see the question has been faved, so I guess someone is), this is what I'm looking at right now. Basically I'd have to implement the profiling API and I'll register for the events that I'm interested in, in my case whenever a JIT compilation starts. An extract of the blogpost: In your ICorProfilerCallback2::ModuleLoadFinished callback, you call ICorProfilerInfo2::GetModuleMetadata to get a pointer to a metadata interface on that module. QI for the metadata interface you want. Search MSDN for "IMetaDataImport", and grope through the table of contents to find topics on the metadata interfaces. Once you're in metadata-land, you have access to all the types in the module, including their fields and function prototypes. You may need to parse metadata signatures and this signature parser may be of use to you. In your ICorProfilerCallback2::JITCompilationStarted callback, you may use ICorProfilerInfo2::GetILFunctionBody to inspect the original IL, and ICorProfilerInfo2::GetILFunctionBodyAllocator and then ICorProfilerInfo2::SetILFunctionBody to replace that IL with your own. The great news: I get notified when a JIT compilation starts and I can replace the bytecode right there, without having to worry about replacing the class, etc. The not-so-great news: you cannot invoke managed code from the API's callback methods, which makes sense but means I'm on my own parsing the IL code, etc, as opposed to be able to use Cecil, which would've been a breeze. I don't think there's a simpler way to do this without using AOP frameworks (such as PostSharp). If anyone has any other idea please let me know. I'm not marking the question as answered yet.

    Read the article

  • Drupal Customizing User Registration Form

    - by Asif Mulla
    Hi All, I am newbie in Drupal 6. I am looking for customizing User registration form. Apparently found that while adding user using Admin login allows registration form to have fields like email address, username, password,confirm password, etc with validations. But when anonymous use wants to register, then only fields like email address and username are displayed. I tried with Profile module available. But now how could I add some fields (password, confirm password, terms & condition check and receive news letter check box)and behavior (password, confirm password validation etc.)? If I am adding such fields they are also get visible in AdminAdd user form resulting duplicate fields like Password,Confirm password. Could you please suggest me how can I do this? I tried googling but confused me a lot as I am beginner to Drupal.

    Read the article

  • JSTL - Format date

    - by John Manak
    Hi! I have a loop that goes through all the news items we have on our site. One of the fields is date ${newsitem.value['Date']}, given in millliseconds. I'd like to display this date in month/day/year format on the webpage. I thought JSTL format tag, <fmt:formatDate>, would help, but I haven't succeeded. Do you know how to do it? <cms:contentaccess var="newsitem" /> <h2><c:out value="${newsitem.value['Title']}" /></h2> // display date here <c:out value="${newsitem.value['Text']}" escapeXml="false" />

    Read the article

  • where do I submit the ipad apps?

    - by Mike
    I read Apple is allowing developers to submit iPad apps for the great opening of the ipad store, but I cannot find anything in my account that says that or allows sending the apps. Another thing is: in order for an app to be accepted you have to sign it with your own certificate but to do that you have to select the device on Xcode. As far as I know, Xcode do not signs with certificates applications that run on the simulator. Beyond that, any try to build a distribution package on Xcode shows messages like "you should disable armv6", and others. So, I ask. Is this news true? If yes, how to I manage to have the app ready for iPad and ready for submission? thanks.

    Read the article

  • [SQL] How to SELECT TOP 5 and then the following 5?

    - by Crays
    Hi guys, as the comments always have it, you can select to show the top 5 comments (which i know how) and if there is more than 5, you can click a link and it will show the following 5 comments. The problem is that i don't know how the code should be for it to show the next 5. Better idea of what i'm saying Let's say i have 10 comments, i use SELECT * FROM news ORDER BY ID DESC LIMIT 5 that will show the TOP 5 comments say, the comments with ID 10,9,8,7,6 but what if i want the comments with ID 5,4,3,2,1 ?

    Read the article

  • google search as an rss feed

    - by Jonathan
    Hi guys, Is there a way to have treat google serach results as an rss feed? For example say I worked for stackoverflow and wanted to montior how if the results from the following search url: http://www.google.com/search?hl=en&q=stackoverflow changes from day today. It would be cool if I could append &output=rss to the url and get back a feed like with google news. But that does not seem to be supported. Anyone have ideas? (Note I am programing with Ruby and Rails, if that matters) Thanks! Jonathan

    Read the article

< Previous Page | 135 136 137 138 139 140 141 142 143 144 145 146  | Next Page >