程序代写

Julia dual numbers

1. Implement a function f1(x) that computes the derivative of sin(x) using dual numbers. Verify that the result obtained using dual numbers is consistent with the analytical derivative of sin(x); 2. Implement a function f2(x, y) that computes the partial derivatives of x^2 + y^2 with respect to x and y using dual numbers. Verify […]

Julia dual numbers Read More »

MATH 558 Assignment 4

Design and Analysis of Experiments Assignment #4, due Thursday, 30th March 2023, 23h59 1. Show that the regression model coefficients for 2k factorial design are one half of effect estimates. (10 points) 2. Show that the estimated standard error of interaction effect is (10 points) 2S se(Effect) = √ 3. Let (X,B) be a (t,b,r,k,λ)

MATH 558 Assignment 4 Read More »

mininet controller assignment1

from pox.core import core import pox.lib.packet as pkt import pox.lib.packet.ethernet as eth import pox.lib.packet.arp as arp import pox.lib.packet.icmp as icmp import pox.lib.packet.ipv4 as ip import pox.openflow.libopenflow_01 as of from pox.lib.util import dpidToStr from pox.lib.addresses import EthAddr log = core.getLogger() ### This is the list where you will store the rules that need to be installed.

mininet controller assignment1 Read More »

mininet topo assignment1

from mininet.net import Mininet from mininet.node import RemoteController from mininet.cli import CLI from mininet.log import setLogLevel, info import time def assignmentTopo(): net = Mininet( controller=RemoteController) info( ‘*** Adding controller\n’ ) net.addController(‘c0’) ### Code here to add hosts switches and links ############### ############################################################# info( ‘*** Starting network\n’) net.start() h1, h2, h3, h4 = net.hosts[0],net.hosts[1],net.hosts[2],net.hosts[3] ### Add

mininet topo assignment1 Read More »

CS 521 allocator

* @file allocator.c * @author Your name here * Implements a C memory allocator with a FIFO free list cache. Users can set * ALLOC_THRESH to determine how many free blocks are cached in the free list. #include #include #include #include #include “logger.h” #include “trace.h” #define DEFAULT_THRESH 100 static size_t list_size = 0; /*< Actual

CS 521 allocator Read More »

CS2302 Project 1 A Simple Shell

Project 1: A Simple Shell 1. »ù±¾¹¦ÄÜ ShellÊÇÒ»¸öÓÃCÓïÑÔ±àдµÄ³ÌÐò£¬ËüÊÇÓû§Ê¹ÓÃLinuxµÄÇÅÁº¡£Shell¼ÈÊÇÒ»ÖÖÃüÁîÓïÑÔ£¬ÓÖÊÇÒ»ÖÖ ³ÌÐòÉè¼ÆÓïÑÔ¡£Í¨Ë×Ò׶®µÄShell½Ì³ÌÓÐ: Shell½Ì³Ì | ²ËÄñ½Ì³Ì Bash ½Å±¾½Ì³Ì ÎÒÃǵĵĵÚÒ»¸öÏîÄ¿ÊDZàдһ¸ö¼òµ¥µÄShell¹¤¾ßmyshell£¬Ëü¾ßÓÐÒÔÏÂÊôÐÔ: 1. Ëü¿ÉÒÔÖ§³ÖÒÔϵÄÄÚ²¿Ö¸Áî: cd ´Óµ±Ç°µÄĬÈÏĿ¼Ìøתµ½Ö¸¶¨µÄĿ¼directory¡£ Èç¹ûûÓÐÖ¸¶¨²ÎÊýdirectory £¬Êä³öµ±Ç°Ä¿Â¼¡£ Èç¹ûdirectoryĿ¼²»´æÔÚ£¬Êä³ö´íÎóÐÅÏ¢¡£ ¸ÃÖ¸ÁîͬʱҪÐ޸Ļ·¾³±äÁ¿PWD¡£ clr:Çå¿ÕÆÁÄ»ÉϵÄÏÔʾÄÚÈÝ¡£ dir :Êä³öĿ¼directoryϵÄËùÓÐÄÚÈÝ£¬°üÀ¨Ä¿Â¼ºÍÎļþ¡£ environ:Êä³öËùÓеĻ·¾³±äÁ¿¡£ echo Êä³öcommentµÄ¾ßÌåÄÚÈݲ¢»»ÐС£ µ±comment µÄÄÚÈݳöÏÖ¶à¸öspace»òÕßtabʱ£¬Ó¦¸ÃѹËõΪһ¸öspace¡£ help:Êä³öÓû§Ö¸ÄÏ¡£ pause:Í£Ö¹ShellµÄÖ´ÐУ¬Ö±µ½Óû§°´ÏÂEnter¼ü¡£ quit:Í˳ö¡£ ShellµÄ»·¾³±äÁ¿ÖÐÓ¦¸Ã°üº¬shell=/myshell¡£ÆäÖÐ /myshell ÊÇShell¹¤¾ßµÄ¾ø¶Ô·¾¶¡£ 2. ËùÓеÄÆäËûÖ¸Áî¿ÉÒÔͨ¹ýµ÷ÓÃforkÓëexecÍê³É¡£¸¸½ø³Ìͨ¹ýforkÉú³É×Ó½ø³Ì£¬×Ó½ø³Ìµ÷Óà exec·½·¨Ö´ÐÐÓû§µÄÖ¸Áî¡£×¢Ò⣬×Ó½ø³ÌÔÚÖ´ÐÐʱӦ¸Ã°üº¬»·¾³±äÁ¿parent= /myshell£¬/myshellµÄ¶¨ÒåͬÉÏ¡£ 3. Èç¹ûShell¹¤¾ßÔÚʹÓÃʱ´øÓвÎÊý£¬ÄÇôËü¿ÉÒÔ´Ó²ÎÊýÖ¸¶¨µÄÎļþÖжÁÈ¡Ö¸Á²¢ÒÀ´ÎÖ´ ÐС£ÀýÈ磬µ±ÎÒÃÇÕâÑùʹÓÃShell¹¤¾ßʱ: ÄÇô£¬ÎÒÃÇ»áÒÀ´Î¶ÁÈ¡batchfileÎļþµÄÿһÐв¢Ö´ÐС£µ±¶ÁÈ¡µ½ÎļþµÄ×îºóÒ»ÐÐʱ£¬ Shell»áÍ˳ö¡£ 4. Ëü¿ÉÒÔÖ§³ÖÊäÈëÊä³öÖض¨Ïò¡£ÀýÈ磬µ±ÎÒÃÇÔÚShellÖÐÖ´ÐÐÒÔÏÂÖ¸Áî: myshell batchfile programname arg1 arg2 < inputfile

CS2302 Project 1 A Simple Shell Read More »

MAT136 Calculus 2 ACT E Generating a Graphical Representation

2023/3/4 06:32 ACT E – Generating a Graphical Representation: MAT136 – Calculus 2 – Winter 2023 ACT E – Generating a Graphical Representation ACT E: Generating a Graphical Representation Create a graphical representation of a mathematical model. This representation will consist mostly of an appropriately labeled graph that will help your audience to understand the

MAT136 Calculus 2 ACT E Generating a Graphical Representation Read More »