Search Results

Search found 4763 results on 191 pages for 'adams john'.

Page 100/191 | < Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >

  • Why is the servlet request not available in the portlet API

    - by John Smith
    The portlet API deos not provide any reference to the enclosing servlet request and response objects. I know it is not the preferred model of interaction with the user, but it seems draconian to remove all access. I understand that for portlet driven interaction with the user, you want to use portlet URLs, and let the portlet container manage all the complexity. However if you have a number of portlets which are basically showing variants of the same data, it makes sense for them to be able to use the enclosing request to drive the data. We ended up using using a Liferay specific call to get the request, and it all seems to work as we wish. However I do feel the guilt. So my question really is, is there an underlying deep reason for the prohibition, or is it just to enforce the authors view of the API environment?

    Read the article

  • Use boost date_time to parse and create HTTP-dates

    - by John Price
    I'm writing a kind of HTTP proxy, so I need to be able to do 3 things: Parse an HTTP-date given any of the 3 formats specified in RFC 2616, sec 3.3, Convert a file date-time to an HTTP-date string, and Output the date to a string. For reference, theses are examples of the date-times I need to parse. I will output only the first format: Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036 Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format I'm pretty sure Boost date_time can do all of this, but I'm having some trouble with number 1. Does anyone already have code to do this? Perhaps I'm not using google proficiently, but I can't find an example of how to do this with boost anywhere. Thanks for any help!

    Read the article

  • XML Schema for a .NET type that inherits and implements

    - by John Ruiz
    Hi, Please consider the following three .NET types: I have an interface, an abstract class, and a concrete class. My question is how to write the XML Schema to include the properties from the interface and from the abstract class. public interface IStartable { bool RequiresKey { get; set; } void Start(object key); } public abstract class Vehicle { uint WheelCount { get; set; } } public class Car : Vehicle, IStartable { public bool RequiresKey { get; set; } public string Make { get; set; } publilc string Model { get; set; } public Car() {} public void Start(object key) { // start car with key } } I don't know how to complete this schema: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="cars" xmlns="cars" xmlns:c="cars"> <!-- How do I get car to have vehicle's wheelcount AND IStartable's RequiresKey? --> <xs:element name="Car" type="c:Car" /> <xs:complexType name="Car"> <xs:complexContent> <xs:extension base="c:Vehicle"> <xs:group ref=c:CarGroup" /> </xs:extension> </xs:complexContent> </xs:complexType> <xs:group name="CarGroup"> <xs:sequence> <xs:element name="Make" type="xs:token" /> <xs:element name="Model" type="xs:token" /> </xs:sequence> </xs:group> <xs:complexType name="Vehicle"> <xs:sequence> <xs:element name="WheelCount" type="xs:unsignedInt" /> </xs:sequence> </xs:complexType> <xs:complexType name="IStartable"> <xs:sequence> <xs:element name="RequiresKey" type="xs:boolean" /> </xs:sequence> </xs:complexType> </xs:schema>

    Read the article

  • Using NSURLRequest+NSURLConnection seems overkill for a webcall with no data return

    - by Spectravideo328
    All, This might seems very straightforward but I have already gone through the URL loading system program guide and the various NSURL.... classes and not found my answer. I am just trying to do a simple call from the app to a website to reserve a party spot: NSString *path=[NSString stringWithFormat:@"http://www.myparty123.com/ireservedURL.asp?Nickname=%@&Seat=%i&Email=%@&Currentparty=%i",john,5432,[email protected],6598]; NSURL* reservationURL =[NSURL URLWithString:path]; NSData *call= [NSData dataWithContentsOfURL:reservationURL]; This seemed to be the simple way but I get this warning that I am not using the "call" variable. And it seems overkill to do a call using NSData where there is no data return. Yet, creating an NSURLRequest and initiating an NSURLConnection and then implementing delegates with that request seems to be overkill as well. What am I missing. Thanks KMB

    Read the article

  • asp.net Dynamic Data Site own MetaData

    - by loviji
    Hello, I'm searching info about configuring own MetaData in asp.NET Dynamic Site. For example. I have a table in MS Sql Server with structure shown below: CREATE TABLE [dbo].[someTable]( [id] [int] NOT NULL, [pname] [nvarchar](20) NULL, [FullName] [nvarchar](50) NULL, [age] [int] NULL) and I have Ms Sql table, sysTables and sysColumns. sysTables: ID sysTableName TableName TableDescription 1 | someTable |Persons |All Data about Persons in system sysColumns ID TableName sysColumnName ColumnName ColumnDesc ColumnType MUnit 1 |someTable | sometable_pname| Name | Persona Name(ex. John)| nvarchar(20) | null 2 |someTable | sometable_Fullname| Full Name | Persona Name(ex. John Black)| nvarchar(50) | null 3 |someTable | sometable_age| age | Person age| int | null

    Read the article

  • Keyboard blocking my view

    - by John Smith
    I have a UIView with another UIView inside it. On the inside UIView there is a textbox which I want to fill in. When I try to fill it in the keyboard blocks my view: The UIViewController has the following containerView = [[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds]; self.view=containerView; //The apropriate releases etc are further on... When I touch it, the keyboard comes up as expected, but blocks the textbox I'm trying to fill in. How can I force the view to slide up? The front view OptionsFront * fv = [[OptionsFront alloc] initWithFrame:[UIScreen mainScreen].bounds]; [containerView addSubview:frontView]; In the front view is a subview CGRect bounds = CGRectMake(0.0f, 210.0f, 280.0f, 130.0f); sv = [[UIView alloc] initWithFrame:bounds]; [self addSubview:sv]; //added to frontView In sv is a textbox near the botton: rect = CGRectMake(70.0f, 20.0f, 100.0f, 27.0f); cf = [self createTextField_Rounded:rect holder:@"+ve"]; [sv addSubview:cf]; So cf happens to be near the bottom of the page. I expected that when I select it, the whole display would move up, but the keyboard just moves up and blocks it. What can I do? Appendix: - (UITextField *)createTextField_Rounded:(CGRect) frame holder:(NSString *) ph { UITextField *returnTextField = [[UITextField alloc] initWithFrame:frame]; returnTextField.borderStyle = UITextBorderStyleRoundedRect; returnTextField.textColor = [UIColor blackColor]; returnTextField.font = [UIFont systemFontOfSize:17.0]; returnTextField.delegate = self; returnTextField.keyboardType = UIKeyboardTypeNumbersAndPunctuation; returnTextField.returnKeyType = UIReturnKeyDone; returnTextField.clearButtonMode = UITextFieldViewModeWhileEditing; return returnTextField; }

    Read the article

  • How to move a Winform dialog

    - by John
    My main form launches another as a modal dialog, using .ShowDialog. I want to position this based on the mouse-position, but my attempts to call SetDesktopLocation are having no effect. Is this the right method? Thanks

    Read the article

  • AIR: sync gui with data-base?

    - by John Isaacks
    I am going to be building an AIR application that shows a list (about 1-25 rows of data) from a data-base. The data-base is on the web. I want the list to be as accurate as possible, meaning as soon as the data-base data changes, the list displayed in the app should update asap. I do not know of anyway that the air application could be notified when there is a change, I am thinking I am going to have to poll the data-base at certain intervals to keep an up to date list. So my question is, first is there any way to NOT have to keep checking the data-base? or if I do keep have to keep checking the data-base what is a reasonable interval to do that at? Thanks.

    Read the article

  • Publishing similar apps in AppStore

    - by John
    Hello guys, I have some questions that I think some one here can help me ... I have published 5 apps in AppStore that brings news to the users, for different countries. One app per country, because no one want's to read the news of other countrys. Now, I have submitted 3 more apps to publish and Apple reject it, because they say that I need to use "In App Purchase" because the apps are similar ... I have seen many similar apps published by the same user .. so, my question is, how can I publish many similar apps without "In App Purchase"? I have used the same "bundle Id" for all of my apps .. Is it wrong? I need the create one bundle Id per app to get this work and the ok by Apple? Thanks you very much and sorry for my limited english!!

    Read the article

  • Pressing UIBarButtonItem on a NavigationController

    - by john
    Hey I've added a button the my navigation bar like so: UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStylePlain target:self action:@selector(methodtocall:)]; self.navigationItem.rightBarButtonItem = anotherButton; [anotherButton release]; However when I press this I get a InvalidArgumentException. This is in a brand new navigation project. Does anyone know why I get this behaviour?

    Read the article

  • Why do compiled Haskell libraries see invalid static FFI storage?

    - by John Millikin
    I am using GHC 6.12.1, in Ubuntu 10.04 When I try to use the FFI syntax for static storage, only modules running in interpreted mode (ie GHCI) work properly. Compiled modules have invalid pointers, and do not work. I'd like to know whether anybody can reproduce the problem, whether this an error in my code or GHC, and (if the latter) whether it's a known issue. Given the following three modules: -- A.hs {-# LANGUAGE ForeignFunctionInterface #-} module A where import Foreign import Foreign.C foreign import ccall "&sys_siglist" siglist_a :: Ptr CString -- -- B.hs {-# LANGUAGE ForeignFunctionInterface #-} module B where import Foreign import Foreign.C foreign import ccall "&sys_siglist" siglist_b :: Ptr CString -- -- Main.hs {-# LANGUAGE ForeignFunctionInterface #-} module Main where import Foreign import Foreign.C import A import B foreign import ccall "&sys_siglist" siglist_main :: Ptr CString main = do putStrLn $ "siglist_a = " ++ show siglist_a putStrLn $ "siglist_b = " ++ show siglist_b putStrLn $ "siglist_main = " ++ show siglist_main peekSiglist "a " siglist_a peekSiglist "b " siglist_b peekSiglist "main" siglist_main peekSiglist name siglist = do ptr <- peekElemOff siglist 2 str <- maybePeek peekCString ptr putStrLn $ "siglist_" ++ name ++ "[2] = " ++ show str I would expect something like this output, where all pointer values identical and valid: $ runhaskell Main.hs siglist_a = 0x00007f53a948fe00 siglist_b = 0x00007f53a948fe00 siglist_main = 0x00007f53a948fe00 siglist_a [2] = Just "Interrupt" siglist_b [2] = Just "Interrupt" siglist_main[2] = Just "Interrupt" However, if I compile A.hs (with ghc -c A.hs), then the output changes to: $ runhaskell Main.hs siglist_a = 0x0000000040378918 siglist_b = 0x00007fe7c029ce00 siglist_main = 0x00007fe7c029ce00 siglist_a [2] = Nothing siglist_b [2] = Just "Interrupt" siglist_main[2] = Just "Interrupt"

    Read the article

  • byte[] to wav file

    - by John
    Hi, It would be great if you could tell me how I could save a byte[] to a wav file. Sometimes I need to set different samplerate, number of bits and channels. Thanks for your help.

    Read the article

  • wordpress extended_valid_elements for script tag?

    - by John
    Can someone tell me how to tell Wordpress' tinymce editor to NOT strip out script tags? I looked in wp-admin/includes/post.php and added 'extended_valid_elements'=>'script[charset|defer|language|src|type]', to the $initArray. When I do a view source on the CMS post editor, I see taht it does show up like so: <script type="text/javascript"> /* <![CDATA[ */ tinyMCEPreInit = { base : "http://dev.esolar.ca/wp-includes/js/tinymce", suffix : "", query : "ver=327-1235", mceInit : {mode:"specific_textareas", editor_selector:"theEditor", width:"100%", theme:"advanced", skin:"wp_theme", theme_advanced_buttons1:"bold,italic,strikethrough,|,bullist,numlist,blockquote,|,justifyleft,justifycenter,justifyright,|,link,unlink,wp_more,|,spellchecker,fullscreen,wp_adv", theme_advanced_buttons2:"formatselect,underline,justifyfull,forecolor,|,pastetext,pasteword,removeformat,|,charmap,|,outdent,indent,|,undo,redo,wp_help", theme_advanced_buttons3:"", theme_advanced_buttons4:"", language:"en", spellchecker_languages:"+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv", theme_advanced_toolbar_location:"top", theme_advanced_toolbar_align:"left", theme_advanced_statusbar_location:"bottom", theme_advanced_resizing:"1", theme_advanced_resize_horizontal:"", dialog_type:"modal", relative_urls:"", remove_script_host:"", convert_urls:"", apply_source_formatting:"", remove_linebreaks:"1", gecko_spellcheck:"1", entities:"38,amp,60,lt,62,gt", accessibility_focus:"1", tabfocus_elements:"major-publishing-actions", media_strict:"", paste_remove_styles:"1", paste_remove_spans:"1", paste_strip_class_attributes:"all", wpeditimage_disable_captions:"", plugins:"safari,inlinepopups,spellchecker,paste,wordpress,media,fullscreen,wpeditimage,wpgallery,tabfocus"}, load_ext : function(url,lang){var sl=tinymce.ScriptLoader;sl.markDone(url+'/langs/'+lang+'.js');sl.markDone(url+'/langs/'+lang+'_dlg.js');} }; /* ]]> */ </script> But for some reason ,my editor still doesn't save <script> tags. What am I doing wrong?

    Read the article

  • How do I read the cache of Chrome and Firefox programmatically on the Mac?

    - by John Gallagher
    Background I want to access the cache of Chrome and Firefox in my Cocoa application. I need to get the HTML for pages accessed recently. Safari is a piece of cake - all this information is available in SQLite data stores, but not so in Chrome and Firefox. The Problem For Firefox, the cache is in /Library/Caches/Firefox/Profiles/xxx.default/Cache with filenames _CACHE_001_ _CACHE_002_ _CACHE_003_ and _CACHE_MAP_ For Chrome, the cache is in /Library/Caches/Google/Chrome/Default/Cache with filenames data_0 data_1 data_2 and data_3 What I've tried The only article I can find that sheds any light on what format these caches are in is here. It recommends a Cache Viewer tool, but doesn't explain how one might do this programmatically. Questions Is there any way of reconstructing this data using command line tools or the Cocoa framework? Or is it much too low level? Is there another way of getting at the HTML of recent web pages that I don't know about?

    Read the article

  • Minimizing SQL queries using join with one-to-many relationship

    - by Brian
    So let me preface this by saying that I'm not an SQL wizard by any means. What I want to do is simple as a concept, but has presented me with a small challenge when trying to minimize the amount of database queries I'm performing. Let's say I have a table of departments. Within each department is a list of employees. What is the most efficient way of listing all the departments and which employees are in each department. So for example if I have a department table with: id name 1 sales 2 marketing And a people table with: id department_id name 1 1 Tom 2 1 Bill 3 2 Jessica 4 1 Rachel 5 2 John What is the best way list all departments and all employees for each department like so: Sales Tom Bill Rachel Marketing Jessica John Pretend both tables are actually massive. (I want to avoid getting a list of departments, and then looping through the result and doing an individual query for each department). Think similarly of selecting the statuses/comments in a Facebook-like system, when statuses and comments are stored in separate tables.

    Read the article

  • PHP matching a string

    - by John Jones
    Hi, I have an Indian company data set and need to extract the City and Zip from the address field: Address Field Example: Gowripuram West, Sengunthapuram Post, Near L.G.B., Karur, Tamilnadu, Karur - 639 002, India As you can see the City is Karur and the zip is followed after the - (hyphen). I need the PHP code to match [city] - [zip] Not sure how to do this I can find the Zip after the Hypen but not sure how to find the City, please note the City can be 2 words. Cheers for your time./ J

    Read the article

  • MVC ASP.Net how do I add a second model to a view? i.e. Add a dropdown list to a page with a html grid?

    - by John S
    I have been able to find lots of examples of adding a Dropdown list to a view but I need to add a dropdown list to a view that also has a Webgrid on it. This entails two different models and from what I see I can only have one per view. The DDL will be filled from one model and the grid from the other. I'm just trying to filter the displayed data in the grid with the data selected in the ddl. Any examples or articles would be greatly appreciated. TIA

    Read the article

  • Seeking References To MSVC 9.0's C++ Standards Compliance

    - by John Dibling
    I "know" (hopefully) that MSVC 9.0 Implements C++ 2003 (ISO/IEC 14882:2003). I am looking for a reference to this fact, and I am also looking for any research that has been done in to how compliant MSVC 9.0 is with that version of the Standard. I have searched for and not been able to find a specific reference from MicroSoft that actually says something to the effect that MSVC implements C++ 2003. Some of the out-of-date documentation says things like "this release achieves roughly 98% compliance" (when referring to MSVC .NET 2003's conformance to C++ 1997). But I want a link to a document from MS that says "MSVC 9.0 implements blah," and another link to an independent group that has tested the conformance of MSVC 9.0. Do you know of any such links?

    Read the article

  • Javascript Assoctiative Arrays

    - by John Hartsock
    Hello all, It seems to me that this should work but I cant see what exactly is the problem. The error Im receiving is "DDROA is not defined" Could anyone help enlighten me. var DDROA = { AllowedRoutes : { AR0 : {text : 'SomeText', value : 'SomeValue'}, AR1 : {text : 'SomeText2', value : 'SomeValue2'} }, RouteContext : { RC0 : {text : 'None', value : '0', AllowedRoutes : new Array( DDROA.AllowedRoutes.AR0 // An error occurs here ) } } }

    Read the article

  • Division to the nearest 1 decimal place without floating point math?

    - by John Sheares
    I am having some speed issues with my C# program and identified that this percentage calculation is causing a slow down. The calculation is simply n/d * 100. Both the numerator and denominator can be any integer number. The numerator can never be greater than the denominator and is never negative. Therefore, the result is always from 0-100. Right now, this is done by simply using floating point math and is somewhat slow, since it's being calculated tens of millions of times. I really don't need anything more accurate than to the nearest 0.1 percent. And, I just use this calculated value to see if it's bigger than a fixed constant value. I am thinking that everything should be kept as an integer, so the range with 0.1 accuracy would be 0-1000. Is there some way to calculate this percentage without floating point math?

    Read the article

< Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >