This file contains 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
const net = require('node:net'); | |
const serverPort = 7570; | |
const host = "127.0.0.1"; | |
function connectServer() { | |
const client = net.connect(serverPort, host); | |
client.on('error', (err) => { | |
setTimeoutInterval(connectServer, 1000); | |
}); | |
return client; |
This file contains 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
==19487== Memcheck, a memory error detector | |
==19487== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. | |
==19487== Using Valgrind-3.14.0.GIT and LibVEX; rerun with -h for copyright info | |
==19487== Command: ./test_sub | |
==19487== | |
==19487== Invalid read of size 8 | |
==19487== at 0x10D75E: boost::subgraph<boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, boost::property<boost::vertex_color_t, int, boost::no_property>, boost::property<boost::edge_index_t, unsigned long, boost::property<boost::edge_weight_t, int, boost::no_property> >, boost::no_property, boost::listS> >::global_to_local(boost::detail::edge_desc_impl<boost::bidirectional_tag, unsigned long>) const (in /home/kenkangxgwe/graph/test_sub) | |
==19487== by 0x10DB13: void global_local_convertion_test<boost::subgraph<boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, boost::property<boost::vertex_color_t, int, boost::no_property>, boost::property<boost::edge_index_t, unsigned long, boost::property<boost:: |
This file contains 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
Format[d[f_, x_], TraditionalForm] := DisplayForm[RowBox[{FractionBox["\[DifferentialD]", | |
RowBox[{"\[DifferentialD]", x}]], f}]]; | |
SpecificRules = {d[x_, x_] :> 1, d[(f_)[x_], x_] :> D[f[x], x], | |
d[(a_)^(x_), x_] :> D[a^x, x] /; FreeQ[a, x]}; | |
ConstantRule = d[c_, x_] :> 0 /; FreeQ[c, x]; | |
LinearityRule = {d[f_ + g_, x_] :> d[f, x] + d[g, x], | |
d[c_ f_, x_] :> c d[f, x] /; FreeQ[c, x]}; |
This file contains 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
(* ::Package:: *) | |
ExportDir="ExportDir.pdf"; | |
Figure=PlotFunc[Data,PlotRange->{}(*,PlotMarkers\[Rule]{}*), | |
PlotLegends->(Style[#,FontSize->18]&/@{"Curve A","Curve B"}),Frame->{True,True,False,False},FrameLabel->(Style[#,FontSize->18]&/@{"X axis","Y axis"})] | |
Export[ExportDir,Figure] |
This file contains 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
(* ::Package:: *) | |
Targetdir1 = "%Yourdir%\\*.txt" | |
(*For the table having two demensions.*) | |
Data=Import[Targetdir1,"Table"]; | |
Model = LinearModelFit[Data, x, x] | |
Show[ListPlot[Data, AxesOrigin -> {0, 0}, AxesLabel -> {"x", "y"}], | |
Plot[Normal[Model], {x, First[First[Data]], First[Last[Data]]}]] | |
Model["ParameterTable"] |
This file contains 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
(* ::Package:: *) | |
Targetdir1 = "%Yourdir%\\*.txt" | |
(*For the table having two demensions.*) | |
Data=Import[Targetdir1,"Table"]; | |
Curve=Interpolation[Data,Method->"Spline"(*,Method\[Rule]"Hermite"*)]; | |
Show[ListPlot[Data,AxesLabel->{"x","y"}],Plot[Curve[x],{x,First[First[Data]],First[Last[Data]]}]] |