ILMerge – Łączenie exe z dll w .NET w jeden plik
|
1 |
ilmerge /target:winexe /out:SelfContainedProgram.exe /targetplatform:v4,C:\Windows\Microsoft.NET\Framework64\v4.0.30319 CocBot.exe BotSuite.dll |
|
1 |
ilmerge /target:winexe /out:SelfContainedProgram.exe /targetplatform:v4,C:\Windows\Microsoft.NET\Framework64\v4.0.30319 CocBot.exe BotSuite.dll |
Fix na błąd: Tracker: [Peer certificate cannot be authenticated with known CA certificates]
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
diff -urNp rtorrent-0.9.2/src/core/curl_stack.cc rtorrent-0.9.2-mod/src/core/curl_stack.cc --- rtorrent-0.9.2/src/core/curl_stack.cc 2012-02-14 04:32:01.000000000 +0100 +++ rtorrent-0.9.2-mod/src/core/curl_stack.cc 2014-08-19 09:30:07.379604251 +0200 @@ -52,7 +52,7 @@ CurlStack::CurlStack() : m_handle((void*)curl_multi_init()), m_active(0), m_maxActive(32), - m_ssl_verify_peer(true), + m_ssl_verify_peer(false), m_dns_timeout(60) { m_taskTimeout.slot() = std::tr1::bind(&CurlStack::receive_timeout, this); @@ -165,8 +165,10 @@ CurlStack::add_get(CurlGet* get) { if (!m_httpCaCert.empty()) curl_easy_setopt(get->handle(), CURLOPT_CAINFO, m_httpCaCert.c_str()); - - curl_easy_setopt(get->handle(), CURLOPT_SSL_VERIFYPEER, (long)m_ssl_verify_peer); +if (!m_ssl_verify_peer) { + curl_easy_setopt(get->handle(), CURLOPT_SSL_VERIFYPEER, 0); + curl_easy_setopt(get->handle(), CURLOPT_SSL_VERIFYHOST, 0); +} curl_easy_setopt(get->handle(), CURLOPT_DNS_CACHE_TIMEOUT, m_dns_timeout); base_type::push_back(get); |
HPC Pack 2012 R2 MS-MPI Redistributable Package HPC Pack 2012 Client Utilities Redistributable Package HPC Pack 2012 SDK with Service Pack 1 Wyedytuj user-config.jam:
|
1 2 3 4 |
using mpi : : <include>"c:/Program Files/Microsoft MPI/Inc" <library-path>"c:/Program Files/Microsoft MPI/Lib/i386" <find-shared-library>msmpi ; |
string w postaci: (0,0), (0.01,0), (0.01,0.01) zamieniony na tablicę obiektów typu punkt (x,y)
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
void TokenizeVectorOfPoints(std::vector<Point<2>>& pointsVector){ boost::regex re("(\\((.*?),(.*?)\\).*?)+"); std::string s = _project->heatTransferProbePoints; boost::sregex_iterator it(s.begin(), s.end(), re); boost::sregex_iterator end; for (; it != end; ++it) { double x, y; try { x = boost::lexical_cast<double>((*it)[2]); y = boost::lexical_cast<double>((*it)[3]); } catch (boost::bad_lexical_cast const&) { x = 0; y = 0; } pointsVector.emplace_back(Point<2>(x,y)); } } |
|
1 2 3 |
void testFunction() __attribute__((optimize(0))) { //code } |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
try: paraview.simple except: from paraview.simple import * paraview.simple._DisableFirstRenderCameraReset() points = { 1:[0,0,2], 10:[2.103215,2.103215,2], 11:[-7.55E-08,1.728084,2] [...] } cm = [ [1,2,9], [2,3,10], [3,4,11], [...] ] for key, value in points.iteritems(): Sphere4 = Sphere() Sphere4.Radius = 0.15 Sphere4.Center = value Sphere4.PhiResolution = 20 Sphere4.ThetaResolution = 20 RenderView1 = GetRenderView() DataRepresentation4 = Show() DataRepresentation4.EdgeColor = [0.0, 0.0, 0.5000076295109483] DataRepresentation4.SelectionPointFieldDataArrayName = 'Normals' DataRepresentation4.AmbientColor = [0.0, 0.0, 0.0] DataRepresentation4.CubeAxesColor = [0.0, 0.0, 0.0] DataRepresentation4.ScaleFactor = 0.1 RenderView1.CameraPosition = [0.12249341845958465, 1.6783114555009098, -2.82751287919202] RenderView1.CameraClippingRange = [1.8715334193481947, 5.084339235287565] DataRepresentation4.DiffuseColor = [1.0, 0.0, 0.0] Render() for value in cm: for i in range(1, len(value)): Line2 = Line() # toggle the 3D widget visibility. active_objects.source.SMProxy.InvokeEvent('UserEvent', 'ShowWidget') RenderView1 = GetRenderView() RenderView1.CameraClippingRange = [0.04313226219643915, 43.13226219643914] fromi = value[0] toi = value[i] frompt = points[fromi] topt = points[toi] Line2.Point1 = frompt Line2.Point2 = topt DataRepresentation2 = Show() DataRepresentation2.EdgeColor = [0.0, 0.0, 0.5000076295109483] DataRepresentation2.SelectionPointFieldDataArrayName = 'Texture Coordinates' DataRepresentation2.AmbientColor = [0.0, 0.0, 0.0] DataRepresentation2.CubeAxesColor = [0.0, 0.0, 0.0] DataRepresentation2.ScaleFactor = 0.10752979516983033 DataRepresentation2.Representation = 'Wireframe' DataRepresentation2.LineWidth = 2.0 Render() |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
#!/bin/bash if [ $# -eq 0 ] then echo "No arguments supplied" exit 0 fi inputs=() for f in *.pts; do inputs+=($f) done echo ${inputs[@]} arrSize=${#inputs[@]} echo $arrSize div=$(($1-1)) ile=$(($arrSize / $div)) for i in $(eval echo {0..$div}); do echo "Thread/Screen: $i" inp=${inputs[$i]} ff=`echo $inp | sed 's/_//' | sed 's/\.//' | sed 's/pts//'` ff=project$ff screen -md -S "calc$i" fin=$(($div+1)) command="for c in " for j in $(eval echo {$i..$arrSize..$fin}); do command+="$name " name=${inputs[$j]} done command+="; do module load deal.ii/8.2pre-gcc482 &&./Femaft \$c; done " echo $command screen -S "calc$i" -p 0 -X stuff "$command $(printf \\r) " done |
W nawiązaniu do wpisu:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
#!/bin/bash inputs=() for f in *.pts; do inputs+=($f) done echo ${inputs[@]} arrSize=${#inputs[@]} echo $arrSize div=$(($1-1)) ile=$(($arrSize / $div)) for i in $(eval echo {0..$div}); do echo "Thread/Screen: $i" inp=${inputs[$i]} ff=`echo $inp | sed 's/_//' | sed 's/\.//' | sed 's/pts//'` ff=project$ff screen -md -S "calc$i" fin=$(($div+1)) for j in $(eval echo {$i..$arrSize..$fin}); do name=${inputs[$j]} screen -S "calc$i" -p 0 -X stuff "module load deal.ii/8.2pre-gcc482 &&./Femaft $name$(printf \\r) " echo "Scheduling $name calculations..."; done done |
Zadanie: uruchomić w screenie n instancji programu z różnymi plikami wejściowymi. Każdy plik wejściowy ma nazwę pokroju {num}_{num}.pts
|
1 2 3 4 5 6 7 8 |
#!/bin/bash for f in *.pts; do ff=`echo $f | sed 's/_//' | sed 's/\.//' | sed 's/pts//'` ff=project$ff screen -md -S $ff screen -S $ff -p 0 -X stuff "module load deal.ii/8.2pre-gcc482 && ./Femaft $f$(printf \\r) " echo "Starting $ff calculations..."; done |
Pętla po wszystkich plikach z rozszerzeniem *.pts, pobranie ich nazwy i usuniecie extra znaków, tak by zostały tylko dwie liczby, ustalenie nazwy screena na project{numer}, indywidualna nazwa – 'project’ jest potrzebna… Continue reading
|
1 2 3 4 5 6 7 8 9 10 11 |
MATRIX_FILE="Matrix.dat" RHS_FILE="rhs.dat" SOLUTION_FILE="solution.dat" perl -pi -w -e 's/\((.*?),(.*?)\).(.*)/($1+1)." ".($2+1)." ".$3/e' $MATRIX_FILE lines=`grep -c ^ $MATRIX_FILE` rows=`tail -n 1 $MATRIX_FILE | cut -f1 -d' '` sed -i "1s/^/"$rows" "$rows" "$lines"\n/" $MATRIX_FILE sed -i '1s/^/%%MatrixMarket matrix coordinate real general\n/' $MATRIX_FILE sed -i "1s/^/"$rows"\n/" $SOLUTION_FILE sed -i "1s/^/"$rows"\n/" $RHS_FILE |