Search Results

Search found 5364 results on 215 pages for 'equation editor'.

Page 15/215 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • get equation from XML, AS3

    - by VideoDnd
    There's an variable in my swf I want to receive XML. It's an integer value in the form of an equation. How do I receive the XML value for 'formatcount'? My Variable //Variable I want to grab XML<br> //formatcount=int('want xml value to go here'); formatcount=int(count*count/100); Path formatcount = myXML.FORMATCOUNT.text() My XML <?xml version="1.0" encoding="utf-8"?> <SESSION> <TIMER TITLE="speed">1000</TIMER> <COUNT TITLE="starting position">10000</COUNT> <FORMATCOUNT TITLE="ramp">count*count/1000</FORMATCOUNT> </SESSION>

    Read the article

  • Creating an Equation Editor 3.0 equation in a Word 2003 document using a marco (or through the API)

    - by Sambatyon
    I think the title is fully descriptive now. Anyway, I need to generate a word document from my delphi application. It needs to choose from one of four different equations (with some specific parameters for each document). So far I have manage to create the whole document programmatically except the equation. Is it possible to create equations programmatically? if so, where is de API documentation from MS? if not, which solution can be used?

    Read the article

  • Confusion testing fftw3 - poisson equation 2d test

    - by user3699736
    I am having trouble explaining/understanding the following phenomenon: To test fftw3 i am using the 2d poisson test case: laplacian(f(x,y)) = - g(x,y) with periodic boundary conditions. After applying the fourier transform to the equation we obtain : F(kx,ky) = G(kx,ky) /(kx² + ky²) (1) if i take g(x,y) = sin (x) + sin(y) , (x,y) \in [0,2 \pi] i have immediately f(x,y) = g(x,y) which is what i am trying to obtain with the fft : i compute G from g with a forward Fourier transform From this i can compute the Fourier transform of f with (1). Finally, i compute f with the backward Fourier transform (without forgetting to normalize by 1/(nx*ny)). In practice, the results are pretty bad? (For instance, the amplitude for N = 256 is twice the amplitude obtained with N = 512) Even worse, if i try g(x,y) = sin(x)*sin(y) , the curve has not even the same form of the solution. (note that i must change the equation; i divide by two the laplacian in this case : (1) becomes F(kx,ky) = 2*G(kx,ky)/(kx²+ky²) Here is the code: /* * fftw test -- double precision */ #include <iostream> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <fftw3.h> using namespace std; int main() { int N = 128; int i, j ; double pi = 3.14159265359; double *X, *Y ; X = (double*) malloc(N*sizeof(double)); Y = (double*) malloc(N*sizeof(double)); fftw_complex *out1, *in2, *out2, *in1; fftw_plan p1, p2; double L = 2.*pi; double dx = L/((N - 1)*1.0); in1 = (fftw_complex*) fftw_malloc(sizeof(fftw_complex)*(N*N) ); out2 = (fftw_complex*) fftw_malloc(sizeof(fftw_complex)*(N*N) ); out1 = (fftw_complex*) fftw_malloc(sizeof(fftw_complex)*(N*N) ); in2 = (fftw_complex*) fftw_malloc(sizeof(fftw_complex)*(N*N) ); p1 = fftw_plan_dft_2d(N, N, in1, out1, FFTW_FORWARD,FFTW_MEASURE ); p2 = fftw_plan_dft_2d(N, N, in2, out2, FFTW_BACKWARD,FFTW_MEASURE); for(i = 0; i < N; i++){ X[i] = -pi + (i*1.0)*2.*pi/((N - 1)*1.0) ; for(j = 0; j < N; j++){ Y[j] = -pi + (j*1.0)*2.*pi/((N - 1)*1.0) ; in1[i*N + j][0] = sin(X[i]) + sin(Y[j]) ; // row major ordering //in1[i*N + j][0] = sin(X[i]) * sin(Y[j]) ; // 2nd test case in1[i*N + j][1] = 0 ; } } fftw_execute(p1); // FFT forward for ( i = 0; i < N; i++){ // f = g / ( kx² + ky² ) for( j = 0; j < N; j++){ in2[i*N + j][0] = out1[i*N + j][0]/ (i*i+j*j+1e-16); in2[i*N + j][1] = out1[i*N + j][1]/ (i*i+j*j+1e-16); //in2[i*N + j][0] = 2*out1[i*N + j][0]/ (i*i+j*j+1e-16); // 2nd test case //in2[i*N + j][1] = 2*out1[i*N + j][1]/ (i*i+j*j+1e-16); } } fftw_execute(p2); //FFT backward // checking the results computed double erl1 = 0.; for ( i = 0; i < N; i++) { for( j = 0; j < N; j++){ erl1 += fabs( in1[i*N + j][0] - out2[i*N + j][0]/N/N )*dx*dx; cout<< i <<" "<< j<<" "<< sin(X[i])+sin(Y[j])<<" "<< out2[i*N+j][0]/N/N <<" "<< endl; // > output } } cout<< erl1 << endl ; // L1 error fftw_destroy_plan(p1); fftw_destroy_plan(p2); fftw_free(out1); fftw_free(out2); fftw_free(in1); fftw_free(in2); return 0; } I can't find any (more) mistakes in my code (i installed the fftw3 library last week) and i don't see a problem with the maths either but i don't think it's the fft's fault. Hence my predicament. I am all out of ideas and all out of google as well. Any help solving this puzzle would be greatly appreciated. note : compiling : g++ test.cpp -lfftw3 -lm executing : ./a.out output and i use gnuplot in order to plot the curves : (in gnuplot ) splot "output" u 1:2:4 ( for the computed solution )

    Read the article

  • Solve equation from string to result in C

    - by Alexandre Cassagne
    Hi, I would like to know if anyone has info or experience on how to do something which sounds simple but doesn't look like it when trying to program it. The idea is : give a string containing an equation, such as : "2*x = 10" for example (this is simple, but it could get very complex, such as sqrt(54)*35=x^2; and so on....) and the program would return x = 5 and possibly give a log of how he got there. Is this doable ? If so, does anyone have a lead ? For info there is this site (http://www.numberempire.com/equationsolver.php) which does the same thing in PHP, but isn't open source. Thanks for any help !

    Read the article

  • Straight Line Equation between two points

    - by dafero
    Hi, I need to paint the line witch links two points. I developed my own solution using the straight line equation, but my results are different than using the "professional" programs (such as GIMP or even MS Paint). Here is a example of what I want: But my algorithm does this: *The green point is out of the figure and this is not possible. Any ideas? Anyone know which code is been using for this, in "professional" apps? Thanks! Daniel.

    Read the article

  • Testing a quadratic equation

    - by user1201587
    I'm doing a code testing for a program that calculate the results for a quadratic equation I need to have test data for the following situation, when a is not zero and d positive there is two possibilities which are in the code below, I need to find an example for the first satiation when Math.abs(b / a - 200.0) < 1.0e-4 , all the values that I have tried, excute the second one caption= "Two roots"; if (Math.abs(b / a - 200.0) < 1.0e-4) { System.out.println("first one"); x1 = (-100.0 * (1.0 + Math.sqrt(1.0 - 1.0 / (10000.0 * a)))); x2 = (-100.0 * (1.0 - Math.sqrt(1.0 - 1.0 / (10000.0 * a)))); } else { System.out.println("secrst one"); x1 = (-b - Math.sqrt(d)) / (2.0 * a); x2 = (-b + Math.sqrt(d)) / (2.0 * a); } } }

    Read the article

  • Inserting equation numbers macro

    - by krzych
    I want to insert equations into Word 2010. I'm inserting the center-aligned equations and then want to add a number to the same line, which will be aligned to the right hand side of the page. I'm having a problem with setting the alignment of the number to the right with equation aligned to center. My code is currently only inserting the number without the correct alignment: Sub EqnNumber() Selection.TypeText Text:="(" Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _ Text:="STYLEREF \s ""Naglówek 1"" ", PreserveFormatting:=True Selection.TypeText Text:="." Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _ Text:="SEQ Rysunek \* ARABIC \s 1", PreserveFormatting:=True Selection.TypeText Text:=")" End Sub

    Read the article

  • Vertical circular motion : time(x/y) versus velocity equation

    - by adeeti
    Hi, I wanted to simulate the following through animation : A ball starts with a certain velocity at the bottom most point of a vertical circular loop and keeps rolling in it until its velocity permits. For this, I wanted to find velocity/x/y vs. time equation. For e.g. if the ball had mass : 5Kg, radius of the circular loop = 10m, and initial velocity of the ball is 200 m/s, what will its velocity and (x,y) position be after 5 seconds? thanks.

    Read the article

  • VS2010 Text Editor: How do I set the default formatting style for inline code blocks?

    - by nukefusion
    I've got a problem with the formatting of inline code blocks within the VS2010 text editor and wonder if anyone else has had similar problems and found the 'magic' setting I'm looking for. I'm working my way through tutorials in an MVC book. Whenever I add some inline code blocks to a view I want them formatted like so: <% foreach (var link in Model) { %> <a href="<%=Url.RouteUrl(link.RouteValues)%>"> <%=link.Text%> </a> <% } %> What I'm actually getting is this (auto-formatted by the IDE when I finish writing the code): <% foreach (var link in Model) { %> <a href="<%=Url.RouteUrl(link.RouteValues)%>"> <%=link.Text%> </a> <% } %> It's pretty irritating. Any ideas on how I can instruct the IDE to leave my <% % tags alone? I've been fiddling with options under "Tools - Options - Text Editor" for ages but alas am getting nowhere...

    Read the article

  • Delphi 2010 - Source files randomly become read-only in editor?

    - by Justin
    Does anyone else have this problem or is my Delphi cursed somehow? I'll have a bunch of forms and files open in tabs in the editor and I'll be typing away and then suddenly everything stops - my .pas file has, seemingly at random, become read-only. Sometimes I can just right-click the tab at the top and uncheck "Read-Only" and continue, but sometimes this option is checked and greyed-out (disabled), meaning I can't uncheck it and I can't make any further edits to the file. This too seems to be random. In the latter case, the only solution is to save the file in question, which works, despite Delphi's assertion that the file is read-only, close its tab in the editor, and re-open it. Not catastrophic, really, but it's starting to become annoying. Could it be that I am hitting a keyboard command combination accidentally to do this or is this a bug in Delphi? I'm in Delphi 2010, Windows 7. Doubt it's anything to do with installed packages, but if anyone wants the list I'll generate it and attach it here.

    Read the article

  • MVC 2 Editor Template for Radio Buttons

    - by Steve Michelotti
    A while back I blogged about how to create an HTML Helper to produce a radio button list.  In that post, my HTML helper was “wrapping” the FluentHtml library from MvcContrib to produce the following html output (given an IEnumerable list containing the items “Foo” and “Bar”): 1: <div> 2: <input id="Name_Foo" name="Name" type="radio" value="Foo" /><label for="Name_Foo" id="Name_Foo_Label">Foo</label> 3: <input id="Name_Bar" name="Name" type="radio" value="Bar" /><label for="Name_Bar" id="Name_Bar_Label">Bar</label> 4: </div> With the release of MVC 2, we now have editor templates we can use that rely on metadata to allow us to customize our views appropriately.  For example, for the radio buttons above, we want the “id” attribute to be differentiated and unique and we want the “name” attribute to be the same across radio buttons so the buttons will be grouped together and so model binding will work appropriately. We also want the “for” attribute in the <label> element being set to correctly point to the id of the corresponding radio button.  The default behavior of the RadioButtonFor() method that comes OOTB with MVC produces the same value for the “id” and “name” attributes so this isn’t exactly what I want out the the box if I’m trying to produce the HTML mark up above. If we use an EditorTemplate, the first gotcha that we run into is that, by default, the templates just work on your view model’s property. But in this case, we *also* was the list of items to populate all the radio buttons. It turns out that the EditorFor() methods do give you a way to pass in additional data. There is an overload of the EditorFor() method where the last parameter allows you to pass an anonymous object for “extra” data that you can use in your view – it gets put on the view data dictionary: 1: <%: Html.EditorFor(m => m.Name, "RadioButtonList", new { selectList = new SelectList(new[] { "Foo", "Bar" }) })%> Now we can create a file called RadioButtonList.ascx that looks like this: 1: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> 2: <% 3: var list = this.ViewData["selectList"] as SelectList; 4: %> 5: <div> 6: <% foreach (var item in list) { 7: var radioId = ViewData.TemplateInfo.GetFullHtmlFieldId(item.Value); 8: var checkedAttr = item.Selected ? "checked=\"checked\"" : string.Empty; 9: %> 10: <input type="radio" id="<%: radioId %>" name="<%: ViewData.TemplateInfo.HtmlFieldPrefix %>" value="<%: item.Value %>" <%: checkedAttr %>/> 11: <label for="<%: radioId %>"><%: item.Text %></label> 12: <% } %> 13: </div> There are several things to note about the code above. First, you can see in line #3, it’s getting the SelectList out of the view data dictionary. Then on line #7 it uses the GetFullHtmlFieldId() method from the TemplateInfo class to ensure we get unique IDs. We pass the Value to this method so that it will produce IDs like “Name_Foo” and “Name_Bar” rather than just “Name” which is our property name. However, for the “name” attribute (on line #10) we can just use the normal HtmlFieldPrefix property so that we ensure all radio buttons have the same name which corresponds to the view model’s property name. We also get to leverage the fact the a SelectListItem has a Boolean Selected property so we can set the checkedAttr variable on line #8 and use it on line #10. Finally, it’s trivial to set the correct “for” attribute for the <label> on line #11 since we already produced that value. Because the TemplateInfo class provides all the metadata for our view, we’re able to produce this view that is widely re-usable across our application. In fact, we can create a couple HTML helpers to better encapsulate this call and make it more user friendly: 1: public static MvcHtmlString RadioButtonList<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, params string[] items) 2: { 3: return htmlHelper.RadioButtonList(expression, new SelectList(items)); 4: } 5:   6: public static MvcHtmlString RadioButtonList<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, IEnumerable<SelectListItem> items) 7: { 8: var func = expression.Compile(); 9: var result = func(htmlHelper.ViewData.Model); 10: var list = new SelectList(items, "Value", "Text", result); 11: return htmlHelper.EditorFor(expression, "RadioButtonList", new { selectList = list }); 12: } This allows us to simply the call like this: 1: <%: Html.RadioButtonList(m => m.Name, "Foo", "Bar" ) %> In that example, the values for the radio button are hard-coded and being passed in directly. But if you had a view model that contained a property for the collection of items you could call the second overload like this: 1: <%: Html.RadioButtonList(m => m.Name, Model.FooBarList ) %> The Editor templates introduced in MVC 2 definitely allow for much more flexible views/editors than previously available. By knowing about the features you have available to you with the TemplateInfo class, you can take these concepts and customize your editors with extreme flexibility and re-usability.

    Read the article

  • Eclipse ADT: Layout Properties Editor doesn't work correctly

    - by NullNoname
    I have a new, clean installation of Eclipse Kepler (4.3.1) SR1 (x64) in Linux Mint 15 Olivia x64 (based on Ubuntu 13.04 “Raring Ringtail”). ADT version is 22.3.0, and Java is Oracle's 1.7.0_45. The problem is, I cannot edit the properties in layout editor; nothing happens when I click "..." button, nor I can edit the properties directly by clicking the empty space. The boolean properties don't even contain the checkbox. This doesn't happen in Windows XP 32bit, with the same versions of Eclipse and ADT: Anyone know any workarounds/reasons for this? Looks like Mac OS X Mountain Lion had a similar issue in the past, but I heard that was fixed, and I'm talking about Linux version here. I had no such problems in Eclipse Indigo and an old version of ADT, but I can't remember the exact versions of them. EDIT: Lubuntu 13.04 (32bit) in VMware Player doesn't have this problem.

    Read the article

  • Editor's Notebook: Of Slobber Pots and Flux Capacitors

    - by user462779
    Just wrapping up the contents of the November 2012 issue of Profit... I found this snippet of an interview I did with Team Oracle mechanics Clyde Greene and Chad Colberg when I was in Gary, IN this summer working on a photo shoot about Team Oracle for the current issue. We were standing around in a hangar as the Team prepared for the Chicago Air and Water Show, chatting about the engineering and design of the Oracle Challenger III aerobatic plane. Pick up a copy of Profit's November 2012 and read what Team Oracle pilot Sean D. Tucker has to say about the Oracle Challenger III and get a closer look at the plane. I'll drop a link into this blog entry as soon as the story is available. Your editor, greasy and stooped after a red eye flight, talks with Sean D. Tucker about stunt flying.

    Read the article

  • Free Typescript editor with definition based code completion feature

    - by NagyI
    I know that a plugin for Visual Studio exists. However i can't afford VS so i'm looking for a free alternative which can be used to code TypeScript and aware of the .d.ts definition files and can do code completion based on them. I know that Sublime Text and VIM can do syntax highlighting with the correct language definition file. However the biggest advantage of Typescript for me is that ability to give code assistance while coding. Are you aware of any editor which can do this? I'm interested even if it's in an experimental state.

    Read the article

  • Creating a level editor event system

    - by Vaughan Hilts
    I'm designing a level editor for game, and I'm trying to create sort of an 'event' system so I can chain together things. If anyone has used RPG Maker, I'm trying to do similar to their system. Right now, I have an 'EventTemplate' class and a bunch of sub-classed 'EventNodes' which basically just contain properties of their data. Orginally, the IAction and IExecute interface performed logic but it was moved into a DLL to share between the two projects. Question: How can I abstract logic from data in this case? Is my model wrong? Isn't cast typing expensive to parse these actions all the time? Should I write a 'Processor' class to execute these all? But then these actions that can do all sorts of things need to interact with all sorts of sub-systems.

    Read the article

  • Problem with text deletion in vi editor

    - by user184256
    When I am writing C code on the vi editor, I am not able to use the backspace keys or my arrow keys to delete or navigate through lines. Some unexpected special characters occur on the screen that is on middle of my code and I am not able to delete them also. If I use my delete key, the whole code gets deleted. I have tried both insert mode using 'i' and 'a'. I am able to manage this situation for C programming by using the text editors but when I am creating LeX and yacc programs, I find this awkward. Can you please help me with this?

    Read the article

  • How to support tableless columns with WYSIWYG editor?

    - by Andy
    On the front page of a site I'm working on there's a small slideshow. It's not for pictures in particular, any content can go in, and I'm currently setting up the editing interface for the client. I'd like to be able to have one/two/more columns in the editable area, and ideally that would be via CSS - does anyone know of a WYSIWYG editor that supports this? I'm using Drupal (would prefer not to involve Panels as it would require a bit of work to make it a streamlined workflow for content entry) in case that matters to anyone. To start the ball rolling, one way would be to use templates. I know CKEditor supports templates, and it looks like TinyMCE might have something similar. I don't know how well these work with tableless columns (the CKEditor homepage demo uses tables to achieve its two column effect). Holding out for a cool solution!

    Read the article

  • Flash/SWF Editor For Ubuntu 12.10

    - by Chantelle
    First, thank you in advance for any help that you can give a recent transplant from Windows to Ubuntu. I have a question that I have been seeking the answer too but I draw a blank at every turn. I design websites, free of charge, for nonprofit organizations that are just starting and do not have the resources to hire a design firm. I am in need of a flash/swf editor and compiler. I had a program that I used with the awful previous O/S, however WINE would not run the program. Thank you in advance for any help that you can offer. Since I do not earn a dime for doing this, I would prefer if the program was open source, however any suggestions are greatly appreciated.

    Read the article

  • Writing long line support for text editor

    - by Mathematician82
    I know that some some text editors have problems to show long lines https://bugzilla.gnome.org/show_bug.cgi?id=172099 . What is the best way to fix the bug or are they equally well? Modify the GTK+ source code and add a support for long lines. Modify the text editor source code such that it does not use GTK+ if it meets a long line. Split the long lines into part (maybe by cut on the Bash ) I'm just a junior programmer so I don't know what people does when they meet a bug that is on the library they use.

    Read the article

  • AJAX spreadsheet editor interfaced to own website

    - by Ole Tange
    My website has records that are tables. I would like for my users to be able to edit these records in an easy way. Currently they download a .csv-file, edit it in their favourite spreadsheet, and upload it again. But this often fails (they upload in wrong format or edit fields that they are not supposed to touch). I would therefore like to present the users with an editor directly on the website. So just like you can have WYSIWYG editors in CMSes for text I would like to have it for spreadsheets. One solution would be to interface my website with GoogleDoc and have the users edit the files using GoogleDoc's spreadsheet, and some how get the sheet back when they are done, but I do not know if this is possible at all.

    Read the article

  • Framework to implement an in game gui editor

    - by momboco
    I need to do an in game gui editor. The game engine has his own widgets elements and I don't want a gui library that substitute it. The most difficult task is the implementation of the functionality that makes usable to artists and designers. Positioning Resize Alignment between some elements Multiselection Relationship between children and parents Add guides Magnet to place elements quickly Use of layers Undo / Redo ... I'm searching a framework or something like, with these functionalities implemented. And a form of append my own engine to make use of it. It would be ideally a mixing between a tool like Photoshop and libRocket ( engine rendering independent ).

    Read the article

  • Pitfalls of using a WYSIWYG editor? [closed]

    - by user50849
    I'm interested in reasons for disallowing content editors on medium to large sites, from using various forms of WYSIWYG editors. A common problematic scenario I can think of is that with the use of a WYSIWYG, an editor uploads an image "somewhere" to the file-system, inserts it directly into the text, and publishes the article. Shortly afterwards, someone wants to pull out "The last 10 uploaded images", and display them on the frontpage. Good luck parsing all the content. Taking a look around at some large international online magazines, such as http://www.time.com/, and some local ones, I see that the editors seem to produce articles that are almost only consisting of raw text. Images are usually at the top of the article, and otherwise the most complex content are usually links. What are some common reasons for refusing editors access to WYSIWYG tools?

    Read the article

  • How do I use Notepad++ (or other) with msysgit?

    - by PHLAK
    How do I use Notepad++ (or any other editor besides vim) with msysgit? I tried all of the following to no avail: git config --global core.editor C:\Program Files\Notepad++\notepad++.exe git config --global core.editor "C:\Program Files\Notepad++\notepad++.exe" git config --global core.editor C:/Program Files/Notepad++/notepad++.exe git config --global core.editor C:\\Program Files\\Notepad++\\notepad++.exe

    Read the article

  • Which StackOverflow-style MarkDown (WMD) javascript editor should I use?

    - by Edan Maor
    Background I'm working on an application which requires user-entered content, and I've decided to use a StackOverflow-style MarkDown editor. After researching this topic for the last few days, I realize there are numerous forks of the base WMD editor, some with a few basic enhancements and some with serious differences from the StackOverflow one. Since this will be the heart of the application, I'd like to start with the best code base I can. I'd be happy if anyone can recommend which one of the many solutions out there best fits my needs. Below is requirements, plus what I've managed to find already. I'm hoping this question will help me decide which version to go with, and maybe help me discover a port out there that's an even better fit for my needs. The requirements for my project Live Preview Multiple editors on the same page (not know how many in advance, since the user can dynamically add another editing box). Ability to extend with extra buttons (I'd like a button to upload a picture, instead of just adding an img url). Ability to dynamically show/hide the edit box (and only see the preview box). Not an absolute must, but I'd prefer to stick as close to StackOverflow's look and feel, since it's well known. Don't know if this matters, but the backend is written in Django. Editors I've looked at Here are a few of the code bases I've looked at, with thoughts. Obviously, I might be missing another solution out there. The derobins version. From what I can tell, this is the official StackOverflow version. Seems like it doesn't support multiple editors on one page. JQuery.MarkEdit. Looks very good, but is pretty different from the StackOverflow version. MooWMD. Looks like the winner right now, but I'm a little concerned since it looks less active/hackable than MarkEdit. The wmd-new version. Not sure, looks like an old codebase without much use. The SocialSite branch. Seems like it's not for public use.

    Read the article

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