Quantcast
Channel: 未分类 –懒得折腾
Browsing all 756 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Design and Analysis of Algorithm 2 Homework 5

Question 1 In this assignment you will implement one or more algorithms for the traveling salesman problem, such as the dynamic programming algorithm covered in the video lectures. Here is a data file...

View Article


Image may be NSFW.
Clik here to view.

Programming Languages Programming Assignment 1

fun is_older (date1 : int*int*int, date2 : int*int*int)= let fun toNumber (date : int*int*int) = (#1 date)*10000 + (#2 date)*100 + (#3 date) in if (toNumber(date1) < toNumber(date2)) then true else...

View Article


Image may be NSFW.
Clik here to view.

What’s new with JavaScript and geospatial – wrapup from the js.geo event

What’s new with JavaScript and geospatial – wrapup from the js.geo event   The past couple of days I’ve been at the js.geo event in Denver, which was a small informal conference focused on JavaScript...

View Article

Image may be NSFW.
Clik here to view.

Design and Analysis of Algorithm 2 Homework 6

Question 1 In this assignment you will implement one or more algorithms for the 2SAT problem. Here are 6 different 2SAT instances: #1 #2 #3 #4 #5 #6.The file format is as follows. In each instance, the...

View Article

Image may be NSFW.
Clik here to view.

Programming Languages Programming Assignment 2

Code (* Dan Grossman, Coursera PL, HW2 Provided Code *) (* if you use this function to compare two strings (returns true if the same string), then you avoid several of the functions in problem 1 having...

View Article


Image may be NSFW.
Clik here to view.

Programming Languages Programming Assignment 3

Code (* Coursera Programming Languages, Homework 3, Provided Code *) exception NoAnswer datatype pattern = Wildcard | Variable of string | UnitP | ConstP of int | TupleP of pattern list | ConstructorP...

View Article

Image may be NSFW.
Clik here to view.

Batch Geonews: Voxel.js Minecraft-like, QGIS for Android, Side-by-Side...

Here’s the recent geonews in batch mode. On the open source front: 3D and open source with WebGL mixed with games gives you Voxel.js: Minecraft-like Browser-Based Games, But Open Source, which can...

View Article

Image may be NSFW.
Clik here to view.

用于展现图表的50种JavaScript库

在很多项目中都会有在前端展现数据图表的需求,而在开发过程中,开发者往往会使用一些JavaScript库,从而更有效地达到想要的目标。最近,TechSlide上的一篇文章总结了50种用于展现图表的JavaScript库,并对每种库做了简要的说明。这对于想要选择合适JavaScript库的开发者很有参考意义。 文章作者首推的库是D3,他说到:...

View Article


Image may be NSFW.
Clik here to view.

Programming Languages Programming Assignment 4

#lang racket (define ones (lambda () (cons 1 ones))) (define nats (letrec ([f (lambda (x) (cons x (lambda () (f (+ x 1)))))]) (lambda () (f 1)))) (define powers-of-two (letrec ([f (lambda (x) (cons x...

View Article


Image may be NSFW.
Clik here to view.

Programming Languages Programming Assignment 5

;; Programming Languages, Homework 5 #lang racket (provide (all-defined-out)) ;; so we can put tests in a second file ;; definition of structures for MUPL programs - Do NOT change (struct var (string)...

View Article

Image may be NSFW.
Clik here to view.

Programming Languages Programming Assignment 6

# University of Washington, Programming Languages, Homework 6, hw6runner.rb # This is the only file you turn in, so do not modify the other files as # part of your solution. class MyTetris < Tetris...

View Article

Image may be NSFW.
Clik here to view.

Pattern-Oriented Software Architectures for Concurrent and Networked Software

1. Concurrent software can simultaneously run multiple computations that potentially interact with each other. Networked software defines protocols that enable computing devices to exchange messages...

View Article

Image may be NSFW.
Clik here to view.

Ruby function for Option value calculation

class Stock def initialize (initial_price = 100, up = 1.04574) @initial_price = initial_price @up = up @down = 1/up end def calculateStock (n) Array.new(n + 1) {|i| @initial_price * (@up**( n -...

View Article


Image may be NSFW.
Clik here to view.

Programming Languages Programming Assignment 7

sml code (* University of Washington, Programming Languages, Homework 7, hw7.sml (See also Ruby code.) *) (* Do not make changes to this code except where you see comments containing the word CHANGE....

View Article

Image may be NSFW.
Clik here to view.

Computational Photography Programming Assignment 0 – Image

import sys import os import numpy as np import cv2 def split_rgb(image): '''Split the target image into its red, green and blue channels. image - a numpy array of shape (rows, columns, 3). output -...

View Article


Image may be NSFW.
Clik here to view.

Learn to Program: Crafting Quality Code Assignment 1

def num_buses(n): """ (int) -> int Precondition: n >= 0 Return the minimum number of buses required to transport n people. Each bus can hold 50 people. >>> num_buses(75) 2 """ if not...

View Article

Image may be NSFW.
Clik here to view.

Algorithms, Part II Assignment 2

Programming Assignment 2: Seam Carving Warning: this assignment has not been battle-tested. It is likely that there are more ambiguities and bugs. Please bring those to our attention and we will do our...

View Article


Image may be NSFW.
Clik here to view.

Algorithms, Part II Assignment 1

Programming Assignment 1: WordNet WordNet is a semantic lexicon for the English language that is used extensively by computational linguists and cognitive scientists; for example, it was a key...

View Article

Image may be NSFW.
Clik here to view.

Computational Photography Programming Assignment 1

part0.py import sys import os import numpy as np import random import cv2 import run def convolve(image, kernel): '''Convolve the given image and kernel Inputs: image - a single channel (rows, cols)...

View Article

Image may be NSFW.
Clik here to view.

PingPong Game

import java.util.concurrent.CountDownLatch; import java.util.concurrent.locks.ReentrantLock; /** * Program.java * * Main entry point for game. Creates two threads, * Ping and Pong, that alternately...

View Article
Browsing all 756 articles
Browse latest View live