Programming

Now that API Monitoring has a free version you hardly have any excuses left – right? Actually, one of those last excuses stopping you from setting up your first (free) API monitor might be that you don’t really know what to consider and ...
Now that API Monitoring has a free version you hardly have any excuses left – right? Actually, one of those last excuses stopping you from setting up your first (free) API monitor might be that you don’t really know what to consider and where to start when setting it up – so let’s remedy that in a pinch and get you going with some hands-on tips for creating your first API monitor.
about 1 hour ago
Microsoft's SkyDrive cloud storage service may soon be getting support for 3D panoramas using Photosynth technology. Earlier in May, Microsoft updated SkyDrive with an emphasis on photos, creating a chronologically ordered "All Photos" v...
Microsoft's SkyDrive cloud storage service may soon be getting support for 3D panoramas using Photosynth technology. Earlier in May, Microsoft updated SkyDrive with an emphasis on photos, creating a chronologically ordered "All Photos" view and accepting full-resolution uploads from Windows Phone 8. Now, the highly reliable LiveSide reports that SkyDrive will also allow users to upload and view 3D panoramas. The new feature will be based on Photosynth's toolset, supporting interactive panoramas stitched together from photos and videos. LiveSide notes that it's not clear whether SkyDrive will support synths, a kind of inverse panorama that captures multiple sides of a single building or other object. We also don't have any word on when... Continue reading…
about 2 hours ago
Originally posted on: http://geekswithblogs.net/dlussier/archive/2013/05/25/152989.aspxPrairie Dev Con has been providing fantastic opportunities to learn, network, and have fun for software developers living in the Canadian prairies ove...
Originally posted on: http://geekswithblogs.net/dlussier/archive/2013/05/25/152989.aspxPrairie Dev Con has been providing fantastic opportunities to learn, network, and have fun for software developers living in the Canadian prairies over the last four years. We're looking at running the next Prairie Dev Con in Saskatoon, but we need your help! What sessions would you like to see? What session styles do you like? What would make Prairie Dev Con Saskatoon a must-attend event? We have a short survey that I'd invite you to fill out. It doesn't take long and the information will go a long way to help in planning for a Saskatoon event! Also, if we do go ahead and run a Prairie Dev Con in Saskatoon, we'll draw a name from the survey submissions for a free pass to the conference! Click here to take the survey! Thanks, and hopefully we'll see you in Saskatoon later this year! D'Arcy Lussier Prairie Dev Con
about 2 hours ago
Hello, I have a sharded replica set environment. (6 shards, 2 replicas in each shard + 1 replica as non-read backup). I use our own md5 hash key for equal distribution amongst nodes and force reads to the secondaries and all writes t...
Hello, I have a sharded replica set environment. (6 shards, 2 replicas in each shard + 1 replica as non-read backup). I use our own md5 hash key for equal distribution amongst nodes and force reads to the secondaries and all writes to the primaries. We previously were on 5 shards and just added the
about 2 hours ago
To check if the instance was saved one might do something like this: def is_instance_saved(instance): if instance.pk is None: return False # in case pk was set manually try: instance.__class__.objects.get (pk=instance.pk) except O...
To check if the instance was saved one might do something like this: def is_instance_saved(instance): if instance.pk is None: return False # in case pk was set manually try: instance.__class__.objects.get (pk=instance.pk) except ObjectDoesNotExist: return False
about 3 hours ago
I mentioned in an earlier post that I had written my own ranker and thought I'd revisit this with some code.I verify and ensure the safety of microprocessors for my day job. One way that very complex CPU's are tested is to create another...
I mentioned in an earlier post that I had written my own ranker and thought I'd revisit this with some code.I verify and ensure the safety of microprocessors for my day job. One way that very complex CPU's are tested is to create another model of the chip which can be used to generate pseudo-random instruction streams to run on CPU. The so-called ISG can create thousands (millions!) of these tests in very little time, and the ISG is written in such a way that it can be 'tweaked' to give some control or steering to what the instruction streams will exercise on the CPU.Now simulating these instruction streams and gathering information on just what parts of the CPU are exercised, called covered, by each individual test takes time, and multiple ISG generated tests may cover the same regions of the CPU. To increase the overall coverage of of the CPU we run what is called a regression - all the tests are run and their coverage and the time they take to simulate are stored. at the end of the regression run you may have several thousands of tests that cover only part of the CPU.If you take the regression results and rank them you can find that subset of the tests that give all the coverage. Usually thousands of pseudo-random tests might be ranked and generate a sub-list of only hundreds of tests that when run would give the same coverage. What we then usually do is look at what isn't covered and generate some more tests by the ISG or other methods to try and fill the gaps; run the new regression and rank again in a loop to fully exercise the CPU and hit some target coverage goal.Ranking tests is an important part of the regression flow described above, and when it works well you forget about it. Unfortunately sometimes I want to to rank other data, for which the stock ranking program from the CAD tool vendors does not fit. So here is the guts of a ranking program that will scale to handling hundreds of thousands of tests and coverage points.InputNormally I have to parse my input from text or HTML files of results generated by other CAD programs - it is tedious work that I will skip by providing idealised inputs in the form of a Python dict. (Sometimes the code for parsing input files can be as large or larger than the ranking algorithm).Let us assume that each ISG test has a name, runs for a certain 'time' and when simulated is shown to 'cover' a set of numbered features of the design. after the parsing, the gathered input data is represented by the results dict in the program. 1 2 results = { 3 # 'TEST': ( TIME, set([COVERED_POINT ...])), 4 'test_00': ( 2.08, set([2, 3, 5, 11, 12, 16, 19, 23, 25, 26, 29, 36, 38, 40])), 5 'test_01': ( 58.04, set([0, 10, 13, 15, 17, 19, 20, 22, 27, 30, 31, 33, 34])), 6 'test_02': ( 34.82, set([3, 4, 6, 12, 15, 21, 23, 25, 26, 33, 34, 40])), 7 'test_03': ( 32.74, set([4, 5, 10, 16, 21, 22, 26, 39])), 8 'test_04': (100.00, set([0, 1, 4, 6, 7, 8, 9, 11, 12, 18, 26, 27, 31, 36])), 9 'test_05': ( 4.46, set([1, 2, 6, 11, 14, 16, 17, 21, 22, 23, 30, 31])), 10 'test_06': ( 69.57, set([10, 11, 15, 17, 19, 22, 26, 27, 30, 32, 38])), 11 'test_07': ( 85.71, set([0, 2, 4, 5, 9, 10, 14, 17, 24, 34, 36, 39])), 12 'test_08': ( 5.73, set([0, 3, 8, 9, 13, 19, 23, 25, 28, 36, 38])), 13 'test_09': ( 15.55, set([7, 15, 17, 25, 26, 30, 31, 33, 36, 38, 39])), 14 'test_10': ( 12.05, set([0, 4, 13, 14, 15, 24, 31, 35, 39])), 15 'test_11': ( 52.23, set([0, 3, 6, 10, 11, 13, 23, 34, 40])), 16 'test_12': ( 26.79, set([0, 1, 4, 5, 7, 8, 10, 12, 13, 31, 32, 40])), 17 'test_13': ( 16.07, set([2, 6, 9, 11, 13, 15, 17, 18, 34])), 18 'test_14': ( 40.62, set([1, 2, 8, 15, 16, 19, 22, 26, 29, 31, 33, 34, 38])), 19 } 20 Greedy ranking algorithmThe object of the algorithm is to select and order a subset of the tests that:Cover as many of the coverage points as possible by at least one test.After the above, reduce the number of tests needed to achieve that maximum coverage by as much as is pos
about 3 hours ago
Hello When I run the initially created project using the command 'python manage.py runserver' gives me Error: [Errno 10013] When I run this command though 'python manage.py runserver 8001', then I can see the site on...
Hello When I run the initially created project using the command 'python manage.py runserver' gives me Error: [Errno 10013] When I run this command though 'python manage.py runserver 8001', then I can see the site on [link] Can you tell me why this happens and what are those 4 digit numbers after
about 3 hours ago
2013/05/25 -- Tamar Fraenkel
2013/05/25 -- Tamar Fraenkel
about 3 hours ago
Fonts form a major part of any web design and for this reason most of the web designers concentrate on choosing the right font styles. It is possible to take an ordinary design to an extra ordinary level just with the help of efficient a...
Fonts form a major part of any web design and for this reason most of the web designers concentrate on choosing the right font styles. It is possible to take an ordinary design to an extra ordinary level just with the help of efficient and effective typography as it contributes to near about 70-80% of the web design. Despite the fact that there are a few standard font styles which are used by the web designers more often but at times there is a need of different and unique font styles to make the design extraordinary and unique from other designs.
about 4 hours ago
This is a simple tutorial that shows how easily (and without depending on third party APIs) you can write a simple scheduler in Java. Java comes with build in capability for scheduling using java.util.Timer class and java.util.TimerTask ...
This is a simple tutorial that shows how easily (and without depending on third party APIs) you can write a simple scheduler in Java. Java comes with build in capability for scheduling using java.util.Timer class and java.util.TimerTask class. package com.kushal.tools; /** * @Author Kushal Paudyal * Scheduling a task using Java in-house scheduler * Created : 2011/04/28 * Last Modified: 2011/04/28 */ import java.util.Timer; import java.util.TimerTask; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.Date; public final class SchedulerUsingJavaUtil extends TimerTask { private final static long FREQUENCY_ONE_DAY = 1000 * 60 * 60 * 24; private final static int ONE_DAY = 0; private final static int HOUR_AM = 10; private final static int MINUTES = 52; /** * Construct and use a TimerTask and Timer. */ public static void main(String[] arguments) { TimerTask scheduledTask = new SchedulerUsingJavaUtil(); Timer timer = new Timer(); /** * Schedules the specified task for repeated fixed-rate execution, * beginning at the specified time. Subsequent executions take place at * approximately regular intervals, separated by the specified period. * In fixed-rate execution, each execution is scheduled relative to the * scheduled execution time of the initial execution. If an execution is * delayed for any reason (such as garbage collection or other * background activity), two or more executions will occur in rapid * succession to "catch up." In the long run, the frequency of execution * will be exactly the reciprocal of the specified period (assuming the * system clock underlying Object.wait(long) is accurate). * * Fixed-rate execution is appropriate for recurring activities that are * sensitive to absolute time, such as ringing a chime every hour on the * hour, or running scheduled maintenance every day at a particular * time. It is also appropriate for recurring activities where the total * time to perform a fixed number of executions is important, such as a * countdown timer that ticks once every second for ten seconds. * Finally, fixed-rate execution is appropriate for scheduling multiple * repeating timer tasks that must remain synchronized with respect to * one another. * * * Parameters: * task - task to be scheduled. * firstTime - First time at which task is to be executed. * period - time in milliseconds between successive task executions. * Throws: IllegalArgumentException - if * time.getTime() is negative. IllegalStateException - if task was * already scheduled or cancelled, timer was cancelled, or timer thread * terminated. */ timer.scheduleAtFixedRate(scheduledTask, getFirstRunTime(),FREQUENCY_ONE_DAY); } /** * Implements TimerTask's abstract run() method. */ public void run() { System.out.println("Doing some task..."+new Date()); } /** * Create a time when scheduler needs to run first */ private static Date getFirstRunTime() { /** * Get Today's Calendar */ Calendar tomorrow = new GregorianCalendar(); /** * Add one day to get tomorrow's calendar */ tomorrow.add(Calendar.DATE, ONE_DAY); /** * Set the scheduled time for tomorrow. */ Calendar firstRunTime = new GregorianCalendar( tomorrow.get(Calendar.YEAR), tomorrow.get(Calendar.MONTH), tomorrow.get(Calendar.DATE), HOUR_AM, MINUTES); return firstRunTime.getTime(); } } Originally posted 2011-05-17 20:53:56.
about 5 hours ago