Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ackley_mc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Torda, Prof. Dr. Andrew Ernest
ackley_mc
Commits
37950e34
Commit
37950e34
authored
3 years ago
by
Andrew E. Torda
Browse files
Options
Downloads
Patches
Plain Diff
Cleaning comments.
parent
8c5ef64f
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
mc_work/dorun.go
+2
-1
2 additions, 1 deletion
mc_work/dorun.go
ui/input_tab.go
+2
-3
2 additions, 3 deletions
ui/input_tab.go
with
4 additions
and
4 deletions
mc_work/dorun.go
+
2
−
1
View file @
37950e34
...
@@ -106,7 +106,8 @@ Please run the program from somewhere other than %s`
...
@@ -106,7 +106,8 @@ Please run the program from somewhere other than %s`
return
nil
,
fmt
.
Errorf
(
existErr
,
err
)
// The file exists..
return
nil
,
fmt
.
Errorf
(
existErr
,
err
)
// The file exists..
}
}
// setupRun does things like get the cooling rate, seed the random numbers.
// setupRun does things like get the cooling rate, seed the random numbers,
// open files for writing output.
func
setupRun
(
mcPrm
*
McPrm
,
cprm
*
cprm
)
error
{
func
setupRun
(
mcPrm
*
McPrm
,
cprm
*
cprm
)
error
{
var
err
error
var
err
error
cprm
.
rand
=
rand
.
New
(
rand
.
NewSource
(
int64
(
getSeed
())))
cprm
.
rand
=
rand
.
New
(
rand
.
NewSource
(
int64
(
getSeed
())))
...
...
This diff is collapsed.
Click to expand it.
ui/input_tab.go
+
2
−
3
View file @
37950e34
...
@@ -21,7 +21,7 @@ import (
...
@@ -21,7 +21,7 @@ import (
"example.com/ackley_mc/mc_work"
"example.com/ackley_mc/mc_work"
)
)
// startrun is
what happens
when you click on the form's button to start
// startrun is
called
when you click on the form's button to start
// a calculation.
// a calculation.
func
startrun
(
genParams
genParams
,
form
*
widget
.
Form
,
mcPrm
*
mcwork
.
McPrm
)
{
func
startrun
(
genParams
genParams
,
form
*
widget
.
Form
,
mcPrm
*
mcwork
.
McPrm
)
{
form
.
Disable
()
form
.
Disable
()
...
@@ -164,7 +164,6 @@ func getmcprm(rd fyne.URIReadCloser, err error, genParams genParams, reload func
...
@@ -164,7 +164,6 @@ func getmcprm(rd fyne.URIReadCloser, err error, genParams genParams, reload func
}
}
// rdwork is called after the file open dialog gets "OK"
// rdwork is called after the file open dialog gets "OK"
//func rdwork(mcPrm *mcwork.McPrm, parent fyne.Window, reload func()) {
func
rdwork
(
genParams
genParams
,
reload
func
())
{
func
rdwork
(
genParams
genParams
,
reload
func
())
{
getter
:=
func
(
rd
fyne
.
URIReadCloser
,
err
error
)
{
getter
:=
func
(
rd
fyne
.
URIReadCloser
,
err
error
)
{
getmcprm
(
rd
,
err
,
genParams
,
reload
)
getmcprm
(
rd
,
err
,
genParams
,
reload
)
...
@@ -176,7 +175,7 @@ func rdwork(genParams genParams, reload func()) {
...
@@ -176,7 +175,7 @@ func rdwork(genParams genParams, reload func()) {
t
.
SetLocation
(
y
)
// If there was an error, we just use default location
t
.
SetLocation
(
y
)
// If there was an error, we just use default location
}
}
}
}
t
.
Show
()
// set an error and see if anybody notices
t
.
Show
()
}
}
// mcWrap is run in the background so the interface does not block.
// mcWrap is run in the background so the interface does not block.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment