Search Results

Search found 1506 results on 61 pages for 'ben mezger'.

Page 38/61 | < Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >

  • Has anyone noticed that a WPF file dialog will pass a click through to the UI when double clicking t

    - by Ben
    I have some buttons on my WPF UI and I also need to choose files from time to time. I kept noticing strange problems where when I double-click an item in the file dialog, a button on the main UI would also get clicked. After experimenting, it seems that if you line up an item in the file dialog with a button behind it on the main UI and double click to select the file, it will single-click the button behind it as well. Has anyone else noticed this, or is it just a freak bug with the way I have my UI laid out?

    Read the article

  • iPhone: scroll view with arbitrary page/"settling" boundaries?

    - by Ben
    Hi all, I'm trying to figure out if I can get what I want out of UIScrollView through some trickery or whether I need to roll my own scroll view: I have a series of items in row that I want to scroll through. One item should always be centered in the view, but other items should be visible to either side. In other words, I want normal scrolling and edge bouncing, but I want the deceleration when the user ends a touch to naturally settle at some specified stop point. (Actually now that I think of it, this behavior is similar to coverflow in this respect.) I know UIScrollView doesn't do this out of the box, but does anyone have suggestions for how it might be made to do this, or if anyone's spotted any code that accomplishes something similar (I'm loathe to reimplement all the math for deceleration and edge bounce) Thanks!

    Read the article

  • Recommendations for easy jQuery Autocomplete using AJAX that will set form value based on selected t

    - by Ben Dauphinee
    I am looking for suggestions on the easiest to set up and use AJAX Autocomplete plugin that will use JSON key/value pairs. I want a plugin that supports setting the form value to the key of the name selected. I have been working with jQuery UI Autocomplete, but it is a total pain in the rear to get this working. Does anyone know of anything that actually supports this out of the box, or have a thread or page where this is already detailed?

    Read the article

  • Regexp to extract sources from different video embeds

    - by Ben
    My SMF forum contains posts with video and I want to extract them to show on the Wordpress main page. My current regexp (thanks to SO!) extracts the url of the videos, which I embed using AutoEmbed. Everything works up until a post looks like this: <embed height="600" width="600" allowscriptaccess="never" quality="high" loop="true" play="true" src="http://mmavlog.net/embed/player.swf?file=http://video.ufc.tv/CSG/UFC113/20100507_ufc113_weigh_in_400k.flv" type="application/x-shockwave-flash"> Here is my current regexp: $regexp = "/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i"; Since the posts can contain <embed> or <object> I realize that looking for the url by the "http" might be inaccurate. How can I use the regexp to look for "src=" for <embed> and "data=" for <object>?

    Read the article

  • Summary of the last decade of garbage collection?

    - by Ben Karel
    I've been reading through the Jones & Lin book on garbage collection, which was published in 1996. Obviously, the computing world has changed dramatically since then: multicore, out-of-order chips with large caches, and even larger main memory in desktops. The world has also more-or-less settled on the x86 and ARM microarchitectures for most consumer-facing systems. How has the field of garbage collection changed since the seminal book was published?

    Read the article

  • Undefined variable error when parsing json

    - by Ben Shelock
    I'm trying to parse the json grabbed from here. Basically what I do is iterate over the items, sort them, then display them. But I get an error saying data.data.children[i] is undefined. I can't think why it's doing it though? var json = 'http://www.reddit.com/reddits/mine/.json'; GM_xmlhttpRequest({ method: "GET", url: json, onload: reddits }); function reddits(response){ var txt = response.responseText; var data; var suggested = document.getElementById('suggested-reddits'); if(window.JSON && JSON.parse){ data = JSON.parse(txt); } else{ data = eval("("+txt+")"); } suggested.innerHTML += '<span>reddits you\'re subscribed to </span> <ul id="rsub"></ul>'; GM_addStyle('#rsub{width: 500px;}'); var reddits = new Array(); var rsub = document.getElementById('rsub'); for(i = 0; i <= data.data.children.length; i++){ var r = data.data.children[i].data.display_name; reddits.push(r); } sort(reddits); for(i = 0; i <= reddits.length; i++){ rsub.innerHTML += '<li><a href="#" onclick="set_sr_name(this); return false">' + reddits[i] + '</a></li>'; } }

    Read the article

  • Resizing a UIButton programmatically by maintaining a margin

    - by Oscar Del Ben
    Hello, I'm adding a UIButton to a tableView footer programmatically. This button has a left and right margin that is equal to the tableView margin: UIButton *deleteButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; deleteButton.frame = CGRectMake(10, 60, 300, 34); deleteButton.autoresizingMask = UIViewAutoresizingFlexibleWidth I'm adding autoresizingMask because I want to support rotation. However, it does not work as I want, as the button stretches all the way down to the right, as shown by the image below. Any idea how to fix it? If I remove the autosizing property then the margin is correct.

    Read the article

  • Debugging unexpected error message - possible memory management problem?

    - by Ben Packard
    I am trying to debug an application that is throwing up strange (to my untutored eyed) errors. When I try to simply log the count of an array... NSLog(@"Array has %i items", [[self startingPlayers] count]); ...I sometimes get an error: -[NSCFString count]: unrecognized selector sent to instance 0x1002af600 or other times -[NSConcreteNotification count]: unrecognized selector sent to instance 0x1002af600 I am not sending 'count' to any NSString or NSNotification, and this line of code works fine normally. A Theory... Although the error varies, the crash happens at predictable times, immediately after I have run through some other code where I'm thinking I might have a memory management issue. Is it possible that the object reference is still pointing to something that is meant to be destroyed? Sorry if my terms are off, but perhaps it's expecting the array at the address it calls 'count' on, but finds another previous object that shouldn't still be there (eg an NSString)? Would this cause the problem? If so, what is the most efficient way to debug and find out what is that address? Most of my debugging up until now involves inserting NSLogs, so this would be a good opportunity to learn how to use the debugger.

    Read the article

  • The height and width properties on my Flex 4 app arn't working

    - by ben
    In the opening application tag of my Flex 4 app, I set the width and height properties as follows: <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="init()" backgroundColor.mainState="0x303030" xmlns:components="components.*" width="798" height="240"> What I go into Design mode in Flash Builder 4, the app is the correct size. But when I embed the .swf file into a HTML page, the application's background color covers the whole screen, and when the Flash Player Settings message box pops up it is outside of the area I defined in the code above. What am I doing wrong? Thanks for reading.

    Read the article

  • Default content editor in list form doesn't allow image alignment

    - by Ben Collins
    I need to be able to adjust the alignment of an image in an "Enhanced Rich Text Field" in an announcements list in MOSS 2007. However, the default content editor in the edit form for the list doesn't provide a way to do that. What's the fastest way for me to make sure users can align images? My first thought was to customize the DispForm.aspx and EditForm.aspx pages, but they just have the ListForm web part in the content region and as far as I know, you can't customize the ListForm web part from the designer.

    Read the article

  • Consecutive 'if' statements

    - by Ben Packard
    How can I check one thing AND THEN another, if the first is true? For example, say I have a shopping basket object, and I only want to do something if the basket has been created AND it isn't empty. I've tried: if (basket && [basket numberOfItems >0])... But the second condition is evaluated even if the first fails, resulting in a crash (presumably because i'm calling numberOfItems on an object that doesn't exist). I can nest them, but this seems a bit ugly, and more to the point is problematic. Say I want to do one thing if the basket exists AND isn't empty, but another if either isn't true. That doesn't really work well in nested if statements.

    Read the article

  • (Not So) Silly Objective-C inheritance problem when using property - GCC Bug?

    - by Ben Packard
    Update 2 - Many people are insisting I need to declare an iVar for the property. Some are saying not so, as I am using Modern Runtime (64 bit). I can confirm that I have been successfully using @property without iVars for months now. Therefore, I think the 'correct' answer is an explanation as to why on 64bit I suddenly have to explicitly declare the iVar when (and only when) i'm going to access it from a child class. The only one I've seen so far is a possible GCC bug (thanks Yuji). Not so simple after all... Update - I messed up one line of the original copy and paste - corrected. The @property call was missing (nonatomic, retain) but is a red herring - STILL NEED AN ANSWER! Thanks. I've been scratching my head with this for a couple of hours - I haven't used inheritance much. Here I have set up a simple Test B class that inherits from Test A, where an ivar is declared. But I get the compilation error that the variable is undeclared. This only happens when I add the property and synthesize declarations - works fine without them. TestA Header: #import <Cocoa/Cocoa.h> @interface TestA : NSObject { NSString *testString; } @end TestA Implementation is empty: #import "TestA.h" @implementation TestA @end TestB Header: #import <Cocoa/Cocoa.h> #import "TestA.h" @interface TestB : TestA { } @property (nonatomic, retain) NSString *testProp; @end TestB Implementation (Error - 'testString' is undeclared) #import "TestB.h" @implementation TestB @synthesize testProp; - (void)testing{ NSLog(@"test ivar is %@", testString); } @end

    Read the article

  • SilverLight WebApp Calling Webservice in the same solution

    - by Ben
    Hi, I have a website solution that is composed of a SilverLight Project and an ASP Site that contains an asmx Webservice. The SilverLight project calls various methods in the Webservice, and this works fine on my home PC. When i publish the site (using 123-Reg if that makes a difference), it appears that the SilverLight app is no longer able to call the webservice. I have tried debugging the app by pointing my local version of the site to my published webservice and i get a "policy" issue. I know that 123 Reg have .Net 3.5 running on their servers, so i would assume that the site should "just work" when i publish it. Am i making a hugely stupid assumption there? Is there anything that i can do to change the "policies" within my app? Or is there another way around what i am trying to do ( i need to keep the webservice, as i want for it to be used from other places, and dont really want to duplicate code and create the same methods within the SilverLight project). Thanks

    Read the article

  • How can I check that the NSPasteboard is updated?

    - by Ben Packard
    I'm automating a copy command to place some text on the pasteboard every second or so - unfortunately this is my only way of accessing the text, which is in another application. After copying, I access the pasteboard text and process it. Sometimes, the copy command will be sent when nothing is selected - for example in textEdit, if the cursor is at the end of a line (instead of highlighting some text) and you hit copy, you get a system beep because there is nothing selected to copy. The pasteboard does not update and retains its previous data. I can't think of a creative way to identify when this happens. If I send a copy command and the pasteboard doesn't update, is there any kind of time stamp on the pasteboard I can access that will confirm that something has or hasn't been captured? I was looking at the changeCount, but I'm not sure what that is for exactly, and the documentation didn't help me much - red herring? Any simple and effective ideas gratefully received!

    Read the article

  • Android multiple screen sizes and density problems

    - by Ben Mc
    I'm having a real problem with my drawables that I just can't seem to figure out. The problem is this: There are screen sizes at approximately 320x480, 480x800, 480x854 Then there are most commonly densities at 1.0 (160) and 1.5 (240) Now, on a Droid, the screen size is 480x800 and the density is reporting using DisplayMetrics as 1.5 On the G1, it's 320x480 and reporting back at a density of 1.0 BUT tablet devices are reporting back at 480x800 with a density of 1.0 (160) So, I'm going mad because I can put 320x480 images in the drawables-mdpi folder and 480x800 images in the drawables-hdpi folder, but on Tablet computers, no matter what it's not resizing up anything to a full screen. Any help would be greatly appreciated. I just want all of my 320x480 images to scale up regardless of the device.

    Read the article

  • Meaning of Execute_priv on mysql.db table

    - by Ben Reisner
    I created user 'restriceduser' on my mysql server that is 'locked down'. The mysql.user table has a N for all priveledges for that account. The mysql.db table has Y for only Select, Insert, Update, Delete, Create, Drop; all other privileges are N for that account. I tried to create a stored procedure and then grant him access to run only that procedure, no others, but it does not work. The user receives: Error: execute command denied to user 'restricteduser'@'%' for routine 'mydb.functionname' The stored procedure: CREATE DEFINER = 'restriceduser'@'%' FUNCTION `functionname`(sIn MEDIUMTEXT, sformat MEDIUMTEXT) RETURNS int(11) NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT '' BEGIN .... END; The grant statement I tried: GRANT EXECUTE ON PROCEDURE mydb.functionname TO 'restricteduser'@'%'; I was able to work around by modifying his mysql.db entry with update mysql.db set execute_priv='Y' where user='restricteduser' This seems to be more then I want, because it opens up permissions for him to run any stored procedure in that database, while I only wanted him to have permissions to run the designated function. Does anyone see where my issue may lie?

    Read the article

  • In JSF - What is the correct way to do this? Two dropdown lists with dependency.

    - by Ben
    Hi, I'm making two dropdown lists in JSF which are dependent. Specifically, one list has all the languages and the second list contains values that are displayed in the currently selected language. I've implemented this by having the second list use information from a Hash and rebuilding that Hash in the setter of the currently selected language. JSF Code Bit: <rich:dropDownMenu value="#{bean.currentlySelectedLanguage}" id="languageSelector"> ... (binding to languages hash) ... <rich:dropDownMenu value="#{bean.currentlySelectedScript}" id="ScriptPullDown"> ... (binding to scripts hash) ... Backing Bean Code Bit: setCurrentlySelectedLanguage(String lang){ this.currentlySelectedLanguage = lang; rebuildScriptNames(lang); } I'm wondering if that's a good way of doing this or if theres a better method that I am not aware of. Thank you! EDIT - Adding info.. I used a a4j:support that with event="onchange" and ReRender="ScriptPullDown" to rerender the script pull down. I could probably add an action expression to run a method when the value changes. But is there a benefit to doing this over using code in the setter function?

    Read the article

  • Is READ UNCOMMITTED / NOLOCK safe in this situation?

    - by Ben Challenor
    I know that snapshot isolation would fix this problem, but I'm wondering if NOLOCK is safe in this specific case so that I can avoid the overhead. I have a table that looks something like this: drop table Data create table Data ( Id BIGINT NOT NULL, Date BIGINT NOT NULL, Value BIGINT, constraint Cx primary key (Date, Id) ) create nonclustered index Ix on Data (Id, Date) There are no updates to the table, ever. Deletes can occur but they should never contend with the SELECT because they affect the other, older end of the table. Inserts are regular and page splits to the (Id, Date) index are extremely common. I have a deadlock situation between a standard INSERT and a SELECT that looks like this: select top 1 Date, Value from Data where Id = @p0 order by Date desc because the INSERT acquires a lock on Cx (Date, Id; Value) and then Ix (Id, Date), but the SELECT acquires a lock on Ix (Id, Date) and then Cx (Date, Id; Value). This is because the SELECT first seeks on Ix and then joins to a seek on Cx. Swapping the clustered and non-clustered index would break this cycle, but it is not an acceptable solution because it would introduce cycles with other (more complex) SELECTs. If I add NOLOCK to the SELECT, can it go wrong in this case? Can it return: More than one row, even though I asked for TOP 1? No rows, even though one exists and has been committed? Worst of all, a row that doesn't satisfy the WHERE clause? I've done a lot of reading about this online, but the only reproductions of over- or under-count anomalies I've seen (one, two) involve a scan. This involves only seeks. Jeff Atwood has a post about using NOLOCK that generated a good discussion. I was particularly interested in a comment by Rick Townsend: Secondly, if you read dirty data, the risk you run is of reading the entirely wrong row. For example, if your select reads an index to find your row, then the update changes the location of the rows (e.g.: due to a page split or an update to the clustered index), when your select goes to read the actual data row, it's either no longer there, or a different row altogether! Is this possible with inserts only, and no updates? If so, then I guess even my seeks on an insert-only table could be dangerous. Update: I'm trying to figure out how snapshot isolation works. It seems to be row-based, where transactions read the table (with no shared lock!), find the row they are interested in, and then see if they need to get an old version of the row from the version store in tempdb. But in my case, no row will have more than one version, so the version store seems rather pointless. And if the row was found with no shared lock, how is it different to just using NOLOCK?

    Read the article

  • How to include NetBeans Platform Source code into module dependencies

    - by Ben Hammond
    I am debugging a NetBeans Platform application. I have downloaded the NetBeans Platform source code .zip file. I would really really like to attach the source code to the debugger so that I can seamlessly jump to internal NB source code. Normally I would edit the Library configuration to tell NB where to find the source code, and it would just work. However this is not possible for NetBeans Modules; when I look at the Utilities API module dependency it does not look like a normal NB library and there is nowhere to add in the source code. I suspect that if I were to rebuild my project using Maven this would work automatically. But thats a terrible reason to switch to maven. How can I get the NB Platform Source code included into my Module Dependencies ?

    Read the article

  • margin between content and div overflow scrollbar

    - by ben
    I am using the following bits of code to keep my menu items fixed while allowing for the scrolling of content because it seems to be the most stable method across all browsers. body { overflow: hidden; } div.content { height: 100%; overflow: auto; } My problem is simple, and yet I can not seem to figure it out, the content inside the tag butts up against the scrollbar for the div area and it makes reading much more difficult. How can I get a margin between them (apart from floating a transparent image to the right to create space, there HAS to be a better way)?

    Read the article

< Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >