Search Results

Search found 2767 results on 111 pages for 'alex king'.

Page 12/111 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Error in glmmadmb(.....) The function maximizer failed (couldn't find STD file)

    - by Joe King
    This works fine: fit.mc1 <-MCMCglmm(bull~1,random=~school,data=dt1,family="categorical", prior=list(R=list(V=1, fix=1), G=list(G1=list(V=1, nu=0))), slice=T) So does this: fit.glmer <- glmer(bull~(1|school),data=dt1,family=binomial) But now I am trying to work with the package glmmadmb and this does not work: fit.mc12 <- glmmadmb(bull~1+(1|school), data=dt1, family="binomial", mcmc=TRUE, mcmc.opts=mcmcControl(mcmc=50000)) It generates the error: Error in glmmadmb(bull~ 1 + (1 | school), data = dt1, family = "binomial", : The function maximizer failed (couldn't find STD file) In addition: Warning message: running command '<snip>\cmd.exe <snip>\glmmadmb.exe" -maxfn 500 -maxph 5 -noinit -shess -mcmc 5000 -mcsave 5 -mcmult 1' had status 1

    Read the article

  • Java "compare cannot be resolved to a type" error

    - by King Triumph
    I'm getting a strange error when attempting to use a comparator with a binary search on an array. The error states that "compareArtist cannot be resolved to a type" and is thrown by Eclipse on this code: Comparator<Song> compare = new Song.compareArtist(); I've done some searching and found references to a possible bug with Eclipse, although I have tried the code on a different computer and the error persists. I've also found similar issues regarding the capitalization of the compare method, in this case compareArtist. I've seen examples where the first word in the method name is capitalized, although it was my understanding that method names are traditionally started with a lower case letter. I have experimented with changing the capitalization but nothing has changed. I have also found references to this error if the class doesn't import the correct package. I have imported java.util in both classes in question, which to my knowledge allows the use of the Comparator. I've experimented with writing the compareArtist method within the class that has the binary search call as well as in the "Song" class, which according to my homework assignment is where it should be. I've changed the constructor accordingly and the issue persists. Lastly, I've attempted to override the Comparator compare method by implementing Comparator in the Song class and creating my own method called "compare". This returns the same error. I've only moved to calling the comparator method something different than "compare" after finding several examples that do the same. Here is the relevant code for the class that calls the binary search that uses the comparator. This code also has a local version of the compareArtist method. While it is not being called currently, the code for this method is the same as the in the class Song, where I am trying to call it from. Thanks for any advice and insight. import java.io.*; import java.util.*; public class SearchByArtistPrefix { private Song[] songs; // keep a direct reference to the song array private Song[] searchResults; // holds the results of the search private ArrayList<Song> searchList = new ArrayList<Song>(); // hold results of search while being populated. Converted to searchResults array. public SearchByArtistPrefix(SongCollection sc) { songs = sc.getAllSongs(); } public int compareArtist (Song firstSong, Song secondSong) { return firstSong.getArtist().compareTo(secondSong.getArtist()); } public Song[] search(String artistPrefix) { String artistInput = artistPrefix; int searchLength = artistInput.length(); Song searchSong = new Song(artistInput, "", ""); Comparator<Song> compare = new Song.compareArtist(); int search = Arrays.binarySearch(songs, searchSong, compare);

    Read the article

  • Java array assignment (multiple values)

    - by Danny King
    Hello, I have a Java array defined already e.g. float[] values = new float[3]; I would like to do something like this further on in the code: values = {0.1f, 0.2f, 0.3f}; But that gives me a compile error. Is there a nicer way to define multiple values at once, rather than doing this?: values[0] = 0.1f; values[1] = 0.2f; values[2] = 0.3f; Thanks!

    Read the article

  • UITableViewCell imageView images loading small even when they are the correct size!

    - by Alex Barlow
    Im having an issue whilst loading images into a UITableViewCell after an asynchronous download and placement into an UIImage variable.. The images appear smaller than they actually are! But when scrolled down and scrolled back up to the image, or the whole table is reloaded, they appear at the correct size... Here is a code excerpt... - (void)reviewImageDidLoad:(NSIndexPath *)indexPath { ThumbDownloader *thumbDownloader = [imageDownloadsInProgress objectForKey:indexPath]; if (thumbDownloader != nil) { UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:thumbDownloader.indexPathInTableView]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.4]; [self.tableView cellForRowAtIndexPath:indexPath].imageView.alpha = 0.0; [UIView commitAnimations]; cell.imageView.image = thumbDownloader.review.thumb; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.4]; [self.tableView cellForRowAtIndexPath:indexPath].imageView.alpha = 1.0; [UIView commitAnimations]; } } Here is an image of the app just after calling this method.. http://www.flickr.com/photos/arbarlow/5288563627/ After calling tableView reloadData or scrolling around the appear correctly, go the the next flickr image, to see the normal result, but im sure you can guess that.. Does anyone have an ideas as to make the images appear correctly? im absolutely stumped?! Regards, Alex iPhone noob

    Read the article

  • When using Clipboard, Toolkit and Transferable, I get an error objecting to image width and height

    - by Mike King
    When I run the following code it triggers an error message. The error message is shown below the code. What code changes, or changes to the image file, are needed to fix this error? Help will be appreciated. import java.awt.*; import java.awt.datatransfer.*; public class LoadToClipboard { public static void main( String [] args ) { Toolkit tolkit = Toolkit.getDefaultToolkit(); Clipboard clip = tolkit.getSystemClipboard(); clip.setContents( new ImageSelection( tolkit.getImage("StackOverflowLogo.png")) , null ); } } class ImageSelection implements Transferable { private Image image; public ImageSelection(Image image) { this.image = image; } // Returns supported flavors public DataFlavor[] getTransferDataFlavors() { return new DataFlavor[]{DataFlavor.imageFlavor}; } // Returns true if flavor is supported public boolean isDataFlavorSupported(DataFlavor flavor) { return DataFlavor.imageFlavor.equals(flavor); } // Returns image public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException { if (!DataFlavor.imageFlavor.equals(flavor)) { throw new UnsupportedFlavorException(flavor); } return image; } } Exception in thread "main" java.lang.IllegalArgumentException: Width (-1) and height (-1) cannot be <= 0 at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:999) at sun.awt.datatransfer.DataTransferer.imageToStandardBytes(DataTransferer.java:1994) at sun.awt.windows.WDataTransferer.imageToPlatformBytes(WDataTransferer.java:267) at sun.awt.datatransfer.DataTransferer.translateTransferable(DataTransferer.java:1123) at sun.awt.windows.WDataTransferer.translateTransferable(WDataTransferer.java:163) at sun.awt.windows.WClipboard.setContentsNative(WClipboard.java:73) at sun.awt.datatransfer.SunClipboard.setContents(SunClipboard.java:93) at automateSignature.LoadToClipboard.main(LoadToClipboard.java:8) I have tried to find a place in the code where width and height can be specified, but have not succeeded. I also examined the properties of the jpg file and the w and h are specified.enter code here

    Read the article

  • Regular expression of unicode characters on string

    - by Marcus King
    I'm working in c# doing some OCR work and have extracted the text I need to work with. Now I need to parse a line using Regular Expressions. string checkNum; string routingNum; string accountNum; Regex regEx = new Regex(@"\u9288\d+\u9288"); Match match = regEx.Match(numbers); if (match.Success) checkNum = match.Value.Remove(0, 1).Remove(match.Value.Length - 1, 1); regEx = new Regex(@"\u9286\d{9}\u9286"); match = regEx.Match(numbers); if(match.Success) routingNum = match.Value.Remove(0, 1).Remove(match.Value.Length - 1, 1); regEx = new Regex(@"\d{10}\u9288"); match = regEx.Match(numbers); if (match.Success) accountNum = match.Value.Remove(match.Value.Length - 1, 1); The problem is that the string contains the necessary unicode characters when I do a .ToCharArray() and inspect the contents of the string, but it never seems to recognize the unicode characters when I parse the string looking for them. I thought strings in C# were unicode by default.

    Read the article

  • How to make a panel behave like a modal for the form

    - by The King
    Hi All, I have a MDI child Form which displays items that are already in the database. I use a datagridview (PostedItemsDataGrid) to display the items... I also have a Button which enables user to edit the line selected in the datagridview. There are also other controls on the form other than the two controls specified. I use a panel (Name : UpdateItemsPanel) containing various controls to edit the item selected... I want to display this form Modally... ie... When this form is active, user should not be allowed to access any controls other than the controls in the UpdateItemsPanel. I tried the following but got into other problems... If you can help me in solve either the main or one of these problems, it would be great help. I tried putting the contents of UpdateItemsPanel in a seperate form and show it as modal... The trouble was showing the update form as modal, blocks all other MDI forms also. Other problem with this 1 is, I need to position the modalform just below the PostedItemsDataGrid... I'm not sure How to do it... I tried putting the other controls in a panel and disabling the panel when updatepanel is displayed. This ofcourse, makes the (PostedItemsDataGrid) disabled and hence unable to scroll... Could you please help.... Please let me know, incase you need more info...

    Read the article

  • Keeping an application on top and in focus - always

    - by James Newton-King
    I am creating a kiosk application and I want to ensure it is always, no matter what, on top of other Windows applications and the Windows task bar. I am already blocking Windows keyboard commands (alt-tab, etc) but there are still situations that could cause an application to launch and steal the screen. Is it possible to hook into Windows from .NET and continually test whether the application has focus and is on top, and if not then give it focus and make it on top?

    Read the article

  • How to send IM message like Skype in Android ?

    - by mob-king
    I have to build a feature in my application which allows user to send a skype message. For this I have installed skype lite client for Android (although offically the download has been currently withdrawn from Skype). Now how to initiate the activity from my application OR simply send the chat message without bringing it front, assuming I have skype installed in Android & also signed in already. Any help ? Thanks.

    Read the article

  • SQL Server 2008 - Script Data as Insert Statements from SSIS Package

    - by Brandon King
    SQL Server 2008 provides the ability to script data as Insert statements using the Generate Scripts option in Management Studio. Is it possible to access the same functionality from within a SSIS package? Here's what I'm trying to accomplish... I have a scheduled job that nightly scripts out all the schema and data for a SQL Server 2008 database and then uses the script to create a "mirror copy" SQLCE 3.5 database. I've been using Narayana Vyas Kondreddi's sp_generate_inserts stored procedure to accomplish this, but it has problems with some datatypes and greater-than-4K columns (holdovers from SQL Server 2000 days). The Script Data function looks like it could solve my problems, if only I could automate it. Any suggestions?

    Read the article

  • How to use custom color for each textview in listview that extends SimpleAdapter in Android ?

    - by mob-king
    I have a listview with custom rows and that extends SimpleAdapter. Each row consist of two linear layouts : 1st having two textviews of which one is hidden in horizontal orientation, second having two textviews in horizontal orientation. Now depending on the value in hidden textview , I want to setcolor for the remaining items for the row. To put it as simple: each listview item has some custom colors the value of which comes from the hidden field. I have done this by overriding getview() for the simpleadapter and returning view for each, but this makes list very slow to render (and that I think is obvious as so much of work for each view before showing it). Can I do this in some more efficient way ? like making views and then add up to list instead of using xml layout maybe one solution OR any other ? Any help ? Thanks.

    Read the article

  • Java: Stopping a thread that has run for too long?

    - by Thomas King
    Say I've got something like this public void run(){ Thread behaviourThread = new Thread(abstractBehaviours[i]); behaviourThread.start(); } And I want to wait until abstractBehaviours[i] run method has either finished or run for 5000 milliseconds. How do I do that? behaviourThread.join(5000) doesn't seem to do that afaik (something is wrong with my code and I've put it down to that). All the abstract abstractBehaviour class is of course Runnable. I don't want to implement it inside each run method as that seems ugly and there are many different behaviours, I'd much rather have it in the calling/executing thread and do it just once. Solutions? First time doing something as threaded as this. Thanks!

    Read the article

  • How to disable the third zoom button in webview of Android ?

    - by mob-king
    I want to disable the third button that creates a rectangle to zoom in other than +/- buttons in my WebView which uses builtin zoom controls. How can I do that ? I am able to do this for WebView without using built-in zoom controls by myWebview.getZoomControls().getTouchables().get(2).setVisibility(View.INVISIBLE); But how to do the same for built-in zoom controls ? Also I am extending the WebView class and overriding the onTouchEvent for tracking touch events inside my WebView as this is not possible by default, since zoom buttons consumes the touch event.

    Read the article

  • Is my natural deduction proof correct?

    - by Danny King
    Hello, Given the sequent: |- p v ¬p (that is, no left-hand-side, derives p or not p) I have taken this from http://www.danielclemente.com/logica/dn.en-node38.html but I got a different proof to his solution. I think my simpler proof is correct but could someone verify it for me to check I have understood it? I'd appreciate it very much! 1. ¬(p v ¬p) assumption {note this is equivalent to ¬p ^ p} 2. ¬p ^elimination 1 3. p ^elimination 1 4. contradiction ¬elimination 3, 2 5. p v ¬p ¬introduction 1-4 Thanks!

    Read the article

  • Convert .jar to an OSX executable?

    - by Danny King
    Hello, I made a Java application which I would like to distribute on Windows, OSX and Linux without distributing a jar file. I used the great Windows exe wrapper http://launch4j.sourceforge.net/ to create an .exe file complete with my icon that won't scare Windows users. Are there similar wrappers that I can use for OSX/Unix? An important consideration is that I would like to have my own icon on the executable (especially for mac users). Thanks!

    Read the article

  • Handling multiple exceptions

    - by the-banana-king
    Hi there, I have written a class which loads configuration objects of my application and keeps track of them so that I can easily write out changes or reload the whole configuration at once with a single method call. However, each configuration object might potentially throw an exception when doing IO, yet I do not want those errors to cancel the overall process so that the other objects are still given a chance to reload/write. Therefore I collect all exceptions which are thrown while iterating over the objects and store them in a super-exception, which is thrown after the loop, since each exception must still be handled and someone has to be notified of what exactly went wrong. However, that approach looks a bit odd to me. Someone out there with a cleaner solution? Here is some code of the mentioned class: public synchronized void store() throws MultipleCauseException { MultipleCauseException me = new MultipleCauseException("unable to store some resources"); for(Resource resource : this.resources.values()) { try { resource.store(); } catch(StoreException e) { me.addCause(e); } } if(me.hasCauses()) throw me; }

    Read the article

  • Where to maintain common information, that could be accessed by all forms

    - by The King
    Hi All, This is my first winform app in .NET... I have made a couple of ASP.NET app... In this app, I have some common variables, like current user name, his selected process etc.. etc.. This should be made accessible from all forms in the app at any time... How could I do this... Is there any place like "Session" in ASP.NET here... Further How do coders generally pass information from one form to another... Here I want to pass on the info I acquired in the first form to the subsequent forms... I use constructor overloading and pass the values as parameters... I'm pretty sure there has to be a better way to do it... Thanks for your time...

    Read the article

  • pass other form elements to ajax suggestion box script

    - by Alex Calder
    I paid somebody to build me a jQuery AJAX suggestion box script a while back. It works great. Now I'm trying to learn about it enough to modify it to do something different. Right now, the script that generates the suggestions just takes the query text and does the same check every time. Now, I want to be able to pass along additional info so different things are looked for with each instance of a search box. The HTML... simple, obvious. input class="suggest" name="q" type="text" autocomplete="off" / The jQuery looks like this: jQuery(document).ready(function() { $('.suggest').autocomplete( { source:'output.php', minLength:3, focus: function (event, ui) { $(event.target).val(ui.item.label); return false; } } ); [snip] } Instead of: source:'output.php', minLength:3, I'd like: source:'output.php?arg1=blah1&arg2=blah2', minLength:3, where arg1 and arg2 are passed along in the form... input class="suggest" name="q" type="text" autocomplete="off" / input type="hidden" name="arg1" value="blah1" input type="hidden" name="arg2" value="blah2" Does this make sense? Thanks guys. I know just about "this much" about OOL's and javascript, so I'm learning... Alex

    Read the article

  • Does Android Speech Synthesis do no work for HTC Dream firmware version 1.6 build DRD20 ?

    - by mob-king
    I have a HTC Dream firmware version 1.6 build DRD20. I am unable to install voice data in Menu == Settings == Speech Synthesis == Install voice data. The option just brings me back to previous screen of settings. I also tried installing Speech Synthesis Data Installer and many other applications for text to speech. But none works and give back Sorry! Force close error. Is there any way by which I can install voice data ? Or any way I can use text to speech ? Can anyone also tell what is latest offical firmware available for this mobile ?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >