Search Results

Search found 556 results on 23 pages for 'nathan f77'.

Page 13/23 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Rails: blank page - no errors or stack trace

    - by Nathan Long
    I've been trying to fix a bug in the Rails app I'm developing, and I keep getting a blank screen with no errors. I haven't found anything helpful in development.log, either (though it does show queries being run and such). Finally, I started to wonder if it's somehow set not to show errors anymore. I tried commenting out a necessary route, and sure enough, I got a blank page instead of the error and stack trace I expected. What might cause this? (I wondered if maybe I'm accidentally running production mode and errors aren't supposed to show then, but development.log is being appended, and if I open script/console and echo ENV['RAILS_ENV'], it says development.)

    Read the article

  • SQL CLR Stored Procedure and Web Service

    - by Nathan
    I am current working on a task in which I am needing to call a method in a web service from a CLR stored procedure. A bit of background: Basically, I have a task that requires ALOT of crunching. If done strictly in SQL, it takes somewhere around 30-45 mins to process. If I pull the same process into code, I can get it complete in seconds due to being able to optimize the processing so much more efficiently. The only problem is that I have to have this process set as an automated task in SQL Server. In that vein, I have exposed the process as a web service (I use it for other things as well) and want the SQL CLR sproc to consume the service and execute the code. This allows me to have my automated task. The problem: I have read quite a few different topics regarding how to consume a web service in a CLR Sproc and have done so effectivly. Here is an example of what I have followed. http://blog.hoegaerden.be/2008/11/11/calling-a-web-service-from-sql-server-2005/ I can get this example working without any issues. However, whenever I pair this process w/ a Web Service method that involves a database call, I get the following exceptions (depending upon whether or not I wrap in a try / catch): Msg 10312, Level 16, State 49, Procedure usp_CLRRunDirectSimulationAndWriteResults, Line 0 .NET Framework execution was aborted. The UDP/UDF/UDT did not revert thread token. or Msg 6522, Level 16, State 1, Procedure MyStoredProc , Line 0 A .NET Framework error occurred during execution of user defined routine or aggregate 'MyStoredProc': System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. System.Security.SecurityException: at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.Net.CredentialCache.get_DefaultCredentials() at System.Web.Services.Protocols.WebClientProtocol.set_UseDefaultCredentials(Boolean value) at MyStoredProc.localhost.MPWebService.set_UseDefaultCredentials(Boolean Value) at MyStoredProclocalhost.MPWebService..ctor() at MyStoredProc.StoredProcedures.MyStoredProc(String FromPostCode, String ToPostCode) I am sure this is a permission issue, but I can't, for the life of me get it working. I have attempted using impersonation in the CLR sproc and a few other things. Any suggestions? What am I missing?

    Read the article

  • C# Lambda Expression Speed

    - by Nathan
    I have not used many lambda expressions before and I ran into a case where I thought I could make slick use of one. I have a custom list of ~19,000 records and I need to find out if a record exists or not in the list so instead of writing a bunch of loops or using linq to go through the list I decided to try this: for (int i = MinX; i <= MaxX; ++i) { tempY = MinY; while (tempY <= MaxY) { bool exists = myList.Exists(item => item.XCoord == i && item.YCoord == tempY); ++tempY; } } Only problem is it take ~9 - 11 seconds to execute. Am I doing something wrong is this just a case of where I shouldn't be using an expression like this? Thanks.

    Read the article

  • XSL unique values per node per position

    - by Nathan Colin
    this get ever more complicated :) now i face another issue in last question we managed to take unique values from only one parent node now with: <?xml version="1.0" encoding="ISO-8859-1"?> <roots> <root> <name>first</name> <item> <something>A</something> <something>A</something> </item> <item> <something>B</something> <something>A</something> </item> <item> <something>C</something> <something>P</something> </item> <item> <something>A</something> <something>L</something> </item> <item> <something>A</something> <something>A</something> </item> <item> <something>B</something> <something>A</something> </item> <item> <something>D</something> <something>A</something> </item> </root> <root> <name>second</name> <item> <something>E</something> <something>A</something> </item> <item> <something>B</something> <something>A</something> </item> <item> <something>F</something> <something>A</something> </item> <item> <something>A</something> <something>A</something> </item> <item> <something>A</something> <something>A</something> </item> <item> <something>B</something> <something>H</something> </item> <item> <something>D</something> <something>G</something> </item> </root> </roots> now i need to get the unique values depending only from one node before but just from the elements on the second position <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output indent="yes" method="text"/> <xsl:key name="item-by-value" match="something" use="concat(normalize-space(.), ' ', generate-id(./ancestor::root))"/> <xsl:key name="rootkey" match="root" use="name"/> <xsl:template match="/"> <xsl:for-each select="key('rootkey','first')"> <xsl:for-each select="item/something[1]"> <xsl:sort /> <xsl:if test="generate-id() = generate-id(key('item-by-value', concat(normalize-space(.), ' ', generate-id(./ancestor::root))))"> <xsl:value-of select="."/> </xsl:if> </xsl:for-each> <xsl:text>_________</xsl:text> <xsl:for-each select="item/something[2]"> <xsl:sort /> <xsl:if test="generate-id() = generate-id(key('item-by-value', concat(normalize-space(.), ' ', generate-id(./ancestor::root))))"> <xsl:value-of select="."/> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:template> </xsl:stylesheet> with this XSL i get ABCD__LP where the result i need is ABCD__ALP any ideas?

    Read the article

  • WPF ComboBox in Grid Issue

    - by Nathan
    I am trying to put a series of comboboxes in a grid and then I bind them to a list. For some reason unknown to me when I click the open button on the combobox nothing happens. If I move a comobobox outside the grid it opens just fine. Can someone please tell me what I am doing wrong here. It has to be something stupid because I've used comoboxes before just fine. Here is my xaml: <Grid> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <GroupBox Header="Download Critera" Margin="70,30" Name="groupBox1" Grid.RowSpan="2"> <Grid Height="Auto" Name="grid1" Width="Auto" Margin="0" IsHitTestVisible="False"> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> <RowDefinition /> <RowDefinition /> <RowDefinition /> <RowDefinition /> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <TextBlock Grid.Row="1" Margin="10,5,5,5" Name="textBlock1" Text="A:" Foreground="Black" VerticalAlignment="Center" FontSize="14" FontWeight="Bold" /> <TextBlock Grid.Row="2" Margin="10,5,5,5" Name="textBlock2" Text="B:" Foreground="Black" VerticalAlignment="Center" FontWeight="Bold" /> <TextBlock Grid.Row="3" Margin="10,5,5,5" Name="textBlock3" Text="C:" Foreground="Black" VerticalAlignment="Center" FontWeight="Bold" /> <TextBlock Grid.Row="4" Margin="10,5,5,5" Name="textBlock4" Foreground="Black" Text="D:" VerticalAlignment="Center" FontWeight="Bold" /> <TextBlock Grid.Row="5" Margin="10,5,5,5" Name="textBlock5" Text="E:" Foreground="Black" TextAlignment="Left" VerticalAlignment="Center" FontWeight="Bold" /> <ComboBox x:Name="cb1" Grid.Column="1" Grid.Row="1" Margin="5" MaxDropDownHeight="100" ItemsSource="{Binding Projects}"/> <ComboBox x:Name="cb2" Grid.Column="1" Grid.Row="2" Margin="5" MaxDropDownHeight="100" ItemsSource="{Binding Projects}"/> <ComboBox x:Name="cb3" Grid.Column="1" Grid.Row="3" Margin="5" MaxDropDownHeight="100" ItemsSource="{Binding Projects}"/> <ComboBox x:Name="cb4" Grid.Column="1" Grid.Row="4" Margin="5" MaxDropDownHeight="100" ItemsSource="{Binding Projects}"/> <ComboBox x:Name="cb5" Grid.Column="1" Grid.Row="5" Margin="5" MaxDropDownHeight="100" ItemsSource="{Binding Projects}"/> </Grid> </GroupBox> </Grid>

    Read the article

  • unix tool to remove duplicate lines from a file

    - by Nathan Fellman
    I have a tool that generates tests and predicts the output. The idea is that if I have a failure I can compare the prediction to the actual output and see where they diverged. The problem is the actual output contains some lines twice, which confuses diff. I want to remove the duplicates, so that I can compare them easily. Basically, something like sort -u but without the sorting. Is there any unix commandline tool that can do this?

    Read the article

  • Having trouble passing text from MySQL to a Javascript function using PHP

    - by Nathan Brady
    So here's the problem. I have data in a MySQL DB as text. The data is inserted via mysql_real_escape_string. I have no problem with the data being displayed to the user. At some point I want to pass this data into a javascript function called foo. // This is a PHP block of code // $someText is text retrieved from the database echo "<img src=someimage.gif onclick=\"foo('{$someText}')\">"; If the data in $someText has line breaks in it like: Line 1 Line 2 Line 3 The javascript breaks because the html output is <img src=someimage.gif onclick="foo('line1 line2 line3')"> So the question is, how can I pass $someText to my javascript foo function while preserving line breaks and carriage returns but not breaking the code? =========================================================================================== After using json like this: echo "<img src=someimage.gif onclick=\"foo($newData)\">"; It is outputting HTML like this: onclick="foo("line 1<br \/>\r\nline 2");"> Which displays the image followed by \r\nline 2");"

    Read the article

  • SQLite Modify Column

    - by Nathan
    I need to modify a column in a SQLite database but I have to do it programatically due to the database already being in production. From my research I have found that in order to do this I must do the following. Create a new table with new schema Copy data from old table to new table Drop old table Rename new table to old tables name That seems like a ridiculous amount of work for something that should be relatively easy. Is there not an easier way? All I need to do is change a constraint on a existing column and give it a default value.

    Read the article

  • Infopath 2007 and WCF Data Connection

    - by Nathan Fisher
    I am having trouble trying to connect an Infopath 2007 form to an WCF web service. I appears that the Infopath only wants to communicate via a SOAP 1.0 message. To get around the issue for the moment I have created an .asmx web service. Should I consider continuing down this workaround or figure out a way to get WCF to dish out SOAP 1.0 1.1 messages?

    Read the article

  • Distributed development systems

    - by Nathan Adams
    I am interested in a system that allows for distributed development with an authentication piece. What do I mean by that? Ok so lets take SVN, SVN keeps track of revisions and doesn't care who submits, as long as you have the right to submit you can submit, really, to any part in the repository. Where does my system come into play? Being able to granulate access control and give a stackoverflow like feel to the environment. In the system I am describing we have 4 users Bob, Alice, Dan, Joe. Bob is a project managed, Alice and Dan are programmers under Bob and Joe is a random programmer on the internet who wants to help. Ideally in this system, Bob can commit any changes and won't require approval. Alice and Dan can commit to their branches, or a branch, but a commit to the trunk would need approval by Bob. This is where Joe comes in, wants to help, however, you just don't want to give him the keys to the kingdom just yet so to speak, so in my system you would setup a "low user" account. Any commits that Joe makes would need to be approved by Dan, Alice or both. However, in the system, Joe can build up "Karma" where after so many approved commits it would only need approval by one of the programmers, and then eventually no approval would be necessary. Does that make sense and do you know if a system like that exists? Or am I just crazy to even think such a system/environment would be possible?

    Read the article

  • reading dbase file without standard .dbf extension.

    - by Nathan W
    I am trying to read a file which is just a dbase file but without the standard extension the file is something like: Test.Dat I am using this block of code to try and read the file: string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Temp;Extended Properties=dBase III"; OleDbConnection dBaseConnection = new OleDbConnection(ConnectionString); dBaseConnection.Open(); OleDbDataAdapter oDataAdapter = new OleDbDataAdapter("SELECT * FROM Test", ConnectionString); DataSet oDataSet = new DataSet(); oDataAdapter.Fill(oDataSet);//I get the error right here... DataTable oDataTable = oDataSet.Tables[0]; foreach (DataRow dr in oDataTable.Rows) { Console.WriteLine(dr["Name"]); } Of course this crashes because it can't find the dbase file called test, but if I rename the file to Test.dbf it works fine. I can't really rename the file all the time because a third party application uses it as its file format. Does anyone know a way to read a dbase file without a standard extension in C#. Thanks.

    Read the article

  • How to Deserialize Missing Fields To Nulls

    - by Nathan
    I am working on a .NET project where several versions of the same type of object have been created over the life of the project - most new versions add a field or two. However, now I am looking to mitigate problems for users with an old version. My goal is that when a user tries to open an old version of the serialized object with the new program, the program will automatically assign default values to the fields that are missing from the depreciated version of the file. For example, say I had a class with two boolean fields - RepeatSound and RepeatForever. The first version of the program doesn't know how to repeat forever, so it only saved RepeatSound: <anyType xsi:type="Sound"> <RepeatSound>true</RepeatSound> </anyType> but the new files look like this: <anyType xsi:type="Sound"> <RepeatSound>true</RepeatSound> <RepeatForever>true</RepeatForever> </anyType> My goal is that when I deserialize the first file in the new program that it will create the Sound object but simply default the value of RepeatForever to false. Right now trying to deserialize the first object would throw an exception. Thank you in advance for any responses

    Read the article

  • Linux Browsers And VBScript

    - by Nathan Campos
    I've already done some little things using Visual Basic and some nice things with eMbedded Visual Basic, but now I want to go on the scripting way, then I want to know if Linux, BeOS and other OSes browsers will support VBScript pages.

    Read the article

  • PNGException "crc corruption" when attempting to create ImageIcon objects from ZIP archive

    - by Nathan Strong
    I've got a ZIP file containing a number of PNG images that I am trying to load into my Java application as ImageIcon resources directly from the archive. Here's my code: import java.io.*; import java.util.Enumeration; import java.util.zip.*; import javax.swing.ImageIcon; public class Test { public static void main( String[] args ) { if( args.length == 0 ) { System.out.println("usage: java Test.java file.zip"); return; } File archive = new File( args[0] ); if( !archive.exists() || !archive.canRead() ) { System.err.printf("Unable to find/access %s.\n", archive); return; } try { ZipFile zip = new ZipFile(archive); Enumeration <? extends ZipEntry>e = zip.entries(); while( e.hasMoreElements() ) { ZipEntry entry = (ZipEntry) e.nextElement(); int size = (int) entry.getSize(); int count = (size % 1024 == 0) ? size / 1024 : (size / 1024)+1; int offset = 0; int nread, toRead; byte[] buffer = new byte[size]; for( int i = 0; i < count; i++ ) { offset = 1024*i; toRead = (size-offset > 1024) ? 1024 : size-offset; nread = zip.getInputStream(entry).read(buffer, offset, toRead); } ImageIcon icon = new ImageIcon(buffer); // boom -- why? } zip.close(); } catch( IOException ex ) { System.err.println(ex.getMessage()); } } } The sizes reported by entry.getSize() match the uncompressed size of the PNG files, and I am able to read the data out of the archive without any exceptions, but the creation of the ImageIcon blows up. The stacktrace: sun.awt.image.PNGImageDecoder$PNGException: crc corruption at sun.awt.image.PNGImageDecoder.getChunk(PNGImageDecoder.java:699) at sun.awt.image.PNGImageDecoder.getData(PNGImageDecoder.java:707) at sun.awt.image.PNGImageDecoder.produceImage(PNGImageDecoder.java:234) at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246) at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172) at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136) sun.awt.image.PNGImageDecoder$PNGException: crc corruption at sun.awt.image.PNGImageDecoder.getChunk(PNGImageDecoder.java:699) at sun.awt.image.PNGImageDecoder.getData(PNGImageDecoder.java:707) at sun.awt.image.PNGImageDecoder.produceImage(PNGImageDecoder.java:234) at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246) at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172) at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136) Can anyone shed some light on it? Google hasn't turned up any useful information.

    Read the article

  • Using scroll on one memo edit to scroll on another as well

    - by Nathan Koop
    I've got two memoedits which are similar (in order to compare two records) I would like to keep the scrolling in synch to ease comparison. I had originally thought there would be an OnScroll event, but didn't see one, nor anything similar, the closest I saw was Spin, this handles some possibilities, but not all. I also didn't see a way to navigate the rows. I did see the ScrollToCaret method, but this doesn't do what I want. Any ideas?

    Read the article

  • Using Hibernate to do a query involving two tables

    - by Nathan Spears
    I'm inexperienced with sql in general, so using Hibernate is like looking for an answer before I know exactly what the question is. Please feel free to correct any misunderstandings I have. I am on a project where I have to use Hibernate. Most of what I am doing is pretty basic and I could copy and modify. Now I would like to do something different and I'm not sure how configuration and syntax need to come together. Let's say I have two tables. Table A has two (relevant) columns, user GUID and manager GUID. Obviously managers can have more than one user under them, so queries on manager can return more than one row. Additionally, a manager can be managing the same user on multiple projects, so the same user can be returned multiple times for the same manager query. Table B has two columns, user GUID and user full name. One-to-one mapping there. I want to do a query on manager GUID from Table A, group them by unique User GUID (so the same User isn't in the results twice), then return those users' full names from Table B. I could do this in sql without too much trouble but I want to use Hibernate so I don't have to parse the sql results by hand. That's one of the points of using Hibernate, isn't it? Right now I have Hibernate mappings that map each column in Table A to a field (well the get/set methods I guess) in a DAO object that I wrote just to hold that Table's data. I could also use the Hibernate DAOs I have to access each table separately and do each of the things I mentioned above in separate steps, but that would be less efficient (I assume) that doing one query. I wrote a Service object to hold the data that gets returned from the query (my example is simplified - I'm going to keep some other data from Table A and get multiple columns from Table B) but I'm at a loss for how to write a DAO that can do the join, or use the DAOs I have to do the join. FYI, here is a sample of my hibernate config file (simplified to match my example): <hibernate-mapping package="com.my.dao"> <class name="TableA" table="table_a"> <id name="pkIndex" column="pk_index" /> <property name="userGuid" column="user_guid" /> <property name="managerGuid" column="manager_guid" /> </class> </hibernate-mapping> So then I have a DAOImplementation class that does queries and returns lists like public List<TableA> findByHQL(String hql, Map<String, String> params) etc. I'm not sure how "best practice" that is either.

    Read the article

  • Arguments On a Console eMbedded Visual C++ Application

    - by Nathan Campos
    I'm trying to develop a simple application that will read some files, targeted for Windows CE. For this I'm using Microsoft eMbedded Visual C++ 3. This program(that is for console) will be called like this: /Storage Card/Test coms file.cmss As you can see, file.cmss is the first argument, but on my main I have a condition to show the help(the normal, how to use the program) if the arguments are smaller than 2: if(argc < 2) { showhelp(); return 0; } But when I execute the program on the command-line of Windows CE(using all the necessary arguments) I got the showHelp() content. Then I've checked all the code, but it's entirelly correct. But I think that eVC++ don't use argc and argv[] for arguments, then I want some help on how to determine the arguments on it.

    Read the article

  • VC7.1 C1204 internal compiler error

    - by Nathan Ernst
    I'm working on modifying Firaxis' Civilization 4 core game DLL. The host application is built using VC7, hence the constraint (source not provided for the host EXE). I've been working on rewriting a large chunk of the code (focusing on low-hanging performance issues & memory leaks). I recently ran into an internal compiler error when trying to mod the code to use an array class instead of dynamically allocated 2-d arrays, I was going to use matrices from the boost lib (Civ4 is already using boost, so why not?). Basically, the issue comes down to: if I include "boost/numeric/ublas/matrix.hpp", I run into an internal compiler error C1204. MSDN has this to say: MSDN C1204 KB has this to say: KB 883655 So, I'm curious, is it possible to solve this error without a KB/SP being applied and dramatically reducing the complexity of the code? Additionally, as VC7 is no longer "supported", does anyone have a valid (supported) link for a VC7 service pack?

    Read the article

  • Getting started with silverlight 4

    - by nathan gonzalez
    i'm interested in picking up silverlight as another tool to use when appropriate, and i'm looking to get some suggestions on the best way to get started. i have visual studio 2010, and can purchase expression blend if necessary (is it out of beta?), though i haven't quite been able to grasp the relationship between them. are there any good books, tutorials, blogs etc that i should use to familiarize myself with silverlight 4?

    Read the article

  • sqlite with Perl for Windows; suitable for relocation

    - by Paul Nathan
    I need to set up sqllite for Perl on a Windows box. However - Perl is probably being run over the network from a central server, and I do not know what modules will be available on initial running of my script. I can guarantee Perl 5.8+ (activestate) or Perl 5.10+ (strawberry). Therefore, I need to package sqlite & the associated Perl module(s) in the project directory itself. Having Goggled around, I don't see any immediate zipfile to do this.

    Read the article

  • No Binary File Generation

    - by Nathan Campos
    I've just bought a new laptop for me on the travel, then on my free time, I've started to test MinGW on it by trying to compile my own OS that is written in C++, then I've created all the files needed and the kernel.cpp: extern "C" void _main(struct multiboot_data* mbd, unsigned int magic); void _main( struct multiboot_data* mbd, unsigned int magic ) { char * boot_loader_name =(char*) ((long*)mbd)[16]; /* Print a letter to screen to see everything is working: */ unsigned char *videoram = (unsigned char *) 0xb8000; videoram[0] = 65; /* character 'A' */ videoram[1] = 0x07; /* forground, background color. */ } And tried to compile it with g++ G: g++ -o C:\kernel.o -c kernel.cpp -Wall -Wextra -Werror -nostdlib -nostartfiles -nodefaultlibs kernel.cpp: In function `void _main(multiboot_data*, unsigned int)': kernel.cpp:8: warning: unused variable 'boot_loader_name' kernel.cpp: At global scope: kernel.cpp:4: warning: unused parameter 'magic' G: But it don't create any binary file at C:/, what can I do?

    Read the article

  • running shell commands with gnu clisp

    - by Paul Nathan
    I'm trying to create a "system" command for clisp that works like this (setq result (system "pwd")) ;;now result is equal to /my/path/here I have something like this: (defun system (cmd) (ext:run-program :output :stream)) But, I am not sure how to transform a stream into a string. I've reviewed the hyperspec and google more than a few times.

    Read the article

  • Video Synthesis - Making waves, pattern, gradients...

    - by Nathan
    I'm writing a program to generate some trippy visuals. My code paints each pixel with a random blue value which loops at 0.04 second intervals. for (y = 0; y < 5.5; y += 0.2) { for (x = 0; x < 7.5; x += 0.2) { b = rand() / ((double) RAND_MAX); setPixelColor(x,y,r,g,b); } } I'd like to do more than just make blue noise... but my maths is a bit rusty, and Google isn't helping me much today, so it would be great if you could share anything you know about making waves, patterns, gradient animations, etc or links to such material.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >