Search Results

Search found 1588 results on 64 pages for 'pure'.

Page 38/64 | < Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >

  • How to create column width in CSS that expands with large images yet stays a default size for normal

    - by ChrisJF
    I am creating an HTML5 web page with a one column layout. Basically, it is a forum thread with individual posts. I have specified in my CSS file the column to be 600px wide and centered it in the window using margin: 0 auto;. However, some images that are in the individual posts are larger than 600px and spill out of the column. I'd like to widen an individual post to fit the larger images. However, I want all the other posts to still be 600px wide. Right now, I'm just using overflow:auto which will create a scroll bar, but this is less than ideal. Is this possible to have the an individual post width grow for larger content yet stay fixed for normal content? Is this possible using just pure CSS? Thanks in advance!

    Read the article

  • Custom roles in ASP.NET

    - by MainMa
    Hi, I am working on an ASP.NET website which uses forms authentication with a custom authentication mechanism (which sets e.Authenticated programmatically on protected void Login_Authenticate(object sender, AuthenticateEventArgs e)). I have an ASP.NET sitemap. Some elements must be displayed only to logged in users. Others must be displayed only to one, unique user (ie. administrator, identified by a user name which will never change). What I want to avoid: Set a custom role provider: too much code to write for a such basic thing, Transform the existing code, for example by removing sitemap and replacing it by a code-behind solution. What I want to do: A pure code-behind solution which will let me assign roles on authenticate event. Is it possible? How? If not, is there an easy-to-do workaround?

    Read the article

  • ACL suggestions needed for a small light framework developed

    - by Sai
    Hello all, I've developed a small framework that was needed for the firm that I work. The problem is I've not made a full level framework, as developers are finding tough time to understand what is what, So I made a simple structure with app/controllers, app/models, app/views so that they can clearly separate the code and can get used to higher frameworks later. All other things like components/modules/helpers are just coded for now in a file called app_functions.php. The above framework is derived from cakePHP, not all, but just the framework uses a modified code of dispatcher of cake. The models all work with normal sqls, and views with pure html using a template engine. Now I'm trying to develop a small application over it, it cameout well, but ACL is something which many versions of it have not proved that satisfactory. Can anybody suggest a good ACL. I've checked phpGACL(too heavy), Zend_ACL likely won't be compatible, Cakephp's ACL which wont fit in the structure,as we are not using cake's SQLs, as there too many queries hitting the database for one page display.

    Read the article

  • How to get this.grandparent() functionality in Mootools?

    - by RyOnLife
    I have built a class in Mootools and extended it twice, such that there is a grandparent, parent, and child relationship: var SomeClass1 = new Class({ initialize: function() { // Code }, doSomething: function() { // Code } }); var SomeClass2 = new Class({ Extends: SomeClass1, initialize: function() { this.parent(); }, doSomething: function() { this.parent(); // Some code I don't want to run from Class3 } }); var SomeClass3 = new Class({ Extends: SomeClass2, initialize: function() { this.parent(); }, doSomething: function() { this.grandParent(); } }); From Class3, the child, I need call the doSomething() method from Class1, the grandparent, without executing any code in Class2#doSomething(), the parent. What I need is a grandParent() method to complement the Mootools parent(), but it appears that one does not exist. What's the best way to accomplish this in either Mootools or pure JavaScript? Thanks.

    Read the article

  • Script or automate feature class creation in ESRI/ArcSDE

    - by Keith G
    I'm looking for info on how to write SQL scripts to automate the creation of a versioned feature class in ArcSDE I want to be able to automate the process itself as well as put the scripts under version control. Can anyone point me to a resource that explains how to do this? Is this even possible? It seems like there are lots of interrelationships between tables and data when a feature class is added. P.S. It doesn't have to be pure SQL, but it should be some kind of scripting so we can save to version control and run outside of ESRI desktop tools.

    Read the article

  • How to get paperclip to delete files

    - by webdestroya
    I have a model that is using Paperclip to manage the file. After I delete the model, I obviously would like the file to be deleted as well, but I cannot seem to find out how to get the file deleted using Paperclip. I have tried self.sourcefile = nil if !sourcefile.dirty? in the before_destroy def, but that had no effect. (I want to be able to have it delete the file locally when I test, and then on S3 when I use that - So i need a pure paperclip solution) Any ideas?

    Read the article

  • MIDlet + BlackBerry API = verification error?

    - by Kilnr
    Hi, Is there any way to write a MIDlet, but still use BlackBerry API classes and functions (including the APIs that require code signing)? In particular, I'm trying to use Kuix (http://www.kalmeo.org/projects/kuix). A pure MIDlet + Kuix (so without BlackBerry stuff) works perfectly after I converted the jar/jad to a cod file. As soon as I add BlackBerry API-stuff (CoverageInfo.COVERAGE_DIRECT in this case) I get a verification error when trying to run the cod file: Error starting $name: Module $name has verification error 2410 at offset 9a4f What can I do to solve this?

    Read the article

  • Making of JSON Webservice using C# .NET

    - by Parth_90
    I am trying to make JSON webservice in C# .NET. A json string is returning by web method but it contains xml structure like: <string xmlns="http://tempuri.org/"> {"checkrecord":[{"rollno":"abc2","percentage":40,"attended":12,"missed":34}],"Table1":[]} </string> I saw this article before it wasn't much helpful for me. So my problem is, that json string is not returned in its pure format. I do not want that xml version and xmlns string. I plan to consume the web service on Android later. Can anyone help me? Thanks

    Read the article

  • Initialize window code Mac OS X

    - by Jarle
    I'm currently reading "the red book" for learning OpenGL properly, and in one of the first examples, the author writes a line that says "InitializeAWindowPlease();" as a place holder for the code that will make a window to draw the OpenGL content in. Since I'm using Xcode for my programing, I know that I "get" a window to work with automatically (and that I have to make my own OpenGL view in interfacebuilder). How can I make this with pure code? I'm trying to learn programming, and I'm not to happy about taking "shortcuts" all the time. How can I make a window to draw my openGL stuff in? With Objective-C and C code I would love to see it. My goal is that I can make it without opening interface builder at all:)

    Read the article

  • Is it possible to create thread-safe collections without locks?

    - by Andrey
    This is pure just for interest question, any sort of questions are welcome. So is it possible to create thread-safe collections without any locks? By locks I mean any thread synchronization mechanisms, including Mutex, Semaphore, and even Interlocked, all of them. Is it possible at user level, without calling system functions? Ok, may be implementation is not effective, i am interested in theoretical possibility. If not what is the minimum means to do it? EDIT: Why immutable collections don't work. This of class Stack with methods Add that returns another Stack. Now here is program: Stack stack = new ...; ThreadedMethod() { loop { //Do the loop stack = stack.Add(element); } } this expression stack = stack.Add(element) is not atomic, and you can overwrite new stack from other thread. Thanks, Andrey

    Read the article

  • Does MATLAB perform tail call optimization?

    - by Shea Levy
    I've recently learned Haskell, and am trying to carry the pure functional style over to my other code when possible. An important aspect of this is treating all variables as immutable, i.e. constants. In order to do so, many computations that would be implemented using loops in an imperative style have to be performed using recursion, which typically incurs a memory penalty due to the allocation a new stack frame for each function call. In the special case of a tail call (where the return value of a called function is immediately returned to the callee's caller), however, this penalty can be bypassed by a process called tail call optimization (in one method, this can be done by essentially replacing a call with a jmp after setting up the stack properly). Does MATLAB perform TCO by default, or is there a way to tell it to?

    Read the article

  • Unresolved symbol when inheriting interface

    - by LeopardSkinPillBoxHat
    It's late at night here and I'm going crazy trying to solve a linker error. If I have the following abstract interface: class IArpPacketBuilder { public: IArpPacketBuilder(const DslPortId& aPortId); virtual ~IArpPacketBuilder(); // Other abstract (pure virtual methods) here... }; and I instantiate it like this: class DummyArpPacketBuilder : public IArpPacketBuilder { public: DummyArpPacketBuilder(const DslPortId& aPortId) : IArpPacketBuilder(aPortId) {} ~DummyArpPacketBuilder() {} }; why am I getting the following error when linking? Unresolved symbol references: IArpPacketBuilder::IArpPacketBuilder(DslPortId const&): ppc603_vxworks/_arpPacketQueue.o IArpPacketBuilder::~IArpPacketBuilder(): ppc603_vxworks/_arpPacketQueue.o typeinfo for IArpPacketBuilder: ppc603_vxworks/_arpPacketQueue.o *** Error code 1 IArpPacketBuilder is an abstract interface, so as long as I define the constructors and destructions in the concrete (derived) interface, I should be fine, no? Well it appears not.

    Read the article

  • Is there a way to put Setter elements inside EventTrigger?

    - by Dennis Delimarsky
    Working on a WPF application, I started working on a custom ControlTemplate. I reached the point where I need to change some control properties when an event occurs. For this purpose, there are Setter elements. Seems all good, but I cannot use them inside EventTrigger elements. For example, if a simple Trigger, that can be bound to control properties, is used then Setter elements can be used inside. However, I do not want to bind to a property change but rather to an event. Is there a way to do this in pure XAML or will I have to work in the code-behind?

    Read the article

  • How can I get the text that was clicked on in Javascript?

    - by Jake
    Does anyone know if it is possible with javascript to to tell the position of a mouse click in some text? I know it's easy to get the x,y coordinates, but I'm wanting the position in the text. For example if I clicked inside <p>foo bar</p> I want to be able to tell that the click was on/after the 5th character. Or that foo b is before the click and ar is after it. By the way, I'm using jQuery too, I'm happy with pure JS and solutions that use jQ. Thanks in advance.

    Read the article

  • How can I calculate data for a boxplot (quartiles, median) in a Rails app on Heroku? (Heroku uses Po

    - by hadees
    I'm trying to calculate the data needed to generate a box plot which means I need to figure out the 1st and 3rd Quartiles along with the median. I have found some solutions for doing it in Postgresql however they seem to depend on either PL/Python or PL/R which it seems like Heroku does not have either enabled for their postgresql databases. In fact I ran "select lanname from pg_language;" and only got back "internal". I also found some code to do it in pure ruby but that seems somewhat inefficient to me. I'm rather new to Box Plots, Postgresql, and Ruby on Rails so I'm open to suggestions on how I should handle this. There is a possibility to have a lot of data which is why I'm concerned with performance however if the solution ends up being too complex I may just do it in ruby and if my application gets big enough to warrant it get my own Postgresql I can host somewhere else. *note: since I was only able to post one link, cause I'm new, I decided to share a pastie with some relevant information

    Read the article

  • ajax with WCF work. but few miniute after, doesn't work.

    - by sunglim
    hello. I am WCF pure newbie. I know this question could look like dumb. I used to write ajax with the Webservice. but on this project. I tried to use WCF for ajax. after I build the project. I try to call wcf ajax. and I can receive return successfully. But 10 or more minute after. I cann't receive return, and the ajax call the error function. and the fiddler return nothing. if I rebuild the project without any source modifying, I can receive ajax return successfully. such a weird situation. is their anybody who experience this? and know why ? Thank You.

    Read the article

  • How to build boost foreach cycle

    - by Ockonal
    Hi guys! I have some abstract class called IClass (has pure virtual function). There are some classes which inherit IClass: CFirst, CSecond. I want to add objects of classes which inherit into boost::ptr_vector: class IClass { virtual void someFunc() = 0; }; class CFirst : public IClass { }; class CSecond : public IClass { }; boost::ptr_vector<IClass> objectsList; objectsList.push_back(new CFirst()); objectsList.push_back(new CSecond()); And now my goal is to call function (which is declarated in IClass) from all objects in objectsList. I'd prefer to use BOOST_FOREACH: foreach(IClass tempObj, objectsList) { tempObj.someFunc(); } The problem is that IClass - abstract class, so I can't make instance of it for the foreach-cycle. What should I do?

    Read the article

  • Prevent DTD download when parsing XML, redux

    - by harpo
    I have a folder full of XHTML files, and a console program to process them. The problem is, it doesn't work when I'm offline, because The remote name could not be resolved: 'www.w3.org' A number of sites, including this one, say to set the XmlResolver to null. That is not not working. I have tried setting the XmlResolver to null every way that I can think of: in the XmlDocument, in XmlTextReader, and in the XmlReaderSettings. I believe that it's just creating a default instance. I have also tried implementing my own XmlResolver, but I don't know what to return for external items. public class NonXmlResolver : XmlUrlResolver { public override object GetEntity( Uri absoluteUri, string role, Type ofObjectToReturn ) { if ( absoluteUri.Scheme == "http" ) throw new Exception("What you talking 'bout, Willis?"); else return base.GetEntity( absoluteUri, role, ofObjectToReturn ); } } The documents do not use any special entities, only pure XML. This is possible, right?

    Read the article

  • What are cons if we use javascript to apply css selectors to that browser who do not support that pr

    - by metal-gear-solid
    What are cons if we use JavaScript to apply only CSS property/selectors to that browser who do not support that property by default? to keep my HTML semantic and keep free from Deprecated HTML. Is it against content, style and Behavior separation? If I make accessible site then should i only use whatever i can do with pure css. shouldn't use JavaScript to apply CSS properties. I know those css properties which I'm applying through javascript will not work if javascript is disabled. then due to this reason shouldn't use javascript to apply css never. I'm talking about using these type of stuffs http://www.fetchak.com/ie-css3/ http://code.google.com/p/ie7-js/

    Read the article

  • C# huge size 2-dim arrays

    - by 4eburek
    I need to declare square matrices in C# WinForms with more than 20000 items in a row. I read about 2GB .Net object size limit in 32bit and also the same case in 64bit OS. So as I understood the single answer - is using unsafe code or separate library built withing C++ compiler. The problem for me is worth because ushort[20000,20000] is smaller then 2GB but actually I cannot allocate even 700MB of memory. My limit is 650MB and I don't understand why - I have 32bit WinXP with 3GB of memory. I tried to use Marshal.AllocHGlobal(700<<20) but it throws OutOfMemoryException, GC.GetTotalMemory returns 4.5MB before trying to allocate memory. I found only that many people say use unsafe code but I cannot find example of how to declare 2-dim array in heap (any stack can't keep so huge amount of data) and how to work with it using pointers. Is it pure C++ code inside of unsafe{} brackets? Could you please provide a small example of working with matrices using pointers in unsafe code.

    Read the article

  • Designing a service for consumption on multiple mobile platforms

    - by Nate Bross
    I am building and designing a (mostly) read-only interface to some data. I'll be uing ASP.NET MVC to build a psudo-restful API. I'm wondering if anyone can provide some resources for building full-client applications for various mobile platforms, iPhone, Android, Blackberry, Windows Mobile, etc. I'm thinking that serving up XML data is going to be the most simple and universal, but parsing XML in objective-C for example doesn't sound like fun to me, but maybe there are some good libaries out there to help ease this task? In other words, what formt will be the quickest to implement on the client side? Are there any JSON parsrs for iPhone or Android? I know there are .NET JSON parsers, but not sure about other platforms -- is ther another format that might better? Or should I stick with pure XML and deal with it on each platform differently?

    Read the article

  • How to Store Cookies in Ruby?

    - by viatropos
    I am programmatcally accessing authenticated content in my CDN on Google App Engine, and it's returning a cookie that I'm supposed to store: {"set-cookie"=>"ACSID=cookie-hash; expires=Mon, 12-Apr-2010 01:56:06 GMT; path=/"} What do I do with that? This is my first time dealing with Cookies. I can put in the header of the next request, but what's the recommended way to store that? I'm testing this with irb in the console and when I exit and try again, the cookie is gone. How do I save it for a few days/weeks? I'm using pure ruby without Rails or anything. Thanks so much.

    Read the article

  • CSS Make one row the width of another

    - by gav
    I'm sure this is a fairly common problem but I'm new to CSS so I'm not sure how it's done. I tried searching for the issue but sometimes it's tricky to get the right keywords. I have a table the width of which I want to be constrained by a specific row. My table css is as follows; table { border: 1px solid #ccc; width: auto; margin-left: auto; margin-right: auto; } I have one row which contains cells for which I want the width to autofit and two rows of prose which currently force the table to take 100% width. How do I constrain the latter to have at most the autofit width of the first row? If tables aren't the way to go and this should be pure css and divs, how do you get one class to adopt the fixed but unknown width of another? Thanks, Gav

    Read the article

  • C++ Class Inheritance architecture - preventing casting

    - by Some One
    I have a structure of base class and a couple of inherited classed. Base class should be pure virtual class, it should prevent instantiation. Inherited classes can be instantiated. Code example below: class BaseClass { public: BaseClass(void); virtual ~BaseClass(void) = 0; }; class InheritedClass : public BaseClass { public: InheritedClass1(void); ~InheritedClass1(void); }; class DifferentInheritedClass : public BaseClass { public: DifferentInheritedClass(void); ~DifferentInheritedClass(void); }; I want to prevent the following operations to happen: InheritedClass *inherited1 = new InheritedClass(); DifferentInheritedClass *inherited2 = new DifferentInheritedClass (); BaseClass *base_1 = inherited1; BaseClass *base_2 = inherited2; *base_1 = *base_2;

    Read the article

  • How to generate, sign and import SSL certificate from Java

    - by Demiurg
    I need to generate a self signed certificates at run time, sign them and import to the Java keystore. I can do this using "keytool" and "openssl" from command line in the following way: keytool -import -alias root -keystore keystore.txt -file cacert.pem keytool -genkey -keyalg RSA -keysize 1024 -alias www.cia.gov -keystore keystore.txt keytool -keystore keystore.txt -certreq -alias www.cia.gov -file req.pem openssl x509 -req -days 3650 -in req.pem -CA cacert.pem -CAkey cakey.pem -CAcreateserial -out reqsigned.pem keytool -import -alias www.cia.gov -keystore keystore.txt -trustcacerts -file reqsigned.pem I can, of course, ship my application with keytool and openssl binaries and execute the above commands from Java, but I'm looking for a cleaner approach which would allow me to do all of the above using pure Java. Any libraries I can use ?

    Read the article

< Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >