Search Results

Search found 4275 results on 171 pages for 'accept'.

Page 62/171 | < Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >

  • [Java Stripes] How can I use List of object with Stripes "option" tag ?

    - by cscsaba242
    Hello, I have a List of object, produced by JPA q.getResultList(). I would like to use it in a drop down, but Stripes "option" tag cant accept List, just Collection, Enum and Map. Im new to Java, that why perhaps the List can translated to each of them but I dont know how can I solve this issue. (Stripes select,option-map,-enumeration, -collection can build up a drop down from previous mentioned input object structures ) Thanks advance

    Read the article

  • May volatile be in user defined types to help writing thread-safe code

    - by David Rodríguez - dribeas
    I know, it has been made quite clear in a couple of questions/answers before, that volatile is related to the visible state of the c++ memory model and not to multithreading. On the other hand, this article by Alexandrescu uses the volatile keyword not as a runtime feature but rather as a compile time check to force the compiler into failing to accept code that could be not thread safe. In the article the keyword is used more like a required_thread_safety tag than the actual intended use of volatile. Is this (ab)use of volatile appropriate? What possible gotchas may be hidden in the approach? The first thing that comes to mind is added confusion: volatile is not related to thread safety, but by lack of a better tool I could accept it. Basic simplification of the article: If you declare a variable volatile, only volatile member methods can be called on it, so the compiler will block calling code to other methods. Declaring an std::vector instance as volatile will block all uses of the class. Adding a wrapper in the shape of a locking pointer that performs a const_cast to release the volatile requirement, any access through the locking pointer will be allowed. Stealing from the article: template <typename T> class LockingPtr { public: // Constructors/destructors LockingPtr(volatile T& obj, Mutex& mtx) : pObj_(const_cast<T*>(&obj)), pMtx_(&mtx) { mtx.Lock(); } ~LockingPtr() { pMtx_->Unlock(); } // Pointer behavior T& operator*() { return *pObj_; } T* operator->() { return pObj_; } private: T* pObj_; Mutex* pMtx_; LockingPtr(const LockingPtr&); LockingPtr& operator=(const LockingPtr&); }; class SyncBuf { public: void Thread1() { LockingPtr<BufT> lpBuf(buffer_, mtx_); BufT::iterator i = lpBuf->begin(); for (; i != lpBuf->end(); ++i) { // ... use *i ... } } void Thread2(); private: typedef vector<char> BufT; volatile BufT buffer_; Mutex mtx_; // controls access to buffer_ };

    Read the article

  • Inserting Multiple Records in SQL2000

    - by Chris M
    I have a web app that currently is inserting x (between 1 + 40) records into a table that contains about 5 fields, via a linq-2-sql-stored procedure in a loop. Would it be better to manually write the SQL Inserts to say a string builder and run them against the database when the loops completed rather than 30 transactions? or should I just accept this is negligible for such a small number of inserts.

    Read the article

  • Is there a simple alternative to Readline?

    - by Justin Poliey
    On a project I'm working on, I'm trying to make it accept user commands and provide history with the up arrow. I'm aiming to keep this project free of dependencies, and I don't want to have to require people to also install the readline development files just to compile my project. Does anyone know of a simple drop-in replacement for GNU Readline that provides only simple functionality?

    Read the article

  • Programmatically convert a video to FLV

    - by Raibaz
    Hi all, i am currently working on a web application that needs to accept video uploaded by users in any format (.avi, .mov, etc.) and convert them to flv for playing in a flash-based player. Since the site is OpenCms-based, the best solution would be a ready-made plugin for OpenCms that allowed to upload and play videos doing the transcode operation in background, but just a set of Java classes to do the transcode would be great and then i could make the uploading form and playback part on my own.

    Read the article

  • Cleaning all inline events from HTML tags

    - by Itay Moav
    For HTML input, I want to neutralize all HTML elements that have inline js (onclick="..", onmouseout=".." etc). I am thinking, isn't it enough to encode the following chars? =,(,) So onclick="location.href='ggg.com'" will become onclick%3D"location.href%3D'ggg.com'" What am I missing here? Edit: I do need to accept active HTML (I can't escape it all or entities is it).

    Read the article

  • Clean URLs for images

    - by Albert
    I'm unable to get a working .htaccess that should accept clean URLs to load images. I mean, for example, if a user type this: http://mysite.com/image/example It works perfectly, as my PHP process and parse it. However, if the user type: .../image/example.jpg It doesn't work. I mean, if a user writes that, I want to load the module with the example.jpg as a parameter, I don't want to load the image at all! Thanks in advance.

    Read the article

  • Is I/O Completion ports(Windows) or Asynchronous I/O (AIO) will improve performance of multithreaded

    - by Naga
    Hi, I want to use I/O Completion ports for Windows and Asynchronous I/O (AIO) for solaris and Linux versions of my server application. The application server is multithreaded and it can accept lot of concurrent TCP connections and can process many requests per conenction. Every request will be handled by seperate detached thread. Is this criteria well enough to use the latest AIO?. Is there any standardization using which one code can be used to all platforms. Thanks, Naga

    Read the article

  • Quickly create large file on a windows system?

    - by Leigh Riffel
    In the same vein as http://stackoverflow.com/questions/257844/quickly-create-a-large-file-on-a-linux-system I'd like to quickly create a large file on a windows system. By large I'm thinking 5GB. The content doesn't matter. A built in command or short batch file would be preferable, but I'll accept an application if there are no other easy ways.

    Read the article

  • How to output binary data to a socket with Ruby

    - by Earlz
    Hello I have a very simple HTTP ruby server. I want it to simply server a PNG image. So I sent headers like image/png but I think that Ruby is converting the image data to a string first. Here is my relevant code webserver = TCPServer.new('127.0.0.1', 20001) while (session = webserver.accept) #.... file = File.open("tmp_testserve.png", "rb") contents = file.read file.close session.print @content session.close #.... Is this what is happening?

    Read the article

  • django accepting GET parameters

    - by tipu
    I want the index page to accept parameters, whether it be mysite.com/search/param_here or mysite.com/?search=param_here I have this in my URL patterns but I can't get it to work.. any suggestions? urlpatterns = patterns('', (r'^$/(?P<tag>\w+)', 'twingle.search.views.index'), )

    Read the article

  • Variable declared with variable keyword in sql plus(oracle 9i)?

    - by Vineet
    I am trying to declare g_num ,number data type with size it gives an error but in case of varchar2,char it does not. variable g_name varchar2(5);//correct accept size for varchar 2 variable g_num number(23);//Gives an error " VAR[IABLE] [ <variable> [ NUMBER | CHAR | CHAR (n [CHAR|BYTE]) | VARCHAR2 (n [CHAR|BYTE]) | NCHAR | NCHAR (n) | NVARCHAR2 (n) | CLOB | NCLOB | REFCURSOR ] ]" Please suggest!

    Read the article

  • ModifiedDate Version Convention

    - by Robie
    Hi, I am trying to create a fluent Nhibernate automap convention for all the modifiedDate property of my application where it should set the value to get the current date. I am trying the following and its not working. Please advice. public class ModifiedDateVersionConvention : IVersionConvention,IVersionConventionAcceptance { public void Apply(IVersionInstance instance) { instance.Default(DateTime.Now); } public void Accept(IAcceptanceCriteria<IVersionInspector> criteria) { criteria.Expect(x => x.Name == "ModifiedDate"); } }

    Read the article

  • REST service with binary data

    - by user179437
    Hi I want to create Restful service which can accept binary data. I've implemented javax.xml.ws.Provider interface, but i can't get content of request. If I use javax.xml.ws.Dispatch then its send only XML data, but I need transfer binary data. Please give some solution, but I don't prefer to use JAX-RS or Restlets. Thanks.

    Read the article

  • Why is JFormattedTextField evil?

    - by kwutchak
    Hi, In this question Is there any way to accept only numeric values in a JTextField? one of the answers suggested that JFormattedTextField had issues. I've not yet used it, but could somebody please expand (or disagree) on the issues with this class? Thanks...

    Read the article

  • Android: how to convert a Drawable to Bitmap

    - by Rob
    How can I convert a Drawable to a Bitmap? I would like to set a certain drawable as the device's wallpaper, but all wallpaper functions accept Bitmaps only (I cannot use WallpaperManager - I'm pre 2.1). Also, my drawables are downloaded from the web and do not reside in R.drawable. Thanks, Rob

    Read the article

  • Fast ruby http library for large XML downloads

    - by Vlad Zloteanu
    I am consuming various XML-over-HTTP web services returning large XML files ( 2MB). What would be the fastest ruby http library to reduce the 'downloading' time? Required features: both GET and POST requests gzip/deflate downloads (Accept-Encoding: deflate, gzip) - very important I am thinking between: open-uri Net::HTTP curb but you can also come with other suggestions. P.S. To parse the response, I am using a pull parser from Nokogiri, so I don't need an integrated solution like rest-client or hpricot.

    Read the article

  • Keyboard layout change in cocoa application

    - by frederic
    Hi , I'm a newbie, I'm trying to learn objective-c.I have developed a small application which accepts user input and saves it in sqllite. Curently my application supports only english keyboard layout. I have put radiobutton with options English and Danish. On option select the keyboard layout should change to desired on and accept the input. Can anybody help be outwith this. Thank in advance.

    Read the article

  • Send E-mail Notification : MVC project

    - by Poomjai
    In my system has the function to sending email notification to warn another department that the contract is nearly expired. Has any suggestion to send the email via my mvc project, I try to use System.web.mail but smtp not accept. Do I need to prepare anything to send email. Thanks you for suggestion.

    Read the article

  • Why do we need to use out keyword while calling a method

    - by Midhat
    When a method is defined with an out parameter, why do I have to specify the out keyword when calling it. Its already there in the method definition, and the runtime should know that any parameter passed will be an out parameter. It would make sense if the compiler will accept the argument with or without out keyword, with different semantic, but if you MUST add the keyword to make the code compile, whats the use? Shouldn't the compiler handle it automatically? Same for ref

    Read the article

< Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >