Programming

SEE my configuration, all appears fine: I add : echo 'blockdev --setra 256 /dev/xvdi' | sudo tee -a /etc/rc.local echo 'blockdev --setra 256 /dev/xvdh' | sudo tee -a /etc/rc.local echo 'blockdev --setra 256 /dev/x...
SEE my configuration, all appears fine: I add : echo 'blockdev --setra 256 /dev/xvdi' | sudo tee -a /etc/rc.local echo 'blockdev --setra 256 /dev/xvdh' | sudo tee -a /etc/rc.local echo 'blockdev --setra 256 /dev/xvdg' | sudo tee -a /etc/rc.local echo 'blockdev --setra 256 /dev/xvdf' | sudo tee -a /etc/rc.local
score: 1 about 1 hour ago
Code School teaches web technologies via online video tutorials. While most of their courses are paid, some like the course on Chrome DevTools are free. The Chrome DevTools course is well-produced and impressive. In my opinion, l...
Code School teaches web technologies via online video tutorials. While most of their courses are paid, some like the course on Chrome DevTools are free. The Chrome DevTools course is well-produced and impressive. In my opinion, learning about DevTools within at least one browser is crucial to do a good job at web development. Some of the tricks you learn in the Code School Discover Chrome DevTools tutorial can easily be re-used with the Developer tools of other browsers (like IE, Firefox Firebug) Like Pluralsight, Code School provides some of its courses for free: Try jQuery Try Git Try Ruby Tech Tips, Tricks & Trivia - A seasoned developer's little discoveries and annotated bookmarks.
score: 1 about 1 hour ago
Hello Here are my steps. python manage.py dumpdata --database=legacy > data.json python manage.py loaddata data.json --database=default IntegrityError: Problem installing fixture 'data.json': Could not load accounts.UserProf...
Hello Here are my steps. python manage.py dumpdata --database=legacy > data.json python manage.py loaddata data.json --database=default IntegrityError: Problem installing fixture 'data.json': Could not load accounts.UserProfile(pk=17): duplicate key value violates unique constraint "accounts_userprofile_user_id_ key"
score: 1 about 2 hours ago
To all web developers and designers, there are various resources that they can use while establishing a new website. One of which is frameworks, defined as a universal or regulated array of criteria, concepts, and practices to address th...
To all web developers and designers, there are various resources that they can use while establishing a new website. One of which is frameworks, defined as a universal or regulated array of criteria, concepts, and practices to address the typical problems. Hence, if it is defined in the web designing sphere, it is actually a bundle of folders that have standardized codes such as JSS documents, CSS and HTML, and structured files.
score: 1 about 3 hours ago
Hi All, I am planing to use mongodb in one of my project. In that I want to do real time analytics. There are users in my project's implementation. They have requirements like "Find all the people who talk about a particular topic...
Hi All, I am planing to use mongodb in one of my project. In that I want to do real time analytics. There are users in my project's implementation. They have requirements like "Find all the people who talk about a particular topic". Who to find these kind of result in monogodb? Running basic queries on
score: 1 about 3 hours ago
Hi all, I configure a mongo on UBUNTU using: [link] The problem is when I start my mongo I get this: Server has startup warnings: Sat May 18 16:32:48.963 [initandlisten] Sat May 18 16:32:48.963 [initandlisten] ** WARNING: Readahead...
Hi all, I configure a mongo on UBUNTU using: [link] The problem is when I start my mongo I get this: Server has startup warnings: Sat May 18 16:32:48.963 [initandlisten] Sat May 18 16:32:48.963 [initandlisten] ** WARNING: Readahead for /mdbd is
score: 1 about 3 hours ago
There is a great change from JUnit 3.x to JUnit 4.x. The JUnit Annotations in 4.x make unit testing pretty simpler and quicker now. In this article, I will try to cover 10 different JUnit features to show why you or your company should m...
There is a great change from JUnit 3.x to JUnit 4.x. The JUnit Annotations in 4.x make unit testing pretty simpler and quicker now. In this article, I will try to cover 10 different JUnit features to show why you or your company should migrate from using JUnit 3.x to JUnit 4.x. 1. No more setUp() and tearDown() methods. The methods setUp() and tearDown() methods can now be replaced with annotations @Before and @After and you can name your method as you would like. In Junit 3.x, if you wanted to do initialization and clean up before and after each test run, you had to write methods with specific names as below: Intialization: public void setUp () { //Your Code Here } CleanUp: public void tearDown() { //Your Code Here } You no longer need to follow the naming convention in Junit 4.x, as long as you use annotation tags @before to do initialization and @after to do clean up. Intialization: @before public void myOwnInitializationMethod () { //Your Code Here } CleanUp: @after public void myOwnCleanupMethod() { //Your Code Here } 2. You don’t need to name your method to start with the word test. In Junit 3.x, the jUnit methods had to be specifically named. They needed to begin with the word test in order for JUnit to run that as a test case. Junit 3.x: public void testMyMethod() { //Your Code Here } JUnit 4.x: @Test public void myMethod() { //Your Code Here } 3. You don’t need write your test class to extend junit.framework.TestCase jUnit 3.x: public class MyTestClass extends TestCase { // Your Methods Here } jUnit 4.x: @TestClass public class MyTestClass { //Your Methods Here } 4. JUnit 4 adds ability to do one time setup and one time tear down. If you wanted to do one time setup (intialization at the beginning of the class load) and one time tear down (cleaning up after all your test cases have been run), you can now do that with @BeforeClass and @AfterClass annotations. @BeforeClass public void mySomeMethod() { //This method is run one time before any of your test cases are run. } @AfterClass public void mySomeClenaUpMethod { //This method is run one time after all your test cases have been run } 5. JUnit 4 allows static import of the assert classes. 6. You can ingnore a test case with @Ignore annotation @Ignore public void doNotRunThisTest() { } 1 7. Enforcing Timeout You can time limit your test cases by providing timeout value. If the test case does not complete within that time, JUnit reports this as a failure. 1 @Test(timeout=50) public void runThisTestWithin50ms() { } 8. JUnit Test Suite Running Junits as a suite is now simpler. See the tutorial on running JUnit 4.0 test suite at: http://sanjaal.com/java/tag/junit-test-suite-tutorial/ 9. Expecting Exception: Junit 4.x allows you to expect exceptions in your unit test. So, if you are expecting NullpointerException, here is what your code would look like: @Test(expected=NullPointerException.class) public void testMyMethodForNullPointer() { //Your piece of code that throws null pointer exception } 10. Parameterized Testing: With JUnit 4.x, you can run the same tests with multiple parameters using some annotations. To write parameterized testing, you can put class level annotation @RunWith(Parameterized.class) to tell JUnit to run parameterized testing. Then inside your class, you can use annotation @Parameters to tell JUnit a list of collections to use as parameters. The constructor will know how to initialize your parameters. @RunWith(value=Parameterized.class) public class ParameterizedTest { private String myFirstParam; private String mySecondParam; @Parameters public static Collection paramsValues { return Arrays.asList( new Object[][] { { "1", "1" }, { "11", "11" }, { "12", "12" },
score: 1 about 3 hours ago
Hmmm that post looks very....well let's put this way: no well thought out. "He also positions RethinkDB as a possible future replacement since it has support for joins." He obviously doesn't understand why MongoDB doesn't ...
Hmmm that post looks very....well let's put this way: no well thought out. "He also positions RethinkDB as a possible future replacement since it has support for joins." He obviously doesn't understand why MongoDB doesn't have joins and that is the first thing, if the only thing I need to discredit that entire article
score: 1 about 4 hours ago
This past week 6 new mashups were added to our mashup directory and 20 different APIs were used to build them. Some of the newer or less frequently seen APIs include Baidu, dlvr.it, Google Closure Compiler and Sina Weibo. The most often...
This past week 6 new mashups were added to our mashup directory and 20 different APIs were used to build them. Some of the newer or less frequently seen APIs include Baidu, dlvr.it, Google Closure Compiler and Sina Weibo. The most often used APIs this week are Google Maps, Twitter and YouTube. And the most commonly used types of APIs were Mapping (4 APIs, 6 mashups), Social (4 APIs, 6 mashups) and Music (3 APIs, 3 mashups). The list below shows which APIs were used by which mashups: Baidu used in H7N9 avian flu distribution and updates Billboard used in uKoel Social Jukebox Bing used in PropertyWala.com Bit.ly used in PropertyWala.com dlvr.it used in PropertyWala.com Echo Nest used in WoMEn index ESRI ArcGIS JavaScript used in H7N9 avian flu distribution and updates FeedBurner used in H7N9 avian flu distribution and updates, PropertyWala.com Google Analytics used in PropertyWala.com Google Base used in PropertyWala.com Google Closure Compiler used in PropertyWala.com Google Earth used in PropertyWala.com Google Geocoding used in PropertyWala.com Google Maps used in H7N9 avian flu distribution and updates, JobKaster, PropertyWala.com Google Plus used in PropertyWala.com Last.fm used in WoMEn index PayPal used in PropertyWala.com Sina Weibo used in H7N9 avian flu distribution and updates Twitter used in H7N9 avian flu distribution and updates, PropertyWala.com, uKoel Social Jukebox YouTube used in PropertyWala.com, SOUNDRENALIN, uKoel Social Jukebox Mashups of the day:And each day there is one mashup selected to be Mashup of the Day. Here are last week’s winners: H7N9 avian flu distribution and updates JobKaster PropertyWala.com SOUNDRENALIN uKoel Social Jukebox WoMEn index Sponsored by
score: 1 about 5 hours ago
Register here to join us for a live webcast introducing Java EE 7! The Java EE 7 platform JSR has been approved, and we are now counting down the days to begin developing with many new Java EE features. The online web event, hosted b...
Register here to join us for a live webcast introducing Java EE 7! The Java EE 7 platform JSR has been approved, and we are now counting down the days to begin developing with many new Java EE features. The online web event, hosted by MC Gupta, includes: Business Keynote (Hasan Rizvi and Cameron... [Read More]
score: 1 about 5 hours ago