This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <QCoreApplication> | |
| #include <cv.h> | |
| #include<cxcore.h> | |
| #include <highgui.h> | |
| #include<iostream> | |
| using namespace std; | |
| using namespace cv; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import unicodecsv,json | |
| import sys | |
| def convert2csv(data): | |
| fieldnames = ['user_id','name','average_stars','review_count','type'] #Filed names to filter and record, json stream | |
| with open('test.csv', 'wb+') as f: | |
| dict_writer = unicodecsv.DictWriter(f, fieldnames=fieldnames) | |
| dict_writer.writerow(dict(zip(fieldnames, fieldnames))) | |
| for line in data: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .MPartStack { | |
| font-size: 9; | |
| swt-simple: false; | |
| swt-mru-visible: false; | |
| swt-shadow-visible: true; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
| <html> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
| <link rel="stylesheet" type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.0/css/jquery.dataTables.css"> | |
| <link rel="stylesheet" type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.0/css/jquery.dataTables_themeroller.css"> | |
| <title>DataTables example</title> | |
| <script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Public Class Form1 | |
| 'Global variables | |
| Public value1 As Double | |
| Public value2 As Double | |
| Public previousOperator As Char | |
| Public currentOperator As Char | |
| Public operated As Boolean | |
| Public answerPresented As Boolean | |
| Public buttonClicked As String 'keep trak of the currently clicked button |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Controller | |
| public class HomeController { | |
| private static final Logger logger = LoggerFactory.getLogger(HomeController.class); | |
| /** | |
| * Atomic counter that we use to obtain a unique ID for each handler | |
| * instance. | |
| */ | |
| private static AtomicInteger nextId = new AtomicInteger(1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <beans xmlns="http://www.springframework.org/schema/beans" | |
| xmlns:context="http://www.springframework.org/schema/context" | |
| xmlns:gate="http://gate.ac.uk/ns/spring" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation=" | |
| http://www.springframework.org/schema/beans | |
| http://www.springframework.org/schema/beans/spring-beans-2.5.xsd | |
| http://www.springframework.org/schema/context | |
| http://www.springframework.org/schema/context/spring-context-2.5.xsd | |
| http://gate.ac.uk/ns/spring |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class OptimizedBubbleSort { | |
| public static void main(String args[]) { | |
| int a[] = { 2, 3, 6, 1, 9, 2, 10, 5 }; | |
| int sorted[] = buble(a); | |
| for (int x : sorted) { | |
| System.out.print(x + " "); | |
| } | |
| } | |
| public static int[] buble(int a[]) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| public class QuickSort | |
| { | |
| int a[]; | |
| QuickSort(int a[]) | |
| { | |
| this.a=a; | |
| } | |
| int[] sort() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class InsertionSort { | |
| public static void main(String a[]) { | |
| int data[] = { 9, 2, 6, 1, 8, 10, 1, 0 }; | |
| int sortedarr[] = insertionSort(data); | |
| for (int x : sortedarr) { | |
| System.out.print(x + " "); | |
| } | |
| } | |
| public static int[] insertionSort(int array[]) { |