Search Results

Search found 4643 results on 186 pages for 'john bergman'.

Page 110/186 | < Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >

  • Faking a UITableView selection

    - by John Smith
    I have a UITableView where a selection displays some cool stuff in another part of the display. I tried to fake a keypress by writing: NSIndexPath *ip = [NSIndexPath indexPathForRow: 1 inSection:0]; [tableView selectRowAtIndexPath:ip animated:NO scrollPosition:UITableViewScrollPositionTop ]; [self tableView:tableView didSelectRowAtIndexPath:ip]; However it seems the last line is not being run. How can I make it run?

    Read the article

  • Ruby string encoding problem

    - by John Prideaux
    I've looked at the other ruby/encoding related posts but haven't been able to figure out why the following is not working. Likely just because I'm dense, but here's the situation. Using Ruby 1.9 on windows. I have a set of CSV files that need some data appended to the end of each line. Whenever I run my script, the appended characters are gibberish. The input text appears to be IBM437 encoding, whereas my string I'm appending starts as US-ASCII. Nothing I've tried with respect to forcing encoding on the input strings or the append string seems to change the resultant output. I'm stumped. The current encoding version is simply the last that I tried. def append_salesperson(txt, salesperson) if txt.length > 2 return txt.chomp.force_encoding('US-ASCII') + %(, "", "", "#{salesperson}") end end salespeople = Hash[ "fname", "Record Manager"] outfile = File.open("ActData.csv", "w:US-ASCII") salespeople.each do | filename, recordManager | infile = File.open("#{filename}.txt") infile.each do |line| outfile.puts append_salesperson(line, recordManager) end infile.close end outfile.close

    Read the article

  • Need to tab out of ActiveX control in browser

    - by John Donoghue
    When tabbing through controls in an ActiveX control hosted in IE, once I get to the last control the tab key no longer does anything. I would like it to move the focus outside the ActiveX control to the next html control. This works fine when the ActiveX control is hosted in a WinForms app, does anybody know how to make this work in the browser? It may also be relevant that the ActiveX control is a simple wrapper around a WPF control.

    Read the article

  • oracle collection not enough values

    - by john
    I did following: create or replace type my_row as object ( lname varchar2(30), fname varchar2(30), MI char(1), hohSSN char (9), hohname VARCHAR2(63), hohDob char(10), dob DATE ); create or replace type eiv.my_rec as table of eiv.my_row; but then doing query like: my_records my_rec select '', '', '', '', '', '', sysdate bulk collect into my_records from dual; gives error ORA-00947: not enough values what can i be doing wrong here?

    Read the article

  • CSS center in IE6, 7, and 8

    - by John
    This code works for IE7 and 8 but not for 6. How can I get it to work for 6. Or is there a better way to do it? #contentLoading { width:90px; height: 90px; position: fixed; top: 50%; left: 50%; background:url(_img/ajax-loader4.gif) no-repeat center #fff; text-align:center; padding:10px; font:normal 16px Tahoma, Geneva, sans-serif; border:2px solid #666; margin-left: -50px; margin-top: -50px; z-index:2; overflow: auto; }

    Read the article

  • SlideUp a div if any other div is slided down with jQuery

    - by John
    I have made a function to slidedown different div's by clicking different links. Following is basic code. However, there's a little problem that, for example, if i click on first link, it slides down div. Now If i click on next link, it keeps the first div, and slides down the second div. However I want to do it so that, if there is any div slided down, and I click on any link, it should slide up the previous div and slide down the newer one. I will appriciate your help in this regard. Thanks. $("a.about").click(function(){ $("#about").slideDown("slow"); }); $("a.info").click(function(){ $("#info").slideDown("slow"); }); $("a.contact").click(function(){ $("#contact").slideDown("slow"); });

    Read the article

  • Android Calendar API vs Calendar Provider API

    - by John Roberts
    I'm a little bit confused about the difference between the two. An example of the Calendar API is supposedly located here: http://samples.google-api-java-client.googlecode.com/hg/calendar-android-sample/instructions.html, but the author himself suggests using the Calendar Provider API, details about which are here: http://developer.android.com/guide/topics/providers/calendar-provider.html. Can someone explain to me the difference between the two, and which would be better for me to use for a simple calendar app?

    Read the article

  • Passing data attribute to TextBoxFor not working

    - by john G
    I have the following code inside my ASP.NET MVC 4 razor view: <div> <span class="f">Old Tag</span> @Html.TextBoxFor(model => model.olfTag, new { data_autocomplete_source = Url.Action("AutoComplete", "Home") }) @Html.ValidationMessageFor(model => model.olfTag) </div> But data_autocomplete_source with TextBoxFor will not work. Can anyone give me some advice?

    Read the article

  • REGEX to extract word connected to nearest semicolon?

    - by John Kaybern
    I'm attempting to extract a series of data values from a text file. The values are in the format: <MODIFIER NAME1 VALUE; MODIFIER NAME2 VALUE;> For the purposes of the current task that I have, I only care about extracting the VALUE that is situated next to each semicolon. What would the REGEX command look like that would isolate each of these VALUES (preferably so that I backreference all values in the replacement part of my processing.) I believe that ^(.*?); is somehow used, but I'm not seeing how to isolate only the word that is attached to the semicolon in a group for backreference use. Thanks!

    Read the article

  • whats wrong with this peace of code for saving contacts

    - by Shadow
    Hi, i am using the latest Nokia Qt SDK. i have tried to add the contacts, its not getting added.. what is missing here.. // Construct contact manager for default contact backend QContactManager* cm = new QContactManager("simulator"); // QContactManager* cm = new QContactManager("memory"); // i tried this, its also not working // Create example contact QContact example; // Add contact name QContactName name; name.setFirstName("John"); name.setLastName("Doe"); example.saveDetail(&name); // Add contact email address //QContactEmailAddress email; // email.setContexts(QContactDetail::ContextHome); //email.setEmailAddress(“[email protected]”); // example.saveDetail(&email); // Finally, save the contact details cm->saveContact(&example); delete cm; Thanks

    Read the article

  • C# = assigning custom objects to array with a for loop?

    - by John M
    Given this example: // Create an arary of car objects. car[] arrayOfCars= new car[] { new car("Ford",1992), new car("Fiat",1988), new car("Buick",1932), new car("Ford",1932), new car("Dodge",1999), new car("Honda",1977) }; I tried something like this: for (int i = 0; i < dtable.Rows.Count; i++) { DataRow drow = dtable.Rows[i]; arrayOfCars[] = new car(drow["make"].ToString(), drow["year"].ToString()); } How do I add additional data to the array while looping through a datatable?

    Read the article

  • C# Multiple constraints

    - by John
    I have an application with lots of generics and IoC. I have an interface like this: public interface IRepository<TType, TKeyType> : IRepo Then I have a bunch of tests for my different implementations of IRepository. Many of the objects have dependencies on other objects so for the purpose of testing I want to just grab one that is valid. I can define a separate method for each of them: public static EmailType GetEmailType() { return ContainerManager.Container.Resolve<IEmailTypeRepository>().GetList().FirstOrDefault(); } But I want to make this generic so it can by used to get any object from the repository it works with. I defined this: public static R GetItem<T, R>() where T : IRepository<R, int> { return ContainerManager.Container.Resolve<T>().GetList().FirstOrDefault(); } This works fine for the implementations that use an integer for the key. But I also have repositories that use string. So, I do this now: public static R GetItem<T, R, W>() where T : IRepository<R, W> This works fine. But I'd like to restrict 'W' to either int or string. Is there a way to do that? The shortest question is, can I constrain a generic parameter to one of multiple types?

    Read the article

  • Jquery attach show event to select option

    - by John
    Hi, I have a select form element with 5 options. If option 2 is selected I want to display another form input box (this has a style of display:none initially). How can I attach an event to option 2 so that whenever it is selected the input box is shown otherwise it is hidden. I have this currently but this does not handle is option 2 is already selected when the page loads $('#type').change(function(){ var typeSelected = $(this).val(); if (typeSelected == 2) { $('#extraInput').show(); } }); I know I could add another bit of code which checks what is selected on page load but wondered if there was a neater way of doing this. Also something that could handle the hiding of the input box if option 2 is not selected at the start as currently I have just hard-coded style="display:none" onto the input box but I would prefer this to be dynamic. Thanks

    Read the article

  • Visual Studio 2008 patching without suppressing database

    - by John
    Hi, I made a program using visual c# which connects to a local .mdf sql database. I've published it using the Publish Wizard, used the files on another computer to install it and it worked fine. However, some bugs were discovered. I've corrected the problems, published it again and tried to patch the program on the 2nd computer. After much trials and errors, fastest way to patch is to overwrite the .application file. Suprisingly, the database was also overwritten. Question is: How do I make new version of the program and install it on the other computer without modifying the database? On developping computer, database appears as a .mdf file which can be copied, but on 2nd computer this file does not exists. Supplementary info: -Developping computer: Vista, using Visual Studio 2008 with Server 2005 -2nd computer: XP using microsoft express server 2005

    Read the article

  • GPL and hosted services

    - by John
    As I understand it GPL says you only have to distribute derivative code for works you distribute, i.e. if you develop internal software you can keep your code private. What happens if you develop a server application, say like Facebook or StackOverflow? The server app is not 'distributed' so what's the situation with your code in this case?

    Read the article

  • CreateProcess() fails with an access violation

    - by John Doe
    My aim is to execute an external executable in my program. First, I used system() function, but I don't want the console to be seen to the user. So, I searched a bit, and found CreateProcess() function. However, when I try to pass a parameter to it, I don't know why, it fails. I took this code from MSDN, and changed a bit: #include <windows.h> #include <stdio.h> #include <tchar.h> void _tmain( int argc, TCHAR *argv[] ) { STARTUPINFO si; PROCESS_INFORMATION pi; ZeroMemory( &si, sizeof(si) ); si.cb = sizeof(si); ZeroMemory( &pi, sizeof(pi) ); /* if( argc != 2 ) { printf("Usage: %s [cmdline]\n", argv[0]); return; } */ // Start the child process. if( !CreateProcess( NULL, // No module name (use command line) L"c:\\users\\e\\desktop\\mspaint.exe", // Command line NULL, // Process handle not inheritable NULL, // Thread handle not inheritable FALSE, // Set handle inheritance to FALSE 0, // No creation flags NULL, // Use parent's environment block NULL, // Use parent's starting directory &si, // Pointer to STARTUPINFO structure &pi ) // Pointer to PROCESS_INFORMATION structure ) { printf( "CreateProcess failed (%d).\n", GetLastError() ); return; } // Wait until child process exits. WaitForSingleObject( pi.hProcess, INFINITE ); // Close process and thread handles. CloseHandle( pi.hProcess ); CloseHandle( pi.hThread ); } However, this code crated access violation somehow. Can I execute mspaint without showing user the console? Thank you very much.

    Read the article

  • using 'or' operator not working for menu

    - by John Wilkes
    In my code here, I have a CSS class called "active" which I use if the $_GET['page'] == tutorials, php, mysql, etc... The problem is, even if the 'page' variable is not equal to any of these values, the Tutorials button in this case is still active for some reason. Any ideas why this would be happening? Am I using the 'or' (||) operand incorrectly? <?php if($_GET['page'] == 'tutorials' || 'php' || 'mysql' || 'html' || 'css' || 'js') { ?> <li class="active"> <?php } else { ?> <li> <?php } ?> <a href="index.php?page=tutorials">Tutorials</a> <ul> <li><a href="index.php?page=php">PHP</a></li> <li><a href="index.php?page=mysql">MySQL</a></li> <li><a href="index.php?page=html">HTML</a></li> <li><a href="index.php?page=css">CSS</a></li> <li><a href="index.php?page=js">JS</a></li> </ul> </li>

    Read the article

  • How to disable dragging from a Rich Edit Control

    - by John
    I use a subclass of CRichEditCtrl to provide a CEdit+ type control. One thing I want is to disable drag-drop functionality, which the base class provided by default. Disabling dropping is easy: ::RevokeDragDrop(m_hWnd); But I can't see a simple way to disable the control being a drag-source. Is there an easy way?

    Read the article

  • MySQL Math - Is it possible to calculate a correlation in a query?

    - by John M
    In a MySQL (5.1) database table there is data that represents: how long a user takes to perform a task and how many items the user handled during the task. Would MySQL support correlating the data or do I need to use PHP/C# to calcuate? Where would I find a good formula to calculate correlation (it's been a long time since I last did this)?

    Read the article

  • Color Themes for Eclipse?

    - by John Stauffer
    I am a recovering Emacs user, who is trying to ease into Eclipse usage. (Since I'm encouraging the rest of the team to use it, I guess I should at least try to get along). My current excuse is that it hurts my eyes. I'm currently using the excellent zenburn theme in emacs, and would love to find it for eclipse. However, I find that changing my color theme every few months makes for a great way to procrastinate, so ideally I'd like to find a repository for eclipse color themes. There don't appear to be any eclipse themes indexed by Google, so all the great themes must be sitting on your hard disk somewhere. Please share them. Thanks

    Read the article

  • Best way to code a webservice in weblogic?

    - by John
    I am new to Weblogic and J2ee. I need to build a webservice that simply runs a query on the backend database (DB2 zOS) and returns the results. Being new to this I have a few questions. 1) What is the best way to build the webservice? 2) How do I connect to the database with weblogic. 3) Is there a way to cache the data returned so that the next request for the same data is pulled from cache? If googled for this but there seems to be many way to handle this. I am looking for the best way that can handle a high volume of requests. Any links to sample code would be helpful. - Thanks

    Read the article

< Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >