Search Results

Search found 1012 results on 41 pages for 'josh bush'.

Page 29/41 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Connecting ipad to external monitor

    - by Josh P.
    I am trying to connect my ipad app to an external screen using the following (not checking the correct resolution for no - just want it up and running). - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [window addSubview:[navigationController view]]; if ([[UIScreen screens] count] > 1) { window.screen = [[UIScreen screens] objectAtIndex:1]; } [window makeKeyAndVisible]; return YES; } Is this supposed to redirect everything to the external monitor? How dows it work with touches/gestures? I see in the Apple apps, the controls etc are left on the ipad screen...

    Read the article

  • Fluent NHibernate Column Mapping with Reserved Word

    - by Josh Close
    I've read that using a back tick ` should allow for using of reserved words. I'm using SQL Server and Fluent NHibernate and have a column name "File". If I map it with "`File" it tries using [Fil] so it's adding the brackets correctly, but dropping the "e" from the end. If I map it as "`Filee" it uses [File] correctly. Am I doing something wrong or is this a bug in NHibernate or Fluent Nhibernate?

    Read the article

  • Is it possible to parameterize a MEF import?

    - by Josh Einstein
    I am relatively new to MEF so I don't fully understand the capabilities. I'm trying to achieve something similar to Unity's InjectionMember. Let's say I have a class that imports MEF parts. For the sake of simplicity, let's take the following class as an example of the exported part. [Export] [PartCreationPolicy(CreationPolicy.NonShared)] public class Logger { public string Category { get; set; } public void Write(string text) { } } public class MyViewModel { [Import] public Logger Log { get; set; } } Now what I'm trying to figure out is if it's possible to specify a value for the Category property at the import. Something like: public class MyViewModel { [MyImportAttribute(Category="MyCategory")] public Logger Log { get; set; } } public class MyOtherViewModel { [MyImportAttribute(Category="MyOtherCategory")] public Logger Log { get; set; } } For the time being, what I'm doing is implementing IPartImportsSatisfiedNotification and setting the Category in code. But obviously I would rather keep everything neatly in one place.

    Read the article

  • T-SQL Better way to determine max of date (accounting for nulls)

    - by Josh
    I am comparing two dates and trying to determine the max of the two dates. A null date would be considered less than a valid date. I am using the following case statement, which works - but feels very inefficient and clunky. Is there a better way? update @TEMP_EARNED set nextearn = case when lastoccurrence is null and lastearned is null then null when lastoccurrence is null then lastearned when lastearned is null then lastoccurrence when lastoccurrence > lastearned then lastoccurrence else lastearned end; (This is in MS SQL 2000, FYI.)

    Read the article

  • Determining Excel spreadsheet format before Data Flow Task

    - by Josh Larsen
    I'm working on an SSIS package which uses a for each loop to iterate through excel files in a directory and a data flow task to import them. The issue I'm having is that the project manager I'm working with doesn't think the users will always follow the structure. So if a file is in the folder and the package tries to import it but the spreadsheet is missing columns or has extra columns it generates and error of course. Even though I have the task set to not fail the package; the package does indeed fail and then the other files aren't imported. So, I'm wondering what is the easiest way to either determine the spreadsheet is incorrectly formatted, or stop the error from failing the package execution? After taking said step I would just use a file copy task to move the file to a "Failure" folder. Then continue on processing the spreadsheets.

    Read the article

  • PHP/Javascript: Need help removing line break from code

    - by Josh K
    I am trying to get names from a .txt file. I am using file('filename.txt') but if i use a php for loop to try and trim the names, it comes out on multiple lines: This is the actual line that prints the javascript (NOTE: I am going to be putting these names into a select box, if you can fix the problem at hand the rest of the code should work so unless you a big problem with it you don't need to comment) <?php for($i=1; $i < 27; $i++){ echo "selbox.options[selbox.options.length] = new Option('".lines[$i]."','".$lines[$i]."');\n"; } ?> Heres how it comes out on the browser: selbox.options[selbox.options.length] = new Option('Djamal ABDOUN ','First1 Last1 '); selbox.options[selbox.options.length] = new Option('Chadli AMRI ','First2 Last2 '); I need those to be on one line so i dont get a unterminated string literal js error Any ideas on what i can do here? EDIT: Oh i should probably mention, the $lines var is initiated like this: $lines = file('filename.txt'); and inside that file i have formatted like this First1 Last1 First2 Last2 First3 Last3 etc. and i hit delete after each Last name until the next first name is touching, then hit enter to put it on a new line (Editor is notepad++)

    Read the article

  • Getting IBindingList Property to sort by

    - by Josh
    I've got a class called DatagridBoundList that implements CollectionBase and IBindingList. The implementation of IBindingList.ApplySort looks like this so far: void IBindingList.ApplySort(PropertyDescriptor property, ListSortDirection direction) { throw new NotSupportedException(); } I'm binding the DatagridBoundList to a DataGridView (winforms). When I reflect over the property parameter, I can't seem to find the name of the actual property that the list needs to be sorted by. What's the trick to finding out the name of the property to sort by?

    Read the article

  • string parsing and substring in c

    - by Josh
    I'm trying to parse the string below in a good way so I can get the sub-string stringI-wantToGet: const char *str = "Hello \"FOO stringI-wantToGet BAR some other extra text"; str will vary in length but always same pattern - FOO and BAR What I had in mind was something like: const char *str = "Hello \"FOO stringI-wantToGet BAR some other extra text"; char *probe, *pointer; probe = str; while(probe != '\n'){ if(probe = strstr("\"FOO")!=NULL) probe++ else probe = ""; // Nulterm part if(pointer = strchr(probe, ' ')!=NULL) pointer = '\0'; // not sure here, I was planning to separate it with \0's } Any help will be appreciate it.

    Read the article

  • Big, Thick Reference Books (PHP / MySQL / Unix) [closed]

    - by Josh K
    I'm looking for in-depth reference books / guides in PHP, MySQL, and Unix. I'm aware there other other questions pertaining to good books for short references of function names, or detailed beginner guides to these systems. I'm looking for something different. I want a book that I can either use as a quick but in-depth (decent write up, not a pocket reference guide) reference to common functions (JOINS, string manipulation, Regular Expressions, etc) while also providing a detailed inner workings explanation on the system itself.

    Read the article

  • Is it possible to use 'else' in a python list comprehension?

    - by Josh
    Here is the code I was trying to turn into a list comprehension: table = '' for index in xrange(256): if index in ords_to_keep: table += chr(index) else: table += replace_with Is there a way to add the else statement to this comprehension? table = ''.join(chr(index) for index in xrange(15) if index in ords_to_keep) Also, would I be right in concluding that a list comprehension is the most efficient way to do this?

    Read the article

  • Proper way to scan a range of IP addresses

    - by Josh G
    Given a range of IP addresses entered by a user (through various means), I want to identify which of these machines have software running that I can talk to. Here's the basic process: Ping these addresses to find available machines Connect to a known socket on the available machines Send a message to the successfully established sockets Compare the response to the expected response Steps 2-4 are straight forward for me. What is the best way to implement the first step in .NET? I'm looking at the System.Net.NetworkInformation.Ping class. Should I ping multiple addresses simultaneously to speed up the process? If I ping one address at a time with a long timeout it could take forever. But with a small timeout, I may miss some machines that are available. Sometimes pings appear to be failing even when I know that the address points to an active machine. Do I need to ping twice in the event of the request getting discarded? To top it all off, when I scan large collections of addresses with the network cable unplugged, Ping throws a NullReferenceException in FreeUnmanagedResources(). !? Any pointers on the best approach to scanning a range of IPs like this?

    Read the article

  • Best Method For Storing Values

    - by Josh streit
    Basically, I want to have a database that's lightweight and I won't need to install a million other things on my clients computers for them to access this. I just need a simple method of reading and writing values so that they're not hardcoded into the program. I could do MySQL (which is what I'm very familiar with), but it doesn't need to be making calls remotely. I would have less than 10 fields and one table, if that matters. Thanks!

    Read the article

  • Setting QTMovie attributes

    - by Josh Matthews
    I'm trying to create a QTVR movie via QTKit, and I've got all the frames in the movie. However, setting the attributes necessary doesn't seem to be having any effect. For example: NSNumber *val = [NSNumber numberWithBool:YES]; [fMovie setAttribute:val forKey:QTMovieIsInteractiveAttribute]; val = [NSNumber numberWithBool:NO]; [fMovie setAttribute:val forKey:QTMovieIsLinearAttribute]; If I then get the value of these attributes, they come up as NO and YES, respectively. The movie is editable, so I can't understand what I'm doing wrong here. How can I ensure that the attributes will actually change?

    Read the article

  • Convert XML to UDT in Oracle

    - by Josh
    Is there an easy way to convert an XMLType to a User Defined Type? I can convert the UDT to XMLType using the below. select SYS_XMLGEN(pUDT) into param2 from dual; I can't though, is find a function that takes that and turns it back into that UDT using the same mappings the SYS_XMLGEN used.

    Read the article

  • Help thinking "Pythony"

    - by Josh
    I'm brand new to Python and trying to learn it by replicating the following C++ function into python // determines which words in a vector consist of the same letters // outputs the words with the same letters on the same line void equivalentWords(vector <string> words, ofstream & outFile) { outFile << "Equivalent words\n"; // checkedWord is parallel to the words vector. It is // used to make sure each word is only displayed once. vector <bool> checkedWord (words.size(), false); for(int i = 0; i < words.size(); i++) { if (!checkedWord[i]){ outFile << " "; for(int j = i; j < words.size(); j++){ if(equivalentWords(words[i], words[j], outFile)) { outFile << words[j] << " "; checkedWord[j] = true; } } outFile << "\n"; } } } In my python code (below), rather than having a second vector, I have a list ("words") of lists of a string, a sorted list of the chars in the former string (because strings are immutable), and a bool (that tells if the word has been checked yet). However, I can't figure out how to change a value as you iterate through a list. for word, s_word, checked in words: if not checked: for word1, s_word1, checked1 in words: if s_word1 == s_word: checked1 = True # this doesn't work print word1, print "" Any help on doing this or thinking more "Pythony" is appreciated.

    Read the article

  • How should images be stored when multiple sizes are needed?

    - by Josh Curren
    What is the best way to store images? Currently when an image is uploaded I resize it to 3 different sizes (a thumbnail, a normal size, and a large size). I save in a database a description of the image, the format, and use the id number from the database as the image name. Each size image has its own directory. Should I be storing the images in the database? Should I only be storing the larger size and generate the thumbnail as needed? Or any other ideas you have?

    Read the article

  • Replacing deprecated <:< Manifest type witness in Scala 2.10

    - by Josh
    Can someone point me at what I should be doing under scala 2.10 in place of this deprecated type witness on Manifest? reflect.ClassManifest.singleType(foo) <:< barManifest Honestly, my goal here is just to replace it with something that doesn't raise a deprecation warning. I'm happy to use the new reflection API. Here's the code in question in context, if that's important: https://github.com/azavea/geotrellis/blob/master/src/main/scala/geotrellis/feature/op/geometry/geometry.scala#L45

    Read the article

  • Google App Engine - Document Editor Creation/Tap Into Google Docs?

    - by Josh Patton
    What is the best way to create a custom document editor in GAE? I'm making a website meant for a School Robotics Club (With support for any other organization - DRY). We currently use Google services for online collaboration, I'm wondering if there is a way to tap into Google Docs and allow users to edit a Google Document without using Google Accounts or the Google Doc interface. If that is not possible (I've researched and I don't think it is), what is the best way to make a document editor? I want it completely on the website I'm creating, so I'm assuming just some javascript editor like TinyMCE + Ajax + Datastore. Is their anything that replicates Google Doc's/Microsoft Offices's/OpenOffice.org's feature set as far as fonts, spacing, alignment, justification, etc.?

    Read the article

  • HTML IFrame Help

    - by Josh K
    Hey Few Questions 1.Is it legal to have an IFrame on a website which inside has an external website? 2.In an IFrame is it possible to only show a section of the src that isnt the top left of the site (for instance if there was a chart in the middle of a website, could u have just the chart in your Iframe, or atleast start it centred there) 3.Any way to stop my IFrame from auto redirecting me to the external site for 3: ie <iframe src="http://fifa.com"></iframe> Just sends me to fifa instead of actually showing that site in a frame.

    Read the article

  • Global Import Aliasing in .NET

    - by Josh Stodola
    Using import aliasing in a single class, we can reference class library namespaces by assigning our own custom alias like this: Imports Db = Company.Lib.Data.Objects And then we are able to reference the classes inside of Company.Lib.Data.Objects by using the Db alias that we assigned. Is it possible to do this at the global level so that the alias is applied to the entire solution instead of the given file? Currently, we are working with web applications, so I was hoping we could add something to web.config, but I am also interested in whether or not this is possible with windows forms, console apps, and/or class libraries.

    Read the article

  • Where is the VB.Net debugger "Make Object ID" function?

    - by Josh
    When using the visual studio 2008 debugger with c# i can right-click on a variable and choose "Make Object ID" which allows me to watch that object (via it's ID) regardless of whether it is in the current stack frame or not. When the debugger is in VB code, (doesnt matter if it's run from a c# unit test or a vb unit test) That option isn't there. Where did VB put this feature? Or does it simply not support it like so many other helpful c# features?

    Read the article

  • Regex Question..

    - by Josh
    Hello everyone- In my C# Console App I'm trying to use Regex to search a string to determine if there is a match or not. Below is my code but it is not quite working right so I will explain further. sSearchString is set to "_One-Call_Pipeline_Locations" and pDS.Name is a filename it is searching against. Using the code below it is set to true for Nevada_One-Call_Pipeline_Locations and Nevada_One-Call_Pipeline_LocationsMAXIMUM. There should be a match for Nevada_One-Call_Pipeline_Locations But Not for Nevada_One-Call_Pipeline_LocationsMAXIMUM. How can I change my code to do this properly? Thanks in advance if (Regex.IsMatch(pDS.Name, sSearchString))

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >