Search Results

Search found 508 results on 21 pages for 'joshua anderson'.

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

  • 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

  • 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

  • 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

  • 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

  • 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

  • Error CS1002: ; Expected -- I have a semicolon. :(

    - by Joshua
    Trying to create a new instance of the "MortgageData" object. Professor said to use: ClassName InstanceName = New ClassName(arg1, arg2, arg3, arg4); I Used MortgageData somethingsomething = New MortgageData(ID,principal,apr,term); Keep getting Error CS1002: ; Expected with the class name after new underlined in red. I'm using visual studio 2008. Not sure what to do.

    Read the article

  • Persistence provider caller does not implement the EJB3 spec

    - by Joshua
    WARN [Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoad er() is null. How do you get rid of the above warning? 0:42:08,032 INFO [PersistenceUnitDeployment] Starting persistence unit pe rsistence.unit:unitName=k12-ear.ear/k12-ejb-1.0.0.jar#k12 10:42:08,371 INFO [Version] Hibernate Annotations 3.4.0.GA 10:42:08,442 INFO [Environment] Hibernate 3.3.1.GA 10:42:08,450 INFO [Environment] hibernate.properties not found 10:42:08,486 INFO [Environment] Bytecode provider name : javassist 10:42:08,492 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling 10:42:08,754 INFO [Version] Hibernate Commons Annotations 3.1.0.GA 10:42:08,989 INFO [Version] Hibernate EntityManager 3.4.0.GA 10:42:09,211 INFO [Ejb3Configuration] Processing PersistenceUnitInfo [ name: k12 ...] 10:42:09,458 WARN [Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoad er() is null. 10:42:09,620 WARN [Ejb3Configuration] Defining hibernate.transaction.flush _before_completion=true ignored in HEM 10:42:09,745 DEBUG [AnnotationConfiguration] Execute first pass mapping pro cessing

    Read the article

  • Git: Remove specific commit

    - by Joshua Cheek
    I was working with a friend on a project, and he edited a bunch of files that shouldn't have been edited. Somehow I merged his work into mine, either when I pulled it, or when I tried to just pick the specific files out that I wanted. I've been looking and playing for a long time, trying to figure out how to remove the commits that contain the edits to those files, it seems to be a toss up between revert and rebase, and there are no straightforward examples, and the docs assume I know more than I do. So here is a simplified version of the question: Given the following scenario, how do I remove commit 2? $ mkdir git_revert_test && cd git_revert_test $ git init Initialized empty Git repository in /Users/josh/deleteme/git_revert_test/.git/ $ echo "line 1" > myfile $ git add -A $ git commit -m "commit 1" [master (root-commit) 8230fa3] commit 1 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 myfile $ echo "line 2" >> myfile $ git commit -am "commit 2" [master 342f9bb] commit 2 1 files changed, 1 insertions(+), 0 deletions(-) $ echo "line 3" >> myfile $ git commit -am "commit 3" [master 1bcb872] commit 3 1 files changed, 1 insertions(+), 0 deletions(-) The expected result is $ cat myfile line 1 line 3 Here is an example of how I have been trying to revert $ git revert 342f9bb Automatic revert failed. After resolving the conflicts, mark the corrected paths with 'git add <paths>' or 'git rm <paths>' and commit the result.

    Read the article

  • How does jFLAC work?

    - by Joshua Lückers
    I've downloaded the jFLAC library but I can't figure out how it works. All I want to do is open a FLAC file and play it. The code example I have results in a NullPointerException on line 75 ( http://pastebin.com/Ndvhgex3 ) Any suggestions or example code would be appreciated.

    Read the article

  • Backtracking Problem

    - by Joshua Green
    Could someone please guide me through backtracking in Prolog-C using the simple example below? Here is my Prolog file: likes( john, mary ). likes( john, emma ). likes( john, ashley ). Here is my C file: #include... term_t tx; term_t tv; term_t goal_term; functor_t goal_functor; int main( int argc, char** argv ) { argv[0] = "libpl.dll"; PL_initialise( argc, argv ); PlCall( "consult( swi( 'plwin.rc' ) )" ); PlCall( "consult( 'likes.pl' )" ); tv = PL_new_term_ref( ); PL_put_atom_chars( tv, "john" ); tx = PL_new_term_ref( ); goal_term = PL_new_term_ref( ); goal_functor = PL_new_functor( PL_new_atom( "likes" ), 2 ); PL_cons_functor( goal_term, goal_functor, tv, tx ); PlQuery q( "likes", ??? ); while ( q.next_solution( ) ) { char* solution; PL_get_atom_chars( tx, &solution ); cout << solution << endl; } PL_halt( PL_toplevel() ? 0 : 1 ); } What should I replace ??? with? Or is this the right approach to get all the backtracking results generated and printed? Thank you,

    Read the article

  • How to create a view controller that supports both landscape and portrait, but does not rotate between them (keeps its initial orientation)

    - by Joshua J. McKinnon
    I want to create a view controller that supports both landscape and portrait orientations, but that can not rotate between them - that is, the view should retain its original orientation. I have tried creating an ivar initialOrientation and setting it in -viewDidAppear with initialOrientation = self.interfaceOrientation; then - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == initialOrientation); } But that causes confusing problems (presumably because -shouldAutorotateToInterfaceOrientation is called before -viewDidAppear). How can I lock the orientation to its original orientation?

    Read the article

  • How to represent "options" for my plugin architecture (C# .NET WinForms)

    - by Joshua
    Okay basically here's where I'm at. I have a list of PropertyDescriptor objects. These describe the custom "Options" fields on my Plugins, aka: public class MyPlugin : PluginAbstract, IPlugin { [PluginOption("This controls the color of blah blah blah")] [DefaultValue(Color.Red)] public Color TheColor { get; set; } [PluginOption("The number of blah blah blahs")] [DefaultValue(10)] public int BlahBlahBlahs { get; set; } } So I did all the hard parts: I have all the descriptions, default values, names and types of these custom "plugin options". MY QUESTION IS: When a user loads a plugin, how should I represent these options for them to config? On the back end I'll be using XML for the config, so that's not what I'm asking. I'm asking on the front end: What kind of WinForms control should I use to let users configure the options of a plugin, when there will be an unknown amount of options and different types used etc.?

    Read the article

  • ItemFocusIn Not Working on Non-Editable DataGrid in Flex

    - by Joshua
    I realize that ItemFocusIn is somehow only applicable to editable datagrids in flex, nevertheless I want to fire an event anytime the user selects a new row in a non-editable datagrid. I have successfully used the CLICK event, but this event is not fired when the user uses the keyboard to select a different row in the datagrid. What do I have to do to cause an event to fire whenever the currently highlighted row in the datagrid changes, regardless of weather it was changed by the mouse or by the keyboard?

    Read the article

  • Masking a Drawable/Bitmap on Android

    - by Joshua Rodgers
    I'm currently looking for a way to use a black and white bitmap to mask the alpha channel of another bitmap or Drawable on Android. I'm curious as to what the best way to do this is. I certainly have a couple of ideas for how to do this, but they are not optimal. I need to be able to apply a new mask to the image every so often (the black and white bitmap will change every few seconds). Any feedback on how to achieve this would be greatly appreciated.

    Read the article

  • Finding the last focused element with jQuery.

    - by Joshua Cody
    I'm looking to determine which element had the last focus in a series of inputs, that are added dynamically by the user. This code can only get the inputs that are available on page load: $('input.item').focus(function(){ $(this).siblings('ul').slideDown(); }); And this code sees all elements that have ever had focus: $('input.item').live('focus', function(){ $(this).siblings('ul').slideDown(); }); The HTML structure is this: <ul> <li><input class="item" name="goals[]"> <ul> <li>long list here</li> <li>long list here</li> <li>long list here</li> </ul></li> </ul> <a href="#" id="add">Add another</a> On page load, a single input loads. Then with each add another, a new copy of the top unordered list's contents are made and appended. And when each gets focus, I'd like to show the list beneath it. But I don't seem to be able to "watch for the most recently focused element, which exists now or in the future." Do I have some sort of fundamental assumption wrong?

    Read the article

  • Where Is The MYSQL Settings File Located On A Windows Installation

    - by Joshua
    I need to set "lower_case_table_names", but I don't have any idea where to start. I'm using XAMPP and I don't know where to look for the file or that the exact name of the file is. One source said my.cnf another said my.conf, but neither of those files exist on my drive. Is it possible I need to create such a file? And if so, what folder must I put it in for the settings to take?

    Read the article

  • Calculating Text Width In ActionScript And Flex

    - by Joshua
    I'm trying to calculate how WIDE to make my button, based on the text that it will contain, and when I try to google for how to calcuate something as simplistic as the WIDTH OF SOME TEXT, I go cross-eyed just trying to wade through apparently nonsensical esoteric counter-intuitive voodoo. Can anyone out there help simplify for me how I would write a function like this: public function HowWideWouldThisTextBeIfItWereInThisButton(Text:String,Container:Button):int { ... } Thanks in advance.

    Read the article

  • How to deploy a rar file to jboss

    - by Joshua
    Refer original post here for a reference to the original issue. What plugin should I use to deploy the jackrabbit rar as a separate entity to the jboss installation. I tried the rar module within the maven-ear-plugin which was actually packaging this within the ear file and the rar plugin which seems to be used for packaging a rar. Currently I am using the antrun plugin to deploy the rar file and it's associated ds.xml, is there a different plugin to automate direct deployment.

    Read the article

  • seam iText integration libraries

    - by Joshua
    seam iText integration seems to use older version of iText jars, would it be possible to use the latest iText 5.0.2 specific jars as part of the maven dependencies. Has anyone done this before? http://repository.jboss.org/maven2/org/jboss/seam/jboss-seam-pdf/2.2.0.GA/jboss-seam-pdf-2.2.0.GA.pom http://repository.jboss.org/maven2/com/lowagie/itext/2.1.2/itext-2.1.2.pom The following dependency uses 2.1.2 version of iText, not sure how to make it use the latest version 5.0.2 of iText. <dependency> <groupId>org.jboss.seam</groupId> <artifactId>jboss-seam-pdf</artifactId> <version>${jboss-seam.version}</version> <exclusions> <exclusion> <groupId>org.jboss.seam</groupId> <artifactId>jboss-seam</artifactId> </exclusion> <exclusion> <groupId>org.jboss.seam</groupId> <artifactId>jboss-seam-ui</artifactId> </exclusion> </exclusions> </dependency>

    Read the article

  • How do I correctly install dulwich to get hg-git working on Windows?

    - by Joshua Flanagan
    I'm trying to use the hg-git Mercurial extension on Windows (Windows 7 64-bit, to be specific). I have Mercurial and Git installed. I have Python 2.5 (32-bit) installed. I followed the instructions on http://hg-git.github.com/ to install the extension. The initial easy_install failed because it was unable to compile dulwich without Visual Studio 2003. I installed dulwich manually by: git clone git://git.samba.org/jelmer/dulwich.git cd dulwich c:\Python25\python setup.py --pure install Now when I run easy_install hg-git, it succeeds (since the dulwich dependency is satisfied). In my C:\Users\username\Mercurial.ini, I have: [extensions] hgext.bookmarks = hggit = When I type 'hg' at a command prompt, I see: "* failed to import extension hggit: No module named hggit" Looking under my c:\Python25 folder, the only reference to hggit I see is Lib\site-packages\hg_git-0.2.1-py2.5.egg. Is this supposed to be extracted somewhere, or should it work as-is? Since that failed, I attempted the "more involved" instructions from the hg-git page that suggested cloning git://github.com/schacon/hg-git.git and referencing the path in my Mercurial configuration. I cloned the repo, and changed my extensions file to look like: [extensions] hgext.bookmarks = hggit = c:\code\hg-git\hggit Now when I run hg, I see: * failed to import extension hggit from c:\code\hg-git\hggit: No module named dulwich.errors. Ok, so that tells me that it is finding hggit now, because I can see in hg-git\hggit\git_handler.py that it calls from dulwich.errors import HangupException That makes me think dulwich is not installed correctly, or not in the path. Update: From Python command line: import dulwich yields Import Error: No module named dulwich However, under C:\Python25\Lib\site-packages, I do have a dulwich-0.5.0-py2.5.egg folder which appears to be populated. This was created by the steps mentioned above. Is there an additional step I need to take to make it part of the Python "path"?

    Read the article

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