Search Results

Search found 1506 results on 61 pages for 'ben scheirman'.

Page 11/61 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • c# class naming standards/guidelines

    - by Ben
    Over the years I've used various naming conventions for services in my applications for example: [ClassName]Service [ClassName]Manager [ClassName]Factory [ClassName]Provider [ClassName]Helper I generally only use the "Helper" suffix for utility classes that have no external dependencies. However I find that there is a bit of a cross-over between the others, and wondered if there was any recommendations/standards/guidelines on what to use and when?

    Read the article

  • How to make custom shaped holes in terrain

    - by Guy Ben-Moshe
    So I'm trying to create a game where you fit certain shaped objects into the hole that fits them (similar to the young children's game with different shaped blocks) in Unity 3D. I've encountered a problem, how do I make the holes in the terrain? Or what type of object should I use for making holes in? So far I've tried to make a 3d model in unity by using other cubes and planes, it just doesn't feel right. I guess I need to create a model in another software and import to unity, I don't know any other software I can use. Tips would help.

    Read the article

  • Professional Developers, may I join you?

    - by Ben
    I currently work in technical support for a software/hardware company and for the most part it's a good job, but it's feeling more and more like I'm getting 'stuck' here. No raises in the 5 years I've been here, and lately there seems to be more hiring from the outside than promotion from within. The work I do is more technical than end-user support, as we deal primarily with our field technicians who have a little more technical skill than the general user base. As a result I get into much more technical support issues... often tracking down bugs in our software, finding performance bottlenecks in our database schema, etc. The work I'm most proud of are the development projects I've come up with on my own, and worked on during lunch breaks and slow periods in Support. Over the years I've written a number of useful utilities for the company. Diagnostic type applications that several departments use and appreciate. These include apps that simulate our various hardware devices, log file analysis, time-saving utilities for our work processes, etc. My best projects have been the hardware simulation programs, which are the type of thing we probably wouldn't have put a full-time developer on had anyone thought to do it, but they've ended up being popular and useful enough to be used by development, QA, R&D, and Support. They allow us to interface our software with simulated hardware, rather than clutter up our work areas with bulky, hard to acquire equipment. Since starting here my life has moved forward (married, kid, one more on the way), but it feels like my career has not. I still earn what I earned walking in the door my first day. Company budget is tight, bonuses have gone down, and no raises or cost of living / inflation adjustments either. As the sole source of income for my family I feel I need to do more, and I'd like to have a more active role in creating something at work, not just cleaning up other people's mistakes. I enjoy technical work, and I think development is the next logical step in my career. I'd like to bring some "legitimacy" to my part-time development work, and make myself a more skilled and valuable employee. Ultimately if this can help me better support my family, that would be ideal. Can I make the jump to professional developer? I have an engineering degree, but no formal education in computer science. I write WinForms apps using the .NET framework, do some freelance web development, have volunteered to write software for a nonprofit, and have started experimenting with programming microcontrollers. I enjoy learning new things in the limited free time I have available. I think I have the aptitude to take on a development role, even in an 'apprentice' capacity if such an option is possible. Have any of you moved into development like this? Do any of you developers have any advice or cautionary tales? Are there better career options I haven't thought of? I welcome any and all related comments and thank you in advance for posting them.

    Read the article

  • Encode two integers into colour values and compare them in a HLSL shader

    - by Ben Slinger
    I am writing a 2D point and click adventure game in Monogame, and I'd like to be able to create an image mask for every room which defines which parts of the background a character can walk behind, and at which Y value a character needs to be at for the background to be drawn above the character. I haven't done any shader work before but after doing some reading I thought the following solution should work: Create a mask for the room with different walk behind areas painted in a colour that defines the baseline Y value (Walk Behind Mask) Render all objects to a RenderTarget2D (Base Texture) Render all objects to a different RenderTarget2D, but changing every pixel of each object to a colour that defines its Y value (Position Mask) Pass these two textures plus the image mask into the shader, and for each pixel compare the colour of the image mask to the colour of the Position Mask to the Walk Behind Mask - if the Position Mask pixel is larger (thus lower on the screen and closer to the camera) than the Walk Behind Mask, draw the pixel from the Base Texture, otherwise draw a transparent pixel (allowing the background to show through). I've got it mostly working, but I'm having trouble packing and unpacking the Y values into colours and retrieving them correctly in the shader. Here are some code examples of how I'm doing it so far: (When drawing to the Position Mask RenderTarget2D) Color posColor = new Color(((int)Position.Y >> 16) & 255, ((int)Position.Y >> 8) & 255, (int)Position.Y & 255); So as far as I can tell, this should be taking the first 3 bytes of the position integer and encoding them into a 4 byte colour (ignoring the alpha as the 4th byte). This seems to work fine, as when my character is at Y = 600, the resulting Color from this is: {[Color: R=0, G=2, B=88, A=255, PackedValue=4283957760]}. I then have an area in my Walk Behind Mask that I only want the character to be displayed behind if his Y value is lower than 655, so I've painted it with R=0, G=2, B=143, A=255. Now, I think I have the shader OK as well, here's what I have: sampler BaseTexture : register(s0); sampler MaskTexture : register(s1); sampler PositionTexture : register(s2); float4 mask( float2 coords : TEXCOORD0 ) : COLOR0 { float4 color = tex2D(BaseTexture, coords); float4 maskColor = tex2D(MaskTexture, coords); float4 positionColor = tex2D(PositionTexture, coords); float maskCompare = (maskColor.r * pow(2,24)) + (maskColor.g * pow(2,16)) + (maskColor.b * pow(2,8)); float positionCompare = (positionColor.r * pow(2,24)) + (positionColor.g * pow(2,16)) + (positionColor.b * pow(2,8)); return positionCompare < maskCompare ? float4(0,0,0,0) : color; } technique Technique1 { pass NoEffect { PixelShader = compile ps_3_0 mask(); } } This isn't working, however - currently all characters are displayed behind the walk behind area, regardless of their Y value. I tried printing out some debug info by grabbing the pixel from both the Position Mask and the Walk Under Mask under the current mouse position, and it seems like maybe the colours aren't being rendered to the Position Mask correctly? When calculating the colour in that code above I'm getting R=0, G=2, B=88, A=255, but when I mouseover my character I get R=0, G=0, B=30, A=255. Any ideas what I'm doing wrong? It seems like maybe I'm losing some information when rendering to the RenderTarget2D, but I'm now knowledgeable enough to figure out what's happening. Also, I should probably ask, is this an efficient way to do this? Will there be a performance impact? Edit: Whoops, turns out there was a bug that I'd introduced myself, I was drawing out the Position Mask with the position Color, left over from some early testing I was doing. So this solution is working perfectly, though I'm still interested in whether this is an efficient solution performance wise.

    Read the article

  • Project Euler 19: (Iron)Python

    - by Ben Griswold
    In my attempt to learn (Iron)Python out in the open, here’s my solution for Project Euler Problem 19.  As always, any feedback is welcome. # Euler 19 # http://projecteuler.net/index.php?section=problems&id=19 # You are given the following information, but you may # prefer to do some research for yourself. # # - 1 Jan 1900 was a Monday. # - Thirty days has September, # April, June and November. # All the rest have thirty-one, # Saving February alone, # Which has twenty-eight, rain or shine. # And on leap years, twenty-nine. # - A leap year occurs on any year evenly divisible by 4, # but not on a century unless it is divisible by 400. # # How many Sundays fell on the first of the month during # the twentieth century (1 Jan 1901 to 31 Dec 2000)? import time start = time.time() import datetime sundays = 0 for y in range(1901,2001): for m in range(1,13): # monday == 0, sunday == 6 if datetime.datetime(y,m,1).weekday() == 6: sundays += 1 print sundays print "Elapsed Time:", (time.time() - start) * 1000, "millisecs" a=raw_input('Press return to continue')

    Read the article

  • Project Euler 2: (Iron)Python

    - by Ben Griswold
    In my attempt to learn (Iron)Python out in the open, here’s my solution for Project Euler Problem 2.  As always, any feedback is welcome. # Euler 2 # http://projecteuler.net/index.php?section=problems&id=2 # Find the sum of all the even-valued terms in the # Fibonacci sequence which do not exceed four million. # Each new term in the Fibonacci sequence is generated # by adding the previous two terms. By starting with 1 # and 2, the first 10 terms will be: # 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... # Find the sum of all the even-valued terms in the # sequence which do not exceed four million. import time start = time.time() total = 0 previous = 0 i = 1 while i <= 4000000: if i % 2 == 0: total +=i # variable swapping removes the need for a temp variable i, previous = previous, previous + i print total print "Elapsed Time:", (time.time() - start) * 1000, "millisecs" a=raw_input('Press return to continue')

    Read the article

  • Ranking hit after WP site migration

    - by Ben
    I migrated my site from its old domain over a month ago. I followed WMT completely, including 301 redirects from every existing URL to the new domain, and then submitting a change of address. Traffic continued as normal, but then a few days after submitting the change of address traffic plummeted to about 20-30% of what it was previously. Most of my traffic come from organic search, and I can see that for the keywords I had targeted before and performed well with and am now ranking much much lower for. In some cases for low competition keywords I've only lost a few places, for higher competition terms I have really suffered. This has started to pick up a bit (one of my keywords I have risen from 195 to 100 in the last week), but it seems to be a very slow process. How seamless is this process normally? I was under the impression that this would not affect my rankings too severely, but it has now been a month since the move and recovery seems to be very slow, if at all. Is it likely that I've missed something? The only change is that I have moved what was the home page to be more of a sub-page, and now in its place is a magazine-style home page. I understand that links to the old site will now be pointing to the latter which means that rankings for some keywords attributed to the old home page will take a hit, but even on other pages that seem to fit in exactly the same page structure as the previous site I have seen a drop in rankings. Any help would be greatly appreciated. Thanks!

    Read the article

  • Is LightDM is broken? Autologin works

    - by Ben
    I recently upgraded my Mythbuntu box to 11.10. LightDM worked for a while and then I configured autologin on my user account. After some time, I've removed some packages to lean down the system. Now when I log out (from either Unity or Gnome Shell) I lose the X session, LightDM doesn't start back up. If I disable autologin through /etc/lightdm/lightdm.conf I get no login screen & no X. As I said, autologin works and gives me a Ubuntu Classic desktop. This is the only reference in dmesg to lightdm; [ 17.351023] type=1400 audit(1329530135.420:19): apparmor="STATUS" operation="profile_load" name="/usr/lib/lightdm/lightdm-guest-session-wrapper" pid=1097 comm="apparmor_parser" Can anyone help?

    Read the article

  • Flash video streaming choppy for Chrome, alright for Firefox

    - by Ben
    I'm using Ubuntu 12.04.1, Chrome 21 and Firefox 15. Flash player 11.2 has been installed, and I've just started using Ubuntu... yesterday. And I'm using a Lenovo T61. The problem is that it doesn't matter if it's youtube or vimeo or some other flash player, it streams fine on chrome but every 30 seconds or so, there is a pause in video playback (with audio continuing) before it catches up, skipping quite a few seconds of video. It works perfectly fine in Firefox, and I've tried disabling PepperFlash/libpepflashplayer.so in Chrome but it doesn't seem to affect the performance. Anyone know how to work around this? It's more a problem of convenience because I don't like the idea of having to switch between Chrome and Firefox just to watch videos.

    Read the article

  • Removing hard-coded values and defensive design vs YAGNI

    - by Ben Scott
    First a bit of background. I'm coding a lookup from Age - Rate. There are 7 age brackets so the lookup table is 3 columns (From|To|Rate) with 7 rows. The values rarely change - they are legislated rates (first and third columns) that have stayed the same for 3 years. I figured that the easiest way to store this table without hard-coding it is in the database in a global configuration table, as a single text value containing a CSV (so "65,69,0.05,70,74,0.06" is how the 65-69 and 70-74 tiers would be stored). Relatively easy to parse then use. Then I realised that to implement this I would have to create a new table, a repository to wrap around it, data layer tests for the repo, unit tests around the code that unflattens the CSV into the table, and tests around the lookup itself. The only benefit of all this work is avoiding hard-coding the lookup table. When talking to the users (who currently use the lookup table directly - by looking at a hard copy) the opinion is pretty much that "the rates never change." Obviously that isn't actually correct - the rates were only created three years ago and in the past things that "never change" have had a habit of changing - so for me to defensively program this I definitely shouldn't store the lookup table in the application. Except when I think YAGNI. The feature I am implementing doesn't specify that the rates will change. If the rates do change, they will still change so rarely that maintenance isn't even a consideration, and the feature isn't actually critical enough that anything would be affected if there was a delay between the rate change and the updated application. I've pretty much decided that nothing of value will be lost if I hard-code the lookup, and I'm not too concerned about my approach to this particular feature. My question is, as a professional have I properly justified that decision? Hard-coding values is bad design, but going to the trouble of removing the values from the application seems to violate the YAGNI principle. EDIT To clarify the question, I'm not concerned about the actual implementation. I'm concerned that I can either do a quick, bad thing, and justify it by saying YAGNI, or I can take a more defensive, high-effort approach, that even in the best case ultimately has low benefits. As a professional programmer does my decision to implement a design that I know is flawed simply come down to a cost/benefit analysis?

    Read the article

  • Desktop background won't change until restart

    - by Ben
    I'm new to Ubuntu and indeed Linux systems. I have 11.04 installed on my laptop. Here's the problem. When i select a picture for the desktop background, it says that Desktop Background has been changed but the changes do not apply right away. It is only after I have restarted the system that the changes will appear. This did not happen before. When i first started using this OS a few months ago the changes applied immediately. So what have i done that made this start acting wonky. Thank you for any help.

    Read the article

  • What happens differently when you add a task Asynchronously on GAE?

    - by Ben Grunfeld
    Google's doc on async tasks assumes knowledge of the difference between regular and asynchronously added tasks. add_async(task, transactional=False, rpc=None) Asynchronously add a Task or a list of Tasks to this Queue. How is adding tasks asynchronously different to adding them regularly. I.e. what is the difference between using add(task, transactional=False) and add_async(task, transactional=False, rpc=None) I've heard that adding tasks regularly blocks certain things. Any explanation of what it blocks and how, and how async tasks don't block would be greatly appreciated.

    Read the article

  • Triple monitor setup with an ATI Radeon 4200?

    - by Ben Clapp
    I have a relatively new Powerspec computer (i5 quad core processor, about a year or two old) and just grabbed a new relatively inexpensive ($40?) graphics card. It has 1 DVI, one VGA, and one HDMI output. I have two (different type) monitors plugged into the DVI and VGA slots, and they work great. However, I cannot seem to be able to get a third monitor in the HDMI slot to work. I can see the monitor (and monitor info) show up in display settings. However, if I try to switch the monitor to 'on' and click apply, nothing happens. Anyone have the slightest idea what the problem might be? (It's a Radeon graphics card FYI; if I remember right I think it was the Radeon 4200?)

    Read the article

  • Project Euler 11: (Iron)Python

    - by Ben Griswold
    In my attempt to learn (Iron)Python out in the open, here’s my solution for Project Euler Problem 11.  As always, any feedback is welcome. # Euler 11 # http://projecteuler.net/index.php?section=problems&id=11 # What is the greatest product # of four adjacent numbers in any direction (up, down, left, # right, or diagonally) in the 20 x 20 grid? import time start = time.time() grid = [\ [8,02,22,97,38,15,00,40,00,75,04,05,07,78,52,12,50,77,91,8],\ [49,49,99,40,17,81,18,57,60,87,17,40,98,43,69,48,04,56,62,00],\ [81,49,31,73,55,79,14,29,93,71,40,67,53,88,30,03,49,13,36,65],\ [52,70,95,23,04,60,11,42,69,24,68,56,01,32,56,71,37,02,36,91],\ [22,31,16,71,51,67,63,89,41,92,36,54,22,40,40,28,66,33,13,80],\ [24,47,32,60,99,03,45,02,44,75,33,53,78,36,84,20,35,17,12,50],\ [32,98,81,28,64,23,67,10,26,38,40,67,59,54,70,66,18,38,64,70],\ [67,26,20,68,02,62,12,20,95,63,94,39,63,8,40,91,66,49,94,21],\ [24,55,58,05,66,73,99,26,97,17,78,78,96,83,14,88,34,89,63,72],\ [21,36,23,9,75,00,76,44,20,45,35,14,00,61,33,97,34,31,33,95],\ [78,17,53,28,22,75,31,67,15,94,03,80,04,62,16,14,9,53,56,92],\ [16,39,05,42,96,35,31,47,55,58,88,24,00,17,54,24,36,29,85,57],\ [86,56,00,48,35,71,89,07,05,44,44,37,44,60,21,58,51,54,17,58],\ [19,80,81,68,05,94,47,69,28,73,92,13,86,52,17,77,04,89,55,40],\ [04,52,8,83,97,35,99,16,07,97,57,32,16,26,26,79,33,27,98,66],\ [88,36,68,87,57,62,20,72,03,46,33,67,46,55,12,32,63,93,53,69],\ [04,42,16,73,38,25,39,11,24,94,72,18,8,46,29,32,40,62,76,36],\ [20,69,36,41,72,30,23,88,34,62,99,69,82,67,59,85,74,04,36,16],\ [20,73,35,29,78,31,90,01,74,31,49,71,48,86,81,16,23,57,05,54],\ [01,70,54,71,83,51,54,69,16,92,33,48,61,43,52,01,89,19,67,48]] # left and right max, product = 0, 0 for x in range(0,17): for y in xrange(0,20): product = grid[y][x] * grid[y][x+1] * \ grid[y][x+2] * grid[y][x+3] if product > max : max = product # up and down for x in range(0,20): for y in xrange(0,17): product = grid[y][x] * grid[y+1][x] * \ grid[y+2][x] * grid[y+3][x] if product > max : max = product # diagonal right for x in range(0,17): for y in xrange(0,17): product = grid[y][x] * grid[y+1][x+1] * \ grid[y+2][x+2] * grid[y+3][x+3] if product > max: max = product # diagonal left for x in range(0,17): for y in xrange(0,17): product = grid[y][x+3] * grid[y+1][x+2] * \ grid[y+2][x+1] * grid[y+3][x] if product > max : max = product print max print "Elapsed Time:", (time.time() - start) * 1000, "millisecs" a=raw_input('Press return to continue')

    Read the article

  • How to change speed without changing path travelled?

    - by Ben Williams
    I have a ball which is being thrown from one side of a 2D space to the other. The formula I am using for calculating the ball's position at any one point in time is: x = x0 + vx0*t y = y0 + vy0*t - 0.5*g*t*t where g is gravity, t is time, x0 is the initial x position, vx0 is the initial x velocity. What I would like to do is change the speed of this ball, without changing how far it travels. Let's say the ball starts in the lower left corner, moves upwards and rightwards in an arc, and finishes in the lower right corner, and this takes 5s. What I would like to be able to do is change this so it takes 10s or 20s, but the ball still follows the same curve and finishes in the same position. How can I achieve this? All I can think of is manipulating t but I don't think that's a good idea. I'm sure it's something simple, but my maths is pretty shaky.

    Read the article

  • Project Euler 16: (Iron)Python

    - by Ben Griswold
    In my attempt to learn (Iron)Python out in the open, here’s my solution for Project Euler Problem 16.  As always, any feedback is welcome. # Euler 16 # http://projecteuler.net/index.php?section=problems&id=16 # 2^15 = 32768 and the sum of its digits is # 3 + 2 + 7 + 6 + 8 = 26. # What is the sum of the digits of the number 2^1000? import time start = time.time() print sum([int(i) for i in str(2**1000)]) print "Elapsed Time:", (time.time() - start) * 1000, "millisecs" a=raw_input('Press return to continue')

    Read the article

  • Enabling multitouch on an acer 5742?

    - by Ben
    I am trying to get multitouch to work on my touchpad. I am currently trying to run a script to get it to work. It is set to start on boot, saved as .run and has been made executable. here is the code: #!/bin/bash #enable multitouch sleep 10 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Two-Finger Scrolling" 8 1 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 8 1 1 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 32 10 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 32 8 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Edge Scrolling" 8 0 0 0 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Jumpy Cursor Threshold" 32 110 synclient TapButton2=2 exit the commands make multi touch work if I enter them in the terminal, but the script itself does not work. any suggestions?

    Read the article

  • "Search Friendly" domain names

    - by Ben
    We bought a few search friendly domain names for the CPA site that I manage. Each of the domains we bought has the name of a nearby city and the word cpa in front of, or behind the city name. The plan is to create a landing page for each of these domains with useful information about business filings, ect. specific to that city, as well as directions to our office from that city. The question is how to best utilize these new domains: Should each domain be set to a 301 redirect to mainsite.com/city ? Should each domain be it's own single page mini-site that links to mainsite.com ? What other options are there and what are the pros/cons? Remember the goal is to be more relevant in searches that use a nearby city name in their search for CPA/accounting services.

    Read the article

  • Best practices for periodically saving game state to disk

    - by Ben Morris
    I'm working on an MMO. All of the player and environment data lives on a server and is kept in memory. There's a "world" object which keeps track of all of the maps, characters, etc. and their relations to each other. To avoid data loss in case of a crash, I've been periodically serializing the world to disk. The trouble is, this object can be quite large, so when the server starts writing, there's noticeable in-game slowdown for a few seconds, which I'd like to avoid. Any pointers on how to go about this in a more efficient way?

    Read the article

  • Best Persistence choice for J2EE-App with frequently changing Data Model

    - by Ben-G
    Whenever I develop a J2EE-Application, I at some point decide to switch from my dummy Persistence (Simply Using Lists and other Data Structures) to some Sort of Database Persistence. Mostly when I hope the Data Model is more or less complete. From this point on, changes to the data model become exhausting, but unluckily they occur rather often. I've used different Object-Relational-Mappers (iBatis, Hibernate) for my projects. They definitely reduce the pain coming with Data Model changes, but they anyway let me adjust code/configuration at 3 or 4 places for every single change. To me, that's cumbersome and error prone. I made a better experience with DB4O, which simply persists Java Objects as they are, but I believe it's performance does not scale for huge applications. Is there anyway to maintain performance while letting out all the ugly configuration work? I'm seeking a performant framework which really hides persistence from my code. Wish for thinking? Or am I missing out THE technology? Hope you can help.

    Read the article

  • Why does this game loop stop my process from responding?

    - by Ben
    I implemented a fixed time step loop for my C# game. All it does at the moment is make a square bounce around the screen. The problem I'm having is that when I execute the program, I can't close it from the window's close button and the cursor is stuck on the "busy" icon. I have to go into Visual Studio and stop the program manually. Here's the loop at the moment: public void run() { int updates = 0; int frames = 0; double msPerTick = 1000.0 / 60.0; double threshhold = 0; long lastTime = getCurrentTime(); long lastTimer = getCurrentTime(); while (true) { long currTime = getCurrentTime(); threshhold += (currTime - lastTime) / msPerTick; lastTime = currTime; while (threshhold >= 1) { update(); updates++; threshhold -= 1; } this.Refresh(); frames++; if ((getCurrentTime() - lastTimer) >= 1000) { this.Text = updates + " updates and " + frames + " frames per second"; updates = 0; frames = 0; lastTimer += 1000; } } } Why is this happening?

    Read the article

  • Project Euler 13: (Iron)Python

    - by Ben Griswold
    In my attempt to learn (Iron)Python out in the open, here’s my solution for Project Euler Problem 13.  As always, any feedback is welcome. # Euler 13 # http://projecteuler.net/index.php?section=problems&id=13 # Work out the first ten digits of the sum of the # following one-hundred 50-digit numbers. import time start = time.time() number_string = '\ 37107287533902102798797998220837590246510135740250\ 46376937677490009712648124896970078050417018260538\ 74324986199524741059474233309513058123726617309629\ 91942213363574161572522430563301811072406154908250\ 23067588207539346171171980310421047513778063246676\ 89261670696623633820136378418383684178734361726757\ 28112879812849979408065481931592621691275889832738\ 44274228917432520321923589422876796487670272189318\ 47451445736001306439091167216856844588711603153276\ 70386486105843025439939619828917593665686757934951\ 62176457141856560629502157223196586755079324193331\ 64906352462741904929101432445813822663347944758178\ 92575867718337217661963751590579239728245598838407\ 58203565325359399008402633568948830189458628227828\ 80181199384826282014278194139940567587151170094390\ 35398664372827112653829987240784473053190104293586\ 86515506006295864861532075273371959191420517255829\ 71693888707715466499115593487603532921714970056938\ 54370070576826684624621495650076471787294438377604\ 53282654108756828443191190634694037855217779295145\ 36123272525000296071075082563815656710885258350721\ 45876576172410976447339110607218265236877223636045\ 17423706905851860660448207621209813287860733969412\ 81142660418086830619328460811191061556940512689692\ 51934325451728388641918047049293215058642563049483\ 62467221648435076201727918039944693004732956340691\ 15732444386908125794514089057706229429197107928209\ 55037687525678773091862540744969844508330393682126\ 18336384825330154686196124348767681297534375946515\ 80386287592878490201521685554828717201219257766954\ 78182833757993103614740356856449095527097864797581\ 16726320100436897842553539920931837441497806860984\ 48403098129077791799088218795327364475675590848030\ 87086987551392711854517078544161852424320693150332\ 59959406895756536782107074926966537676326235447210\ 69793950679652694742597709739166693763042633987085\ 41052684708299085211399427365734116182760315001271\ 65378607361501080857009149939512557028198746004375\ 35829035317434717326932123578154982629742552737307\ 94953759765105305946966067683156574377167401875275\ 88902802571733229619176668713819931811048770190271\ 25267680276078003013678680992525463401061632866526\ 36270218540497705585629946580636237993140746255962\ 24074486908231174977792365466257246923322810917141\ 91430288197103288597806669760892938638285025333403\ 34413065578016127815921815005561868836468420090470\ 23053081172816430487623791969842487255036638784583\ 11487696932154902810424020138335124462181441773470\ 63783299490636259666498587618221225225512486764533\ 67720186971698544312419572409913959008952310058822\ 95548255300263520781532296796249481641953868218774\ 76085327132285723110424803456124867697064507995236\ 37774242535411291684276865538926205024910326572967\ 23701913275725675285653248258265463092207058596522\ 29798860272258331913126375147341994889534765745501\ 18495701454879288984856827726077713721403798879715\ 38298203783031473527721580348144513491373226651381\ 34829543829199918180278916522431027392251122869539\ 40957953066405232632538044100059654939159879593635\ 29746152185502371307642255121183693803580388584903\ 41698116222072977186158236678424689157993532961922\ 62467957194401269043877107275048102390895523597457\ 23189706772547915061505504953922979530901129967519\ 86188088225875314529584099251203829009407770775672\ 11306739708304724483816533873502340845647058077308\ 82959174767140363198008187129011875491310547126581\ 97623331044818386269515456334926366572897563400500\ 42846280183517070527831839425882145521227251250327\ 55121603546981200581762165212827652751691296897789\ 32238195734329339946437501907836945765883352399886\ 75506164965184775180738168837861091527357929701337\ 62177842752192623401942399639168044983993173312731\ 32924185707147349566916674687634660915035914677504\ 99518671430235219628894890102423325116913619626622\ 73267460800591547471830798392868535206946944540724\ 76841822524674417161514036427982273348055556214818\ 97142617910342598647204516893989422179826088076852\ 87783646182799346313767754307809363333018982642090\ 10848802521674670883215120185883543223812876952786\ 71329612474782464538636993009049310363619763878039\ 62184073572399794223406235393808339651327408011116\ 66627891981488087797941876876144230030984490851411\ 60661826293682836764744779239180335110989069790714\ 85786944089552990653640447425576083659976645795096\ 66024396409905389607120198219976047599490197230297\ 64913982680032973156037120041377903785566085089252\ 16730939319872750275468906903707539413042652315011\ 94809377245048795150954100921645863754710598436791\ 78639167021187492431995700641917969777599028300699\ 15368713711936614952811305876380278410754449733078\ 40789923115535562561142322423255033685442488917353\ 44889911501440648020369068063960672322193204149535\ 41503128880339536053299340368006977710650566631954\ 81234880673210146739058568557934581403627822703280\ 82616570773948327592232845941706525094512325230608\ 22918802058777319719839450180888072429661980811197\ 77158542502016545090413245809786882778948721859617\ 72107838435069186155435662884062257473692284509516\ 20849603980134001723930671666823555245252804609722\ 53503534226472524250874054075591789781264330331690' total = 0 for i in xrange(0, 100 * 50 - 1, 50): total += int(number_string[i:i+49]) print str(total)[:10] print "Elapsed Time:", (time.time() - start) * 1000, "millisecs" a=raw_input('Press return to continue')

    Read the article

  • Project Euler 7: (Iron)Python

    - by Ben Griswold
    In my attempt to learn (Iron)Python out in the open, here’s my solution for Project Euler Problem 7.  As always, any feedback is welcome. # Euler 7 # http://projecteuler.net/index.php?section=problems&id=7 # By listing the first six prime numbers: 2, 3, 5, 7, # 11, and 13, we can see that the 6th prime is 13. What # is the 10001st prime number? import time start = time.time() def nthPrime(nth): primes = [2] number = 3 while len(primes) < nth: isPrime = True for prime in primes: if number % prime == 0: isPrime = False break if (prime * prime > number): break if isPrime: primes.append(number) number += 2 return primes[nth - 1] print nthPrime(10001) print "Elapsed Time:", (time.time() - start) * 1000, "millisecs" a=raw_input('Press return to continue')

    Read the article

  • Project Euler 4: (Iron)Python

    - by Ben Griswold
    In my attempt to learn (Iron)Python out in the open, here’s my solution for Project Euler Problem 4.  As always, any feedback is welcome. # Euler 4 # http://projecteuler.net/index.php?section=problems&id=4 # Find the largest palindrome made from the product of # two 3-digit numbers. A palindromic number reads the # same both ways. The largest palindrome made from the # product of two 2-digit numbers is 9009 = 91 x 99. # Find the largest palindrome made from the product of # two 3-digit numbers. import time start = time.time() def isPalindrome(s): return s == s[::-1] max = 0 for i in xrange(100, 999): for j in xrange(i, 999): n = i * j; if (isPalindrome(str(n))): if (n > max): max = n print max print "Elapsed Time:", (time.time() - start) * 1000, "millisecs" a=raw_input('Press return to continue')

    Read the article

  • Speaking at SQLSaturday #44 in Huntington Beach, CA (Los Angeles Area)

    - by Ben Nevarez
      I'll be presenting a session at SQLSaturday #44 in Huntington Beach, the first SQLSaturday on Southern California. The event takes place on Saturday, April 24 at the Golden West College on 15744 Goldenwest St, Huntington Beach, CA 92647.. For more information visit the following link   http://sqlsaturday.com/44/eventhome.aspx   My session is “How the Query Optimizer Works”. I hope to see you there. Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >