Search Results

Search found 633 results on 26 pages for 'mathematical equations'.

Page 7/26 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Where do you go to tickle your brain (to get programming challenges)?

    - by Prakash
    I am sure we all have some place to go to get our brain teased! Sometimes i visit Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems Where do you all go?

    Read the article

  • C#/.NET Little Wonders: The Useful But Overlooked Sets

    - by James Michael Hare
    Once again we consider some of the lesser known classes and keywords of C#.  Today we will be looking at two set implementations in the System.Collections.Generic namespace: HashSet<T> and SortedSet<T>.  Even though most people think of sets as mathematical constructs, they are actually very useful classes that can be used to help make your application more performant if used appropriately. A Background From Math In mathematical terms, a set is an unordered collection of unique items.  In other words, the set {2,3,5} is identical to the set {3,5,2}.  In addition, the set {2, 2, 4, 1} would be invalid because it would have a duplicate item (2).  In addition, you can perform set arithmetic on sets such as: Intersections: The intersection of two sets is the collection of elements common to both.  Example: The intersection of {1,2,5} and {2,4,9} is the set {2}. Unions: The union of two sets is the collection of unique items present in either or both set.  Example: The union of {1,2,5} and {2,4,9} is {1,2,4,5,9}. Differences: The difference of two sets is the removal of all items from the first set that are common between the sets.  Example: The difference of {1,2,5} and {2,4,9} is {1,5}. Supersets: One set is a superset of a second set if it contains all elements that are in the second set. Example: The set {1,2,5} is a superset of {1,5}. Subsets: One set is a subset of a second set if all the elements of that set are contained in the first set. Example: The set {1,5} is a subset of {1,2,5}. If We’re Not Doing Math, Why Do We Care? Now, you may be thinking: why bother with the set classes in C# if you have no need for mathematical set manipulation?  The answer is simple: they are extremely efficient ways to determine ownership in a collection. For example, let’s say you are designing an order system that tracks the price of a particular equity, and once it reaches a certain point will trigger an order.  Now, since there’s tens of thousands of equities on the markets, you don’t want to track market data for every ticker as that would be a waste of time and processing power for symbols you don’t have orders for.  Thus, we just want to subscribe to the stock symbol for an equity order only if it is a symbol we are not already subscribed to. Every time a new order comes in, we will check the list of subscriptions to see if the new order’s stock symbol is in that list.  If it is, great, we already have that market data feed!  If not, then and only then should we subscribe to the feed for that symbol. So far so good, we have a collection of symbols and we want to see if a symbol is present in that collection and if not, add it.  This really is the essence of set processing, but for the sake of comparison, let’s say you do a list instead: 1: // class that handles are order processing service 2: public sealed class OrderProcessor 3: { 4: // contains list of all symbols we are currently subscribed to 5: private readonly List<string> _subscriptions = new List<string>(); 6:  7: ... 8: } Now whenever you are adding a new order, it would look something like: 1: public PlaceOrderResponse PlaceOrder(Order newOrder) 2: { 3: // do some validation, of course... 4:  5: // check to see if already subscribed, if not add a subscription 6: if (!_subscriptions.Contains(newOrder.Symbol)) 7: { 8: // add the symbol to the list 9: _subscriptions.Add(newOrder.Symbol); 10: 11: // do whatever magic is needed to start a subscription for the symbol 12: } 13:  14: // place the order logic! 15: } What’s wrong with this?  In short: performance!  Finding an item inside a List<T> is a linear - O(n) – operation, which is not a very performant way to find if an item exists in a collection. (I used to teach algorithms and data structures in my spare time at a local university, and when you began talking about big-O notation you could immediately begin to see eyes glossing over as if it was pure, useless theory that would not apply in the real world, but I did and still do believe it is something worth understanding well to make the best choices in computer science). Let’s think about this: a linear operation means that as the number of items increases, the time that it takes to perform the operation tends to increase in a linear fashion.  Put crudely, this means if you double the collection size, you might expect the operation to take something like the order of twice as long.  Linear operations tend to be bad for performance because they mean that to perform some operation on a collection, you must potentially “visit” every item in the collection.  Consider finding an item in a List<T>: if you want to see if the list has an item, you must potentially check every item in the list before you find it or determine it’s not found. Now, we could of course sort our list and then perform a binary search on it, but sorting is typically a linear-logarithmic complexity – O(n * log n) - and could involve temporary storage.  So performing a sort after each add would probably add more time.  As an alternative, we could use a SortedList<TKey, TValue> which sorts the list on every Add(), but this has a similar level of complexity to move the items and also requires a key and value, and in our case the key is the value. This is why sets tend to be the best choice for this type of processing: they don’t rely on separate keys and values for ordering – so they save space – and they typically don’t care about ordering – so they tend to be extremely performant.  The .NET BCL (Base Class Library) has had the HashSet<T> since .NET 3.5, but at that time it did not implement the ISet<T> interface.  As of .NET 4.0, HashSet<T> implements ISet<T> and a new set, the SortedSet<T> was added that gives you a set with ordering. HashSet<T> – For Unordered Storage of Sets When used right, HashSet<T> is a beautiful collection, you can think of it as a simplified Dictionary<T,T>.  That is, a Dictionary where the TKey and TValue refer to the same object.  This is really an oversimplification, but logically it makes sense.  I’ve actually seen people code a Dictionary<T,T> where they store the same thing in the key and the value, and that’s just inefficient because of the extra storage to hold both the key and the value. As it’s name implies, the HashSet<T> uses a hashing algorithm to find the items in the set, which means it does take up some additional space, but it has lightning fast lookups!  Compare the times below between HashSet<T> and List<T>: Operation HashSet<T> List<T> Add() O(1) O(1) at end O(n) in middle Remove() O(1) O(n) Contains() O(1) O(n)   Now, these times are amortized and represent the typical case.  In the very worst case, the operations could be linear if they involve a resizing of the collection – but this is true for both the List and HashSet so that’s a less of an issue when comparing the two. The key thing to note is that in the general case, HashSet is constant time for adds, removes, and contains!  This means that no matter how large the collection is, it takes roughly the exact same amount of time to find an item or determine if it’s not in the collection.  Compare this to the List where almost any add or remove must rearrange potentially all the elements!  And to find an item in the list (if unsorted) you must search every item in the List. So as you can see, if you want to create an unordered collection and have very fast lookup and manipulation, the HashSet is a great collection. And since HashSet<T> implements ICollection<T> and IEnumerable<T>, it supports nearly all the same basic operations as the List<T> and can use the System.Linq extension methods as well. All we have to do to switch from a List<T> to a HashSet<T>  is change our declaration.  Since List and HashSet support many of the same members, chances are we won’t need to change much else. 1: public sealed class OrderProcessor 2: { 3: private readonly HashSet<string> _subscriptions = new HashSet<string>(); 4:  5: // ... 6:  7: public PlaceOrderResponse PlaceOrder(Order newOrder) 8: { 9: // do some validation, of course... 10: 11: // check to see if already subscribed, if not add a subscription 12: if (!_subscriptions.Contains(newOrder.Symbol)) 13: { 14: // add the symbol to the list 15: _subscriptions.Add(newOrder.Symbol); 16: 17: // do whatever magic is needed to start a subscription for the symbol 18: } 19: 20: // place the order logic! 21: } 22:  23: // ... 24: } 25: Notice, we didn’t change any code other than the declaration for _subscriptions to be a HashSet<T>.  Thus, we can pick up the performance improvements in this case with minimal code changes. SortedSet<T> – Ordered Storage of Sets Just like HashSet<T> is logically similar to Dictionary<T,T>, the SortedSet<T> is logically similar to the SortedDictionary<T,T>. The SortedSet can be used when you want to do set operations on a collection, but you want to maintain that collection in sorted order.  Now, this is not necessarily mathematically relevant, but if your collection needs do include order, this is the set to use. So the SortedSet seems to be implemented as a binary tree (possibly a red-black tree) internally.  Since binary trees are dynamic structures and non-contiguous (unlike List and SortedList) this means that inserts and deletes do not involve rearranging elements, or changing the linking of the nodes.  There is some overhead in keeping the nodes in order, but it is much smaller than a contiguous storage collection like a List<T>.  Let’s compare the three: Operation HashSet<T> SortedSet<T> List<T> Add() O(1) O(log n) O(1) at end O(n) in middle Remove() O(1) O(log n) O(n) Contains() O(1) O(log n) O(n)   The MSDN documentation seems to indicate that operations on SortedSet are O(1), but this seems to be inconsistent with its implementation and seems to be a documentation error.  There’s actually a separate MSDN document (here) on SortedSet that indicates that it is, in fact, logarithmic in complexity.  Let’s put it in layman’s terms: logarithmic means you can double the collection size and typically you only add a single extra “visit” to an item in the collection.  Take that in contrast to List<T>’s linear operation where if you double the size of the collection you double the “visits” to items in the collection.  This is very good performance!  It’s still not as performant as HashSet<T> where it always just visits one item (amortized), but for the addition of sorting this is a good thing. Consider the following table, now this is just illustrative data of the relative complexities, but it’s enough to get the point: Collection Size O(1) Visits O(log n) Visits O(n) Visits 1 1 1 1 10 1 4 10 100 1 7 100 1000 1 10 1000   Notice that the logarithmic – O(log n) – visit count goes up very slowly compare to the linear – O(n) – visit count.  This is because since the list is sorted, it can do one check in the middle of the list, determine which half of the collection the data is in, and discard the other half (binary search).  So, if you need your set to be sorted, you can use the SortedSet<T> just like the HashSet<T> and gain sorting for a small performance hit, but it’s still faster than a List<T>. Unique Set Operations Now, if you do want to perform more set-like operations, both implementations of ISet<T> support the following, which play back towards the mathematical set operations described before: IntersectWith() – Performs the set intersection of two sets.  Modifies the current set so that it only contains elements also in the second set. UnionWith() – Performs a set union of two sets.  Modifies the current set so it contains all elements present both in the current set and the second set. ExceptWith() – Performs a set difference of two sets.  Modifies the current set so that it removes all elements present in the second set. IsSupersetOf() – Checks if the current set is a superset of the second set. IsSubsetOf() – Checks if the current set is a subset of the second set. For more information on the set operations themselves, see the MSDN description of ISet<T> (here). What Sets Don’t Do Don’t get me wrong, sets are not silver bullets.  You don’t really want to use a set when you want separate key to value lookups, that’s what the IDictionary implementations are best for. Also sets don’t store temporal add-order.  That is, if you are adding items to the end of a list all the time, your list is ordered in terms of when items were added to it.  This is something the sets don’t do naturally (though you could use a SortedSet with an IComparer with a DateTime but that’s overkill) but List<T> can. Also, List<T> allows indexing which is a blazingly fast way to iterate through items in the collection.  Iterating over all the items in a List<T> is generally much, much faster than iterating over a set. Summary Sets are an excellent tool for maintaining a lookup table where the item is both the key and the value.  In addition, if you have need for the mathematical set operations, the C# sets support those as well.  The HashSet<T> is the set of choice if you want the fastest possible lookups but don’t care about order.  In contrast the SortedSet<T> will give you a sorted collection at a slight reduction in performance.   Technorati Tags: C#,.Net,Little Wonders,BlackRabbitCoder,ISet,HashSet,SortedSet

    Read the article

  • Extreme Optimization Numerical Libraries for .NET – Part 1 of n

    - by JoshReuben
    While many of my colleagues are fascinated in constructing the ultimate ViewModel or ServiceBus, I feel that this kind of plumbing code is re-invented far too many times – at some point in the near future, it will be out of the box standard infra. How many times have you been to a customer site and built a different variation of the same kind of code frameworks? How many times can you abstract Prism or reliable and discoverable WCF communication? As the bar is raised for whats bundled with the framework and more tasks become declarative, automated and configurable, Information Systems will expose a higher level of abstraction, forcing software engineers to focus on more advanced computer science and algorithmic tasks. I've spent the better half of the past decade building skills in .NET and expanding my mathematical horizons by working through the Schaums guides. In this series I am going to examine how these skillsets come together in the implementation provided by ExtremeOptimization. Download the trial version here: http://www.extremeoptimization.com/downloads.aspx Overview The library implements a set of algorithms for: linear algebra, complex numbers, numerical integration and differentiation, solving equations, optimization, random numbers, regression, ANOVA, statistical distributions, hypothesis tests. EONumLib combines three libraries in one - organized in a consistent namespace hierarchy. Mathematics Library - Extreme.Mathematics namespace Vector and Matrix Library - Extreme.Mathematics.LinearAlgebra namespace Statistics Library - Extreme.Statistics namespace System Requirements -.NET framework 4.0  Mathematics Library The classes are organized into the following namespace hierarchy: Extreme.Mathematics – common data types, exception types, and delegates. Extreme.Mathematics.Calculus - numerical integration and differentiation of functions. Extreme.Mathematics.Curves - points, lines and curves, including polynomials and Chebyshev approximations. curve fitting and interpolation. Extreme.Mathematics.Generic - generic arithmetic & linear algebra. Extreme.Mathematics.EquationSolvers - root finding algorithms. Extreme.Mathematics.LinearAlgebra - vectors , matrices , matrix decompositions, solvers for simultaneous linear equations and least squares. Extreme.Mathematics.Optimization – multi-d function optimization + linear programming. Extreme.Mathematics.SignalProcessing - one and two-dimensional discrete Fourier transforms. Extreme.Mathematics.SpecialFunctions

    Read the article

  • Logarithmic spacing of FFT bins

    - by Mykel Stone
    I'm trying to do the examples within the GameDev.net Beat Detection article ( http://archive.gamedev.net/archive/reference/programming/features/beatdetection/index.html ) I have no issue with performing a FFT and getting the frequency data and doing most of the article. I'm running into trouble though in the section 2.B, Enhancements and beat decision factors. in this section the author gives 3 equations numbered R10-R12 to be used to determine how many bins go into each subband: R10 - Linear increase of the width of the subband with its index R11 - We can choose for example the width of the first subband R12 - The sum of all the widths must not exceed 1024 He says the following in the article: "Once you have equations (R11) and (R12) it is fairly easy to extract 'a' and 'b', and thus to find the law of the 'wi'. This calculus of 'a' and 'b' must be made manually and 'a' and 'b' defined as constants in the source; indeed they do not vary during the song." However, I cannot seem to understand how these values are calculated...I'm probably missing something simple, but learning fourier analysis in a couple of weeks has left me Decimated-in-Mind and I cannot seem to see it.

    Read the article

  • Logarithmic spacing of FFT subbands

    - by Mykel Stone
    I'm trying to do the examples within the GameDev.net Beat Detection article ( http://archive.gamedev.net/archive/reference/programming/features/beatdetection/index.html ) I have no issue with performing a FFT and getting the frequency data and doing most of the article. I'm running into trouble though in the section 2.B, Enhancements and beat decision factors. in this section the author gives 3 equations numbered R10-R12 to be used to determine how many bins go into each subband: R10 - Linear increase of the width of the subband with its index R11 - We can choose for example the width of the first subband R12 - The sum of all the widths must not exceed 1024 He says the following in the article: "Once you have equations (R11) and (R12) it is fairly easy to extract 'a' and 'b', and thus to find the law of the 'wi'. This calculus of 'a' and 'b' must be made manually and 'a' and 'b' defined as constants in the source; indeed they do not vary during the song." However, I cannot seem to understand how these values are calculated...I'm probably missing something simple, but learning fourier analysis in a couple of weeks has left me Decimated-in-Mind and I cannot seem to see it.

    Read the article

  • 2D isometric picking

    - by Bikonja
    I'm trying to implement picking in my isometric 2D game, however, I am failing. First of all, I've searched for a solution and came to several, different equations and even a solution using matrices. I tried implementing every single one, but none of them seem to work for me. The idea is that I have an array of tiles, with each tile having it's x and y coordinates specified (in this simplified example it's by it's position in the array). I'm thinking that the tile (0, 0) should be on the left, (max, 0) on top, (0, max) on the bottom and (max, max) on the right. I came up with this loop for drawing, which googling seems to have verified as the correct solution, as has the rendered scene (ofcourse, it could still be wrong, also, forgive the messy names and stuff, it's just a WIP proof of concept code) // Draw code int col = 0; int row = 0; for (int i = 0; i < nrOfTiles; ++i) { // XOffset and YOffset are currently hardcoded values, but will represent camera offset combined with HUD offset Point tile = IsoToScreen(col, row, TileWidth / 2, TileHeight / 2, XOffset, YOffset); int x = tile.X; int y = tile.Y; spriteBatch.Draw(_tiles[i], new Rectangle(tile.X, tile.Y, TileWidth, TileHeight), Color.White); col++; if (col >= Columns) // Columns is the number of tiles in a single row { col = 0; row++; } } // Get selection overlay location (removed check if selection exists for simplicity sake) Point tile = IsoToScreen(_selectedTile.X, _selectedTile.Y, TileWidth / 2, TileHeight / 2, XOffset, YOffset); spriteBatch.Draw(_selectionTexture, new Rectangle(tile.X, tile.Y, TileWidth, TileHeight), Color.White); // End of draw code public Point IsoToScreen(int isoX, int isoY, int widthHalf, int heightHalf, int xOffset, int yOffset) { Point newPoint = new Point(); newPoint.X = widthHalf * (isoX + isoY) + xOffset; newPoint.Y = heightHalf * (-isoX + isoY) + yOffset; return newPoint; } This code draws the tiles correctly. Now I wanted to do picking to select the tiles. For this, I tried coming up with equations of my own (including reversing the drawing equation) and I tried multiple solutions I found on the internet and none of these solutions worked. Trying out lots of solutions, I came upon one that didn't work, but it seemed like an axis was just inverted. I fiddled around with the equations and somehow managed to get it to actually work (but have no idea why it works), but while it's close, it still doesn't work. I'm not really sure how to describe the behaviour, but it changes the selection at wrong places, while being fairly close (sometimes spot on, sometimes a tile off, I believe never more off than the adjacent tile). This is the code I have for getting which tile coordinates are selected: public Point? ScreenToIso(int screenX, int screenY, int tileHeight, int offsetX, int offsetY) { Point? newPoint = null; int nX = -1; int nY = -1; int tX = screenX - offsetX; int tY = screenY - offsetY; nX = -(tY - tX / 2) / tileHeight; nY = (tY + tX / 2) / tileHeight; newPoint = new Point(nX, nY); return newPoint; } I have no idea why this code is so close, especially considering it doesn't even use the tile width and all my attempts to write an equation myself or use a solution I googled failed. Also, I don't think this code accounts for the area outside the "tile" (the transparent part of the tile image), for which I intend to add a color map, but even if that's true, it's not the problem as the selection sometimes switches on approx 25% or 75% of width or height. I'm thinking I've stumbled upon a wrong path and need to backtrack, but at this point, I'm not sure what to do so I hope someone can shed some light on my error or point me to the right path. It may be worth mentioning that my goal is to not only pick the tile. Each main tile will be divided into 5x5 smaller tiles which won't be drawn seperately from the whole main tile, but they will need to be picked out. I think a color map of a main tile with different colors for different coordinates within the main tile should take care of that though, which would fall within using a color map for the main tile (for the transparent parts of the tile, meaning parts that possibly belong to other tiles).

    Read the article

  • Uget tray icon not showing

    - by ArK
    Since I upgraded to Saucy, Uget is not showing in the system tray, although the Always show tray icon option in Uget settings is checked. P.S. this happens only with Uget, all the other Softwares have working tray icons (vlc,qbittorrent..) Here is the snapshot which shows the settings of Uget: sudo dpkg -l | grep -e "^rc" -e "^iU": rc account-plugin-generic-oauth 0.10bzr13.03.26-0ubuntu1.1 i386 GNOME Control Center account plugin for single signon - generic OAuth rc appmenu-gtk:i386 12.10.3daily13.04.03-0ubuntu1 i386 Export GTK menus over DBus rc appmenu-gtk3:i386 12.10.3daily13.04.03-0ubuntu1 i386 Export GTK menus over DBus rc arora 0.11.0-0ubuntu1 i386 simple cross platform web browser rc buc 0.5.2-20 i386 BUC rc clementine 1.1.1+dfsg-2ubuntu1 i386 modern music player and library organizer rc epiphany-browser 3.6.1-2ubuntu1 i386 Intuitive GNOME web browser rc epiphany-browser-data 3.6.1-2ubuntu3 all Data files for the GNOME web browser rc fancontrol 1:3.3.3-1ubuntu1 all utilities to read temperature/voltage/fan sensors rc flaremonitor 1.0-5 i386 It is an advanced browser integration helper module of FlareGet rc google-chrome-stable 28.0.1500.95-r213514 i386 The web browser from Google rc hal 0.5.14-8ubuntu1 i386 Hardware Abstraction Layer rc hotot-gtk 1:0.9.8.5+git20120630.884797d-1 all lightweight microblogging client - GTK+ wrapper rc jockey-common 0.9.7-0ubuntu13 all user interface and desktop integration for driver management rc libanalitza4abi1 4:4.10.4-0ubuntu0.1 i386 library to work with mathematical expressions rc libanalitza5 4:4.11.2-0ubuntu1 i386 library to work with mathematical expressions rc libanalitzagui4abi2 4:4.10.4-0ubuntu0.1 i386 library to work with mathematical expressions - GUI routines rc libanalitzaplot4 4:4.10.4-0ubuntu0.1 i386 library to work with mathematical expressions - plot routines rc libavcodec53:i386 6:0.8.6-1ubuntu2 i386 Libav codec library rc libavutil51:i386 6:0.8.6-1ubuntu2 i386 Libav utility library rc libbamf3-1:i386 0.4.0daily13.06.19~13.04-0ubuntu1 i386 Window matching library - shared library rc libboost-iostreams1.49.0 1.49.0-4 i386 Boost.Iostreams Library rc libboost-program-options1.49.0 1.49.0-4 i386 program options library for C++ rc libboost-python1.49.0 1.49.0-4 i386 Boost.Python Library rc libboost-thread1.49.0 1.49.0-4 i386 portable C++ multi-threading rc libbrlapi0.5:i386 4.4-8ubuntu4 i386 braille display access via BRLTTY - shared library rc libcamel-1.2-40 3.6.4-0ubuntu1.1 i386 Evolution MIME message handling library rc libcolumbus0-0 0.4.0daily13.04.16~13.04-0ubuntu1 i386 error tolerant matching engine - shared library rc libdns95 1:9.9.2.dfsg.P1-2ubuntu2.1 i386 DNS Shared Library used by BIND rc libdvbpsi7 0.2.2-1 i386 library for MPEG TS and DVB PSI tables decoding and generating rc libebackend-1.2-5 3.6.4-0ubuntu1.1 i386 Utility library for evolution data servers rc libechonest2.0:i386 2.0.2-0ubuntu1 i386 Qt library for communicating with The Echo Nest platform rc libechonest2.1:i386 2.1.0-2 i386 Qt library for communicating with The Echo Nest platform rc libedata-book-1.2-15 3.6.4-0ubuntu1.1 i386 Backend library for evolution address books rc libedata-cal-1.2-18 3.6.4-0ubuntu1.1 i386 Backend library for evolution calendars rc libftgl2 2.1.3~rc5-4ubuntu1 i386 library to render text in OpenGL using FreeType rc libgc1c3:i386 1:7.2d-0ubuntu5 i386 conservative garbage collector for C and C++ rc libgnome-desktop-3-4 3.6.3-0ubuntu1 i386 Utility library for loading .desktop files - runtime files rc libgtksourceview-3.0-0:i386 3.6.3-0ubuntu1 i386 shared libraries for the GTK+ syntax highlighting widget rc libgweather-3-1 3.6.2-0ubuntu1 i386 GWeather shared library rc libhal-storage1 0.5.14-8ubuntu1 i386 Hardware Abstraction Layer - shared library for storage devices rc libhal1 0.5.14-8ubuntu1 i386 Hardware Abstraction Layer - shared library rc libharfbuzz0:i386 0.9.13-1 i386 OpenType text shaping engine rc libhd16 16.0-2.2 i386 Hardware identification system library rc libibus-1.0-0:i386 1.4.2-0ubuntu2 i386 Intelligent Input Bus - shared library rc libical0 0.48-2 i386 iCalendar library implementation in C (runtime) rc libimobiledevice3 1.1.4-1ubuntu6.2 i386 Library for communicating with the iPhone and iPod Touch rc libisc92 1:9.9.2.dfsg.P1-2ubuntu2.1 i386 ISC Shared Library used by BIND rc libkdegamesprivate1 4:4.10.2-0ubuntu1 i386 private shared library for KDE games rc libkeybinder0 0.3.0-1ubuntu1 i386 registers global key bindings for applications rc libkgapi0:i386 0.4.4-0ubuntu1 i386 Google API library for KDE rc liblastfm1:i386 1.0.7-2 i386 Last.fm web services library rc libnetfilter-queue1 1.0.2-1 i386 Netfilter netlink-queue library rc libnl1:i386 1.1-7ubuntu1 i386 library for dealing with netlink sockets rc libossp-uuid16 1.6.2-1.3 i386 OSSP uuid ISO-C and C++ - shared library rc libpackagekit-glib2-14:i386 0.7.6-3ubuntu1 i386 Library for accessing PackageKit using GLib rc libpoppler28:i386 0.20.5-1ubuntu3 i386 PDF rendering library rc libprojectm2 2.1.0+dfsg-1build1 i386 Advanced Milkdrop-compatible music visualization library rc libqxt-core0:i386 0.6.1-7 i386 extensions to Qt core classes (LibQxt) rc libqxt-gui0:i386 0.6.1-7 i386 extensions to Qt GUI classes (LibQxt) rc libraw5:i386 0.14.7-0ubuntu1.13.04.2 i386 raw image decoder library rc librhythmbox-core6 2.98-0ubuntu5 i386 support library for the rhythmbox music player rc librhythmbox-core7 3.0.1-0~13.10~ppa1 i386 support library for the rhythmbox music player rc libsnmp15 5.4.3~dfsg-2.7ubuntu1 i386 SNMP (Simple Network Management Protocol) library rc libsqlite0 2.8.17-8fakesync1 i386 SQLite shared library rc libsyncdaemon-1.0-1 4.2.0-0ubuntu1 i386 Ubuntu One synchronization daemon library rc libtiff4:i386 3.9.7-2ubuntu1 i386 Tag Image File Format (TIFF) library (old version) rc libunity-core-6.0-5 7.0.0daily13.06.19~13.04-0ubuntu1 i386 Core library for the Unity interface. rc libva-wayland1:i386 1.2.1-0ubuntu0~raring i386 Video Acceleration (VA) API for Linux -- Wayland runtime rc libwayland0:i386 1.0.5-0ubuntu1 i386 wayland compositor infrastructure - shared libraries rc libwebp2:i386 0.1.3-3 i386 Lossy compression of digital photographic images. rc linux-image-3.8.0-19-generic 3.8.0-19.30 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP rc linux-image-3.8.0-21-generic 3.8.0-21.32 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP rc linux-image-3.8.0-22-generic 3.8.0-22.33 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP rc linux-image-3.8.0-26-generic 3.8.0-26.38 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP rc linux-image-3.8.0-27-generic 3.8.0-27.40 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP rc linux-image-3.9.0-030900-generic 3.9.0-030900.201304291257 i386 Linux kernel image for version 3.9.0 on 32 bit x86 SMP rc linux-image-3.9.0-030900rc8-generic 3.9.0-030900rc8.201304211835 i386 Linux kernel image for version 3.9.0 on 32 bit x86 SMP rc linux-image-extra-3.8.0-19-generic 3.8.0-19.30 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP rc linux-image-extra-3.8.0-21-generic 3.8.0-21.32 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP rc linux-image-extra-3.8.0-22-generic 3.8.0-22.33 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP rc linux-image-extra-3.8.0-26-generic 3.8.0-26.38 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP rc linux-image-extra-3.8.0-27-generic 3.8.0-27.40 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP rc preload 0.6.4-2 i386 adaptive readahead daemon rc steam-launcher 1.0.0.39 all Launcher for the Steam software distribution service rc super-boot-manager 0.7.15 all Simple gui to configure Grub2, Burg and Plymouth. rc totem 3.6.3-0ubuntu6 i386 Simple media player for the GNOME desktop based on GStreamer rc transmission-gtk 2.77-0ubuntu1 i386 lightweight BitTorrent client (GTK interface) rc unity-common 7.0.0daily13.06.19~13.04-0ubuntu1 all Common files for the Unity interface. rc vino 3.6.2-0ubuntu4 i386 VNC server for GNOME rc wicd-daemon 1.7.2.4-4.1 all wired and wireless network manager - daemon rc wicd-gtk 1.7.2.4-4.1 all wired and wireless network manager - GTK+ client rc xscreensaver 5.15-2ubuntu1 i386 Automatic screensaver for X rc xscreensaver-data 5.15-3ubuntu1 i386 data files to be shared among screensaver frontends sudo dpkg -l | grep uget: ii uget 1.10.3-1 i386 easy-to-use download manager written in GTK+ sudo dpkg -l | grep indicator: ii gir1.2-appindicator3-0.1 12.10.1+13.10.20130920-0ubuntu2 i386 Typelib files for libappindicator3-1. ii gir1.2-syncmenu-0.1 12.10.5+13.10.20131011-0ubuntu1 i386 indicator for synchronisation processes status - bindings ii indicator-applet-complete 12.10.2+13.10.20130924.2-0ubuntu1 i386 Clone of the GNOME panel indicator applet ii indicator-application 12.10.1daily13.01.25-0ubuntu1 i386 Application Indicators ii indicator-appmenu 13.01.0+13.10.20130930-0ubuntu1 i386 Indicator for application menus. ii indicator-bluetooth 0.0.6+13.10.20131016-0ubuntu1 i386 System bluetooth indicator. ii indicator-datetime 13.10.0+13.10.20131023.2-0ubuntu1 i386 Simple clock ii indicator-keyboard 0.0.0+13.10.20131010.1-0ubuntu1 i386 Keyboard indicator ii indicator-messages 13.10.1+13.10.20131011-0ubuntu1 i386 indicator that collects messages that need a response ii indicator-multiload 0.3-0ubuntu1 i386 Graphical system load indicator for CPU, ram, etc. ii indicator-power 12.10.6+13.10.20131008-0ubuntu1 i386 Indicator showing power state. ii indicator-printers 0.1.7daily13.03.01-0ubuntu1 i386 indicator showing active print jobs ii indicator-session 12.10.5+13.10.20131023.1-0ubuntu1 i386 indicator showing session management, status and user switching ii indicator-sound 12.10.2+13.10.20131011-0ubuntu1 i386 System sound indicator. ii indicator-sync 12.10.5+13.10.20131011-0ubuntu1 i386 indicator for synchronisation processes status ii libappindicator1 12.10.1+13.10.20130920-0ubuntu2 i386 Application Indicators ii libappindicator3-1 12.10.1+13.10.20130920-0ubuntu2 i386 Application Indicators ii libindicator3-7 12.10.2+13.10.20130913-0ubuntu2 i386 panel indicator applet - shared library ii libindicator7 12.10.2+13.10.20130913-0ubuntu2 i386 panel indicator applet - shared library ii libsync-menu1:i386 12.10.5+13.10.20131011-0ubuntu1 i386 indicator for synchronisation processes status - libraries ii python-appindicator 12.10.1+13.10.20130920-0ubuntu2 i386 Python bindings for libappindicator ii sni-qt:i386 0.2.6-0ubuntu1 i386 indicator support for Qt ii telepathy-indicator 0.3.1daily13.06.19-0ubuntu1 i386 Desktop service to integrate Telepathy with the messaging menu.

    Read the article

  • from Java to SAS

    - by Giovanni Rossi
    I am a seasoned python,java,...other programmer having a (fairly advanced) mathematical education (so I do understand statistics and data mining, for example) . For various reasons I am thinking to switch to SAS/BI area (I am naming SAS because it might be, for me, a possible way to enter in BI). My question, for whoever might have an experience of both: is it, in BI current state, worth it? I mean, the days of big ideas in BI for business seem to be over (there are the APIs, managers think that they know what you can do with them), and my mathematical background might turn out to be superflous. Also, the big companies now have their data organized, have their BI procedures well established, and trying to analyze it from a different standpoint might not be what they want. Another difference is: while in Java etc. development one codes and codes and codes, I don't know if this is the case for BI; in fact, from what I read on the net, a BI (or OLAP, ...etc) developer, in a big organization, is usually in a state of standby, and does in fact little coding. Any opinions, and in particular strong opinions, will be appreciated.

    Read the article

  • Should you create a class within a method?

    - by Amndeep7
    I have made a program using Java that is an implementation of this project: http://nifty.stanford.edu/2009/stone-random-art/sml/index.html. Essentially, you create a mathematical expression and, using the pixel coordinate as input, make a picture. After I initially implemented this in serial, I then implemented it in parallel due to the fact that if the picture size is too large or if the mathematical expression is too complex (especially considering the fact that I made the expression recursively), it takes a really long time. During this process, I realized that I needed two classes which implemented the Runnable interface as I had to put in parameters for the run method, which you aren't allowed to do directly. One of these classes ended up being a medium sized static inner class (not large enough to make an independent class file for it though). The other though, just needed a few parameters to determine some indexes and the size of the for loop that I was making run in parallel - here it is: class DataConversionRunnable implements Runnable { int jj, kk, w; DataConversionRunnable(int column, int matrix, int wid) { jj = column; kk = matrix; w = wid; } public void run() { for(int i = 0; i < w; i++) colorvals[kk][jj][i] = (int) ((raw[kk][jj][i] + 1.0) * 255 / 2.0); increaseCounter(); } } My question is should I make it a static inner class or can I just create it in a method? What is the general programming convention followed in this case?

    Read the article

  • Why is math taught "backwards"? [closed]

    - by Yorirou
    A friend of mine showed me a pretty practical Java example. It was a riddle. I got excited and quickly solved the problem. After it, he showed me the mathematical explanation of my solution (he proved why is it good), and it was completely clear for me. This seems like natural approach for me: solve problems, and generalize. This is very familiar to me, I do it all the time when I am programming: I write a function. When I have to write a similar function, I generalize the problem, grab the generic parts, and refactor them to a function, and solve the original problems as a specialization of the general function. At the university (or at least where I study), things work backwards. The professors shows just the highest possible level of the solutions ("cryptic" mathematical formulas). My problem is that this is too abstract for me. There is no connection of my previous knowledge (== reality in my sense), so even if I can understand it, I can't really learn it properly. Others are learning these formulas word-by-word, and get good grades, since they can write exactly the same to the test, but this is not an option for me. I am a curious person, I can learn interesting things, but I can't learn just text. My brain is for storing toughts, not strings. There are proofs for the theories, but they are also really hard to understand because of this, and in most of the cases they are omitted. What is the reason for this? I don't understand why is it a good idea to show the really high level of abstraction and then leave the practical connections (or some important ideas / practical motivations) out?

    Read the article

  • I can write code...but can't design well. Any suggestions?

    - by user396089
    I feel that I am good at writing code in bits and pieces, but my designs really suck. The question is how do I improve my designs (in order to become a better designer). I think schools and colleges do a good job of teaching people as to how to become good at mathematical problem solving, but lets admit the fact that most programs taught at school are generally around 1000 - 2000 lines long, which means that it is mostly an academic exercise and no way reflects the complexity of real world software (a few hundred thousand to millions of lines of code). This is where I believe that even projects like topcoder/project euler also won't be of much help, they might sharpen your mathematical problem solving ability - but you might become a theoretician programmer; someone who is more interested in the nice, clean stuff, and someone who is utterly un-interested in the day to day mundane and hairy stuff that most application programmers deal with. So my question is how do I improve my design skills? That is the ability to design small/medium scale applications that will go into a few thousand of lines of code? How can I learn design skills that would help me build a better html editor kit, or some graphics program like gimp?

    Read the article

  • Diophantine Equation [closed]

    - by ANIL
    In mathematics, a Diophantine equation (named for Diophantus of Alexandria, a third century Greek mathematician) is a polynomial equation where the variables can only take on integer values. Although you may not realize it, you have seen Diophantine equations before: one of the most famous Diophantine equations is: X^n+Y^n=Z^n We are not certain that McDonald's knows about Diophantine equations (actually we doubt that they do), but they use them! McDonald's sells Chicken McNuggets in packages of 6, 9 or 20 McNuggets. Thus, it is possible, for example, to buy exactly 15 McNuggets (with one package of 6 and a second package of 9), but it is not possible to buy exactly 16 nuggets, since no non- negative integer combination of 6's, 9's and 20's adds up to 16. To determine if it is possible to buy exactly n McNuggets, one has to solve a Diophantine equation: find non-negative integer values of a, b, and c, such that 6a + 9b + 20c = n. Problem 1 Show that it is possible to buy exactly 50, 51, 52, 53, 54, and 55 McNuggets, by finding solutions to the Diophantine equation. You can solve this in your head, using paper and pencil, or writing a program. However you chose to solve this problem, list the combinations of 6, 9 and 20 packs of McNuggets you need to buy in order to get each of the exact amounts. Given that it is possible to buy sets of 50, 51, 52, 53, 54 or 55 McNuggets by combinations of 6, 9 and 20 packs, show that it is possible to buy 56, 57,..., 65 McNuggets. In other words, show how, given solutions for 50-55, one can derive solutions for 56-65. Problem 2 Write an iterative program that finds the largest number of McNuggets that cannot be bought in exact quantity. Your program should print the answer in the following format (where the correct number is provided in place of n): "Largest number of McNuggets that cannot be bought in exact quantity: n" Hints: Hypothesize possible instances of numbers of McNuggets that cannot be purchased exactly, starting with 1 For each possible instance, called n, a. Test if there exists non-negative integers a, b, and c, such that 6a+9b+20c = n. (This can be done by looking at all feasible combinations of a, b, and c) b. If not, n cannot be bought in exact quantity, save n When you have found six consecutive values of n that in fact pass the test of having an exact solution, the last answer that was saved (not the last value of n that had a solution) is the correct answer, since you know by the theorem that any amount larger can also be bought in exact quantity

    Read the article

  • Creating an equation in a word 2003 document using a marco (or through the API)

    - by Sambatyon
    I think the title is fully descriptive. 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

  • 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

  • Efficient algorithm to generate all solutions of a linear diophantine equation with ai=1

    - by Ben
    I am trying to generate all the solutions for the following equations for a given H. With H=4 : 1) ALL solutions for x_1 + x_2 + x_3 + x_4 =4 2) ALL solutions for x_1 + x_2 + x_3 = 4 3) ALL solutions for x_1 + x_2 = 4 4) ALL solutions for x_1 =4 For my problem, there are always 4 equations to solve (independently from the others). There are a total of 2^(H-1) solutions. For the previous one, here are the solutions : 1) 1 1 1 1 2) 1 1 2 and 1 2 1 and 2 1 1 3) 1 3 and 3 1 and 2 2 4) 4 Here is an R algorithm which solve the problem. library(gtools) H<-4 solutions<-NULL for(i in seq(H)) { res<-permutations(H-i+1,i,repeats.allowed=T) resum<-apply(res,1,sum) id<-which(resum==H) print(paste("solutions with ",i," variables",sep="")) print(res[id,]) } However, this algorithm makes more calculations than needed. I am sure it is possible to go faster. By that, I mean not generating the permutations for which the sums is H Any idea of a better algorithm for a given H ?

    Read the article

  • Function pointer arrays in Fortran

    - by Eduardo Dobay
    I can create function pointers in Fortran 90, with code like real, external :: f and then use f as an argument to another function/subroutine. But what if I want an array of function pointers? In C I would just do double (*f[])(int); to create an array of functions returning double and taking an integer argument. I tried the most obvious, real, external, dimension(3) :: f but gfortran doesn't let me mix EXTERNAL and DIMENSION. Is there any way to do what I want? (The context for this is a program for solving a system of differential equations, so I could input the equations without having a million parameters in my subroutines.)

    Read the article

  • How to best integrate generated code

    - by Arne
    I am evaluating the use of code generation for my flight simulation project. More specifically there is a requirement to allow "the average engineer" (no offense I am one myself) to define the differential equations that describe the dynamic system in a more natural syntax than C++ provides. The idea is to devise a abstract descriptor language that can be easily understood and edited to generate C++ code from. This descriptor is supplied by the modeling engineer and used by the ones implementing and maintaining the simulation evironment to generate code. I've got something like this in mind: model Aircraft has state x1, x2; state x3; input double : u; input bool : flag1, flag2; algebraic double : x1x2; model Engine : tw1, tw2; model Gear : gear; model ISA : isa; trim routine HorizontalFight; trim routine OnGround, General; constant double : c1, c2; constant int : ci1; begin differential equations x1' = x1 + 2.*x2; x2' = x2 + x1x2; begin algebraic equations x1x2 = x1*x2 + x1'; end model It is important to retain the flexibility of the C language thus the descriptor language is meant to only define certain parts of the definition and implementation of the model class. This way one enigneer provides the model in from of the descriptor language as examplified above and the maintenance enigneer will add all the code to read parameters from files, start/stop/pause the execution of the simulation and how a concrete object gets instatiated. My first though is to either generate two files from the descriptor file: one .h file containing declarations and one .cpp file containing the implementation of certain functions. These then need to be #included at appropriate places [File Aircarft.h] class Aircraft { public: void Aircraft(..); // hand-written constructor void ReadParameters(string &file_name); // hand-written private: /* more hand wirtten boiler-plate code */ /* generate declarations follow */ #include "Aircraft.generated.decl" }; [File Aircraft.cpp] Aircarft::Aircraft(..) { /* hand-written constructer implementation */ } /* more hand-written implementation code */ /* generated implementation code follows */ #include "Aircraft.generated.impl" Any thoughts or suggestions?

    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

  • Calculating a parabola: What am I doing wrong? [closed]

    - by Nils
    I was following this thread and copied the code in my project. Playing around with it turns out that it seems not to be very precise. Recall the formula: y = ax^2 + bx +c Since the first given point I have is at x1 = 0, we already have c=y1 . We just need to find a and b. Using: y2 = ax2^2 + bx2 +c y3 = ax3^2 + bx3 +c Solving the equations for b yields: b = y/x - ax - cx Now setting both equations equal to each other so b falls out y2/x2 - ax2 - cx2 = y3/x3 - ax3 - cx3 Now solving for a gives me: a = ( x3*(y2 - c) + x2*(y3 - c) ) / ( x2*x3*(x2 - x3) ) (is that correct?!) And then using again b = y2/x2 - ax2 - cx2 to find b. However so far I haven't found the correct a and b coeffs. What am I doing wrong?

    Read the article

  • What math should all game programmers know?

    - by Tetrad
    Simple enough question: What math should all game programmers have a firm grasp of in order to be successful? I'm not specifically talking about rendering math or anything in the niche areas of game programming, more specifically just things that even game programmers should know about, and if they don't they'll probably find it useful. Note: as there is no one correct answer, this question (and its answers) is a community wiki. Also, if you would like fancy latex math equations, feel free to use http://mathurl.com/.

    Read the article

  • Why use other number bases when programming

    - by JMD
    My coworkers and I have been bending our minds to figuring out why anyone would go out of their way to program numbers in a base other than base 10. I suggested that perhaps you could optimize longer equations by putting the variables in the correct base you are working with (for instance, if you have only sets of 5 of something with no remainders you could use base 5), but I'm not sure if that's true. Any thoughts?

    Read the article

  • how to solve the error: The name in the tag element must match the element type in the start tag

    - by user2227801
    please I am working on a very important large word document file it contains many math equations and suddenly i cant open that file it keep giving me an error : The name in the tag element must match the element type in the start tag. Location : Part: /word/document.xml, Line: 2, Column 5437966 I uploaded my file in http://www.freeuploadsite.com/do.php?id=19094 Please help me. Please save me. Thanks in advance

    Read the article

  • Why use other bases when programming [closed]

    - by JMD
    Possible Duplicate: Why use other number bases when programming My coworkers and I have been bending our minds to figuring out why anyone would go out of their way to program numbers in a base other than base 10. I suggested that perhaps you could optimize longer equations by putting the variables in the correct base you are working with (for instance, if you have only sets of 5 of something with no remainders you could use base 5), but I'm not sure if that's true. Any thoughts?

    Read the article

  • Math: How to sum each row of a matrix

    - by macek
    I have a 1x8 matrix of students where each student is a 4x1 matrix of scores. Something like: SCORES S [62, 91, 74, 14] T [59, 7 , 59, 21] U [44, 9 , 69, 6 ] D [4 , 32, 28, 53] E [78, 99, 53, 83] N [48, 86, 89, 60] T [56, 71, 15, 80] S [47, 67, 79, 40] Main question: Using sigma notation, or some other mathematical function, how can I get a 1x8 matrix where each student's scores are summed? # expected result TOTAL OF SCORES S [241] T [146] U [128] D [117] E [313] N [283] T [222] S [233] Sub question. To get the average, I will multiply the matrix by 1/4. Would there be a quicker way to get the final result? AVERAGE SCORE S [60.25] T [36.50] U [32.00] D [29.25] E [78.25] N [70.75] T [55.50] S [58.25] Note: I'm not looking for programming-related algorithms here. I want to know if it is possible to represent this with pure mathematical functions alone.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >