Search Results

Search found 1174 results on 47 pages for 'square'.

Page 2/47 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • total number of magic square from 9 numbers

    - by Peeyush
    9 numbers need to be arranged in a magic number square. A magic number square is a square of numbers that is arranged such that every row and column has the same sum.(condition for diagonal has been relaxed) For example: 1 2 3 3 2 1 2 2 2 How do we calculate total number of distinct magic square from 9 numbers. Two magic number squares are distinct if they differ in value at one or more positions. For example, there is only one magic number square that can be made of 9 instances of the same number. e.g. for these 9 numbers { 4, 4, 4, 4, 4, 4, 4, 4, 4 }, answer should be 1. Also the complexity should be optimal. Do we need to iterate through all the permutations , discarding if a[0]+a[1]+a[2] %3!=0 such combinations ? moreover how do we remove duplicate magic square?

    Read the article

  • Sliding Response after a Point-Square Collision

    - by mars
    In general terms and pseudo-code, what would be the best way to have a collision response of sliding along a wall if the wall is actually just a part of an entire square that a point is colliding into? The collision test method used is a test to see if the point lies in the square. Should I divide the square into four lines and just calculate the shortest distance to the line and then move the point back that distance?If so, then how can I determine which edge of the square the point is closest to after collision?

    Read the article

  • Detect a white square in a black and white image

    - by gcc
    I saw that question i one web site (cite name like that programm.) then i tried to solve but icannot (not my and myfriend homework ) how can i approach to that one (in program.net no solution there is ) Read black & white image data from standard input, and detect a white square in the image. Output the coordinates of the upper left corner of the square, and the width of the square. In the preliminary work, you can print the output and terminate your program after you detect your first square. If you can't find any square on the image, you will print the string: "NO DETECTION". Input (which represents a 2 by 2 square in the center of a 5 by 4 image): 2 2 5 4 0 0 0 0 0 0 0 255 255 0 0 0 255 255 0 0 0 0 0 0 Output: 3 2 2 Input (more comprehensible format of the image, with the same output): 2 6 4 000 000 000 000 000 000 000 000 255 255 255 000 000 000 000 255 255 000 000 000 000 000 000 000 Output: no detection Input can be: 000 255 255 000 000 000 000 255 255 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 255 255 255 000 000 000 255 255 255 000 000 000 255 255 255 000 000 000 000 000 000 000 If there are two squares detected, we should use the biggest one

    Read the article

  • Attempting to find a formula for tessellating rectangles onto a board, where middle square can't be

    - by timemirror
    I'm working on a spatial stacking problem... at the moment I'm trying to solve in 2D but will eventually have to make this work in 3D. I divide up space into n x n squares around a central block, therefore n is always odd... and I'm trying to find the number of locations that a rectangle of any dimension less than n x n (eg 1x1, 1x2, 2x2 etc) can be placed, where the middle square is not available. So far I've got this.. total number of rectangles = ((n^2 + n)^2 ) / 4 ..also the total number of squares = (n (n+1) (2n+1)) / 6 However I'm stuck in working out a formula to find how many of those locations are impossible as the middle square would be occupied. So for example: [] [] [] [] [x] [] [] [] [] 3 x 3 board... with 8 possible locations for storing stuff as mid square is in use. I can use 1x1 shapes, 1x2 shapes, 2x1, 3x1, etc... Formula gives me the number of rectangles as: (9+3)^2 / 4 = 144/4 = 36 stacking locations However as the middle square is unoccupiable these can not all be realized. By hand I can see that these are impossible options: 1x1 shapes = 1 impossible (mid square) 2x1 shapes = 4 impossible (anything which uses mid square) 3x1 = 2 impossible 2x2 = 4 impossible etc Total impossible combinations = 16 Therefore the solution I'm after is 36-16 = 20 possible rectangular stacking locations on a 3x3 board. I've coded this in C# to solve it through trial and error, but I'm really after a formula as I want to solve for massive values of n, and also to eventually make this 3D. Can anyone point me to any formulas for these kind of spatial / tessellation problem? Also any idea on how to take the total rectangle formula into 3D very welcome! Thanks!

    Read the article

  • Square One to Game Development

    - by Ian Quach
    How does someone even get into developing a game. What would they need to know, how would someone find the knowledge to program a game? I've always looked at game development as a future career. Now that I'm getting closer to university I was hoping to find a way to head start this future in game development. What would be the best place to start? I would love any help or tips from anyone. Thanks for reading this. :)

    Read the article

  • Fastest way to check if two square 2D arrays are rotationally and reflectively distinct

    - by kustrle
    The best idea I have so far is to rotate first array by {0, 90, 180, 270} degrees and reflect it horizontally or/and vertically. We basically get 16 variations [1] of first array and compare them with second array. if none of them matches the two arrays are rotationally and reflectively distinct. I am wondering if there is more optimal solution than this brute-force approach? [1] 0deg, no reflection 0deg, reflect over x 0deg, reflect over y 0deg, reflect over x and y 90deg, no reflection ...

    Read the article

  • Square Brackets in XSL-FO

    - by Igman
    I am attempting to create a list in XSL-FO using a square bracket. I have been able to get it working using the standard unicode bullet character (&#8226;) but I just can't seem to get it working for square brackets. I have tried using &#9632;, but that does not seem to work. It is important that i can get the square bullets working because I am matching an existing file format.Any help in getting this working would be greatly appreciated.

    Read the article

  • XSLT: How to escape square brackets in Urls

    - by ilariac
    I have a set of records from Solr where field[@name='url'] can have the following format: http://url/blabla/blabla.aspx?sv=[keyword%20keyword,%201] My understanding is that the square brackets denote an array syntax and I would like to use XSLT to remove the square brackets from all Urls. The reason for this is that I am using an Open URL resolver, which does not currently handle well those characters. The best option would be to strip the square brackets from all URLs before such resources are mediated by the Open URL resolver. There are cases where I have multiple occurrences of square brackets per Url. Can you please help me with this? Thanks for your help, I.

    Read the article

  • How to find the largest square in the number (Java)

    - by Ypsilon IV
    Hello everyone, I want to find the largest square in the number, but I am stuck at some point. I would really appreciate some suggestions. This is what I've done so far: I take the number on the input, factorize into prime numbers, and put the sequence of prime numbers to ArrayList. Numbers are sorted, in a sense, thus the numbers in the sequence are increasing. For example, 996 is 2 2 3 83 1000 is 2 2 2 5 5 5 100000 is 2 2 2 2 2 5 5 5 5 5 My idea now is to count number of occurrences of each elements in the sequence, so if the number of occurrences is divisible by two, then this is the square. In this way, I can get another sequence, where the right most element divisible by two is the largest square. What is the most efficient way to count occurrences in the ArrayList? Or is there any better way to find the largest square? Many thanks in advance!

    Read the article

  • Square character

    - by John
    I have to write x/100000 with square character: x*10-5 ,but the '-5' should be above 10 so it is known that it is x/10/10/10/10/10. How do I do that?

    Read the article

  • Square Bullet in XSL-FO

    - by Igman
    I am attempting to create a list in XSL-FO using a square bracket. I have been able to get it working using the standard unicode bullet character (&#8226;) but I just can't seem to get it working for square brackets. I have tried using &#9632;, but that does not seem to work. It is important that i can get the square bullets working because I am matching an existing file format.Any help in getting this working would be greatly appreciated. <fo:list-item-label end-indent="label-end()"> <fo:block>&#x2022;</fo:block> </fo:list-item-label>

    Read the article

  • Table/column names enclosed in square brackets, even though their names consist of legal characters

    - by AspOnMyNet
    Square brackets allow you to use names for columns or aliases that contain characters not permitted for column names or aliases. a) I’ve noticed that lots of times table and column names are enclosed inside square brackets, even though their names consist of perfectly legal characters. Why is that? b) As far as I know, square brackets enclosing object’s name aren’t actually a part of that name. Thus, if we create a table named [A]: CREATE TABLE [A] ( … ) we can later reference it without using brackets: SELECT * FROM A But why isn’t the same true when I try to reference a column KEY from a table returned by CONTAINSTABLE function? Namely, if I omit the brackets enclosing column name, I get an error: SELECT ct.KEY FROM CONTAINSTABLE(fullText,*,'some_string') as ct thanx

    Read the article

  • Converting between square and rectangular pixel co-ordinates

    - by FlyboyUtah
    I'm new at using transforms and this type of math, and would appreciate some direction solving my coding problem. I'm writing in XCode for the iphone, and am working with CGraphics. Problem: In Xcode, I want to draw curves, lines and so on it's screen of of square pixels. Then convert those points, as close as possible, into non-square pixel sysem. For example if the original coordinate system is 500 x 500 pixels that are displayed on square screen of 10 by 10 inchs I draw a round circle with the circle formula. It looks round, and all is well. Now, I draw the same circle on a second 10 x 10 inch screen that is 850 pixels by 500 pixels. Without changing the coordinates, the same circle formual displays something that looks like an egg. How can I draw the circle on the second screen in a different coordinate system? And in addition, I need to access the set of points x,y system individually. s

    Read the article

  • Visual Basic Display Square

    - by user1724157
    Alright I'm currently lost on a particular assignment I have for a class. I've seen many examples of this app but none of them see to help my problem is as follows: Write a Sub procedure "DisplaySquare" to display the solid square. The size should be specified by the integer parameter "size". The character that fills the square should be specified by the string parameter "fillCharacter. Use a For...Next statement nested within another For...Next statement to create the square. The outer For...Next specifies what row is currently being displayed. The inner For...Next appends all the characters that form the row to a display string. So it should come out like as follows: if a user enters "8" and "#" ######## ######## ######## ######## ######## ######## ######## ######## Any help would be appreciated.

    Read the article

  • NRF Week - Disney Store Tour

    - by sarah.taylor(at)oracle.com
    Disney has created a real buzz at this year's NRF event. Yesterday morning we began the Oracle Retail Exchange program with a visit to the flagship Disney store in Times Square. Additionally Oracle made a key announcement with Disney  on Oracle Retail's Point of Sale implementation in 330 stores worldwide. Today   Disney's Steve Finney gave a super session on The Magic of Disney at the NRF Big Show. We also saw Disney making an exclusive news announcement about their plans for Global store openings at the Oracle trade show stand - with a little help from Mickey and Minnie Mouse. Disney Stores have been entirely reinvented since the company in 2008 took ownership after previously franchising the retail arm of the business. They have subsequently been a strong Oracle partner and technology has played a key role in their re imagination of the store environment. The new Imagination stores have a 20% higher footfall and margins are up 25%. The Disney brand is synonymous with magical and memorable experiences for children of all ages. The company is achieving a unique retail experience that delights children and shareholders alike! Technology is a key pillar in helping to deliver on both a strong operating model and a unique customer experience - the best thirty minutes in a child's day is their aim. Steve Finney this morning said their technology has to be as reliable as a theme park ride. Store experiences are much more enjoyable when there are short waiting times and children can interact with their favourite characters through magic mirrors, mobile point of sale, touch screens and custom animations that are digitally transmitted to stores globally. The Oracle Retail Point of Sale with iPad touch screens reduces check out times, stores customer data, ensures that promotions are delivered accurately and reduces losses. This means higher levels of guest conversion, increased availability and convenience for customers who want to check availability at other locations. Disney is a pioneer. At NRF's 100th show, we had the privilege of learning from a retailer using technology as a creative force to drive their business forward.

    Read the article

  • Algorithm putting point into square with maximal minimum distance

    - by Mikulas Dite
    I'm stuck on this: Have a square. Put n points into this square so the minimal distance (not necessary the average distance) is the highest possible. I'm looking for an algorithm which would be able to generate the coordinates of all points given the count of them. Example results for n=4;5;6: Please don't mention computing-power based stuff such as trying a lot of combination and then nitpicking the right one and similar ideas.

    Read the article

  • Check if BigInteger is not a perfect square

    - by Ender
    I have a BigInteger value, let's say it is 282 and is inside the variable x. I now want to write a while loop that states: while b2 isn't a perfect square: a ? a + 1 b2 ? a*a - N endwhile How would I do such a thing using BigInteger? EDIT: The purpose for this is so I can write this method. As the article states one must check if b2 is not square.

    Read the article

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