Daily Archives

Articles indexed Thursday May 20 2010

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

  • difference equations in MATLAB - why the need to switch signs?

    - by jefflovejapan
    Perhaps this is more of a math question than a MATLAB one, not really sure. I'm using MATLAB to compute an economic model - the New Hybrid ISLM model - and there's a confusing step where the author switches the sign of the solution. First, the author declares symbolic variables and sets up a system of difference equations. Note that the suffixes "a" and "2t" both mean "time t+1", "2a" means "time t+2" and "t" means "time t": %% --------------------------[2] MODEL proc-----------------------------%% % Define endogenous vars ('a' denotes t+1 values) syms y2a pi2a ya pia va y2t pi2t yt pit vt ; % Monetary policy rule ia = q1*ya+q2*pia; % ia = q1*(ya-yt)+q2*pia; %%option speed limit policy % Model equations IS = rho*y2a+(1-rho)yt-sigma(ia-pi2a)-ya; AS = beta*pi2a+(1-beta)*pit+alpha*ya-pia+va; dum1 = ya-y2t; dum2 = pia-pi2t; MPs = phi*vt-va; optcon = [IS ; AS ; dum1 ; dum2; MPs]; He then computes the matrix A: %% ------------------ [3] Linearization proc ------------------------%% % Differentiation xx = [y2a pi2a ya pia va y2t pi2t yt pit vt] ; % define vars jopt = jacobian(optcon,xx); % Define Linear Coefficients coef = eval(jopt); B = [ -coef(:,1:5) ] ; C = [ coef(:,6:10) ] ; % B[c(t+1) l(t+1) k(t+1) z(t+1)] = C[c(t) l(t) k(t) z(t)] A = inv(C)*B ; %(Linearized reduced form ) As far as I understand, this A is the solution to the system. It's the matrix that turns time t+1 and t+2 variables into t and t+1 variables (it's a forward-looking model). My question is essentially why is it necessary to reverse the signs of all the partial derivatives in B in order to get this solution? I'm talking about this step: B = [ -coef(:,1:5) ] ; Reversing the sign here obviously reverses the sign of every component of A, but I don't have a clear understanding of why it's necessary. My apologies if the question is unclear or if this isn't the best place to ask.

    Read the article

  • what is the wrong in the code ???

    - by rajesh
    function checkLength(obj,url){ //alert("URL="+url+" OBJ="+obj); if(obj) { var params = 'query='+obj; var myAjax = new Ajax.Request(url, { method: 'post', parameters: params, onComplete: loadResponse }); } } is nor working why i think there is requirement of include some files in it.which is that??/

    Read the article

  • Is drupal cms suitable for this?

    - by Folle
    My aim is to create a website where I can add some test content along with pictures. Then, what exactly I need is an easy way to add those into the site. Say, I have designed (in photoshop) a certain theme for this purpose, and now I am wondering if I could use drupal for the matter? Or should I create a website from scratch? Which route is the easiest? Apply the theme to the drupal? I've just never used no CMS, that's why I ask.

    Read the article

  • What do you name the "other" kind of view-model in an MVVM project?

    - by DanM
    With MVVM, I think of a view-model as a class that provides all the data and commands that a view needs to bind to. But what happens when I have a database entity object, say a Customer, and I want to build a class that shapes or flattens the Customer class for use in a data grid. For example, maybe this special Customer object would have a property TotalOrders, which is actually calculated using a join with a collection of Order entities. My question is, what do I call this special Customer class? In other situations, I'd be tempted to call it a CustomerViewModel, but I feel like "overloading" the notion of a view-model like this would be confusing in an MVVM project. What would you suggest?

    Read the article

  • Silverlight Cream for May 19, 2010 -- #865

    - by Dave Campbell
    In this Issue: Michael Washington, Mike Snow(-2-), Justin Angel(-2-), Jeremy Likness, and David Kelley. Shoutout: Erik Mork and crew have their latest up: Silverlight Week – Silverlight Android? From SilverlightCream.com: Simple Silverlight 4 Example Using oData and RX Extensions Michael Washington has a follow-on tutorial up on ViewModel, Rx, and lashed up to OData... good detailed tutorial with external links for more information. Silverlight Tip of the Day #21 – Animation Easing Mike Snow has a couple new tips up -- this first one is about easing... great diagrams to help visualize and a cool demo application to boot. Silverlight Tip of the Day #22 – Data Validation Mike Snow's second tip (#22) is about validation and again he has a great demo app on the post. Windows Phone 7 - Emulator Automation Justin Angel has a WP7 post up about Automating the emulator... and in the process, loading the emulator from something other than VS2010... lots of good information. TFS2010 WP7 Continuous Integration Justin Angel hinted at continuous integration for WP7 in the last post, and he pays off with this one... even without all the bits installed on the build server. Making the ScrollViewer Talk in Silverlight 4 Jeremy Likness tried to respond to a user query about knowing when a user scrolled to the bottom of a ScrollViewer... Jeremy resolved it by listening to the right property. MEF (Microsoft Extensibility Framework) made simple (ish) David Kelley is discussing MEF and using a real-world example while doing so. Good discussion and code available in his code browser app... check thecomments. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • What does SQL Server's BACKUPIO wait type mean?

    - by solublefish
    I'm using Sql Server 2008 ("R1"), with some maintenance plans that back up my databases to a network share. Some of my backup jobs show long waits of type "BACKUPIO". Of course it seems like this is an I/O subsystem limitation, but I'm skeptical. Perfmon stats for I/O on the production (source) server are well within normal trends for that server. The destination server shows a sustained 7MB/s write rate, which seems incredibly low, even for a slow disk. The network link is gigabit ethernet and nowhere near saturated. The few docs I've turned up about BACKUPIO indicate that it's not specifically a wait on I/O, surprisingly enough. This MSFT doc says it's abnormal unless you're using a tape drive, which I'm not. But it doesn't say (or I don't understand) exactly what resource is missing. http://www.docstoc.com/docs/24580659/Performance-Tuning-in-SQL-Server-2005 And this piece says it's not related to I/O performance at all. http://www.informit.com/articles/article.aspx?p=686168&seqNum=5 "Note that BACKUPIO and IO_AUDIT_MUTEX are not related to IO performance." Anyway, does anyone know what BACKUPIO actually means and/or what I can do to diagnose or eliminate it?

    Read the article

  • What can I do to avoid losing original resolution when uploading or exporting photos from Picasa?

    - by Janet Levin
    I'm not a programmer, and/but after multiple email discussions and google searches confirmed the problem I'm describing, and after making changes in picasa preferences with no change in resolution loss (from say, 800kb original image to 235kb after export or upload), I'm at a dead end and thinking the answer may lie among you folks, even though I barely understand the language here.

    Read the article

  • some fields of "content//sms/"

    - by soclose
    Hi, I query "content//sms/" and don't know what some fields are. They are - Thread ID Protocol Status Reply_Path_Present Service_Center I check them in LogCat. I find them like below Thread ID : 1 to 6 etc.. Protocol : null / 0 Status : -1 Reply_Path_Present : null / 0 Service_Center : null Please tell me what they are.

    Read the article

  • Ruby: merge two hash as one and with value connected

    - by scalalala
    Hi guys: 2 hash: h1 = { "s1" => "2009-7-27", "s2" => "2010-3-6", "s3" => "2009-7-27" } h2 = { "s1" => "12:29:15", "s2" => "10:00:17", "s3" => "12:25:52" } I want to merge the two hash as one like this: h = { "s1" => "2009-7-27 12:29:15", "s2" => "2010-3-6 10:00:17", "s3" => "2009-7-27 2:25:52" } what is the best way to do this? thanks!

    Read the article

  • how can udp data can passed through RS232 in ansi c?

    - by moon
    i want to transmit and receive data on RS232 using udp and i want to know about techniques which allow me to transmit and receive data on a faster rate and also no lose of data is there? thanx in advance. i have tried but need improvements if possible #include <stdio.h> #include <dos.h> #include<string.h> #include<conio.h> #include<iostream.h> #include<stdlib.h> #define PORT1 0x3f8 void main() { int c,ch,choice,i,a=0; char filename[30],filename2[30],buf; FILE *in,*out; clrscr(); while(1){ outportb(PORT1+0,0x03); outportb(PORT1+1,0); outportb(PORT1+3,0x03); outportb(PORT1+2,0xc7); outportb(PORT1+4,0x0b); cout<<"\n==============================================================="; cout<<"\n\t*****Serial Communication By BADR-U-ZAMAN******\nCommunication between two computers By serial port"; cout<<"\nPlease select\n[1]\tFor sending file \n[2]\tFor receiving file \n[3]\tTo exit\n"; cout<<"=================================================================\n"; cin>>choice; if(choice==1) { strcpy(filename,"C:\\TC\\BIN\\badr.cpp"); cout<<filename; for(i=0;i<=strlen(filename);i++) outportb(PORT1,filename[i]); in=fopen(filename,"r"); if (in==NULL) { cout<<"cannot open a file"; a=1; } if(a!=1) cout<<"\n\nFile sending.....\n\n"; while(!feof(in)) { buf=fgetc(in); cout<<buf; outportb(PORT1,buf); delay(5); } } else { if(choice==3) exit(0); i=0; buf='a'; while(buf!=NULL) { c=inportb(PORT1+5); if(c&1) { buf=inportb(PORT1); filename2[i]=buf; i++; } } out=fopen(filename2,"t"); cout<<"\n Filename received:"<<filename[2]; cout<<"\nReading from the port..."; cout<<"writing to file"<<filename2; do { c=inportb(PORT1+5); if(c&1) { buf=inportb(PORT1); cout<<buf; fputc(buf,out); delay(5); } if(kbhit()) { ch=getch(); } }while(ch!=27); } getch(); } }

    Read the article

  • TextBoxWatermarkExtender and Custom validator problem

    - by Mac
    i have two textboxes one for phone and one for email for phone textbox i have used textbox watermark extender and a filtered textbox extender provided in ajax extension toolkit as a water mark extender text iam displaying only numbers are allowed. the problem is that on client side validation of two textboxes by custom validator iam checking function ValidatePhoneEmail(source, args) { var txtEmail = $('#<%= txtEmail.ClientID %'); var txtPhone = $('#<%= txtPhone.ClientID %>'); if (txtEmail.focus().val().trim() != '' || txtPhone.focus().val().trim() != '') { args.isValid = true; } else { args.isValid = false; } } and the problem is phone textbox is not empty as it contains text "Only Numbers" so it always return false what to do..?

    Read the article

  • Does html5 allow desktop execution?

    - by Shawn Mclean
    I want a functionality similiar to Adobe AIR or Silverlight Out of Browser but without the need for downloading plugins. I want the user to be on the site, then click install, javascript takes over and save itself to the local file system where it can then be clicked, then started up in the browser. Similiar to save-file. Html5 will handle the offline execution, etc.

    Read the article

  • Need help figuring out scala compiler errors.

    - by klactose
    Hello all, I have been working on a project in scala, but I am getting some error messages that I don't quite understand. The classes that I am working with are relatively simple. For example: abstract class Shape case class Point(x: Int, y: Int) extends Shape case class Polygon(points: Point*) extends Shape Now suppose that I create a Polygon: val poly = new Polygon(new Point(2,5), new Point(7,0), new Point(3,1)) Then if I attempt to determine the location and size of the smallest possible rectangle that could contain the polygon, I get various errors that I don't quite understand. Below are snippets of different attempts and the corresponding error messages that they produce. val upperLeftX = poly.points.reduceLeft(Math.min(_.x, _.x)) Gives the error: "missing parameter type for expanded function ((x$1) = x$1.x)" val upperLeftX = poly.points.reduceLeft((a: Point, b: Point) => (Math.min(a.x, b.x))) Gives this error: "type mismatch; found : (Point, Point) = Int required: (Any, Point) = Any" I am very confused about both of these error messages. If anyone could explain more clearly what I am doing incorrectly, I would really appreciate it. Yes, I see that the second error says that I need type "Any" but I don't understand exactly how to implement a change that would work as I need it. Obviously simply changing "a: Point" to "a: Any" is not a viable solution, so what am I missing?

    Read the article

  • ColdFusion Session Variables

    - by Faisal Abid
    Do the session variables in coldfusion expire or purge before the specified limit? Like say if the expiration is set to 24 hours, and the user only interacts with them for 10 minutes, do they expire if there not being used before the 24 hours?

    Read the article

  • How to avoid OCIError in rails application?

    - by qichunren
    OCIError (ORA-12541: TNS:no listener): oci8.c:270:in oci8lib.so /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.2.4/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:223:in new' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.2.4/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:223:innew_connection' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.2.4/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:328:in initialize' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.2.4/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:24:innew' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.2.4/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:24:in initialize' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.2.4/lib/active_record/connection_adapters/oracle_enhanced_connection.rb:9:innew' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.2.4/lib/active_record/connection_adapters/oracle_enhanced_connection.rb:9:in create' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.2.4/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:50:inoracle_enhanced_connection' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in send' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:inconnection=' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:259:in retrieve_connection' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:inconnection' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1063:in table_exists?' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1153:ininspect' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/core_ext/class/inheritable_attributes.rb:131:in to_proc' /usr/local/ruby-1.8.7-p248/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:426:incollect' It seems that rails app lost oracle connection,how to avoid this in application controller: def rescue_action_in_public(exception) I use def rescue_action_in_public(exception) case exception.class.to_s when "OCIError" # my solution end It still throw me 500.html

    Read the article

  • When a python process is killed on OSX, why doesn't it kill the child processes?

    - by Hugh
    I found myself getting very confused a while back by some changes that I found when moving Python scripts from Linux over to OSX... On Linux, if a python script has called os.system(), and the calling process is killed, the called process will be killed at the same time. On OSX, however, if the main process is killed, anything that it launched is left behind. Is there something somewhere in OSX/Python where I can change this behaviour? This is causing problems on our render farm, where the processes can be killed from the management GUI, but the top level process is really just a wrapper, so, while the render farm management might think that the process has gone and the machine is freed up for another task, the actual processor-intensive task is still running, which can lead to huge blockages. I know that I could write more logic to catch the kill signal and pass it on to the child processes, but I was hoping that it might be something that could be enabled at a lower level.

    Read the article

  • Reduce Bookmarks in Chrome to Toolbar Icons

    - by Asian Angel
    Do you want to make the most efficient use of the space in Chrome’s Bookmarks Toolbar? Now you can reduce the bookmarks to icons with just a few minutes work. Note: You may or may not wish to do some reorganizing with your bookmarks before-hand. Condensing the Bookmarks If your browser is anything like ours then it has not taken long to fill up your Bookmarks Toolbar. Accessing the drop-down section often throughout the day is not too fun. The bookmarks are the easiest part of your collection to condense. Right-click on each bookmark and select “Edit…” to open the Edit Bookmark Window. Delete the text, click OK, and you are finished. You still have a useable bookmark that looks nice and takes up very little room. These are our bookmarks from the first screenshot above…no problems with accessing all of them now. With just a few minutes work you can have a beautiful and compact Bookmarks Toolbar. If you have been looking for a more efficient and compact Bookmarks Toolbar in Chrome, then this little hack will certainly be useful for you. Similar Articles Productive Geek Tips Reduce Your Bookmarks Toolbar to a Toolbar ButtonAccess Your Bookmarks with a Toolbar Button in Google ChromeConvert Chrome Bookmark Toolbar Folders to IconsAdd the Bookmarks Menu to Your Bookmarks Toolbar with Bookmarks UI ConsolidatorCompact Toolbar Buttons in Firefox TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips VMware Workstation 7 Acronis Online Backup DVDFab 6 Revo Uninstaller Pro Creating a Password Reset Disk in Windows Bypass Waiting Time On Customer Service Calls With Lucyphone MELTUP – "The Beginning Of US Currency Crisis And Hyperinflation" Enable or Disable the Task Manager Using TaskMgrED Explorer++ is a Worthy Windows Explorer Alternative Error Goblin Explains Windows Error Codes

    Read the article

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