Search Results

Search found 2677 results on 108 pages for 'michael cummings'.

Page 73/108 | < Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >

  • Image.createImage problem in J2ME

    - by Michael
    Hi All, I tried this on J2ME try { Image immutableThumb = Image.createImage( temp, 0, temp.length); } catch (Exception ex) { System.out.println(ex); } I hit this error: java.lang.IllegalArgumentException: How do I solve this?

    Read the article

  • Rails - Why is HAML showing the full hash?

    - by Mr. Demetrius Michael
    View: !!! %html %head %title= full_title(yield(:title)) =stylesheet_link_tag "application", media: "all" =javascript_include_tag "application" =csrf_meta_tags =render 'layouts/shim' %body =render 'layouts/header' .container =flash.each do |key, value| %div{class: "alert alert-#{key}"} #{value} Controller def create @user = User.new(params[:user]) if @user.save flash[:success] = "This is Correct" redirect_to @user else flash[:wrong] = "no" render 'new' end end Regardless of the flash (:success or :wrong or otherwise) it always compiles the entire hash as html (below) Output: <!DOCTYPE html> .... <div class='container'> <div class='alert alert-wrong'>no</div> {:wrong=&gt;&quot;no&quot;} </div> </body> </html> I have no idea why {:wrong=&gt;&quot;no&quot;} is being displayed. I've been staring at this terminal for hours. What's interesting is that the hash is being outputted with the container id, but not in the alert class. It feels like an indentation problem, but I went through several permutations with no success.

    Read the article

  • Problem with absolute positioning div over SWF and IE 8.

    - by Michael S. Kelly
    I'm attempting to use the old IFrame-over-SWF trick to get HTML to display "inside" a SWF. I'm following the example provided by Brian Deitte at: http://www.deitte.com/IFrameDemo3/IFrameDemo.html. (The source code can be viewed and downloaded by right-clicking on the SWF and selecting "View Source".) In the latest versions of Firefox, Google, Opera, and Safari on the Mac, it all looks good. But in IE 8 the absolutely positioned div containing the IFrame is positioned too far up and left, and the height and width are considerably smaller. Thoughts?

    Read the article

  • Returning from method inside a @synchronized block

    - by Michael Waterfall
    I'd just like to know if it's advised to return from a method within a @synchronized block? For example: - (id)test { @synchronized(self) { if (a) return @"A"; else return @"B"; } } As opposed to: - (id)test { NSString *value; @synchronized(self) { if (a) value = @"A"; else value = @"B"; } return value; } This sample is rather simplistic, but sometimes in a complex method it would make things simpler to be able to return from within a @synchronized block.

    Read the article

  • Makefile variable initialization and export

    - by Michael
    somevar := apple export somevar update := $(shell echo "v=$$somevar") all: @echo $(update) I was hoping to apple as output of command, however it's empty, which makes me think export and := variable expansion taking place on different phases. how to overcome this?

    Read the article

  • Using a Resource as an Attribute to a HTML Element in ASP.net

    - by Michael Stum
    I would like to have this piece of code in my .aspx file: <input class="ms-ButtonHeightWidth" type="button" name="BtnOK" id="Button2" value="Close" onclick="javascript:HandleOKButtonClick()" accesskey="<%$Resources:wss,okbutton_accesskey%>" /> Unfortunately, ASP.net doesn't seem to like that: An error occurred during the processing of /_layouts/MyPage/Info.aspx. Literal expressions like '<%$Resources:wss,okbutton_accesskey%>' are not allowed. Use <asp:Literal runat="server" Text="<%$Resources:wss,okbutton_accesskey%>" /> instead That doesn't work in this situation as that would mean nesting the Literal between the quotes of the accesskey attribute, which causes a "The tag contains duplicate 'ID' attributes" error. Is there a way to use a string from a resource without having to change the input to an asp:Button? I guess there has to be a way using <%=, but I don't know how I would address the resource itself?

    Read the article

  • Systematically resolve conflicting styles in css

    - by Frank Michael Kraft
    I have some stylesheets from different sources in my web project. I want to harmonize them. Some styles I need from the one, some from the other. Is there a tool or method how to systematically resolve style conflicts? I tried IE8 developer tool, and yes, it is possible to view conflicts at the level of each element. But I have many elemens, so if I do it element by element I think this takes too long. Theoretically there could be a tool that shows conflicts of two css files at design time?!? I think this would save me a lot of time.

    Read the article

  • SqlCE DB occasionally freezes on one handheld, not another

    - by Michael
    I have two types of custom handhelds which are similar, but slightly different, each running the same WinForm application and a WinCE database: Type 1: WinCE 4.2, 400 mhz, 93244 kb Type 2: WinCE 5.0, 520 mhz, 84208 kb Type 1 will happily proceed through a large batch db operation (initiated) by the app, by Type 2 will consistently begin c-r-a-w-l-i-n-g (for several to many cycles) at around the 200 cycle mark. As several points it will begin running normally and then crawl again. The app does several db op's (inserts, updates and selects, no deletes). To simplify my situation, I've built a small test app which essentially does this: command_s.CommandText = "select dvr from vr where vid = 2211250"; command_u.CommandText = "update pvr set LocationID=81 where Status='OK' and vri = 27861"; while(going) { command_s.ExecuteScalar(); command_u.ExecuteNonQuery(); } and set it off running on the two units side by side. Sure enough, the slower (400 mhz) unit is outpacing the faster (520 mhz) unit (it's about 5000 cycles ahead right now) and I can see noticable pauses on the 520 mhz unit. What is causing this?

    Read the article

  • Where would async calls make sense in an ASP.net (MVC) Web Application?

    - by Michael Stum
    I'm just wondering, if I have an ASP.net Web Application, either WebForms or MVC, is there any situation where doing stuff asynchronously would make sense? The Web Server already handles threading for me in that it spins up multiple threads to handle requests, and most request processing is rather simple and straight forward. I see some use for when stuff truly is a) expensive and b) can be parallelized. but these are the minority cases (at least from what I've encountered). Is there any gain from async in the simple "Read some input, do some CRUD, display some output" scenario?

    Read the article

  • Where is the taglib definition of PrimeFaces 4?

    - by Michael Wölm
    I am looking around how to define custom components in JSF. According to the Java EE tutorial, any custom component needs to be described in a taglib. When I take a look into the PrimeFaces source, I cannot find any taglib file or any hint where the namespace is bound and the available components are defined. I am adding primefaces jar to my dependencies, adding xmlns:p="http://primefaces.org/ui to the xml namespace, defining some primfaces components on my page and it works... Ok, but neither I can find the related taglib in the source or binary package nor my IDE (IntelliJ) is able to find where "xmlns:p="http://primefaces.org/ui" is pointing to. Therefore, code completion is also not possible. (all other mojarra taglibs are found.) Is it possible that PrimeFaces is defining the taglib via annotations directly in Java classes or is it generating it during runtime? I can easily find the UIComponents, primefaces defines in its source, but the configuration of the taglib seems to be missing. I am sure I just don't know how PrimeFaces is doing it, but the javaeetutorial is not describing any other opportunity than defining a ...-taglib.xml

    Read the article

  • Acl mechanism for JSF

    - by michael lucas
    Is there some ready-to-use ACL mechanism for JSF? I know JBoss Seam comes with something like that, but switching to JBoss Seam is not an option in my case. What I need is to easily define which pages given user is allowed to see and which actions to invoke.

    Read the article

  • Objective-C retain counts in dealloc

    - by Michael Waterfall
    I'm seeing something fairly strange here, I've got breakpoints set in various dealloc methods in my app, and on inspection, the retain counts of the object self varies from 1 to 0. When dealloc is called, will the retain count of the object be set to 0 already? I'm using print (int) [self retainCount] in the console to test this. The 0's seem to only appear in the dealloc of my NSOperation's that are being run in an NSOperationQueue. Any idea why this is?

    Read the article

  • Passenger, Apache and avoiding page caching

    - by Michael Guterl
    I'm hosting a rack application with passenger and apache. The application is setup to cache the content of each request to the public directory after each request. This allows apache to serve the content directly as a static page for future requests. I would like to tell Apache, presumably through some rewrite rules that any requests with query parameters should not be cached, but instead passed down to the rack application. With a mongrel setup I would just redirect it to the balancer if it meets my rewrite conditions. How do you do the same with passenger?

    Read the article

  • jQuery Validation Custom Message Before Listing Errors

    - by Michael
    I am looking to add a custom message before listing my errors for a login page: "Oops, you forgot to enter the following:" + "Username", "Password" (if both not entered) or "Oops, you forgot to enter the following:" + "Username" (if just username not entered) $(document).ready(function(){ $("#loginForm").validate({ errorLabelContainer: $('#RegisterErrors'), messages: { username: "Username", password: "Password" } }); }); With this in my HTML <div id="RegisterErrors">

    Read the article

  • Can I get Androis OS?

    - by Michael Turner
    I bought a umpc on ebay, A Ipad touchscreen like device. I had been looking at a particular hardware model that many sellers had, on which was running Android (1.6). I based my choice on the one that offered "free" shipping via UPS (3-5 day) delivery. after the purchase I noticed that the one I bought has Windows CE, not android (!#$^%!!!). Now I want to know if I can get a copy of Android 1.6 or higher and put it on this device. I have looked on google, Torrent sites and ebay, but cannot find a copy of Android OS

    Read the article

  • JQuery Syntax Problem?

    - by Michael Smith
    I am using JQuery to insert divs into a page but i cant seem to get the quotation marks correctly setup. For example the code below works fine: var newDiv_1 = '<div id="event_1"><b>Hello World 01</b></div>'; $('#mon_Events').append(newDiv_1); But when i try to use variable in place of the normal text, i doesnt seem to work: var eventname = 1; var newDiv_1 = '<div id="event_' . eventName . '"><b>Hello World 01</b></div>'; $('#mon_Events').append(newDiv_1); How do i use variable inside this statement?

    Read the article

  • Why do some people prefer "T const&" over "const T&"?

    - by Michael Aaron Safyan
    So, I realize that const T& and T const& are identical and both mean a reference to a const T. In both cases, the reference is also constant (references cannot be reassigned, unlike pointers). I've observed, in my somewhat limited experience, that most C++ programmers use const T&, but I have come across a few people who use T const&. Is this just a personal preference? Why is one chosen over the other?

    Read the article

  • How to specify a LinearLayout to either wrap_content if it exceeds certain width

    - by michael
    Hi, I have want to layout an ImageView and then follow by a LinearLayout (to the right of it). <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content"> <ImageView android:id="@+id/icon" android:layout_width="20px" android:layout_height="20px" /> <RelativeLayout android:id="@+id/side" android:layout_width="fill_parent" android:layout_weight="1" android:layout_width="????"> // some children here </RelativeLayout> </LinearLayout> How can I configure my side panel so that it either use 'wrap_content' if the height is than the image view? if not, use the height of the image i.e. 20px?

    Read the article

  • Return specific HREF attribute using Xpath query

    - by Michael Pasqualone
    Having a major brain freeze, I have the following chunk of code: // Get web address $domQuery = query_HtmlDocument($html, '//a[@class="productLink"]'); foreach($domQuery as $rtn) { $web = $rtn->getAttribute('href'); } Which obviously gets the entire href attribute, however I only want 1 specific attribute within the href. I.e. If the href is: /website/product1234.do?code=1234&version=1.3&somethingelse=blaah I only want to return the variable for "version", so wish to only return "1.3" in my example. What's most efficient way to do this?

    Read the article

  • Rendering another Action without changing URL?

    - by Michael Stum
    I have this code in my Rails 3 controller: def index now = Time.now.utc.strftime("%m%d") redirect_to :action => "show", :id => now end def show begin @date = Time.parse("12#{params[:id]}") dbdate = params[:id] rescue ArgumentError @date = Time.now.utc dbdate = @date.strftime("%m%d") end @date = @date.strftime("%B %d") @events = Event.events_for_date(dbdate) end So basically index is just a specialized version of show, hence I want it to execute show, render the show.html.erb view - but I do not want to change the URL like redirect_to does. I have tried this approach: def index now = Time.now.utc.strftime("%m%d") params[:id] = now show render :action => "show" end Now, this works, but it just smells badly. I'm new to Ruby and Rails, so I just wonder if there is something fundamentally wrong or if there is a better way to do this?

    Read the article

  • NSArraycontroller selectionIndexes bindings

    - by Michael Scherbaum
    Hi all, I have the following set-up: A Window that has a splitView in which I display I NSCollectionView in the left view and a detailView in the right view. Both views are set-up in separate xibs. Furthermore I have a Datacontroller (of class NSArrayController) that manages a mutable Array of NSMutableDictionaries (moviesForChoice). The dataController is set-up as application delegate. The movie objects in the array have properties like (name, plot, genre etc.) so far so good... In the xib for the NScollectionview I bound a NSArraycontroller content property to my datacontroller via Application.delegate.moviesForChoice The collectionView accesses the arraycontroller.arrrangedObjects and arraycontroller.selectionIndexes. This works fine the contents are displayed and the selection works fine in the collectionview (my collectionviewItem renders a selection color) In the xib for the detailView I want to display information for the selected object in the collectionview. Therefore I also added an arraycontroller to the xib, bound the content aray to Application.delegate.moviesForChoice and bound the NSTextfields in the view to e.g. arraycontroller.selection.name Here comes my issue: everytime I open the window with the two xibs, my collectionview displays all movies that are for choice correctly, and the detailview displays the information for the 1st object in my collectionview. Whenever I click on a different movie in the collectionView the res. item renders a selection color, but the detailView doesn't update. My understanding of it would be that the DataController is not informed about updates in the selectionIndexes and can therefore not trigger an update in the detailView. Correct me if I'm wrong... To remedy this I tried to bind the selectionIndexes property of the arraycontroller in the collectionView xib to Application.delegate.moviesForChoice.selecionIndexes but this failed with: addObserver:forKeyPath:options:context:] is not supported. Key path: selectionIndexes I could imagine that this means that the datacontroller is not KVO compliant for my Array moviesForChoice, but I implemented the following methods for it: -(void)insertObject:(NSDictionary *)dict inMoviesForChoiceAtIndex:(NSUInteger)index { [moviesForChoice insertObject:dict atIndex:index]; } -(void)removeObjectFromMoviesForChoiceAtIndex:(NSUInteger)index { [moviesForChoice removeObjectAtIndex:index]; } -(void)setMoviesForChoice:(NSMutableArray *)a { moviesForChoice = a; } -(NSArray*)moviesForChoice { return moviesForChoice; } -(NSUInteger)countOfMoviesForChoice { return [moviesForChoice count]; } - (void)addMovieForChoiceObject:(Movie *)anObject { [moviesForChoice addObject:anObject]; } So where am I wrong? How do I correctly bind to the selectionIndexes? You help is much appreciated! M

    Read the article

  • How to skip extra lines before the header of a tab delimited delimited file in R

    - by Michael Dunn
    The software I am using produces log files with a variable number of lines of summary information followed by lots of tab delimited data. I am trying to write a function that will read the data from these log files into a data frame ignoring the summary information. The summary information never contains a tab, so the following function works: read.parameters <- function(file.name, ...){ lines <- scan("tmp.log", what="character", sep="\n") first.line <- min(grep("\\t", lines)) return(read.delim(file.name, skip=first.line-1, ...)) } However, these logfiles are quite big, and so reading the file twice is very slow. Surely there is a better way?

    Read the article

  • Should uni provide "correct answer" after programming assignment is due?

    - by Michael Mao
    Hi all: This is my very first subjective question. And I think it is programming related - the assignment is to be written in a programming language. I am not for "getting the full marks out of a subject". I am actually not for a "correct answer", but for a "better solution", so that I can compare, and can improve. I reckon it is good that I practice programming first and check the solution later to pick up the things I've done wrong/bad. Without a "benchmark" to against, this would be much harder. Unfortunately as far as I know, not all programming subjects taught in uni would kindly provide the students with a "correct answer" in the end, after the assignment is due. One bad metaphor for this is like someone asks you a question which they don't have a clear answer themselves and hope to take advantage of your answer as the basis for their answer. Personally, I feel having a assignment solution provided by the academic staff is essential to students. I do appreciate this, and I feel I might not be the only one. I am a very proactive student in uni. I learn more, I practice more, an assignment for me is more like a challenge to achieve "the best solution I can come up with", not something "I have to pass"... The cause of this question is that for the past few days I have crafted 500+ lines of Perl code, for a tiny assignment. I feel pain when I look at my solution(not finished yet) and I feel like I am an idiot doing some crap code. I know there must be a much better solution. And I reckon it is better for the lecturer in this subject to get me one, rather than asking for an answer here, even I would shamelessly add the link to my solution apart from the assignment requirements. I know in SO, there are a lot of tutors/lecturers for programming subjects/courses. I'd like to hear your words on this question.

    Read the article

< Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >