# Search Results

• ### Using Taylor Polynomials Programmatically in Maple

##### - by kzh
I am trying to use a Taylor polynomial programmatically in Maple, but the following does not seem to work... T[6]:=taylor(sin(x),x=Pi/4,6);convert(T[6], polynom, x); f:=proc(x) convert(T[6], polynom, x); end proc; f(1); All of the following also do not work: f:=convert(T[6], polynom); f:=convert(T[6], polynom, x); f:=x->convert(T[6], polynom); f:=x->convert(T[6], polynom, x);. Is there a way of doing this without copying and pasting the output of convert into the definition of f?

• ### Using Taylor Series to Avoid Loss of Precision

##### - by Zachary
I'm trying to use Taylor series to develop a numerically sound algorithm for solving a function. I've been at it for quite a while, but haven't had any luck yet. I'm not sure what I'm doing wrong. The function is f(x)=1 + x - sin(x)/ln(1+x) x~0 Also: why does loss of precision even occur in this function? when x is close to zero, sin(x)/ln(1+x) isn't even close to being the same number as x. I don't see where significance is even being lost. In order to solve this, I believe that I will need to use the Taylor expansions for sin(x) and ln(1+x), which are x - x^3/3! + x^5/5! - x^7/7! + ... and x - x^2/2 + x^3/3 - x^4/4 + ... respectfully. I have attempted to use like denominators to combine the x and sin(x)/ln(1+x) components, and even to combine all three, but nothing seems to work out correctly in the end. Any help is appreciated.

• ### TechEd Video Chat: SharePoint 2010 with Andrew Connell

Check out this video interview from TechEd 2010 with SharePoint MVP and guru, Andrew Connell: In the video, Andrew discusses: What is awesome about SharePoint 2010? Silverlight in SharePoint 2010 The SharePoint 2010 development experience Andrews CodeRush plugins that help solve SharePoint development pains Andrew's push to improve DevExpress' involvement in the SharePoint developer market SharePoint education and training from CriticalPath Is Andrew the best...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

• ### Apps Script Developer Chat: Andrew Stillman

Apps Script Developer Chat: Andrew Stillman Join us for a chat with Andrew Stillman, the developer of several popular scripts in the Script Gallery, such as formMule, formMutant, autoCrat, doctopus, and more. We'll talk with Andrew about his experiences with Apps Script and how he applies it to his work at New Visions for Public Schools and with youpd.org. From: GoogleDevelopers Views: 0 0 ratings Time: 00:00 More in Science & Technology

• ### Transcript: Andrew Tridgell on Patent Defence

<b>ESP Software Patents News:</b> "The following is a transcript of a talk given in New Zealand, 2010. Andrew Tridgell discusses why reading patents is usually a good idea, how to read a patent, and how to work through it with a lawyer to build a solid defence."

• ### complete project of the book -- “ASP.NET 3.5 Social Networking” by Andrew Siemer

##### - by user287745
i have been reading, using vs too to get familiar with the step followed to write the coding...... i have reached the end, all the code the third party plug-ins, references etc have been made on running the work it gives a lot of errors, some are too hard to debug. can any one please help by giving the complete website this book has taught us to make?

• ### Question about "ASP.NET 3.5 Social Networking" by Andrew Siemer (from Packt Publishing)

##### - by user287745
am currently reading a book, which has explanation of making a social website. ASP.NET 3.5 Social Networking https://www.packtpub.com/expert-guide-for-social-networking-with-asp-.net-3.5/book On page 41 I noticed that the images of the solution explorer given in the text, indicate that windowsformapplication[PROJECT] has been used instead of WebForms[create new website]. there are no webforms? how would the end result be a site? what is happening here?? the name of the book is, ASP.NET 3.5 Social Networking, please refer to page 41, thanks note:- i have always made websites which needs hosting and be accessible from other computers using webforms[create new website] which has web.config file app_data etc..... please help thank you.

• ### Need help programming with Mclauren series and Taylor series!

##### - by user352258
Ok so here's what i have so far: #include <stdio.h> #include <math.h> //#define PI 3.14159 int factorial(int n){ if(n <= 1) return(1); else return(n * factorial(n-1)); } void McLaurin(float pi){ int factorial(int); float x = 42*pi/180; int i, val=0, sign; for(i=1, sign=-1; i<11; i+=2){ sign *= -1; // alternate sign of cos(0) which is 1 val += (sign*(pow(x, i)) / factorial(i)); } printf("\nMcLaurin of 42 = %d\n", val); } void Taylor(float pi){ int factorial(int); float x; int i; float val=0.00, sign; float a = pi/3; printf("Enter x in degrees:\n"); scanf("%f", &x); x=x*pi/180.0; printf("%f",x); for(i=0, sign=-1.0; i<2; i++){ if(i%2==1) sign *= -1.0; // alternate sign of cos(0) which is 1 printf("%f",sign); if(i%2==1) val += (sign*sin(a)*(pow(x-a, i)) / factorial(i)); else val += (sign*cos(a)*(pow(x-a, i)) / factorial(i)); printf("%d",factorial(i)); } printf("\nTaylor of sin(%g degrees) = %d\n", (x*180.0)/pi, val); } main(){ float pi=3.14159; void McLaurin(float); void Taylor(float); McLaurin(pi); Taylor(pi); } and here's the output: McLaurin of 42 = 0 Enter x in degrees: 42 0.733038-1.00000011.0000001 Taylor of sin(42 degrees) = -1073741824 I suspect the reason for these outrageous numbers goes with the fact that I mixed up my floats and ints? But i just cant figure it out...!! Maybe its a math thing, but its never been a strength of mine let alone program with calculus. Also the Mclaurin fails, how does it equal zero? WTF! Please help correct my noobish code. I am still a beginner...

• ### I am trying to deploy my first rails app using Capistrano and am getting an error.

##### - by Andrew Bucknell
My deployment of a rails app with capistrano is failing and I hoping someone can provide me with pointers to troubleshoot. The following is the command output [email protected]:~/projects/rails/guestbook2\$ cap deploy:setup * executing `deploy:setup' * executing "mkdir -p /var/www/dev/guestbook2 /var/www/dev/guestbook2/releases /var/www/dev/guestbook2/shared /var/www/dev/guestbook2/shared/system /var/www/dev/guestbook2/shared/log /var/www/dev/guestbook2/shared/pids && chmod g+w /var/www/dev/guestbook2 /var/www/dev/guestbook2/releases /var/www/dev/guestbook2/shared /var/www/dev/guestbook2/shared/system /var/www/dev/guestbook2/shared/log /var/www/dev/guestbook2/shared/pids" servers: ["dev.andrewbucknell.com"] Enter passphrase for /home/andrew/.ssh/id_dsa: Enter passphrase for /home/andrew/.ssh/id_dsa: [dev.andrewbucknell.com] executing command command finished [email protected]:~/projects/rails/guestbook2\$ cap deploy:check * executing `deploy:check' * executing "test -d /var/www/dev/guestbook2/releases" servers: ["dev.andrewbucknell.com"] Enter passphrase for /home/andrew/.ssh/id_dsa: [dev.andrewbucknell.com] executing command command finished * executing "test -w /var/www/dev/guestbook2" servers: ["dev.andrewbucknell.com"] [dev.andrewbucknell.com] executing command command finished * executing "test -w /var/www/dev/guestbook2/releases" servers: ["dev.andrewbucknell.com"] [dev.andrewbucknell.com] executing command command finished * executing "which git" servers: ["dev.andrewbucknell.com"] [dev.andrewbucknell.com] executing command command finished * executing "test -w /var/www/dev/guestbook2/shared" servers: ["dev.andrewbucknell.com"] [dev.andrewbucknell.com] executing command command finished You appear to have all necessary dependencies installed [email protected]:~/projects/rails/guestbook2\$ cap deploy:migrations * executing `deploy:migrations' * executing `deploy:update_code' updating the cached checkout on all servers executing locally: "git ls-remote [email protected]:/home/andrew/git/guestbook2.git master" Enter passphrase for key '/home/andrew/.ssh/id_dsa': * executing "if [ -d /var/www/dev/guestbook2/shared/cached-copy ]; then cd /var/www/dev/guestbook2/shared/cached-copy && git fetch origin && git reset --hard 369c5e04aaf83ad77efbfba0141001ac90915029 && git clean -d -x -f; else git clone [email protected]:/home/andrew/git/guestbook2.git /var/www/dev/guestbook2/shared/cached-copy && cd /var/www/dev/guestbook2/shared/cached-copy && git checkout -b deploy 369c5e04aaf83ad77efbfba0141001ac90915029; fi" servers: ["dev.andrewbucknell.com"] Enter passphrase for /home/andrew/.ssh/id_dsa: [dev.andrewbucknell.com] executing command ** [dev.andrewbucknell.com :: err] Permission denied, please try again. ** Permission denied, please try again. ** Permission denied (publickey,password). ** [dev.andrewbucknell.com :: err] fatal: The remote end hung up unexpectedly ** [dev.andrewbucknell.com :: out] Initialized empty Git repository in /var/www/dev/guestbook2/shared/cached-copy/.git/ command finished failed: "sh -c 'if [ -d /var/www/dev/guestbook2/shared/cached-copy ]; then cd /var/www/dev/guestbook2/shared/cached-copy && git fetch origin && git reset --hard 369c5e04aaf83ad77efbfba0141001ac90915029 && git clean -d -x -f; else git clone [email protected]:/home/andrew/git/guestbook2.git /var/www/dev/guestbook2/shared/cached-copy && cd /var/www/dev/guestbook2/shared/cached-copy && git checkout -b deploy 369c5e04aaf83ad77efbfba0141001ac90915029; fi'" on dev.andrewbucknell.com [email protected]:~/projects/rails/guestbook2\$ The following fragment is from cap -d deploy:migrations Preparing to execute command: "find /var/www/dev/guestbook2/releases/20100305124415/public/images /var/www/dev/guestbook2/releases/20100305124415/public/stylesheets /var/www/dev/guestbook2/releases/20100305124415/public/javascripts -exec touch -t 201003051244.22 {} ';'; true" Execute ([Yes], No, Abort) ? |y| yes * executing `deploy:migrate' * executing "ls -x /var/www/dev/guestbook2/releases" Preparing to execute command: "ls -x /var/www/dev/guestbook2/releases" Execute ([Yes], No, Abort) ? |y| yes /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.17/lib/capistrano/recipes/deploy.rb:55:in `join': can't convert nil into String (TypeError) from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.17/lib/capistrano/recipes/deploy.rb:55:in `load'

• ### Function approximation with Maclaurin series

##### - by marines
I need to approx (1-x)^0.25 with given accuracy (0.0001 e.g.). I'm using expansion found on Wikipedia for (1+x)^0.25. I need to stop approximating when current expression is less than the accuracy. long double s(long double x, long double d) { long double w = 1; long double n = 1; // nth expression in series long double tmp = 1; // sum while last expression is greater than accuracy while (fabsl(tmp) >= d) { tmp *= (1.25 / n - 1) * (-x); // the next expression w += tmp; // is added to approximation n++; } return w; } Don't mind long double n. :P This works well when I'm not checking value of current expression but when I'm computing 1000 or more expressions. Domain of the function is <-1;1 and s() calculates approximation well for x in <-1;~0.6. The bigger the argument is the bigger is the error of calculation. From 0.6 it exceeds the accuracy. I'm not sure if the problem is clear enough because I don't know English math language well. The thing is what's the matter with while condition and why the function s() doesn't approximate correctly.

• ### DOM: element created with cloneNode(true) missing element when added to DOM

##### - by user149327
I'm creating a tree control and I'm attempting to use a parent element as a template for its children. To this end I'm using the element.cloneNode(true) method to deep clone the parent element. However when I insert the cloned element into the DOM it is missing certain inner elements despite having an outerHTML value identical to its parent. Surprisingly I observe the same behavior is in IE, Firefox, and Chrome leading me to believe that it is by design. This is the HTML for the node I'm attempting to clone. <SPAN class=node><A class=nodeLink href="/SparklerRestService2.aspx?q={0}" name=http://dbpedia.org/data/Taylor_Swift.rdf> <IMG class=nodeIcon alt="Taylor Swift" src="images/node.png"><SPAN class=nodeText>Taylor Swift</SPAN></A><SPAN class=nodeDescription>Taylor Swift is a swell gall who is realy great.</SPAN></SPAN> Once I've cloned the node using cloneNode(true) I examine the outerHTML property and find that it is indeed identical to the original. <SPAN class=node><A class=nodeLink href="/SparklerRestService2.aspx?q={0}" name=http://dbpedia.org/data/Taylor_Swift.rdf><IMG class=nodeIcon alt="Taylor Swift" src="images/node.png"><SPAN class=nodeText>Taylor Swift</SPAN></A><SPAN class=nodeDescription>Taylor Swift is a swell gall who is realy great.</SPAN></SPAN> However when I insert it into the DOM and inspect the result using FireBug I find that the element has been transformed: <span class="node" style="top: 0px; left: 0px;"<a class=nodeLink href="/SparklerRestService2.aspx?q={0}" name=http://dbpedia.org/data/Taylor_Swift.rdf>Taylor Swift</a><span class="nodeDescription">It's great</span></span> Notice that the grandchildren of the node (the image tag and the span tag surrounding "Taylor Swift") are missing, although strangely the great grandchild "Taylor Swift" text node has made it into the tree. Can anyone shed some light on this behavior? Why would nodes disappear after insertion into the DOM, and why am I seeing the same result in all three major browser engines?

• ### Synergy setup broke on upgrade

##### - by CoatedMoose
I had synergy setup working fine with version 1.3.7, however I got a new computer and decided to set it up as well. Because the setup I was working with was ubuntu (server - dual monitors) mac (client) and the new computer (replacing the mac) was windows, I ended up updating everything to 1.4.10. ______ ______ ______ | mac | ubu1 | ubu2 | |______|______|______| The problem is currently that dragging to the left of ubu1 causes the cursor on the mac to flicker briefly and then the cursor shows up at the bottom right corner of ubu2. Here is my .synergy.conf section: screens Andrews-Mac-Mini: ctrl = ctrl alt = meta super = alt Andrew-Ubuntu: end section: links Andrew-Ubuntu: left = Andrews-Mac-Mini Andrews-Mac-Mini: right = Andrew-Ubuntu end And the output from synergys -f NOTE: client "Andrews-Mac-Mini" has connected INFO: switch from "Andrew-Ubuntu" to "Andrews-Mac-Mini" at 1679,451 INFO: leaving screen INFO: screen "Andrew-Ubuntu" updated clipboard 0 INFO: screen "Andrew-Ubuntu" updated clipboard 1 INFO: switch from "Andrews-Mac-Mini" to "Andrew-Ubuntu" at 2398,833 INFO: entering screen

• ### Perform a case insensitive match using Regex without using RegexOptions enumeration

##### - by spoon16
Is it possible to do a case insensitive match in C# using the Regex class without setting the RegexOptions.IgnoreCase flag? What I would like to be able to do is within the regex itself define whether or not I want the match operation to be done in a case insensitive manner. I would like this regex, taylor, to match on the following values: Taylor taylor taYloR

• ### Case insensitive Regex without using RegexOptions enumeration

##### - by spoon16
Is it possible to do a case insensitive match in C# using the Regex class without setting the RegexOptions.IgnoreCase flag? What I would like to be able to do is within the regex itself define whether or not I want the match operation to be done in a case insensitive manner. I would like this regex, taylor, to match on the following values: Taylor taylor taYloR

• ### First Look - Oracle Data Mining

##### - by kimberly.billings
In his blog, JT on EDM, James Taylor shares his analysis of Oracle Data Mining, including its new GUI and Exadata integration. While Oracle Data Mining has been available for a while, it is now easier to access and try via the Amazon Cloud. Using the Oracle 11gR2 Data Mining Amazon Machine Image (AMI), you can launch an Oracle Data Mining-enabled instance directly through Amazon Web Services (AWS) and connect to it using the Oracle Data Miner graphical user interface. The new Oracle Data Mining GUI, which will be available to beta customers soon, provides more graphics, the ability to define, save and share analytical "work flows" to solve business problems, and provides more automation and simplicity. Taylor comments that, "the UI looks to have a nice look and feel including graphical model development flows, easy access to the data, nice little micro graphs when browsing data records and more." On using Oracle Data Mining with Exadata, Taylor writes, "Oracle says that the use of the ODM routines in the Exadata kernel is faster than running a native ODM model in the database by a factor of 2 and that this increases as more joins are used. This could mean that ODM outperforms even third party in-database analytics." Taylor concludes his blog with a positive overall review, stating that "ODM is a nice product for Oracle database customers and well worth looking into. The new UI will only make it more so." Read the blog. var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-13185312-1"); pageTracker._trackPageview(); } catch(err) {}

• ### Remove duplicates from a list of nested dictionaries

##### - by user2924306
I'm writing my first python program to manage users in Atlassian On Demand using their RESTful API. I call the users/search?username= API to retrieve lists of users, which returns JSON. The results is a list of complex dictionary types that look something like this: [ { "self": "http://www.example.com/jira/rest/api/2/user?username=fred", "name": "fred", "avatarUrls": { "24x24": "http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred", "16x16": "http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred", "32x32": "http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred", "48x48": "http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred" }, "displayName": "Fred F. User", "active": false }, { "self": "http://www.example.com/jira/rest/api/2/user?username=andrew", "name": "andrew", "avatarUrls": { "24x24": "http://www.example.com/jira/secure/useravatar?size=small&ownerId=andrew", "16x16": "http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=andrew", "32x32": "http://www.example.com/jira/secure/useravatar?size=medium&ownerId=andrew", "48x48": "http://www.example.com/jira/secure/useravatar?size=large&ownerId=andrew" }, "displayName": "Andrew Anderson", "active": false } ] I'm calling this multiple times and thus getting duplicate people in my results. I have been searching and reading but cannot figure out how to deduplicate this list. I figured out how to sort this list using a lambda function. I realize I could sort the list, then iterate and delete duplicates. I'm thinking there must be a more elegant solution. Thank you!

• ### How to get only one row for each distinct value in the column ?

##### - by Chavdar
Hi Everybody, I have a question about Access.If for example I have a table with the following data : NAME | ADDRESS John Taylor | 33 Dundas Ave. John Taylor | 55 Shane Ave. John Taylor | 786 Edward St. Ted Charles | 785 Bloor St. Ted Charles | 90 New York Ave. I want to get one record for each person no matter of the address.For example : NAME | ADDRESS John Taylor | 33 Dundas Ave. Ted Charles | 90 New York Ave. Can this be done with queries only ? I tried using DISTINCT, but when I am selecting both columns, the combination is allways unique so I get all the rows. Thank you !

• ### How should I fix problems with file permissions while restoring from Time Machine?

##### - by Andrew Grimm
While restoring files from a Time Machine backup, I got the error message "The operation can’t be completed because you don’t have permission to access some of the items." because of problems with files in one folder. What's the safest way to deal with this? The folder in question has permissions like: Andrew-Grimms-MacBook-Pro:kmer agrimm\$ pwd /Volumes/Time Machine Backups/Backups.backupdb/Andrew Grimm’s MacBook Pro/2010-12-09-224309/Macintosh HD/Users/agrimm/ruby/kmer Andrew-Grimms-MacBook-Pro:kmer agrimm\$ ls -ltra total 6156896 [email protected] 19 agrimm staff 680 18 Jan 2008 Saccharomyces_cerevisiae [email protected] 1 agrimm staff 60221852 4 Aug 2009 hs_ref_GRCh37_chrY.fa [email protected] 1 agrimm staff 157488804 4 Aug 2009 hs_ref_GRCh37_chrX.fa (snip a few files) [email protected] 1 agrimm staff 676063 27 Oct 2009 NC_001143.fna [email protected] 1 agrimm staff 6148 23 Mar 2010 .DS_Store [email protected] 3 agrimm staff 1530 23 Mar 2010 . [email protected] 30 agrimm staff 1054 20 Nov 14:43 .. Is it ok to do sudo chmod, or is there a safer approach? Background: Files within the original folder on my computer also had weird permissions - I suspect I may have used sudo to copy some files from a thumbdrive onto my computer.

• ### counting unique values based on multiple columns

##### - by gooogalizer
I am working in google spreadsheets and I am trying to do some counting that takes into consideration cell values across multiple cells in each row. Here's my table: |AUTHOR| |ARTICLE| |VERSION| |PRE-SELECTED| ANDREW GOLF STREAM 1 X ANDREW GOLF STREAM 2 X ANDREW HURRICANES 1 JOHN CAPE COD 1 X JOHN GOLF STREAM 1 (Google doc here) Each person can submit multiple articles as well as multiple versions of the same article. Sometimes different people submit different articles that happen to be identically named (Andrew and John both submitted different articles called "Golf Stream"). Multiple versions written by the same person do not count as unique, but articles with the same title written by different people do count as unique. So, I am looking to find a formula that Counts the number of unique articles that have been submitted [4] (without having to manually create extra columns for doing CONCATS, if possible) It would also be great to find formulas that: Count the number of unique articles that have been pre-selected (marked "X" in "PRE-SELECTED" column) [2] Count the number of unique articles that have only 1 version [4] Count the number of unique articles that have more than 1 of their versions pre-selected 1 Thank you so much! Nikita

• ### ssh-agent on ubuntu rapidly restarts

##### - by Santa Claus
I am attempting to use ssh-agent on Ubuntu 13.10 so that I will not have to enter my passphrase to unlock a key every time I want to use ssh or git. As you can see below, ssh-agent appears to be restarting for some reason. These commends were executed within a period of less than 5 seconds: [email protected]:~\$ ssh-agent SSH_AUTH_SOCK=/tmp/ssh-pqm5J0s70NxG/agent.2820; export SSH_AUTH_SOCK; SSH_AGENT_PID=2821; export SSH_AGENT_PID; echo Agent pid 2821; [email protected]:~\$ ssh-agent SSH_AUTH_SOCK=/tmp/ssh-VpkOH2WKjT1M/agent.2822; export SSH_AUTH_SOCK; SSH_AGENT_PID=2823; export SSH_AGENT_PID; echo Agent pid 2823; [email protected]:~\$ ssh-agent SSH_AUTH_SOCK=/tmp/ssh-EQ6X9JHNiBOO/agent.2824; export SSH_AUTH_SOCK; SSH_AGENT_PID=2825; export SSH_AGENT_PID; echo Agent pid 2825; [email protected]:~\$ ssh-agent SSH_AUTH_SOCK=/tmp/ssh-8Iij8kFkaapz/agent.2826; export SSH_AUTH_SOCK; SSH_AGENT_PID=2827; export SSH_AGENT_PID; echo Agent pid 2827; [email protected]:~\$ My guess is that ssh-agent is crashing, but how would I know? What log file would it log to?

• ### Free Online Performance Tuning Event

##### - by Andrew Kelly
On June 9th 2010 I will be showing several sessions related to performance tuning for SQL Server and they are the best kind because they are free :).  So mark your calendars. Here is the event info and URL: June 29, 2010 - 10:00 am - 3:00 pm Eastern SQL Server is the platform for business. In this day-long free virtual event, well-known SQL Server performance expert Andrew Kelly will provide you with the tools and knowledge you need to stay on top of three key areas related to peak performance...(read more)