Search Results

Search found 759 results on 31 pages for 'matthew carroll'.

Page 22/31 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • NHibernate Left Outer Join

    - by Matthew
    I'm looking to create a Left outer join Nhibernate query with multiple on statements akin to this: SELECT * FROM [Database].[dbo].[Posts] p LEFT JOIN [Database].[dbo].[PostInteractions] i ON p.PostId = i.PostID_TargetPost And i.UserID_ActingUser = 202 I've been fooling around with the critera and aliases, but I haven't had any luck figuring out how do to this. Any suggestions?

    Read the article

  • Finding the intersection of two vector equations.

    - by Matthew Mitchell
    I've been trying to solve this and I found an equation that gives the possibility of zero division errors. Not the best thing: v1 = (a,b) v2 = (c,d) d1 = (e,f) d2 = (h,i) l1: v1 + ?d1 l2: v2 + µd2 Equation to find vector intersection of l1 and l2 programatically by re-arranging for lambda. (a,b) + ?(e,f) = (c,d) + µ(h,i) a + ?e = c + µh b +?f = d + µi µh = a + ?e - c µi = b +?f - d µ = (a + ?e - c)/h µ = (b +?f - d)/i (a + ?e - c)/h = (b +?f - d)/i a/h + ?e/h - c/h = b/i +?f/i - d/i ?e/h - ?f/i = (b/i - d/i) - (a/h - c/h) ?(e/h - f/i) = (b - d)/i - (a - c)/h ? = ((b - d)/i - (a - c)/h)/(e/h - f/i) Intersection vector = (a + ?e,b + ?f) Not sure if it would even work in some cases. I haven't tested it. I need to know how to do this for values as in that example a-i. Thank you.

    Read the article

  • How to get Jquery form plugin and Jquery validation to work together.

    - by Matthew
    Hello guys, I was hoping someone can shed some light on what might be occurring on my page. Okay what I currently have on my page is a simple form that collects first name, last name, city, state and email. Once submitted it will hit a PHP page that updates our DB and echo's back to the designted div with a class of .response. I am using jquery.validation and placing that dynamic function within the submitHandler like so: submitHandler: function(form) { $(form).ajaxSubmit({ target: '.response', // target element(s) to be updated with server response resetForm: true, success: function() { $('#commentform').hide(); $('.response').show(); } }); So what I am getting is a div that is not being populated with the echo from my php file in FF and in IE I am getting the message of thank you but the page is taking me to the update.php script in which I have the form action pointing to. I am not sure what I am missing... Thanks, Matt

    Read the article

  • Is there a fast alternative to creating a Texture2D from a Bitmap object in XNA?

    - by Matthew Bowen
    I've looked around a lot and the only methods I've found for creating a Texture2D from a Bitmap are: using (MemoryStream s = new MemoryStream()) { bmp.Save(s, System.Drawing.Imaging.ImageFormat.Png); s.Seek(0, SeekOrigin.Begin); Texture2D tx = Texture2D.FromFile(device, s); } and Texture2D tx = new Texture2D(device, bmp.Width, bmp.Height, 0, TextureUsage.None, SurfaceFormat.Color); tx.SetData<byte>(rgbValues, 0, rgbValues.Length, SetDataOptions.NoOverwrite); Where rgbValues is a byte array containing the bitmap's pixel data in 32-bit ARGB format. My question is, are there any faster approaches that I can try? I am writing a map editor which has to read in custom-format images (map tiles) and convert them into Texture2D textures to display. The previous version of the editor, which was a C++ implementation, converted the images first into bitmaps and then into textures to be drawn using DirectX. I have attempted the same approach here, however both of the above approaches are significantly too slow. To load into memory all of the textures required for a map takes for the first approach ~250 seconds and for the second approach ~110 seconds on a reasonable spec computer. If there is a method to edit the data of a texture directly (such as with the Bitmap class's LockBits method) then I would be able to convert the custom-format images straight into a Texture2D and hopefully save processing time. Any help would be very much appreciated. Thanks

    Read the article

  • Can I send a ctrl-C (SIGINT) to an application on Windows?

    - by Matthew Murdoch
    I have (in the past) written cross-platform (Windows/Unix) applications which, when started from the command line, handled a user-typed Ctrl-C combination in the same way (i.e. to terminate the application cleanly). Is it possible on Windows to send a Ctrl-C/SIGINT/equivalent to a process from another (unrelated) process to request that it terminate cleanly (giving it an opportunity to tidy up resources etc.)?

    Read the article

  • need help with a small Python program

    - by Matthew
    Basically looking for a small program that will do nothing but activate the F6 key every x seconds for the active window, x being whatever number I enter, and the program stops with the hit of like ctrl+z or something. What would be a good way to do this?

    Read the article

  • Functional languages targeting the LLVM

    - by Matthew
    Are there any languages that target the LLVM that: Are statically typed Use type inference Are functional (i.e. lambda expressions, closures, list primitives, list comprehensions, etc.) Have first class object-oriented features (inheritance, polymorphism, mixins, etc.) Have a sophisticated type system (generics, covariance and contravariance, etc.) Scala is all of these, but only targets the JVM. F# (and to some extent C#) is most if not all of these, but only targets .NET. What similar language targets the LLVM?

    Read the article

  • (MyClassName)object vs. object as MyClassName

    - by Matthew Doyle
    Hello all, I was wondering what is the better method for Casting objects for C#: MyClassName test = (MyClassName)object; MyClassName test = object as MyClassName; I know already that if you do the first way, you get an exception, and the second way it sets test as null. However, I was wondering why do one over the other? I see the first way a lot, but I like how the second way because then I can check for null... If there isn't a 'better way' of doing it, what are the guidelines for using one way or the other?

    Read the article

  • WPF Inner Property Binding not updating.

    - by Matthew Kruskamp
    I have an INotifyProperty item that I have bound to a wpf control. <local:ScrollingSelector DataContext="{Binding Path=SelectedScreen.VisualizationTypes}" Grid.ColumnSpan="2" Grid.Column="3" Margin="0,0,0,0" Grid.Row="1"/> If I change the SelectedScreen property to a different control the binding still assumes the first control. Why is this? Is there an easy work-around?

    Read the article

  • Maven not setting classpath for dependencies properly

    - by Matthew
    OS name: "linux" version: "2.6.32-27-generic" arch: "i386" Family: "unix" Apache Maven 2.2.1 (r801777; 2009-08-06 12:16:01-0700) Java version: 1.6.0_20 I am trying to use the mysql dependency in with maven in ubuntu. If I move the "mysql-connector-java-5.1.14.jar" file that maven downloaded into my $JAVA_HOME/jre/lib/ext/ folder, everything is fine when I run the jar. I think I should be able to just specify the dependency in the pom.xml file and maven should take care of setting the classpath for the dependency jars automatically. Is this incorrect? My pom.xml file looks like this: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.ion.common</groupId> <artifactId>TestPreparation</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <name>TestPrep</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <mainClass>com.ion.common.App</mainClass> </manifest> </archive> </configuration> </plugin> </plugins> </build> <dependencies> <!-- JUnit testing dependency --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <!-- MySQL database driver --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.14</version> <scope>compile</scope> </dependency> </dependencies> </project> The command "mvn package" builds it without any problems, and I can run it, but when the application attempts to access the database, this error is presented: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at com.ion.common.Functions.databases(Functions.java:107) at com.ion.common.App.main(App.java:31) The line it is failing on is: Class.forName("com.mysql.jdbc.Driver"); Can anyone tell me what I'm doing wrong or how to fix it?

    Read the article

  • Hard-coded 8191 10485 values in JavaScript rounding function

    - by Matthew Hegarty
    I've seen the following (bizarre) Javascript rounding function in some legacy code. After googling for it I can see that it crops up in a number of places online. However I can't work out why the hard-coded values 8191 and 10485 are present. Does anyone know if there's any sensible reason why these values are included? If not, hopefully we can kill off the meme! function roundNumber(num,dec) { var newnumber = 0; if (num > 8191 && num < 10485) { num = num-5000; newnumber = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec); newnumber = newnumber+5000; } else { newnumber = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec); } return newnumber; }

    Read the article

  • [Hibernate Mapping] relationship set between table and mapping table to use joins.

    - by Matthew De'Loughry
    Hi guys, I have two table a "Module" table and a "StaffModule" I'm wanting to display a list of modules by which staff are present on the staffmodule mapping table. I've tried from Module join Staffmodule sm with ID = sm.MID with no luck, I get the following error Path Expected for join! however I thought I had the correct join too allow this but obviously not can any one help StaffModule HBM <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <!-- Generated Apr 26, 2010 9:50:23 AM by Hibernate Tools 3.2.1.GA --> <hibernate-mapping> <class name="Hibernate.Staffmodule" schema="WALK" table="STAFFMODULE"> <composite-id class="Hibernate.StaffmoduleId" name="id"> <key-many-to-one name="mid" class="Hibernate.Module"> <column name="MID"/> </key-many-to-one> <key-property name="staffid" type="int"> <column name="STAFFID"/> </key-property> </composite-id> </class> </hibernate-mapping> and Module.HBM <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <!-- Generated Apr 26, 2010 9:50:23 AM by Hibernate Tools 3.2.1.GA --> <hibernate-mapping> <class name="Hibernate.Module" schema="WALK" table="MODULE"> <id name="id" type="int"> <column name="ID"/> <generator class="assigned"/> </id> <property name="modulename" type="string"> <column length="50" name="MODULENAME"/> </property> <property name="teacherid" type="int"> <column name="TEACHERID" not-null="true"/> </property> </class> hope thats enough information! and thanks in advance.

    Read the article

  • Why does it make a difference where I include the jQuery script file?

    - by Matthew Jones
    On my master page (for all pages in my site) I have a ToolkitScriptManager. On my content page, there are a series of hyperlinks and divs for collapsible functionality. The code to show/hide the panels work like the following: $('#nameHyperLink').click(function() { var div = $('#nameDiv'); var link = $('#nameHyperLink'); if (div.css('display') == 'none') { link.text('Hide Data'); div.show('100'); } else { link.text('Show Data'); div.hide('100'); } }); If I include a ScriptReference to the jQuery 1.4.2 file in the toolkitscriptmanager, the javascript code is executed incorrectly on the page (only the text for the hyperlink is changed, the div is not actually shown.) However, if I don't include the jQuery file in the ToolkitScriptManager and instead include it in the content page, it works correctly. I'm a Javascript/jQuery newbie, and this makes no sense at all. What's going on here?

    Read the article

  • How to display a date as iso 8601 format with PHP

    - by Matthew James Taylor
    I'm trying to display a datetime from my MySQL database as an iso 8601 formated string with PHP but it's coming out wrong. 17 Oct 2008 is coming out as: 1969-12-31T18:33:28-06:00 which is clearly not correct (the year should be 2008 not 1969) This is the code I'm using: <?= date("c", $post[3]) ?> $post[3] is the datetime (CURRENT_TIMESTAMP) from my MySQL database. Any ideas what's going wrong?

    Read the article

  • Correct Time Display

    - by Matthew
    Guys, I''m looking to get this correct and i'm getting a bit fustrated with this. What I want to do is get hours and days and weeks correct. Example: if this post is < 60min old then have it read: Posted Less then 1 minute ago if this post is < 120min old then have it read: Posted 1 hour ago if this post is 120min old then have it read: Posted 1 hours ago if this post is < 1440min old then have it read: Posted 1 day ago if this post is 1440min old then have it read: Posted 2 days ago Is that right?? This is what I have so far: if (lapsedTime < 60) { return '< 1 mimute'; } else if (lapsedTime < (60*60)) { return Math.round(lapsedTime / 60) + 'minutes'; } else if (lapsedTime < (12*60*60)) { return Math.round(lapsedTime / 2400) + 'hr'; } else if (lapsedTime < (24*60*60)) { return Math.round(lapsedTime / 3600) + 'hrs'; } else if (lapsedTime < (7*24*60*60)) { return Math.round(lapsedTime / 86400) + 'days'; } else { return Math.round(lapsedTime / 604800) + 'weeks'; }

    Read the article

  • What HTTP redirect status should I use to link offsite?

    - by Matthew Scharley
    While randomly browsing my website via Google, I noticed that it was showing up remote redirects as local files. Now this can be both good and bad, but I'm wondering how can I fix this so it doesn't happen? I'm currently using PHP and header('Location: ... which sends a 302 redirect. Looking over the list of HTTP status codes, I'd take a guess that I should be using 303 redirects to redirect offsite. Is anyone able to help me here, and either confirm/deny this, or tell me what I should be doing instead? Obviously, due to me not being able to tell Google to reindex my site on command, there's issues with being able to test this myself...

    Read the article

  • Invoke Blue Screen of Death using Managed Code

    - by Matthew Ruston
    Just curious here: is it possible to invoke a Windows Blue Screen of Death using .net managed code under Windows XP/Vista? And if it is possible, what could the example code be? Just for the record, this is not for any malicious purpose, I am just wondering what kind of code it would take to actually kill the operating system as specified.

    Read the article

  • MSSQL Search Proper Names Full Text Index vs LIKE + SOUNDEX

    - by Matthew Talbert
    I have a database of names of people that has (currently) 35 million rows. I need to know what is the best method for quickly searching these names. The current system (not designed by me), simply has the first and last name columns indexed and uses "LIKE" queries with the additional option of using SOUNDEX (though I'm not sure this is actually used much). Performance has always been a problem with this system, and so currently the searches are limited to 200 results (which still takes too long to run). So, I have a few questions: Does full text index work well for proper names? If so, what is the best way to query proper names? (CONTAINS, FREETEXT, etc) Is there some other system (like Lucene.net) that would be better? Just for reference, I'm using Fluent NHibernate for data access, so methods that work will with that will be preferred. I'm using MS SQL 2008 currently.

    Read the article

  • Static library not included in resulting LLVM executable

    - by Matthew Glubb
    Hi, I am trying to compile a c program using LLVM and I am having trouble getting some static libraries included. I have successfully compiled those static libraries using LLVM and, for example, libogg.a is present, as is ogg.l.bc. However, when I try to build the final program, it does not include the static ogg library. I've tried various compiler options with the most notable being: gcc oggvorbis.c -O3 -Wall -I$OV_DIR/include -l$OV_DIR/lib/libogg.a -l$OV_DIR/lib/libvorbis.a -o test.exe This results in the following output (directories shortened for brevity): $OV_DIR/include/vorbis/vorbisfile.h:75: warning: ‘OV_CALLBACKS_DEFAULT’ defined but not used $OV_DIR/include/vorbis/vorbisfile.h:82: warning: ‘OV_CALLBACKS_NOCLOSE’ defined but not used $OV_DIR/include/vorbis/vorbisfile.h:89: warning: ‘OV_CALLBACKS_STREAMONLY’ defined but not used $OV_DIR/include/vorbis/vorbisfile.h:96: warning: ‘OV_CALLBACKS_STREAMONLY_NOCLOSE’ defined but not used llvm-ld: warning: Cannot find library '$OV_DIR/lib/ogg.l.bc' llvm-ld: warning: Cannot find library '$OV_DIR/lib/vorbis.l.bc' WARNING: While resolving call to function 'main' arguments were dropped! I find this perplexing because $OV_DIR/lib/ogg.l.bc DOES exit, as does vorbis.l.bc and they are both readable (as are their containing directories) by everyone. Does anyone have any idea with what I am doing wrong? Thanks, Matt

    Read the article

  • How to compile OpenGL with a python C++ extension using distutils on Mac OSX?

    - by Matthew Mitchell
    When I try it I get: ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/cscalelib.so, 2): Symbol not found: _glBindFramebufferEXT Referenced from: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/cscalelib.so Expected in: dynamic lookup I've tried all sort of things in the setup.py file. What do I actually need to put in it to link to OpenGL properly? My code compiles fine so there's no point putting that on there.

    Read the article

  • asp.net mvc rhino mocks mocking httprequest values

    - by Matthew
    Hi Is there a way to mock request params, what is the best approach when testing to create fake request values in order to run a test would some thing like this work? _context = MockRepository.GenerateStub<HttpContext>(); request = MockRepository.GenerateStub<HttpRequest>(); var collection = new NameValueCollection(); collection.Add("", ""); SetupResult.For(request.Params).Return(collection); SetupResult.For(_context.Request).Return(request);

    Read the article

  • How to create and use resources in .NET

    - by Matthew Scharley
    How do I create a resource that I can reference and use in various parts of my program easily? My specific problem is that I have a NotifyIcon that I want to change the icon of depending on the state of the program. A common problem, but one I've been struggling with for a long time.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >