Search Results

Search found 150 results on 6 pages for 'niels hansen'.

Page 5/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • Recompiling an old fortran 2/4\66 program that was compiled for os\2 need it to run in dos

    - by Mike Hansen
    I am helping an old scientist with some problems and have 1 program that he found and modified about 20 yrs. ago, and runs fine as a 32 bit os\2 executable but i need it to run under dos! I am not a programmer but a good hardware & software man, so I'am pretty stupid about this problem, but here go's I have downloaded 6 different compilers watcom77,silverfrost ftn95,gfortran,2 versions of g77 and f80. Watcom says it is to old of program,find older compiler,silverfrost opens it,debugs, etc. but is changing all the subroutines from "real" to "complex" and vice-vesa,and the g77's seem to install perfectly (library links and etc.) but wont even compile the test.f programs.My problem is 1; to recompile "as is" or "upgrade" the code? PROGRAM xconvlv INTEGER N,N2,M PARAMETER (N=2048,N2=2048,M=128) INTEGER i,isign REAL data(n),respns(m),resp(n),ans(n2),t3(n),DUMMY OPEN(UNIT=1, FILE='C:\QKBAS20\FDATA1.DAT') DO 1 i=1,N READ(1,*) T3(i), data(i), DUMMY continue CLOSE(UNIT-1) do 12 i=1,N respns(i)=data(i) resp(i)=respns(i) continue isign=-1 call convlv(data,N,resp,M,isign,ans) OPEN(UNIT=1,FILE='C:\QKBAS20\FDATA9.DAT') DO 14 i=1,N WRITE(1,*) T3(i), ans(i) continue END SUBROUTINE CONVLV(data,n,respns,m,isign,ans) INTEGER isign,m,n,NMAX REAL data(n),respns(n) COMPLEX ans(n) PARAMETER (NMAX=4096) * uses realft, twofft INTEGER i,no2 COMPLEX fft (NMAX) do 11 i=1, (m-1)/2 respns(n+1-i)=respns(m+1-i) continue do 12 i=(m+3)/2,n-(m-1)/2 respns(i)=0.0 continue call twofft (data,respns,fft,ans,n) no2=n/2 do 13 i=1,no2+1 if (isign.eq.1) then ans(i)=fft(i)*ans(i)/no2 else if (isign.eq.-1) then if (abs(ans(i)) .eq.0.0) pause ans(i)=fft(i)/ans(i)/no2 else pause 'no meaning for isign in convlv' endif continue ans(1)=cmplx(real (ans(1)),real (ans(no2+1))) call realft(ans,n,-1) return END SUBROUTINE realft(data,n,isign) INTEGER isign,n REAL data(n) * uses four1 INTEGER i,i1,i2,i3,i4,n2p3 REAL c1,c2,hli,hir,h2i,h2r,wis,wrs DOUBLE PRECISION theta,wi,wpi,wpr,wr,wtemp theta=3.141592653589793d0/dble(n/2) cl=0.5 if (isign.eq.1) then c2=-0.5 call four1(data,n/2,+1) else c2=0.5 theta=-theta endif (etc.,etc., etc.) SUBROUTINE twofft(data,data2,fft1,fft2,n) INTEGER n REAL data1(n,data2(n) COMPLEX fft1(n), fft2(n) * uses four1 INTEGER j,n2 COMPLEX h1,h2,c1,c2 c1=cmplx(0.5,0.0) c2=cmplx(0.0,-0.5) do 11 j=1,n fft1(j)=cmplx(data1(j),data2(j) continue call four1 (fft1,n,1) fft2(1)=cmplx(aimag(fft1(1)),0.0) fft1(1)=cmplx(real(fft1(1)),0.0) n2=n+2 do 12 j=2,n/2+1 h1=c1*(fft1(j)+conjg(fft1(n2-j))) h2=c2*(fft1(j)-conjg(fft1(n2-j))) fft1(j)=h1 fft1(n2-j)=conjg(h1) fft2(j)=h2 fft2(n2-j)=conjg(h2) continue return END SUBROUTINE four1(data,nn,isign) INTEGER isign,nn REAL data(2*nn) INTEGER i,istep,j,m,mmax,n REAL tempi,tempr DOUBLE PRECISION theta, wi,wpi,wpr,wr,wtemp n=2*nn j=1 do 11 i=1,n,2 if(j.gt.i)then tempr=data(j) tempi=data(j+1) (etc.,etc.,etc.,) continue mmax=istep goto 2 endif return END There are 4 subroutines with this that are about 3 pages of code and whould be much easier to e-mail to someone if their able to help me with this.My e-mail is [email protected] , or if someone could tell me where to get a "working" compiler that could recompile this? THANK-YOU, THANK-YOU,and THANK-YOU for any help with this! The errors Iam getting are; 1.In a call to CONVLV from another procedure,the first argument was of a type REAL(kind=1), it is now a COMPLEX(kind=1) 2.In a call to REALFT from another procedure, ... COMPLEX(kind=1) it is now a REAL(kind=1) 3.In a call to TWOFFT from...COMPLEX(kind-1) it is now a REAL(kind=1) 4.In a previous call to FOUR1, the first argument was of a type REAL(kind=1) it is now a COMPLEX(kind=1).

    Read the article

  • WPF - Transparency - Stream Desktop Content

    - by Niels Willems
    Greetings I'm in the process of making a Scoreboard for a game (Starcraft II). This scoreboard is being made as a WPF Application with a C# code-behind. I already have a version which works for 90% in WinForms but I lacked the support to easily make it look a lot nicer which are available in WPF. The point of this application will be to form a kind of overlay on top of a running game. This game is in Fulscreen(Windowed Mode) so when in WinForms I coded it so that it should always be on top. It would do so and that was no problem. Since the main look of the app in WPF is based on an image with a transparent background I have set most Background values to Transparent. However when I do this the entire application does not get registered by streaming software. For example it just shows my Desktop or the game I'm playing but not my application even though it IS there. I can see it with my own eyes but the audience on the stream cannot. Does anyone have any experience with this matter because it's really doing my head in. My entire application will be useless if it is not visible on streams. If I have to put the background on a color rather than transparent the UI will be completely demolished as well in terms of looks. I'm basically trying to make a game-overlay in C# & WPF. I have read you can do this on different ways as well but I have little to no knowledge of C++ nor do I know anything about DirectX Thank you for your time reading and your possible insights. Edit: The best solution would be an overlay similar to that one of Steam/Xfire/Dolby Axon. Edit 2: I've had no luck with all the suggestions so I basically made the transparent bits of my image non transparent and let the user decide which one to use depending on what streaming software they would be using.

    Read the article

  • Which Hadoop API version should I use?

    - by Niels Basjes
    In the latest Hadoop Studio the 0.18 API of Hadoop is called "Stable" and the 0.20 API of Hadoop is called "Unstable". The distribution that comes from Yahoo is a 0.20 (with yahoo patches), which is apparently "the way to go". From cloudera they state the 0.20 (with cloudera patches) is also stable. Now given the fact that we'll start coding a new Hadoop project in the next few weeks; which API should we use and which Hadoop distribution (Apache, Cloudera, Yahoo, ...) should we use? Thanks for your insights.

    Read the article

  • Problem with LINQ query

    - by Niels Bosma
    The following works fine: (from e in db.EnquiryAreas from w in db.WorkTypes where w.HumanId != null && w.SeoPriority > 0 && e.HumanId != null && e.SeoPriority > 0 && db.Enquiries.Where(f => f.WhereId == e.Id && f.WhatId == w.Id && f.EnquiryPublished != null && f.StatusId != EnquiryMethods.STATUS_INACTIVE && f.StatusId != EnquiryMethods.STATUS_REMOVED && f.StatusId != EnquiryMethods.STATUS_REJECTED && f.StatusId != EnquiryMethods.STATUS_ATTEND ).Any() select new { EnquiryArea = e, WorkType = w }); But: (from e in db.EnquiryAreas from w in db.WorkTypes where w.HumanId != null && w.SeoPriority > 0 && e.HumanId != null && e.SeoPriority > 0 && EnquiryMethods.BlockOnSite(db.Enquiries.Where(f => f.WhereId == e.Id && f.WhatId == w.Id)).Any() select new { EnquiryArea = e, WorkType = w }); + public static IQueryable<Enquiry> BlockOnSite(IQueryable<Enquiry> linq) { return linq.Where(e => e.EnquiryPublished != null && e.StatusId != STATUS_INACTIVE && e.StatusId != STATUS_REMOVED && e.StatusId != STATUS_REJECTED && e.StatusId != STATUS_ATTEND ); } I get the following error: base {System.SystemException}: {"Method 'System.Linq.IQueryable1[X.Enquiry] BlockOnSite(System.Linq.IQueryable1[X.Enquiry])' has no supported translation to SQL."}

    Read the article

  • Why do MSTests Assert.AreEqual(1.0, double.NaN, 0.0) pass?

    - by Egil Hansen
    Short question, why do Assert.AreEqual(1.0, double.NaN, 0.0) pass when Assert.AreEqual(1.0, double.NaN) do not? Is it an error in MSTest or am I missing something here? Best regards, Egil. Update: Should probably add, that the reason behind my question is, that I have a bunch of unit tests that unfortunately passed due to the result of some linear algebraic matrix operation being NaN or (+/-)Infinity. The unit tests are fine, but since Assert.AreEqual on doubles with a delta will pass when actual or/and expected are NaN or Infinity, I was left to believe that the code I was testing was correct.

    Read the article

  • Drag/Drop movieclip event in JSFL? (Flash IDE)

    - by niels
    Lately im trying to do some experimental things with JSFL, and i was wondering if it is possible to listener for an event when a component (that i have made) or movieclip is dragged from library on the stage. i want to create something that i'll get a component and drop it on a mc. when the component is dropped on the mc the component will save the mc as a reference in some var. maybe with events isnt the way to go but i have no clue if this is possible or how to do it another way. i hope someone can help me get started thx in advance

    Read the article

  • ASP.Net Session Storage provider in 3-layer architecture

    - by Tedd Hansen
    I'm implementing a custom session storage provider in ASP.Net. We have a strict 3-layer architecture and therefore the session storage needs to go through the business layer. Presentation-Business-Database. The business layer is accessed through WPF. The database is MSSQL. What I need is (in order of preference): A commercial/free/open source product that solves this. The source code of a SqlSessionStateStore (custom session store) (not the ODBC-sample on MSDN) that I can modify to use a middle layer. I've tried looking at .Net source through Reflector, but the code is not usable. Note: I understand how to do this. I am looking for working samples, preferably that has been proven to work fine under heavy load. The ODBC sample on MSDN doesn't use the (new?) stored procs that the build in SqlSessionStateStore uses - I'd like to use these if possible (decreases traffic). Edit1: To answer Simons question on more info: ASP.Net Session()-object can be stored in either InProc, ASP.Net State Service or SQL-server. In a secure 3-layer model the presentation layer (web server) does not have direct/physical access to the database layer (SQL-server). And even without the physical limitations, from an architectural standpoint you may not want this. InProc and ASP.Net State Service does not support load balancing and doesn't have fault tolerance. Therefore the only option is to access SQL through webservice middle layer (business layer).

    Read the article

  • Correct use of boost lambda

    - by Niels P.
    Consider the following piece of C++0x code: a_signal.connect([](int i) { if(boost::any_cast<std::string>(_buffer[i]) == "foo") { base_class<>* an_object = new derived_class(); an_object->a_method(_buffer[i]); }}); How would it correctly look in Boost Lambda (since this C++0x feature can't be used yet)?

    Read the article

  • Compilig + testing an Android library with the JDK?

    - by Jarle Hansen
    Hi all, I am creating a library for Android that others can include in their own project. So far I have been working on it as a normal Java project with JDK 1.6 setup as system library. This works just fine in Eclipse when I add the android.jar. The issue comes when I try to my build script. I am running Gradle and doing a normal compile and test build cycle. My thoughts were that it does not matter if I compile it with a normal JDK, since this is not a standalone application. The benefits by creating a normal Java project is that Gradle does support this much better. My project also does not contain any UI at all. However, the problem is that of course android.jar and the JDK contains lots of the same classes and I think that this is what messes up my build script. Everything crashes when running the tests (the tests are in the same project under src/test/java). My question is, how should I create this project that is meant to be included in Android projects as a third party library? Should I create it as an Android project in Eclipse even though I am only creating a library that does not use any of the UI features? Also, should the tests be in a separate project? Thanks for all responses!

    Read the article

  • Dash surrounding text

    - by Brandon Hansen
    Given the above dynamically generated text (meaning that I can't just use an image), I am trying to recreate the design using just html and css selectors. I would like to just use a single h4 with the containing text, but am open to other solutions. I would prefer to not use absolute positioning, but again, if that is the only way, then so be it. I have tried surrounding with span tags, but those are inline elements that don't have an inherent width. The h4 will be nested within a div, though not always of the same class or id. Any ideas or resources to get me started?

    Read the article

  • How do I perform this XPath query with Linq?

    - by John Hansen
    In the following code I am using XPath to find all of the matching nodes using XPath, and appending the values to a StringBuilder. StringBuilder sb = new StringBuilder(); foreach (XmlNode node in this.Data.SelectNodes("ID/item[@id=200]/DAT[1]/line[position()>1]/data[1]/text()")) { sb.Append(node.Value); } return sb.ToString(); How do I do the same thing, except using Linq to XML instead? Assume that in the new version, this.Data is an XElement object.

    Read the article

  • Why Do I See the "In Recovery" Msg, and How Can I Prevent it?

    - by John Hansen
    The project I'm working on creates a local copy of the SQL Server database for each SVN branch you work on. We're running SQL Server 2008 Express with Advanced Services on our local machine to host it. When we create a new branch, the build script will create a new database with the ID of that branch, creates the schema objects, and copies over a selection of data from the production shadow server. After the database is created, it, or other databases on the local machine, will often go into "In Recovery" mode for several minutes. After several refreshes it comes up and is happy, but will occasionally go back into "In Recovery" mode. The database is created in simple recovery mode. The file names aren't specified, so it uses default paths for files. The size of the database after loading data is ~400 megs. It is running in SQL Server 2005 compatibility mode. The command that creates the database is: sqlcmd -S $(DBServer) -Q "IF NOT EXISTS (SELECT [name] FROM sysdatabases WHERE [name] = '$(DBName)') BEGIN CREATE DATABASE [$(DBName)]; print 'Created $(DBName)'; END" ...where $(DBName) and $(DBServer) are MSBuild parameters. I got a nice clean log file this morning. When I turned on my computer it starts all five databases. However, two of them show transactions being rolled forward and backwards. The it just keeps trying to start up all five of the databases. 2010-06-10 08:24:59.74 spid52 Starting up database 'ASPState'. 2010-06-10 08:24:59.82 spid52 Starting up database 'CommunityLibrary'. 2010-06-10 08:25:03.97 spid52 Starting up database 'DLG-R8441'. 2010-06-10 08:25:05.07 spid52 2 transactions rolled forward in database 'DLG-R8441' (6). This is an informational message only. No user action is required. 2010-06-10 08:25:05.14 spid52 0 transactions rolled back in database 'DLG-R8441' (6). This is an informational message only. No user action is required. 2010-06-10 08:25:05.14 spid52 Recovery is writing a checkpoint in database 'DLG-R8441' (6). This is an informational message only. No user action is required. 2010-06-10 08:25:11.23 spid52 Starting up database 'DLG-R8979'. 2010-06-10 08:25:12.31 spid36s Starting up database 'DLG-R8441'. 2010-06-10 08:25:13.17 spid52 2 transactions rolled forward in database 'DLG-R8979' (9). This is an informational message only. No user action is required. 2010-06-10 08:25:13.22 spid52 0 transactions rolled back in database 'DLG-R8979' (9). This is an informational message only. No user action is required. 2010-06-10 08:25:13.22 spid52 Recovery is writing a checkpoint in database 'DLG-R8979' (9). This is an informational message only. No user action is required. 2010-06-10 08:25:18.43 spid52 Starting up database 'Rls QA'. 2010-06-10 08:25:19.13 spid46s Starting up database 'DLG-R8979'. 2010-06-10 08:25:23.29 spid36s Starting up database 'DLG-R8441'. 2010-06-10 08:25:27.91 spid52 Starting up database 'ASPState'. 2010-06-10 08:25:29.80 spid41s Starting up database 'DLG-R8979'. 2010-06-10 08:25:31.22 spid52 Starting up database 'Rls QA'. In this case it kept trying to start the databases continuously until I shut down SQL Server at 08:48:19.72, 23 minutes later. Meanwhile, I actually am able to use the databases much of the time.

    Read the article

  • ASP.NET: Using Session to store authentication?

    - by Niels Bosma
    I'm having a lot of problems with FormsAuthentication (http://stackoverflow.com/questions/2964342/problem-with-asp-net-authentication) and as as potential work around I'm thinking about storing the login in the Session? Login: Session["Auth.ClientId"] = clientId; IsAuthenticated: Session["Auth.ClientId"] != null; Logout; Session["Auth.ClientId"] == null; I'm not really using most of the bells and whistles of FormsAuthentication anyway. Is this a bad idea?

    Read the article

  • Response.Redirect exception

    - by Tedd Hansen
    Executing the line: Response.Redirect("Whateva.aspx", true); Results in: A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll An exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll but was not handled in user code The exception is because of the "true" part, telling it to end the current request immediately. Is this how it should be? If we consider: Exceptions are generally considered heavy, and many times the reason for ending the request early is to avoid processing the rest of the page. Exceptions show up in performance monitoring, so monitoring the solution will show a false number of exceptions. Is there an alternative way to achieve the same?

    Read the article

  • Magento - How to link the Configurable Product image to the Simple Product image?

    - by Niels
    This is the case: I have a configurable product with several simple products. These simple products need to have the same product image as the configurable product. Now I have to upload the same image to each simple product over and over again. Is there a way to link the product image of the configurable product to the simple products? Some of my products have 30 simple products in 1 configurable product and it is kinda irrelevant to upload the same image 30 times. I hope someone can help me with this problem! Thanks in advance!

    Read the article

  • Dynamically showing TableView or DetailView

    - by Niels
    From my TableView I dynamically want to show either a TableView or a DetailView (new segue), based on the cell's content. I setup two segues from the TableView to different DetailViews and one segue from the TableViewCell to the TableView. I have almost completed the implementation using performSegueWithIdentifier: (see below), but there is one struggling issue remaining: after I call [self dismissModalViewControllerAnimated:YES]; on the DetailView it returns to an empty TableView . I assume because the Storyboard segue from the UITableViewCell is performed. By clicking the back button I return to my original (parent) TableView data. Any suggestions for this work? - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { NSLog(@"%s", __PRETTY_FUNCTION__); NSString *type = [[self.dataController objectInListAtIndex:[self.tableView indexPathForSelectedRow].row] valueForKey:@"cell_type"]; NSLog(@"cell_type: %@", type); if([[segue identifier] isEqualToString:@"DetailSegue"]) { UIViewController *detailViewController = [segue destinationViewController]; detailViewController.game = [self.dataController objectInListAtIndex:[self.tableView indexPathForSelectedRow].row]; } else if ... } else if([[segue identifier] isEqualToString:@"TableViewSegue"]){ if([type isEqualToString:@"TableView"]){ //Create child ViewController, a custom ViewController with custom initWithId:Title: CategoryViewController *categoryViewController = [[segue destinationViewController] initWithId:categoryId Title:categoryTitle]; } } }

    Read the article

  • Subversion: How to make local changes to a file *never* check in, but have it sync with remote anyway?

    - by Niels Heidenreich
    I have a file with local changes that should never sync back to the repository because it's for my local installation only. But if that same file is changed in the repo, I want those changes to update my local copy, anyway. At the moment, the file in question always shows up in the list of changes when I want to check-in my changes, and I have to manually exclude it from the check-in. How do I make it so that I can just update, with the above restriction in place? Thanks :)

    Read the article

  • Large memory chunk not garbage collected

    - by Niels
    In a hunt for a memory-leak in my app I chased down a behaviour I can't understand. I allocate a large memory block, but it doesn't get garbage-collected resulting in a OOM, unless I explicit null the reference in onDestroy. In this example I have two almost identical activities that switch between each others. Both have a single button. On pressing the button MainActivity starts OOMActivity and OOMActivity returns by calling finish(). After pressing the buttons a few times, Android throws a OOMException. If i add the the onDestroy to OOMActivity and explicit null the reference to the memory chunk, I can see in the log that the memory is correctly freed. Why doesn't the memory get freed automatically without the nulling? MainActivity: package com.example.oom; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class MainActivity extends Activity implements OnClickListener { private int buttonId; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); System.gc(); Button OOMButton = new Button(this); OOMButton.setText("OOM"); buttonId = OOMButton.getId(); setContentView(OOMButton); OOMButton.setOnClickListener(this); } @Override public void onClick(View v) { if (v.getId() == buttonId) { Intent leakIntent = new Intent(this, OOMActivity.class); startActivity(leakIntent); } } } OOMActivity: public class OOMActivity extends Activity implements OnClickListener { private static final int WASTE_SIZE = 20000000; private byte[] waste; private int buttonId; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Button BackButton = new Button(this); BackButton.setText("Back"); buttonId = BackButton.getId(); setContentView(BackButton); BackButton.setOnClickListener(this); waste = new byte[WASTE_SIZE]; } public void onClick(View view) { if (view.getId() == buttonId) { finish(); } } }

    Read the article

  • Running script constantly in background: daemon, lock file with crontab, or simply loop?

    - by Mauritz Hansen
    I have a Perl script that queries a database for a list of files to process processes the files and then exits Upon startup this script creates a file (let's say script.lock), and upon exit it removes this file. I have a crontab entry that runs this script every minute. If the lockfile exists then the script exits, assuming that another instance of itself is running. The above process works fine but I am not very happy with the robustness of this approach. Specifically, if for some reason the script exits prematurely and the lockfile is not removed then a new instance will not execute properly. I would appreciate some advice on the following: Is using the lock file a good approach or is there a better/more robust way to do this? Is using crontab for this a good idea or could I better write an endless loop with sleep()? Should I use the GNU 'daemon' program or the Perl Proc::Daemon module (or some other equivalent) for this?

    Read the article

  • is vim able to detect in which language a file is written, and then load the correct dictionnary ?

    - by Niels
    I am using several languages, and by now I am obliged to indicate vim with which of these the spell check must be done. Is there a way to set up vim so that he automatically detects the correct one ? I remember vaguely that in a previous version of vim, when the spell check was not integrated, this was possible, using the vimspell script. It would be even better if this could apply not only to a file but also to a portion of a file, since I frequently mix several languages in a single file. Of course, I would like to avoid to load several dictionaries simultaneously.

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >