Daily Archives

Articles indexed Saturday June 12 2010

Page 8/74 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Using MS Anti XSS library for sanitizing HTML

    - by user102533
    In the intent of preventing XSS attacks, I am updating a page in which we have a textbox that accepts HTML, stores it in a database and retrieves and renders it at a later time. My understanding is that I can sanitize the HTML using AntiXSS.GetSafeHtmlFragment() method. As long as I do this before storing the HTML in the database, am I covered? Do I need to do anything when the HTML is outputted on a web page? Also, it appears that the white list is kind of a black box. Is there a way to update this based on our requirements?

    Read the article

  • Problems with Joomla menus

    - by aarontb
    I added a new link (like I usually do) but now all but the HOME menu button DO NOT WORK...they send me to a page that says No input file specified. Can someone help me please...it's a bit of an EMERGENCY. Check it out at http://www.fishchummer.com Thanks guys, Aaron

    Read the article

  • Don't understand multiple parameter declarations in objective-c

    - by Blankman
    can someone clarify this for me: When there’s more than one argument, the arguments are declared within the method name after the colons. Arguments break the name apart in the declaration, just as in a message. For example: - (void)setWidth:(float)width height:(float)height; So in the above: method is for instance variables returns void parameter#1 is a float, named width. parameter#2 is a float,named height. But why is it hieght:(float)height; and not just: - (void)setWidth: (float)width (float)height;

    Read the article

  • What does this `_time_independent_equlas` mean?

    - by Satoru.Logic
    In the tornado.web module there is a function called _time_independent_equals: def _time_independent_equals(a, b): if len(a) != len(b): return False result = 0 for x, y in zip(a, b): result |= ord(x) ^ ord(y) return result == 0 It is used to compare secure cookie signatures, and thus the name. But regarding the implementation of this function, is it just a complex way to say a==b?

    Read the article

  • NHibernate tutorial #6 - Parent-Child Relationships

    - by BobPalmer
    I've finally had a chance to continue my NHibernate tutorial series after a series of vacations and events.  In this tutorial, I cover one of the most common relationships, that of the parent-child, in NHibernate.  I also go through some optimization refactoring along the way. You can view the entire Google Docs article here: http://docs.google.com/Doc?docid=0AUP-rKyyUMKhZGczejdxeHZfMzBmdjdzZDlkaA&hl=en   As always, feedback is appreciate! -Bob

    Read the article

  • Running multipul lines through a server.

    - by Kevin Roberson
    I am looking to buy numbers in bulk on DIDx.net. After I purchase the numbers in a particular area code, I want to forward those numbers to other numbers that are outside of that area code. This way it will be seen as a local call versus long distance. I have the customers but I don't have the system I need. I have read about Asterisk, VOIP, SIP, and BYOH. But I have no clue what will be the best system for me. Does anyone have any idea what my next step should be when it comes to hardware and software? Or what type of operating system I should use? I basically want to set up a system like GoogleVoice & Phonebooth.

    Read the article

  • Why are some PNGs open in Photoshop with Indexed Colors and no transparency?

    - by Daniel Beardsley
    Why are some 32 bit PNGs opened in Photoshop with Indexed Colors and no transparency? For instance, I grabbed a png icon file of the Stack Overflow logo at: http://blog.stackoverflow.com/wp-content/uploads/icon-so.png When opening it in Photoshop CS3, it apparently treats it as indexed color and gets rid of the alpha channel. The image on the right is a screen grab of the icon. Changing the Image mode in Photoshop to RGB doesn't change the image at all. I've tried this with a few other PNGs and it seems hit or miss. When viewed in other programs, it displays fine. left:png opened in Photoshop, right:screen grab of png from browser What gives?, does Photoshop not interpret the PNG file format correctly?

    Read the article

  • Can anyone explain this pience of snippet?

    - by karthick6891
    Can anyone explain the following code,forget the sin and cosine parts..Is it trying to build a space for the object objectsInScene = new Array(); for (var i=space; i<180; i+=space) { for (var angle=0; angle<360; angle+=space) { var object = {}; var x = Math.sin(radian*i)*radius; object.x = Math.cos(angle*radian)*x; object.y = Math.cos(radian*i)*radius; object.z = Math.sin(angle*radian)*x; objectsInScene.push(object); } }

    Read the article

  • Kind of stumped with some basic C# constructors.

    - by Sergio Tapia
    public class Parser { Downloader download = new Downloader(); HtmlDocument Page; public Parser(string MovieTitle) { Page = download.FindMovie(MovieTitle); } public Parser(string ActorName) { Page = download.FindActor(ActorName); } } I want to create a constructor that will allow other developers who use this library to easily create a Parser object with the relevant HtmlDocument already loaded as soon as it's done creating it. The problem lies in that a constructor cannot exist twice with the same type of parameters. Sure I can tell the logical difference between the two paramters, but the computer can't. Any suggestions on how to handle this? Thank you!

    Read the article

  • Is there a way to embed an mp3 player in a website that isn't flash based (so that the website is iP

    - by hartleybrody
    I did a lot of searching for what I thought would be a pretty common question, but I came up with nothing. If there is another thread with a similar topic, please let me know. Basically, I'm looking for a way to have an .mp3 file play in a website without relying on a flash-based player. I've searched w3 schools and every forum I can think of, but every media player I've found so far has been some sort of proprietary flash player. Doesn't HTML support some sort of native player? I've found some that rely on Windows Media Player which is close, but I want the player to work on an iPhone and something tells me WMP won't get that done... PS, as I'm thinking more about this this idea just popped into my head: a javascipt player and inside the <noscript> tag, put a flash player? I'm running a music blog (@ http://www.freshoncampus.com) so the less code per post, the better...

    Read the article

  • Can I install WhizzyTeX for Emacs on a Mac (is Mac OS X a unix environment)?

    - by Vivi
    I think my question is pretty stupid, but here it goes: I am using Aquamacs, and I want to install the WhizzyTeX mode. The website for WhizzyTeX says that "it is designed for Unix platforms". I read that Mac OS X is unix certified, but does that mean I can install WhizzyTeX on my mac? If yes, can I install and use it with Aquamacs or do I have to use the Emacs running from the terminal? PS: I don't know whether this question should be posted here or on SuperUser, but as Emacs users seem to hang out here more often, this is the place I chose. EDIT: There are some websites saying I can use WhizzyTeX with Carbon Emacs on mac os x, but some places say I cannot (see for example this pdf document, page 27, which says that "* whizzytex: http://cristal.inria.fr/whizzytex/ mode in latex with ocaml good fo linux, should also work in cygwin, doe not work on osx"). So I am really confused...

    Read the article

  • VS 2010 Entity Repository Error

    - by Steve
    In my project I have it set up so that all the tables in the DB has the property "id" and then I have the entity objects inherit from the EntityBase class using a repository pattern. I then set the inheritance modifier for "id" property in the dbml file o/r designer to "overrides" Public MustInherit Class EntityBase MustOverride Property id() As Integer End Class Public MustInherit Class RepositoryBase(Of T As EntityBase) Protected _Db As New DataClasses1DataContext Public Function GetById(ByVal Id As Integer) As T Return (From a In _Db.GetTable(Of T)() Where a.id = Id).SingleOrDefault End Function End Class Partial Public Class Entity1 Inherits EntityBase End Class Public Class TestRepository Inherits RepositoryBase(Of Entity1) End Class the line Return (From a In _Db.GetTable(Of T)() Where a.id = Id).SingleOrDefault however produces the error "Class member EntityBase.id is unmapped" when i use VS 2010 using the 4.0 framework but I never received that error with the old one. Any help would be greatly appreciated. Thanks in advance.

    Read the article

  • Why first arg to execve() must be path to executable

    - by EBM
    I understand that execve() and family require the first argument of its argument array to be the same as the executable that is also pointed to by its first argument. That is, in this: execve(prog, args, env); args[0] will usually be the same as prog. But I can't seem to find information as to why this is. I also understand that executables (er, at least shell scripts) always have their calling path as the first argument when running, but I would think that the shell would do the work to put it there, and execve() would just call the executable using the path given in its first argument ("prog" from above), then passing the argument array ("args" from above) as one would on the command line.... i.e., I don't call scripts on the command line with a duplicate executable path in the args list.... /bin/ls /bin/ls /home/john Can someone explain?

    Read the article

  • Rails 3 loading all models on startup

    - by janechii
    Hi all, I have a class method mixed in to all my models. the method gets called when the model class is evaluated. unfortunately (for me), this seems to be on-demand, whenever the model is needed in development env. how can have rails load all the models at start up? is this even advisable? class Foo < ActiveRecord::Base include Acl register_acl # i need this to be called for all models at start up end thank you!

    Read the article

  • Capture console output in TestNG?

    - by Misha Koshelev
    Dear All: I am using TestNG+ReportNG per wiki instructions in gradle (I fixed on cookbook as default example did not work form me). http://docs.codehaus.org/display/GRADLE/Cookbook#Cookbook-addreporters I would like to somehow capture console output in TestNG. Is this possible? Thank you Misha

    Read the article

  • Listing all possible values for SOAP enumeration with Python SUDS

    - by bdk
    I'm connecting with a SUDS client to a SOAP Server whose wsdl contains manu enumerations like the following: </simpleType> <simpleType name="FOOENUMERATION"> <restriction base="xsd:string"> <enumeration value="ALPHA"><!-- enum const = 0 --> <enumeration value="BETA"/><!-- enum const = 1 --> <enumeration value="GAMMA"/><!-- enum const = 2 --> <enumeration value="DELTA"/><!-- enum const = 3 --> </restriction> </simpleType> In my client I am receiving sequences which contain elements of these various enumeration types. My need is that given a member variable, I need to know all possible enumeration values. Basically I need a function which takes an instance of one of these enums and returns a list of strings which are all the possible values. When I have an instance, running: print type(foo.enumInstance) I get: <class 'suds.sax.text.Text'> I'm not sure how to get the actual simpleType name from this, and then get the possible values from that short of parsing the WSDL myself.

    Read the article

  • Moving physical windows 7 to Hyper - V on windows 2008 r2

    - by ekamtaj
    Hey Guys, I have a Windows 7 on a PC, but I want to install Windows 2008 R2 on the computer. I also want to keep Windows 7 on as a VM. Can I use disk2vhd? http://technet.microsoft.com/en-us/sysinternals/ee656415.aspx Can I create a windows & full backup and restore it on Hyper-V? Please let me know what will work best and if you have any other suggestions.

    Read the article

  • Photoshop vector line

    - by Yuval
    When I use the line tool in Photoshop, it creates a vector layer mask with the shape of that line. When I draw a curved line with the pen tool, the only option I see for making a line out of the path is "Stroke path", which is not vector (raster). How do I create a vector line/curve with the pen tool in Photoshop (CS4)? Thanks!

    Read the article

  • Visual Studio 2005 Project And Item Templates

    All about Project and Item Templates. You can use Custom Templates to make your development process faster than you ever think. Create your own Template for Visual Studio and distribute with all others. You can also learn how to create an installer to install a template.

    Read the article

  • passing Perl method results as a reference

    - by arareko
    Some XML::LibXML methods return arrays instead of references to arrays. Instead of doing this: $self->process_items($xml->findnodes('items/item')); I want to do something like: $self->process_items(\$xml->findnodes('items/item')); So that in process_items() I can dereference the original array instead of creating a copy: sub process_items { my ($self, $items) = @_; foreach my $item (@$items) { # do something... } } I can always store the results of findnodes() into an array and then pass the array reference to my own method, but let's say I want to try a reduced version of my code. Is that the correct syntax for passing the method results or should I use something different? Thanks!

    Read the article

  • Declaring variable as PHP class

    - by iamdadude
    I have a variable called $theclass and it's a string "Home_class". How can I define a class out of that string? The reason I need to do this is that the variable will change and I want to be able to declare the class that the variable is equal to. Is this possible? Thanks for any help.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >