Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DaylightingSociety/WhereAreTheEyes
/ functions
Functions
145 in github.com/DaylightingSociety/WhereAreTheEyes
⨍
Functions
145
◇
Types & classes
32
↓ 21 callers
Method
debug
(msg)
website/log.rb:35
↓ 12 callers
Method
warning
(msg)
website/log.rb:23
↓ 9 callers
Method
getUsername
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MainActivity.java:213
↓ 8 callers
Function
getPostNumber
To sort posts numerically we need to get their number This is everything up to the "_", converted to an int
website/util.rb:13
↓ 7 callers
Method
notice
(msg)
website/log.rb:31
↓ 6 callers
Function
getMarkdown
(filename)
website/util.rb:17
↓ 5 callers
Method
setMapDimensions
(boolean scoresEnabled)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MainActivity.java:503
↓ 5 callers
Method
verifies
How many people have verified this pin?
website/map.rb:62
↓ 4 callers
Method
getAllPins
Note: This function is for administrators to view the state of the map as a whole, and is not intended for user-use
website/map.rb:329
↓ 4 callers
Method
scoresEnabled
(String username)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/Score.java:48
↓ 4 callers
Method
updateScore
(final String username)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/Score.java:86
↓ 3 callers
Method
error
(msg)
website/log.rb:27
↓ 3 callers
Method
getLocation
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/GPS.java:87
↓ 3 callers
Method
refreshPins
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/GPS.java:70
↓ 3 callers
Method
validLogin?
(username)
website/auth.rb:53
↓ 2 callers
Method
acquireLocationPerms
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MainActivity.java:413
↓ 2 callers
Method
addRecord
Records than an IP has marked a camera, tracks frequency so we can detect anyone abusing the map and marking cameras everywhere.
website/ratelimit.rb:41
↓ 2 callers
Method
alertNoUsername
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MainActivity.java:303
↓ 2 callers
Method
clearScore
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/Score.java:63
↓ 2 callers
Method
commitMarkingCamera
(String username)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MainActivity.java:365
↓ 2 callers
Method
drawScores
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MainActivity.java:203
↓ 2 callers
Method
getDistance
Returns distance in meters between two GPS coordinates This implementation of the Haversine formula gratefully taken from Stack Overflow: https://stac
website/location.rb:36
↓ 2 callers
Method
init
()
website/log.rb:14
↓ 2 callers
Method
ipInRange?
Returns whether an IP address is close enough to a latitude longitude that it's feasible their location is correct.
website/location.rb:21
↓ 2 callers
Method
loadPins
(filename)
website/map.rb:134
↓ 2 callers
Method
pulse
(Context c)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/Vibrate.java:20
↓ 2 callers
Method
rateExceeded?
Returns if a mark should be blocked because the IP Address was abusive
website/ratelimit.rb:79
↓ 2 callers
Method
recenterMap
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MainActivity.java:278
↓ 2 callers
Method
setMapTheme
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MainActivity.java:234
↓ 2 callers
Method
setMapTracking
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MainActivity.java:252
↓ 1 callers
Method
addAccount
Adds an account to the database, and locks the file so we cannot add multiple accounts at the same time and corrupt the database
website/auth.rb:42
↓ 1 callers
Method
addCamera
(username)
website/scores.rb:71
↓ 1 callers
Method
addPin
If there are no pins close by then add a new one, otherwise verify the existing pin at that location
website/map.rb:201
↓ 1 callers
Method
addVerification
(username)
website/scores.rb:100
↓ 1 callers
Method
backupPins
This is the only regularly called external method. It backs up pins each hour and rotates backups when appropriate.
website/backup.rb:168
↓ 1 callers
Method
correctLogin?
(username)
website/auth.rb:26
↓ 1 callers
Method
createDatabase
website/auth.rb:33
↓ 1 callers
Method
deprecatePins
Triggers a removal of all old pins Should be run periodically to purge outdated data
website/map.rb:254
↓ 1 callers
Method
exportPinsCSV
(filename)
website/export.rb:14
↓ 1 callers
Method
getCameraIcon
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/Images.java:27
↓ 1 callers
Method
getInfoWindowHandler
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MainActivity.java:156
↓ 1 callers
Method
getPins
For now we ignore the radius. Later we can use it as an upper bound and ignore pins that are too far away for the user to care For now we'll just retu
website/map.rb:180
↓ 1 callers
Method
getQuery
(List<AbstractMap.SimpleEntry> params)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/UnmarkPin.java:98
↓ 1 callers
Method
getQuery
(List<AbstractMap.SimpleEntry> params)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MarkOrVerifyPin.java:97
↓ 1 callers
Method
getSecret
website/state.rb:174
↓ 1 callers
Method
getStatusBarHeight
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MainActivity.java:492
↓ 1 callers
Method
getThemePreference
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MainActivity.java:220
↓ 1 callers
Method
getTrackingPreference
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MainActivity.java:227
↓ 1 callers
Method
getUserScore
Returns a Points object or nil if user doesn't exist
website/scores.rb:59
↓ 1 callers
Method
getVerificationTimestamps
Return timestamps from every verification
website/map.rb:67
↓ 1 callers
Method
handleResponse
(String response, final Context context, final Activity activity)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/UnmarkPin.java:119
↓ 1 callers
Method
handleResponse
(String response, final Context context, final Activity activity)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MarkOrVerifyPin.java:118
↓ 1 callers
Method
init
(Context c)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/Images.java:23
↓ 1 callers
Method
onLocationChanged
(Location loc)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/GPS.java:33
↓ 1 callers
Method
parseDownload
(String data)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/Score.java:125
↓ 1 callers
Method
parsePin
(PinData p, String pinString)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/DownloadPinsTask.java:35
↓ 1 callers
Method
purgeDebugVerifies
Removes any verifications by debug accounts. This is useful for situations where we *must* test on production servers, such as getting Apple testers t
website/map.rb:102
↓ 1 callers
Method
purgeOldVerifies
Removes older verifications, so that forgotten pins will slowly fade away Basically we check if the timestamp is older than an arbitrary number of day
website/map.rb:88
↓ 1 callers
Method
purgeRecords
Remove all records old enough that they don't matter. What "matters" is defined by some constants, but it's around "IP records for the last five minut
website/ratelimit.rb:87
↓ 1 callers
Function
render
()
website/camimage.py:32
↓ 1 callers
Method
renderPins
(final PinData p)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/DownloadPinsTask.java:59
↓ 1 callers
Method
savePin
(p)
website/map.rb:146
↓ 1 callers
Method
startWatchdog
website/state.rb:154
↓ 1 callers
Method
stopLocationUpdates
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MainActivity.java:560
↓ 1 callers
Method
unverify
Attempts to remove any verifications by a particular user returns true if any verifications removed, false otherwise
website/map.rb:53
↓ 1 callers
Method
unverifyPin
Searches for pins near the desired location, asks them to unverify the given username. Stops after one success. Returns true if unverification complet
website/map.rb:225
↓ 1 callers
Method
verify
A new user wants to verify this pin! See if they already have. If new verification then add them and return true. If already verified then do nothing
website/map.rb:36
Method
ApplicationTest
()
Android/app/src/androidTest/java/org/daylightingsociety/wherearetheeyes/ApplicationTest.java:10
Method
GPS
(MapView m)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/GPS.java:27
Method
Images
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/Images.java:19
Method
InfoWindowTipView
(Context context, AttributeSet attrs)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/InfoWindowTipView.java:57
Method
MarkData
(String u, Location l, Context c, Activity a)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MarkData.java:20
Method
PinData
(HashMap<LatLng, Integer> p, MapView m, Location l)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/PinData.java:23
Method
Score
(Context c, TextView _cameraScore, TextView _verificationScore)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/Score.java:38
Method
Vibrate
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/Vibrate.java:16
Method
addition_isCorrect
()
Android/app/src/test/java/org/daylightingsociety/wherearetheeyes/ExampleUnitTest.java:11
Method
alert
(msg)
website/log.rb:19
Method
backupCycle
website/state.rb:109
Method
createDailyFolder
(time)
website/backup.rb:55
Method
createHourlyFolder
(time)
website/backup.rb:39
Method
createMonthlyFolder
(time)
website/backup.rb:65
Method
createNewSnapshot
(time)
website/backup.rb:76
Method
deprecateCycle
website/state.rb:95
Method
doInBackground
(MarkData... params)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/UnmarkPin.java:34
Method
doInBackground
(PinData[] params)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/DownloadPinsTask.java:101
Method
doInBackground
(MarkData... params)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MarkOrVerifyPin.java:34
Method
exportCycle
website/state.rb:137
Method
filter
(CharSequence source, int start, int end, Spanned dest, int dstart, int
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/SettingsActivity.java:32
Method
getCamerasMarked
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/Score.java:77
Method
getCoordinatesOfIP
Returns (latitude, longitude) if address is valid Returns (nil, nil) if we can't resolve it
website/location.rb:57
Method
getInfoWindow
(final Marker marker)
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/MainActivity.java:158
Method
getVerifications
()
Android/app/src/main/java/org/daylightingsociety/wherearetheeyes/Score.java:81
Method
getZoneFile
(latitude, longitude)
website/map.rb:126
Method
hashUser
Hides usernames so we can check if a user has verified a particular pin We use SHA2 here for performance. It's already an O(n) operation to check if t
website/map.rb:78
Method
hashUsername
(username, salt)
website/scores.rb:54
Method
init
website/backup.rb:21
Method
init
Creates a new blank score database if none exists
website/scores.rb:41
Method
init
Set up empty databases if they don't exist yet
website/ratelimit.rb:17
Method
init
website/location.rb:15
Method
init
website/state.rb:21
next →
1–100 of 145, ranked by callers