Search Results

Search found 2818 results on 113 pages for 'fun mun pieng'.

Page 20/113 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Problems with UK.Elect() method

    - by codeulike
    I'm calling UK.Elect() but getting a weird result back. I was expecting a value of Enum.ElectoralReform but it seems to be throwing an InfufficientSeatsException I think I probably need to re-factor the whole PoliticalClass Any suggestions?

    Read the article

  • How to create a snowstorm on your Windows desktop?

    - by Vilx-
    Practical uses aside, how (if it is possible at all) could you create a "snowing" effect on your desktop PC running Windows? Preferably with nothing but raw C/C++ and WinAPI. The requirements for the snow are: Appears over everything else shown; Snowflakes are small, possibly simple dots or clusters of a few white pixels; Does not bother working with the computer (clicking a snowflake sends the click through to the underlying window); Plays nicely with users dragging windows; Multimonitor capable. Bonus points for any of the following features: Snow accumulates on the lower edge of the window or the taskbar (if it's at the bottom of the screen); Snow accumulates also on top-level windows. Or perhaps some snow accumulates, some continues down, accumulating on every window with a title bar; Snow accumulated on windows gets "shaken off" when windows are dragged; Snow accumulated on taskbar is aware of the extended "Start" button under Vista/7. Snowflakes have shadows/outlines, so they are visible on white backgrounds; Snowflakes have complex snowflike-alike shapes (they must still be tiny). Most of these effects are straightforward enough, except the part where snow is click-through and plays nicely with dragging of windows. In my early days I've made an implementation that draws on the HDC you get from GetDesktopWindow(), which was click-through, but had problems with users dragging windows (snowflakes rendered on them got "dragged along"). The solution may use Vista/7 Aero features, but, of course, a universal solution is preferred. Any ideas? :)

    Read the article

  • What is your favourite programming-related lolcat picture?

    - by DR
    In the spirit of these questions... http://stackoverflow.com/questions/234075/what-is-your-best-programmer-joke http://stackoverflow.com/questions/354686/programming-related-songs http://stackoverflow.com/questions/517897/anyone-know-any-programming-related-poetry ... I wonder: What is your favourite programming-related lolcat picture? Please add one answer per picture.

    Read the article

  • Most inappropriate function or variable names you have encountered?

    - by Andrioid
    I was reading through my daily doze of RSS when I noticed a link to the python compiler documentation where class names like assList, assName and assTuple exist. While starting names with 'ass' is perfectly acceptable to me, it just sparked this idea that there probably exist much better examples of this. Have you personally used or otherwise encountered any inappropriate function or variable names? Personally I have used 'crap' and 'moo' for temporary purposes, forgot them and at a later point they came too integrated for me to bother with fixing them.

    Read the article

  • Implementing a scrabble trainer (cheater)

    - by bstullkid
    Hello, I've recently been playing alot of online scrabble so I decided to make a program that quickly searches through a dictionary of 200,000+ words with an input of up to any 26 letters. My first attempt was fail as it took a while when you input 8 or more letters (just a basic look through dictionary and cancel out a letter if its found kind of thing), so I made a tree like structure containing only an array of 26 of the same structure and a flag to indicate the end of a word, doing that It can output all possible words in under a second even with an input of 26 characters. But it seems that when I input 12 or more letters with some of the same characters repeated i get duplicates; can anyone see why I would be getting duplicates with this code? (ill post my program at the bottom) Also, the next step once the duplicates are weeded out is to actually be able to input the letters on the game board and then have it calculate the best word you can make on a given board. I am having trouble trying to figure out a good algorithm that can analyze a scrabble board and an input of letters and output a result; the possible words that could be made I have no problem with but actually checking a board efficiently (ie can this word fit here, or here etc... without creating a non dictionary word in the process on some other string of letters) Anyone have a idea for an approach at that? (given a scrabble board, and an input of 7 letters, find all possible valid words or word sets that you can make) lol crap i forgot to email myself the code from my other computer thats in another state... ill post it on monday when I get back there! btw the dictionary im using is sowpods (http://www.calvin.edu/~rpruim/scrabble/ospd3.txt)

    Read the article

  • MS Exam 70-536 - How can you constrain the input before you write any code?

    - by Max Gontar
    Hello! In MS Exam 70-536 .Net Foundation, Chapter 3 "Searching, Modifying, and Encoding Text" in Case Scenario 1 related to regex there is a question: How can you constrain the input before you write any code? I thought it's maybe a in-mind design of regex pattern but it will not really constrain the input, will it? I am not so good in psychokinesis yet! Or maybe the is some other way? Thanks for your time!

    Read the article

  • How to elegantly say "something unknown is wrong with this program"?

    - by Anvaka
    Medicine has the term idiopathic cardiomyopathy. Cardiomyopathy means something is wrong with your heart, and idiopathic means "we have no idea why yours isn't working." I know we have heisenbugs, bohrbugs, mandelbugs, and so on, but I feel I'm lacking one more buzzword: what's the IT cousin to idiopathic cardiomyopathy? What's an elegant word or phrase for "something unknown is wrong with this program"?

    Read the article

  • How can I improve my programming skills with out a computer (or reading material)?

    - by Tom Duckering
    Given the recent and continued chaos with grounded flights and folks stuck in airports, and what not, I'm wondering if anyone has any suggestions for activities that would help sharpen and develop a progammer's mind. The constraints are: Laptop is out of battery and there are no free sockets. You're bored of the book you're reading or you have none with you. Reasonable resources such as a pen and pad of paper are available. Rules can be bent within reason. As daft examples, things I have thought about are: How I might optimise the boarding of a plane. How I might improve the UI of a departure board.

    Read the article

  • Fastest algorithm to check if a number is pandigital?

    - by medopal
    Pandigital number is a number that contains the digits 1..number length. For example 123, 4312 and 967412385. I have solved many Project Euler problems, but the Pandigital problems always exceed the one minute rule. This is my pandigital function: private boolean isPandigital(int n){ Set<Character> set= new TreeSet<Character>(); String string = n+""; for (char c:string.toCharArray()){ if (c=='0') return false; set.add(c); } return set.size()==string.length(); } Create your own function and test it with this method int pans=0; for (int i=123456789;i<=123987654;i++){ if (isPandigital(i)){ pans++; } } Using this loop, you should get 720 pandigital numbers. My average time was 500 millisecond. I'm using Java, but the question is open to any language.

    Read the article

  • Coolest Class Names?

    - by Starx
    Whenever, working on a big project. Using Technical names for your class can be pretty harsh on yourself to remember. So, what are the coolest class name that you can think of which is descriptive, funny and easy to remember. PS also include parent and class names just to add a little spice

    Read the article

  • 20 lines of code you're working on right now [closed]

    - by Anton Gogolev
    Out of sheer curiosity. Hope none of you NDAs are violated or whatever. Here are mine. I'm currently refactoring a massively coupled webapp. As it usually is, no comments and no documentation whatsoever. if (paymentMethod == PaymentMethod.InAgency ) { EmailController.SendBookingCreateEmails(booking); this.DC.SubmitChanges(); return RedirectToAction("Result", new { id = booking.Id }); } else if (paymentMethod == PaymentMethod.CreditCard) { return RedirectToAction("Pay", new { id = booking.Id }); } else if(paymentMethod == PaymentMethod.MostravelBank || paymentMethod == PaymentMethod.MostravelCallback || paymentMethod == PaymentMethod.MostravelCardCredit || paymentMethod == PaymentMethod.MostravelCourierCash || paymentMethod == PaymentMethod.MostravelCourierPlasticCard) { isExclusive = true; Log.TraceInformation("Started booking for Mostravel. Payment method: {0}", paymentMethod); try { Log.TraceInformation("Sending emails"); EmailController.SendBookingCreateEmailsEx(booking); Log.TraceInformation("Sent emails. Started booking"); MakeRealBooking(booking, DC.MailRuAgencies.First(a => a.Id == MvcApplication.DefaultMailRuAgencyId)); Log.TraceInformation("Finished booking"); } catch(Exception ex) { Log.TraceEvent(TraceEventType.Error, 0, "Error while booking: {0}", ex.ToString()); } What are you working on right now?

    Read the article

  • SQL SERVER – A Puzzle Part 2 – Fun with SEQUENCE in SQL Server 2012 – Guess the Next Value

    - by pinaldave
    Before continuing this blog post – please read the first part of the SEQUENCE Puzzle here A Puzzle – Fun with SEQUENCE in SQL Server 2012 – Guess the Next Value. Where we played a simple guessing game about predicting next value. The answers the of puzzle is shared on the blog posts as a comment. Now here is the next puzzle based on yesterday’s puzzle. First execute the script which I have written here. The only difference between yesterday’s script is that I have removed the MINVALUE as 1 from the syntax. Now guess what will be the next value as requested in the query. USE TempDB GO -- Create sequence CREATE SEQUENCE dbo.SequenceID AS BIGINT START WITH 3 INCREMENT BY 1 MAXVALUE 5 CYCLE NO CACHE; GO -- Following will return 3 SELECT next value FOR dbo.SequenceID; -- Following will return 4 SELECT next value FOR dbo.SequenceID; -- Following will return 5 SELECT next value FOR dbo.SequenceID; -- Following will return which number SELECT next value FOR dbo.SequenceID; -- Clean up DROP SEQUENCE dbo.SequenceID; GO Above script gave me following resultset. 3 is the starting value and 5 is the maximum value. Once Sequence reaches to maximum value what happens? and WHY? I (kindly) suggest you try to attempt to answer this question without running this code in SQL Server 2012. I am very confident that irrespective of SQL Server version you are running you will have great learning. I will follow up of the answer in comments below. Recently my friend Vinod Kumar wrote excellent blog post on SQL Server 2012: Using SEQUENCE, you can head over there for learning sequence in details. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Puzzle, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • MySQL Connect in Only 5 Days – Some Fun Stuff!

    - by Bertrand Matthelié
    72 1024x768 Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} We’ve recently blogged about the various MySQL Connect sessions focused on MySQL Cluster, InnoDB, the MySQL Optimizer and MySQL Replication. But we also wanted to draw your attention to some great opportunities to network and have fun! That’s also part of what makes a good conference... MySQL Connect Reception San Francisco Hilton - Continental Ballroom 6:30 p.m.–8:30 p.m. A great opportunity to network with Oracle’s MySQL engineers, partners having a booth in the exhibition hall and just about everyone at MySQL Connect. Long time MySQL users will see many familiar faces, and new users will be able to build valuable relationships. A must attend reception for sure! Taylor Street Open House 7:00 p.m.–9:00 p.m. After two intense days at MySQL Connect, you’ll get the chance to relax and continue networking at the Taylor Street Café Open House on Sunday evening. Perhaps recharging batteries for a full week at Oracle OpenWorld… The Oracle OpenWorld Music Festival Starting on Sunday eve and running through the entire duration of Oracle OpenWorld, the first Oracle OpenWorld Musical Festival features some of today’s breakthrough musicians. It’s five nights of back-to-back performances in the heart of San Francisco. Registered Oracle conference attendees get free admission, so remember your badge when you head to a show. More information here. You can check out the full MySQL Connect program here as well as in the September edition of the MySQL newsletter. Not registered yet? You can still save US$ 300 over the on-site fee – Register Now!

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >