Search Results

Search found 928 results on 38 pages for 'mr anderson'.

Page 10/38 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Fixing parent controller's elements after screen orientation

    - by Jonas Anderson
    I have a tab bar application with mixed orientation support for only some views. One of the child view controller shown from one of the tab's navigation controller is displayed only in Landscape mode. In order to accomplish this, I've done the view transformation for the child view as suggested here: Is there a documented way to set the iPhone orientation? The only problem I'm seeing is that after I've performed the orientation adjustment for the child controller and then readjusted orientation back to normal on its dismissal, the contents of the (parent) navigation controller is still shown with Landscape mode dimensions despite the navigation controller reporting the correct value for the interfaceOrientation. How do I ensure that view's size is reset to match the orientation without hardcoding screen dimensions? I have the following in the root navigation controller's viewWillAppear (invoked after the child controller is dismissed): - (void)viewWillAppear:(BOOL)animated { NSLog(@"viewFrame: (%2f, %2f), width: %2f, height: %2f\n", self.view.frame.origin.x, self.view.frame.origin.y, self.view.frame.size.width, self.view.frame.size.height); // Frame values are (0, 0) for (x,y) width: 320, height: 367 before I // displayed child controller. // Frame values are (0,0) width: 480, height: 219 after returning from child // controller -- still has the landscape dimensions NSLog(@"orientation: %d", self.interfaceOrientation); // reports portrait as expected } I've tried to invoke 'layoutIfNeeded' as well as 'setNeedsDisplay' on the view but neither of them bring the view contents into the correct display. Any suggestions would be greatly appreciated.

    Read the article

  • Server -> Desktop Push API

    - by Rich Anderson
    Hi I am looking for solution which can push automatically a certain event (let's say RSS message) realtime to a desktop user. A toolbar app or a desktop (growl like) will be super for this push. I have looked at few options but cannot find much info on these kind of apps. I have looked at conduit - it sucks as there is lot of other fancy options which I am not interested in offering to users. Please let me know. Thanks.

    Read the article

  • How can I prevent a ToggleButton from being Toggled without setting IsEnabled=False

    - by Bryan Anderson
    I have a list of ToggleButtons being used as the ItemTemplate in a ListBox similar to this answer using the MultiSelect mode of the Listbox. However I need to make sure at least one item is always selected. I can get the proper behavior from the ListBox by just adding an item back into the ListBox's SelectedItems collection on the ListBox.SelectionChanged event but my ToggleButton still moves out of its toggled state so I think I need to stop it earlier in the process. I would like to do it without setting IsEnabled="False" on the last button Selected because I'd prefer to stay with the Enabled visual style without having to redo my button templates. Any ideas?

    Read the article

  • jQuery('body').text() gives different answers in different browsers

    - by Charles Anderson
    My HTML looks like this: <html> <head> <title>Test</title> <script type="text/javascript" src="jQuery.js"></script> <script type="text/javascript"> function init() { var text = jQuery('body').text(); alert('length = ' + text.length); } </script> </head> <body onload="init()">0123456789</body> </html> When I load this in Firefox, the length is reported as 10. However, in Chrome it's 11 because it thinks there's a linefeed after the '9'. In IE it's also 11, but the last character is an escape. Meanwhile, Opera thinks there are 12 characters, with the last two being CR LF. If I change the body element to include a span: <body onload="init()"><span>0123456789</span></body> and the jQuery call to: var text = jQuery('body span').text(); then all the browsers agree that the length is 10. Clearly it's the body element that's causing the issue, but can anyone explain exactly why this is happening? I'm particularly surprised because the excellent jQuery is normally browser-independent.

    Read the article

  • Require Integer Value not Memory Address whilst avoiding Invalid receiver type compiler warning

    - by Dave Anderson
    I have the following code; int days = [[SettingsUtils daysToRetainHistory] intValue]; [retainHistory setText:[NSString stringWithFormat:@"Days to retain History: %d", days]]; [daysToRetainHistory setValue:days animated:NO]; where [SettingsUtils daysToRetainHistory] is as follows; + (int) daysToRetainHistory { return (int)[[NSUserDefaults standardUserDefaults] objectForKey:@"CaseBaseDaysToRetainHistory"]; } I get the compiler warning Invalid receiver type 'int' because I call intValue on an int but unless I do this I can't seem to get the integer value out and always end up with the memory address i.e. 98765432 instead of 9 which ruins the UILabel display [retainHistory] and the UISlider [daysToRetainHistory] value. How do I avoid the compiler warning and still get my integer value in the label and the necessary float value for setting the UISlider value?

    Read the article

  • JavaScript regular expression literal persists between function calls

    - by Charles Anderson
    I have this piece of code: function func1(text) { var pattern = /([\s\S]*?)(\<\?(?:attrib |if |else-if |else|end-if|search |for |end-for)[\s\S]*?\?\>)/g; var result; while (result = pattern.exec(text)) { if (some condition) { throw new Error('failed'); } ... } } This works, unless the throw statement is executed. In that case, the next time I call the function, the exec() call starts where it left off, even though I am supplying it with a new value of 'text'. I can fix it by writing var pattern = new RegExp('.....'); instead, but I don't understand why the first version is failing. How is the regular expression persisting between function calls? (This is happening in the latest versions of Firefox and Chrome.) Edit Complete test case: <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-type" content="text/html;charset=UTF-8"> <title>Test Page</title> <style type='text/css'> body { font-family: sans-serif; } #log p { margin: 0; padding: 0; } </style> <script type='text/javascript'> function func1(text, count) { var pattern = /(one|two|three|four|five|six|seven|eight)/g; log("func1"); var result; while (result = pattern.exec(text)) { log("result[0] = " + result[0] + ", pattern.index = " + pattern.index); if (--count <= 0) { throw "Error"; } } } function go() { try { func1("one two three four five six seven eight", 3); } catch (e) { } try { func1("one two three four five six seven eight", 2); } catch (e) { } try { func1("one two three four five six seven eight", 99); } catch (e) { } try { func1("one two three four five six seven eight", 2); } catch (e) { } } function log(msg) { var log = document.getElementById('log'); var p = document.createElement('p'); p.innerHTML = msg; log.appendChild(p); } </script> </head> <body><div> <input type='button' id='btnGo' value='Go' onclick='go();'> <hr> <div id='log'></div> </div></body> </html> The regular expression continues with 'four' as of the second call on FF and Chrome, not on IE7 or Opera.

    Read the article

  • SQL join from multiple tables

    - by Kenny Anderson
    Hi all We've got a system (MS SQL 2008 R2-based) that has a number of "input" database and a one "output" database. I'd like to write a query that will read from the output DB, and JOIN it to data in one of the source DB. However, the source table may be one or more individual tables :( The name of the source DB is included in the output DB; ideally, I'd like to do something like the following (pseudo-SQL ahoy) SELECT output.UID, output.description, input.data from output.dbo.description LEFT JOIN (SELECT input.UID, input.data FROM [output.sourcedb].dbo.datatable ) AS input ON input.UID=output.UID Is there any way to do something like the above - "dynamically" specify the database and table to be joined on for each row in the query?

    Read the article

  • Linq Query ignore empty parameters

    - by Cj Anderson
    How do I get Linq to ignore any parameters that are empty? So Lastname, Firstname, etc? If I have data in all parameters it works fine. refinedresult = From x In theresult _ Where x.<thelastname>.Value.TestPhoneElement(LastName) Or _ x.<thefirstname>.Value.TestPhoneElement(FirstName) Or _ x.<id>.Value.TestPhoneElement(Id) Or _ x.<number>.Value.TestPhoneElement(Telephone) Or _ x.<location>.Value.TestPhoneElement(Location) Or _ x.<building>.Value.TestPhoneElement(building) Or _ x.<department>.Value.TestPhoneElement(Department) _ Select x Public Function TestPhoneElement(ByVal parent As String, ByVal value2compare As String) As Boolean 'find out if a value is null, if not then compare the passed value to see if it starts with Dim ret As Boolean = False If String.IsNullOrEmpty(parent) Then Return False End If If String.IsNullOrEmpty(value2compare) Then Return ret Else ret = parent.ToLower.StartsWith(value2compare.ToLower.Trim) End If Return ret End Function

    Read the article

  • How can I track down these Firefox warning messages?

    - by Charles Anderson
    Since I upgraded to jQuery 1.4.4 I've been getting several new warning messages when I run my unit tests in Firefox 3.6.13. Here's a typical one: Warning: Unexpected token in attribute selector: '!'. Source File: http://localhost/unitTests/devunitTests.html Line: 0 Or the even more useful: Warning: Selector expected. Source File: http://localhost/unitTests/ui/editors/iframe2.html?test=15 Line: 0 The web page renders nicely, and all my JavaScript code seems to be running okay too, so I'm reluctant to spend a potentially large amount of time chopping away at my code to track these messages down. However, can anyone suggest what's provoking the warnings?

    Read the article

  • d3 tree - parents having same children

    - by Larry Anderson
    I've been transitioning my code from JIT to D3, and working with the tree layout. I've replicated http://mbostock.github.com/d3/talk/20111018/tree.html with my tree data, but I wanted to do a little more. In my case I will need to create child nodes that merge back to form a parent at a lower level, which I realize is more of a directed graph structure, but would like the tree to accomodate (i.e. notice that common id's between child nodes should merge). So basically a tree that divides like normal on the way from parents to children, but then also has the ability to bring those children nodes together to be parents (sort of an incestual relationship or something :)). Asks something similar - How to layout a non-tree hierarchy with D3 It sounds like I might be able to use hierarchical edge bundling in conjunction with the tree hierarchy layout, but I haven't seen that done. I might be a little off with that though.

    Read the article

  • Android - Looping Activity to Repeat MediaPlayer

    - by Austin Anderson
    I'm trying to create a soundboard for longer audio files and can't figure out how to stop an audio file and start it again without closing the activity. Let's say each audio file is one minute long. If I play the first audio file for 20 seconds and start the next audio file, the first stops playing and the second starts playing. However, if I click the first audio file again, the second stops playing and the first does not. I need help. This is driving me insane. bAudio1 = (ImageButton) findViewById(R.id.bAudio1); bAudio2 = (ImageButton) findViewById(R.id.bAudio2); mpAudio1 = MediaPlayer.create(this, R.raw.audio1); mpAudio2 = MediaPlayer.create(this, R.raw.audio2); bAudio1.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if(mpAudio1.isPlaying()) { mpAudio1.stop(); } else { if(mpAudio2.isPlaying()) { mpAudio2.stop(); } mpAudio1.start(); } } }); bAudio2.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if(mpAudio2.isPlaying()) { mpAudio2.stop(); } else { if(mpAudio1.isPlaying()) { mpAudio1.stop(); } mpAudio2.start(); } } }); Thanks.

    Read the article

  • How can I break if gdb is attached, but continue if it is not?

    - by Michael Anderson
    I have some debugging code that if executed while running with GBD attached should break the execution of the application, but if GDB is not running it should continue. The code I'm working with looks something like this in structure: try { if( some_complex_expression ) { gdb_should_berak_here(); do_some_stuff(); throw MyException(); } } catch( const MyException & e ) { handle_exception_and_continue(); } What should gdb_should_break_here be?

    Read the article

  • Detecting Handlers of a jQuery "Live" Event

    - by Anderson De Andrade
    Using: $('#foo').data('events').click We are able to access an iterative object of click handlers added to the element '#foo' but only when they were added with .bind() Is there a way to get the handlers for an event added with .live()? Is there any other way to know if an element has a click handler assigned?

    Read the article

  • Push alerts to notification tray app in Java

    - by Rich Anderson
    Hi - how do I push server alerts to tray apps in java without using xmpp or other heavy protocols? Do you recommend a way to accomplish this? I was planning to write an app which uses URLConnection on a server equipped with Comet but I doubt if that would work as the client requires a JS to be invoked and URLConnection is not a browser.. What is the best way to push instead of using a proprietary client-server approach?

    Read the article

  • Sharepoint 2010 - One or more services have started or stopped unexpectedly

    - by Mr Shoubs
    Does anyone know why I keep getting the following message in Sharepoint 2010 review problems and solutions list: The following services are managed by SharePoint, but their running state does not match what SharePoint expects: SPAdminV4. This can happen if a service crashes or if an administrator starts or stops a service using a non-SharePoint interface. If SharePoint-managed services do not match their expected running state, SharePoint will be unable to correctly distribute work to the service. Failing Services: SPTimerService (SPTimerV4) I assume this is referring to Sharepoint 2010 Timer Service but I can only see this in the services msc (and it is running), not in the Application Management > Manage services on server. Does anyone know why this keeps occurring and how I can stop it? Note - I looked in the event log and all I can see is that same error.

    Read the article

  • What does pidgin mean by "Host unknown"?

    - by Mr. Jefferson
    Pidgin is telling me my XMPP account was disconnected; the error message is "Host Unknown". What specifically does this indicate? Can it not find the server it's supposed to connect to (one in my office)? I can ping the server in the "Domain" account setting (under Basic) without a problem, and I even tried specifying an IP address in the "Connect server" account setting (under Advanced) without success.

    Read the article

  • How can I disable Lumension Sanctuary

    - by Mr. Flibble
    I'm an administrator on my computer but I can't work out how to uninstall/disable Lumension Sanctuary. There is no Uninstall button in the uninstall programs list. I've disabled the service (Sanctuary command and control) but it's had no effect. Any ideas? I'm on Windows XP BTW.

    Read the article

  • How to change cpufreq settings in Kubuntu

    - by Mr Woody
    I have been using Kubuntu, and I would like to change the cpufreq settings. My understanding is that there is no applet for that, and I would have to do it with a script. So I run a command like this: sudo cpufreq-set -g userspace -c 0 -d 800Mhz -u 1200Mhz and when I type cpufreq-info, I get cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009 Report errors and bugs to [email protected], please. analyzing CPU 0: driver: acpi-cpufreq CPUs which run at the same hardware frequency: 0 1 CPUs which need to have their frequency coordinated by software: 0 maximum transition latency: 10.0 us. hardware limits: 800 MHz - 2.50 GHz available frequency steps: 2.50 GHz, 2.50 GHz, 2.00 GHz, 1.60 GHz, 1.20 GHz, 800 MHz available cpufreq governors: conservative, ondemand, userspace, powersave, performance current policy: frequency should be within 800 MHz and 1.20 GHz. The governor "userspace" may decide which speed to use within this range. current CPU frequency is 1.20 GHz. cpufreq stats: 2.50 GHz:70.06%, 2.50 GHz:0.97%, 2.00 GHz:4.85%, 1.60 GHz:0.35%, 1.20 GHz:2.89%, 800 MHz:20.88% (193873) analyzing CPU 1: driver: acpi-cpufreq CPUs which run at the same hardware frequency: 0 1 CPUs which need to have their frequency coordinated by software: 1 maximum transition latency: 10.0 us. hardware limits: 800 MHz - 2.50 GHz available frequency steps: 2.50 GHz, 2.50 GHz, 2.00 GHz, 1.60 GHz, 1.20 GHz, 800 MHz available cpufreq governors: conservative, ondemand, userspace, powersave, performance current policy: frequency should be within 2.00 GHz and 2.00 GHz. The governor "performance" may decide which speed to use within this range. current CPU frequency is 2.00 GHz. cpufreq stats: 2.50 GHz:83.43%, 2.50 GHz:1.03%, 2.00 GHz:4.28%, 1.60 GHz:0.01%, 1.20 GHz:1.74%, 800 MHz:9.50% (3208) which shows that everything worked well (on cpu 0). The problem is that if I run cpufreq-info again after few minutes I get cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009 Report errors and bugs to [email protected], please. analyzing CPU 0: driver: acpi-cpufreq CPUs which run at the same hardware frequency: 0 1 CPUs which need to have their frequency coordinated by software: 0 maximum transition latency: 10.0 us. hardware limits: 800 MHz - 2.50 GHz available frequency steps: 2.50 GHz, 2.50 GHz, 2.00 GHz, 1.60 GHz, 1.20 GHz, 800 MHz available cpufreq governors: conservative, ondemand, userspace, powersave, performance current policy: frequency should be within 800 MHz and 800 MHz. The governor "performance" may decide which speed to use within this range. current CPU frequency is 800 MHz. cpufreq stats: 2.50 GHz:69.73%, 2.50 GHz:0.97%, 2.00 GHz:4.83%, 1.60 GHz:0.35%, 1.20 GHz:2.92%, 800 MHz:21.20% (193880) analyzing CPU 1: driver: acpi-cpufreq CPUs which run at the same hardware frequency: 0 1 CPUs which need to have their frequency coordinated by software: 1 maximum transition latency: 10.0 us. hardware limits: 800 MHz - 2.50 GHz available frequency steps: 2.50 GHz, 2.50 GHz, 2.00 GHz, 1.60 GHz, 1.20 GHz, 800 MHz available cpufreq governors: conservative, ondemand, userspace, powersave, performance current policy: frequency should be within 800 MHz and 800 MHz. The governor "performance" may decide which speed to use within this range. current CPU frequency is 800 MHz. cpufreq stats: 2.50 GHz:82.94%, 2.50 GHz:1.03%, 2.00 GHz:4.33%, 1.60 GHz:0.01%, 1.20 GHz:1.73%, 800 MHz:9.96% (3215) so it looks like some other process changed the settings. Does anyone know how to fix this? I also tried many different settings, but I get similar behavior.

    Read the article

  • Use synergy with Physical KVM

    - by Mr. Man
    I am using synergy on a Linux Mint computer as the server with a Mac as the client. I also have a physical KVM switch. The problem I have is that when ever I switch the physical KVM to my Mac, synergy stops working as in the keyboard and mouse don't work with the Mac. Thanks in advance! EDIT: here are some logs: From the Mint machine: INFO: synergys.cpp,1042: Synergy server 1.3.1 on Linux 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686 DEBUG: synergys.cpp,1051: opening configuration synergy.conf DEBUG: synergys.cpp,1062: configuration read successfully DEBUG: CXWindowsScreen.cpp,847: XOpenDisplay(:0.0) DEBUG: CXWindowsScreenSaver.cpp,339: xscreensaver window: 0x00000000 DEBUG: CXWindowsScreen.cpp,117: screen shape: 0,0 1024x768 DEBUG: CXWindowsScreen.cpp,118: window is 0x03800004 DEBUG: CScreen.cpp,38: opened display DEBUG: CXWindowsScreen.cpp,679: registered hotkey F12 (id=efc9 mask=0000) as id=1 NOTE: synergys.cpp,500: started server INFO: CServer.cpp,1141: screen ubuntu shape changed NOTE: CClientListener.cpp,127: accepted client connection DEBUG: CClientProxy1_0.cpp,404: received client marks-mac.local info shape=-1024,0 2304x800 NOTE: CServer.cpp,278: client mac has connected INFO: CServer.cpp,447: switch from ubuntu to mac at -1024,393 INFO: CScreen.cpp,116: leaving screen DEBUG: CXWindowsClipboard.cDEBUG: CXWindowsClipboard.cDEBUG: CXWindowsClipboard.cDEBUG: CXWindowsClipboard.cDEBUG: CXWindowsClipboard.cDEBUG: CXWinavDEBUG: CXWindowsClipboard.cDEBUG: CXWindowsClipboard.cDEBUG302)DEBUG: CXWindowsClipboard.cDEBUG: CXWindowsClipboard.cDE47DEBUG: CXWindowsClipboard.cDEBUG: CXWindowsrset=utf-8 (633), text/plain (462) DEBUG: CXWindowsClipboard.cpp,555: added fDEBUG: CXWindowsClipboard.cpp,555: added f DEBUG: CXWindCXWDEBUG: CXWindowsClipboard.cpp,555: added fDEBUG:SerDEBUG: CXWindowsClipboard.cpp,555: ed DEBUG: CXWindowsClipboard.cpp,555: added fDEBUG: CXWindowsClipboard.cpp,555owsClDEBUG: CXWindowsClipboard.cpp,555: 1DEBUG: CXWindowsClipboard.cpp,555: added fDEBUG: getDEBUG: CXWindowsClipboard.cpp,555: added f DEBUG: CXW8_STDEBUG: CXWindowsClipboard.cpp,555: added fDEBUG: CXWindowsClipboard.cpp,555: added fD textDEBUG: CXWindowsClipboard.cpp,555: added fDEBU DEBUG: CXWindowsClipboard.cpp,555: added fDEBUG: CXWindowsClipinDEBUG: CXWindowsClipboard.cpp,555:oardDEBUG: CXWindowsClipboard.cpp,555: added fDEBUG: CXWindowsClipboard.cpp,555: added fDEBUG: CXWindCXWDEBUG: CXWindowsClipboard.cpp,555: added fDEBUG:SerDEBUG: CXWindowsClipboard.cpp,555: ed DEBUG: CXWindowsClipboard.cpp,555: added fDEBUG: CXWindowsClipboard.cpp,555owsClDEBUG: CXWindowsClipboard.cpp,555: 1DEBUG: CXWindowsClipboard.cpp, s From the Mac: connecting to '192.168.3.5': 192.168.3.5:24800 connected to server entering screen leaving screen entering screen leaving screen stopped client

    Read the article

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