Search Results

Search found 4344 results on 174 pages for 'mark roberts'.

Page 84/174 | < Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >

  • OnClickListener - x,y location of event?

    - by Mark
    Hi, I have a custom view derived from View. I'd like to be notified when the view is clicked, and the x,y location of where the click happened. Same for long-clicks. Looks like to do this, I need to override onTouchEvent(). Is there no way to get the x,y location of the event from an OnClickListener instead though? If not, what's a good way of telling if a motion event is a 'real' click vs a long-click etc? The onTouchEvent generates many events in rapid succession etc. Thanks

    Read the article

  • Oracle: how to UPSERT (update or insert into a table?)

    - by Mark Harrison
    The UPSERT operation either updates or inserts a row in a table, depending if the table already has a row that matches the data: if table t has a row exists that has key X: update t set mystuff... where mykey=X else insert into t mystuff... Since Oracle doesn't have a specific UPSERT statement, what's the best way to do this?

    Read the article

  • I've built a Windows service as "Any CPU". Why does it run in 32-bit mode on my 64 bit machine?

    - by Mark
    I've built a Windows service as "Any CPU". However, when I run it on my 64 bit machine it runs in 32 bit. How can I fix it? I'm using .NET and C#, and my operating system is Windows 2008 R2. If I build it in x64 it correctly loads in 64 bit mode. However, "Any Cpu" -- which is what I want -- loads in 32 bit, even though the machine it's running on perfectly supports 64 bit. Thanks for any help.

    Read the article

  • How to convert from base-256 to base-N, where N is higher than 16?

    - by mark
    Dear ladies and sirs. I need to convert an array of bytes to another base, namely 85. In math terms the question is how to convert from base-256 to base-85 in the most efficient way? This question is inspired by my previous question - http://stackoverflow.com/questions/2827627/what-is-the-most-efficient-way-to-encode-an-arbitrary-guid-into-readable-ascii-3 Thanks.

    Read the article

  • Smallest Java Runtime I can legally distribute?

    - by Mark
    My Java SWT desktop application is distributed with it's own Java runtime and I want to make the download size as small as possible. I'd like to remove all the classes I don't use from rt.jar, but this is forbidden according to JDK runtime licence (see the README.html file in the root JDK folder). Since Java is open source, am I allowed to compile my own 'Java' runtime from source which doesn't have this distribution restriction? If so, has anyone done this already? (Or do you just ignore the JDK licence terms?)

    Read the article

  • Create table class as a singleton

    - by Mark
    I got a class that I use as a table. This class got an array of 16 row classes. These row classes all have 6 double variables. The values of these rows are set once and never change. Would it be a good practice to make this table a singleton? The advantage is that it cost less memory, but the table will be called from multiple threads so I have to synchronize my code which way cause a bit slower application. However lookups in this table are probably a very small portion of the total code that is executed. EDIT: This is my code, are there better ways to do this or is this a good practice? Removed synchronized keyword according to recommendations in this question. final class HalfTimeTable { private HalfTimeRow[] table = new HalfTimeRow[16]; private static final HalfTimeTable instance = new HalfTimeTable(); private HalfTimeTable() { if (instance != null) { throw new IllegalStateException("Already instantiated"); } table[0] = new HalfTimeRow(4.0, 1.2599, 0.5050, 1.5, 1.7435, 0.1911); table[1] = new HalfTimeRow(8.0, 1.0000, 0.6514, 3.0, 1.3838, 0.4295); //etc } @Override @Deprecated public Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException(); } public static HalfTimeTable getInstance() { return instance; } public HalfTimeRow getRow(int rownumber) { return table[rownumber]; } }

    Read the article

  • How do I call an upside down jQuery.slideDown()?

    - by Mark Rogers
    In the web app I'm working on I want to do a little slide up notification, like on twitter or your desktop. jQuery's .slideDown does exactly what I want, but it's upside down. The .slideUp doesn't execute an upside down version of slideDown. Instead it hides stuff, like after your cleaning up an old message you've displayed with slideDown. So what's the simplest code to do an upside down slideDown() in jQuery?

    Read the article

  • Grid view w/ progress bars?

    - by Mark
    Trying to decide on the best element to use for a grid view, pretty much exactly like the one you'd see in uTorrent or any other upload/download client. Specifically, I want to have a 'progress' column too (with progress bars). Using VS2010/.NET4. What would you recommend?

    Read the article

  • <button type="submit"> compatibility?

    - by Mark
    I'd like to have a submit button that submits a different value than is displayed on the button. With <input type="submit"> you can't seem to do this. With <button type="submit"> however, these can be two different values. The question is, will it work in all browsers? Trying this test code here: <form method="get" action=""> <input type="text" name="txt"/> <button type="submit" name="btn" value="val">text</button> </form> In FF 3.6 it updates my address bar with both values appropriately (and responds to me pressing enter in the text box). In IE 8, it also accepts pressing enter, displays the text value in the address bar, but it show the button's value as a GET param at all... does that mean it's not submitting it?

    Read the article

  • Matlab - building an array while looping

    - by Mark
    Hello, I have a for loop that loops over one array... for i=1:length(myArray) In this loop, I want to do check on the value of myArray and add it to another array myArray2 if it meets certain conditions. I looked through the Matlab docs, but couldn't find anything on creating arrays without declaring all their values on initialization or reading data into them in one shot. Many thanks!

    Read the article

  • Android Mock Location locks GPS on status bar

    - by Mark Manickaraj
    I created an app that uses mock locations to insert GPS coordinates. After removing the test provider via: mLocationManager.clearTestProviderLocation(mocLocationProvider); mLocationManager.removeTestProvider(mocLocationProvider); mLocationManager.removeUpdates(mLocationListener); When I launch google maps for example after exiting the app the GPS location is found and then never goes away. "Location Set By GPS" always remains on the notification bar even though my app is ended. Any ideas?

    Read the article

  • jquery select divs with same id

    - by mark
    hei guys i want to select two divs with the same id in jquery. how do i do it? i tried this and it did not work jQuery('#xx').each(function(ind,obj){ //do stuff; }); i have jquery countdown timers in a page, and i update them via ajax. some of these countdown timers repeat and that is why i need to use the same id on the divs.

    Read the article

  • Is there YAPE::Regex::Explain alternative to python?

    - by S.Mark
    Is there perl's YAPE::Regex::Explain alternative to python? Which could do \w+=\d+|\w+='[^']+' to explanations like this NODE EXPLANATION -------------------------------------------------------------------------------- \w+ word characters (a-z, A-Z, 0-9, _) (1 or more times (matching the most amount possible)) -------------------------------------------------------------------------------- = '=' -------------------------------------------------------------------------------- \d+ digits (0-9) (1 or more times (matching the most amount possible)) -------------------------------------------------------------------------------- | OR -------------------------------------------------------------------------------- \w+ word characters (a-z, A-Z, 0-9, _) (1 or more times (matching the most amount possible)) -------------------------------------------------------------------------------- =' '=\'' -------------------------------------------------------------------------------- [^']+ any character except: ''' (1 or more times (matching the most amount possible)) -------------------------------------------------------------------------------- ' '\''

    Read the article

  • Split string on first two colons

    - by Mark Miller
    I would like to split a column of strings on the first two colons, but not on any subsequent colons: my.data <- read.table(text=' my.string some.data 12:34:56:78 -100 87:65:43:21 -200 a4:b6:c8888 -300 11:bb:ccccc -400 uu:vv:ww:xx -500', header = TRUE) desired.result <- read.table(text=' my.string1 my.string2 my.string3 some.data 12 34 56:78 -100 87 65 43:21 -200 a4 b6 c8888 -300 11 bb ccccc -400 uu vv ww:xx -500', header = TRUE) I have searched extensively and the following question is the closest to my current dilemma: Split on first comma in string Thank you for any suggestions. I prefer to use base R.

    Read the article

  • UIScrollView not scrolling...

    - by Mark
    I have a UIScrollView which contains many UIImageView's UILabel's etc... the labels are well longer that the UIScrollView, but when I run the app, I cannot click and scroll down... Why might this be? Thanks

    Read the article

  • How can one configure Hudson to integrate with Sventon?

    - by mark
    Dear ladies and sirs. Hudson ver. 1.353 Sventon ver. 2.14 I just cannot figure out how to configure Hudson to work with Sventon. It seems that the path format that Hudson expects from Sventon is not the format used by Sventon. Any ideas? Thanks. UPDATE Given an SVN repository with the name of windows, the Sventon URL path to the repository is http://dev-builder:8080/svn/repos/windows/list/ However, Hudson expects something like http://dev-builder:8080/svn/repobrowser.svn?name=windows Can anyone explain how this should be configured?

    Read the article

  • How can I pull another repository and update to its head in GIT?

    - by mark
    Here is the description of the problem in terms of Mercurial: Given: Two repos A and B, where B is a fork of A The current directory is a working directory for the tip of A. Needed: Pull in B and update to its most recent head REV. This is what I want to do in term of Mercurial: A> hg pull B A> hg heads # Notice the most recent head of B A> hg update **REV** How can I do it in GIT? More concretely: A is the master branch of https://github.com/yui/yui3-gallery.git B is the master branch of https://github.com/jafl/yui3-gallery.git I need to update to the most recent revision of B, when I have a local clone of A I know it should be trivial, still I cannot figure it out. Anyone?

    Read the article

  • Why is Django sending the wrong email template?

    - by Mark
    I'm so baffled... I keep staring at this code, looking for the typo, but I can't find it! template = 'emails/transporter_joined' tt = loader.get_template(template+'.txt') c = Context({'user':user, 'fee': settings.FEE * Decimal('100.00'),'settings':settings}) e = EmailMultiAlternatives('Activate Your Account', tt.render(c), '[email protected]', [user.email]) try: ht = loader.get_template(template+'.html') e.attach_alternative(ht.render(c), 'text/html') except: pass e.send() First it should load the 'emails/transporter_joined.txt' template, and adds that to the email. And then it tries to load a '.html' version and attaches that too. In Gmail you can see the the "original email" with both emails, and all the headers in plain text. It very clearly shows the .txt version twice. the .html and .txt files are definitely different. What am I doing wrong here? If I replace this tt = loader.get_template(template+'.txt') With .html instead, then it sends the .html twice... it must be Django that's screwing up, no?

    Read the article

  • Maintaining file permissions across SVN updates?

    - by Mark Mayo
    I have a series of python scripts with execute permissions in Linux. They are stored in SVN. If I then run svn up to update them, the overwritten files are back to 644 - ie no execute permissions for anyone. Yes I could just script it to chmod +x * afterwards, but surely there's a way to store permissions in SVN or to maintain them when you update? Any suggestions appreciated.

    Read the article

  • Measure time in minutes in C

    - by Mark Szymanski
    I am writing a program that will need to measure time in minutes. To be exact, it will wait 10 minutes, execute some code, wait 2 minutes, execute more code and repeat this 5 times (anyone guess what I'm trying to do?) and I am wondering how to do the breaks. Thanks in advance! Oh, and by the way, I'm on Mac.

    Read the article

  • Is there an Easier way to Get a 3 deep Panel Control from a Form in order to add a new Control to it programmatically?

    - by Mark Sweetman
    I have a VB Windows Program Created by someone else, it was programmed so that anyone could Add to the functionality of the program through the use of Class Libraries, the Program calls them (ie... the Class Libraries, DLL files) Plugins, The Plugin I am creating is a C# Class Library. ie.. .dll This specific Plugin Im working on Adds a Simple DateTime Clock Function in the form of a Label and inserts it into a Panel that is 3 Deep. The Code I have I have tested and it works. My Question is this: Is there a better way to do it? for instance I use Controls.Find 3 different times, each time I know what Panel I am looking for and there will only be a single Panel added to the Control[] array. So again Im doing a foreach on an array that only holds a single element 3 different times. Now like I said the code works and does as I expected it to. It just seems overly redudant, and Im wondering if there could be a performance issue. here is the code: foreach (Control p0 in mDesigner.Controls) if (p0.Name == "Panel1") { Control panel1 = (Control)p0; Control[] controls = panel1.Controls.Find("Panel2", true); foreach (Control p1 in controls) if (p1.Name == "Panel2") { Control panel2 = (Control)p1; Control[] controls1 = panel2.Controls.Find("Panel3", true); foreach(Control p2 in controls1) if (p2.Name == "Panel3") { Control panel3 = (Control)p2; panel3.Controls.Add(clock); } } }

    Read the article

  • jquery css transform, why translate?

    - by Mark
    The CSS transform translate property, I don't get the difference between changing that value and changing the margin or position with css2. Where would you want to use transform? (ignoring the ie incompat for the moment)

    Read the article

  • Generic collection class?

    - by Mark
    Is there anyway I can do this? class TSOC<TCollection, TValue> : ICollection<TValue>, INotifyCollectionChanged where TCollection : ICollection { private TCollection<TValue> collection; } It doesn't like my definition of collection. I'd prefer the definition to look like TSOC<TCollection> where the user can pass in List<int> or something, but then I need to pull out the "int" to know what interface to implement.

    Read the article

  • Android SurfaceView/Canvas flickering after trying to clear it

    - by Mark D
    So I am trying to clear the Canvas using canvas.drawColor(Color.BLACK) but if I just call this once, the display flickers and displays the old drawing which should have been covered up by the drawColor. Here is the important bits of my code - public void update() { //This method is called by a Thread Canvas canvas = holder.lockCanvas(null); if (canvas != null) { onDraw(canvas); } holder.unlockCanvasAndPost(canvas); } @Override protected void onDraw(Canvas canvas) { if (toClear) { canvas.drawColor(Color.BLACK); //if this is not set to change back to false, it does not flicker toClear = false; } //Draw some objects that are moving around } public void clearScreen() { //This method is called when the user pressed a button toClear = true; } After Googling around a litte, I heard about double buffering but came to the understanding that lockCanvas() and unlockCanvasAndPost() should handle this for me. What is going wrong here?

    Read the article

< Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >