René's URL Explorer Experiment


Title: compiler does not find the NetcdfFileWriter identifiers · Issue #29 · trung/InMemoryJavaCompiler · GitHub

Open Graph Title: compiler does not find the NetcdfFileWriter identifiers · Issue #29 · trung/InMemoryJavaCompiler

X Title: compiler does not find the NetcdfFileWriter identifiers · Issue #29 · trung/InMemoryJavaCompiler

Description: I would like to convert String variables to java code to build a NetCDF file from strings. I have some Strings which contain the commands to write a netCDF. For example: String Variable contains the following strings: 'Variable time; ' '...

Open Graph Description: I would like to convert String variables to java code to build a NetCDF file from strings. I have some Strings which contain the commands to write a netCDF. For example: String Variable contains th...

X Description: I would like to convert String variables to java code to build a NetCDF file from strings. I have some Strings which contain the commands to write a netCDF. For example: String Variable contains th...

Opengraph URL: https://github.com/trung/InMemoryJavaCompiler/issues/29

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":" compiler does not find the NetcdfFileWriter identifiers","articleBody":"I would like to convert String variables to java code to build a NetCDF file from strings. I have some Strings which contain the commands to write a netCDF. For example: \r\n\r\nString Variable contains the following strings: \r\n'Variable time; '\r\n'time = ncfile.addVariable(null, \"time\", DataType.Double, \"time\");'\r\n\r\nString DataA contains:\r\n'ArrayDouble.D1 timeData = new ArrayDouble.D1(countLinesResult); '\r\n'Index ima = timeData.getIndex();'\r\n\r\nString DataD contains:\r\n'timeData.setDouble(ima.set(timeIdx),ValueD.get(timeIdx)); ' \r\n\r\nString DataNC contains:\r\n'ncfile.write(time, timeData); '\r\n\r\neach string is public static String. These strings are in NetCDF_writer Class static void getDataNc method. Here is the code:\r\n```\r\npackage meteoread;\r\n\r\n/**\r\n *\r\n * @author Beata\r\n */\r\n;\r\nimport java.sql.Connection;\r\nimport java.sql.PreparedStatement;\r\nimport java.sql.ResultSet;\r\nimport java.sql.ResultSetMetaData;\r\nimport java.text.ParseException;\r\nimport java.text.SimpleDateFormat;\r\nimport java.util.ArrayList;\r\nimport java.util.Calendar;\r\nimport java.util.Date;\r\nimport java.util.GregorianCalendar;\r\nimport java.util.Iterator;\r\nimport static meteoread.DownLoad_Meteo.Detected;\r\nimport static meteoread.DownLoad_Meteo.ETime;\r\nimport static meteoread.DownLoad_Meteo.STime;\r\nimport static meteoread.DownLoad_Meteo.Values;\r\nimport static meteoread.DownLoad_Meteo.Values2;\r\nimport static meteoread.DownLoad_Meteo.id1;\r\nimport static meteoread.DownLoad_Meteo.id2;\r\nimport static meteoread.DownLoad_Meteo.listString;\r\nimport static meteoread.DownLoad_Meteo.res;\r\nimport static meteoread.SelectData.result;\r\nimport org.mdkt.compiler.InMemoryJavaCompiler;\r\n\r\nimport ucar.nc2.*;\r\n\r\nimport ucar.ma2.*;\r\n\r\npublic class NetCDF_writer {\r\n    private static String okW =\"\";\r\n    private static int is;\r\n    private static int il;\r\n    private static int di;\r\n    private static int countLinesResult;\r\n    public static String TableNC  = DownLoad_Meteo.Table;\r\n    private static ArrayList\u003cString\u003e s = new ArrayList\u003cString\u003e();\r\n    private static ArrayList\u003cString\u003e s2 = new ArrayList\u003cString\u003e();\r\n   private static ArrayList\u003cString\u003e s3 = new ArrayList\u003cString\u003e();\r\n   private static ArrayList\u003cString\u003e s4 = new ArrayList\u003cString\u003e();\r\n   private static ArrayList\u003cString\u003e s5 = new ArrayList\u003cString\u003e();\r\n   private String[] colName;\r\n    private static ArrayList\u003cString\u003e ValueS = new ArrayList\u003cString\u003e();\r\n    private static ArrayList\u003cInteger\u003e ValueI = new ArrayList\u003cInteger\u003e();\r\n    private static ArrayList\u003cDouble\u003e ValueD = new ArrayList\u003cDouble\u003e();\r\n    public static String Variables;\r\n    public static String DataA;\r\n    public static String DataD;\r\n    public static String DataNC;\r\n\r\n   \r\n \r\n\r\n    static void getDataNc(int id1, int id2, String listString, String location, String Stimenc, String ETimenc)throws Exception {\r\n    \r\n    \r\n        try{\r\n          Connection con = MeteoRead.getConnection();\r\n         PreparedStatement statement= con.prepareStatement(\"SELECT \" + listString + \" FROM \" +TableNC + \" WHERE TIME_ID BETWEEN \" +\"\\\"\" + STime + \"\\\"\" +\" AND \" + \"\\\"\" +ETime + \"\\\"\" + \" ORDER BY ID\");\r\n\r\n         ResultSet result = statement.executeQuery();\r\n         ResultSetMetaData rsmd = result.getMetaData();\r\n         \r\n\r\n            is = id1;   \r\n      \r\n            il = id2;\r\n            \r\n            di = il-is;\r\n              \r\n            if(is == 1){\r\n             countLinesResult = il;\r\n             }\r\n             else{\r\n             countLinesResult = di;}\r\n            result.first();\r\n            result.previous();\r\n            \r\n                \r\n            ColName = listString.split(\",\");\r\n\r\n            \r\n            NetcdfFileWriter ncfile = NetcdfFileWriter.createNew(NetcdfFileWriter.Version.netcdf4, location, null);\r\n            Dimension timeDim = ncfile.addUnlimitedDimension(\"time\");\r\n            \r\n                       \r\n            s = SelectData.result.get(1);\r\n            s2 = SelectData.result.get(2);\r\n            s3 = SelectData.result.get(3);\r\n            s4 = SelectData.result.get(4);\r\n            s5 = SelectData.result.get(5);\r\n\r\n\r\n            Variables = \"\";\r\n            DataA = \"\";\r\n            DataD = \"\";\r\n            DataNC = \"\";\r\n             int n = 0;\r\n          \r\n              while(n \u003c s.size()-1){\r\n           \r\n                 Variables = Variables +\" \" + s.get(n) + \"\\n\";\r\n                             \r\n                 Variables = Variables +\" \" + s2.get(n) + \"\\n\";\r\n                 \r\n                     while(result.next()){\r\n                                       \r\n                        Date date2 = dateConv1(result.getString(\"TIME\"));\r\n                 \r\n                         double dateU = ToMATLABDate(date2);\r\n                 \r\n                         if(rsmd.getColumnName(n+1).equals(\"TIME\")){\r\n                     \r\n                           ValueD.add(dateU);\r\n                                    }\r\n                 \r\n                          if(rsmd.getColumnTypeName(n+1)== \"VARCHAR\" \u0026\u0026 !rsmd.getColumnName(n+1).equals(\"TIME\")){\r\n                      \r\n                            ValueS.add(result.getString(ColName[n]));\r\n                            }\r\n                    \r\n                          if(rsmd.getColumnTypeName(n+1)== \"INTEGER\"){\r\n                           \r\n                            ValueI.add(result.getInt(ColName[n]));\r\n                            }\r\n                  \r\n                             if(rsmd.getColumnTypeName(n+1)== \"DOUBLE\"){\r\n                           \r\n                              ValueD.add(result.getDouble(ColName[n]));\r\n                                                                     }\r\n                                                           }\r\n                     \r\n                       DataA = DataA + s3.get(n) + \"\\n\";\r\n                       DataD = DataD + s4.get(n) + \"\\n\";\r\n                       DataNC = DataNC + s5.get(n) + \"\\n\";\r\n                 \r\n                 \r\n                n++; }\r\n                \r\n           \r\n           \r\n                          \r\n               StringBuffer sourceCode = new StringBuffer();\r\n                sourceCode.append(\"package meteoread;\\n\");\r\n                sourceCode.append(\"public class NetCDF_writer {\\n\");\r\n                sourceCode.append(\"   static void getDataNc(int id1, int id2, String listString, String location, String Stimenc, String ETimenc)throws Exception {\" +Variables +\" ncfile.create();\" + \"\\n\" + DataA +\" for (int timeIdx = 0; timeIdx \u003c countLinesResult; timeIdx ++){\" + DataD + \"}\"+ DataNC + \"}\");\r\n                sourceCode.append(\"}\");      \r\n                 Class\u003c?\u003e Netcdf_writer = InMemoryJavaCompiler.compile(\"meteoread.NetCDF_writer\", sourceCode.toString());\r\n                  \r\n           okW = \"NC FILE BUILD SUCCESSFULLY\";\r\n           okWindow o = new okWindow();\r\n           o.okWindow(okW);\r\n           o.setVisible(true);\r\n           \r\n            } catch(Exception e){\r\n            e.printStackTrace();\r\n            okW = e.toString();\r\n            okWindow o = new okWindow();\r\n            o.okWindow(okW);\r\n            o.setVisible(true);}\r\n\r\n            }\r\n    \r\n       \r\n        public static Date dateConv1(String s){\r\n        SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n        String dateInString = s;\r\n        Date date = new Date();\r\n        \r\n   \r\n        try {\r\n\r\n             date = (Date)formatter.parse(dateInString);\r\n        } catch (ParseException e) {\r\n            e.printStackTrace();\r\n        }\r\n         return date;\r\n    }\r\n    \r\n      /**\r\n     * Converts a java.util.Date into a MATLAB Serial Date Number in the local timezone. MATLAB Serial Date Number are\r\n     * doubles counting the number of days since January 0 0000. The time of day is represented in fractions of a whole\r\n     * day.\r\n     *\r\n     * @param date the date to convert\r\n     * @return the date as MATLAB Serial Date Number\r\n     */\r\n    public static double ToMATLABDate(Date date) {\r\n        // Converts a java.util.Date into a MATLAB Serial Date Number taking into account timezones and DST.\r\n        Calendar cal = new GregorianCalendar();\r\n        cal.setTime(date);\r\n        double SerialDateNumber = (date.getTime() + cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET)) / 1000.0 / 3600.0 / 24.0 ;\r\n        return SerialDateNumber;\r\n    }\r\n\r\n    \r\n}\r\n```\r\nUnfortunately, I got several cannot find symbol error messages. The compiler does not find the NetcdfFileWriter identifiers even though I imported ucar.nc2.* and ucar.ma2.* packages. Could you please write to me how I should fix this issue?","author":{"url":"https://github.com/szabotakacsb","@type":"Person","name":"szabotakacsb"},"datePublished":"2020-01-28T07:23:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/29/InMemoryJavaCompiler/issues/29"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9e496180-0d6d-224e-bdbc-0e31a371f0f8
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id916C:1DC7:780985:96875E:697E7894
html-safe-nonce02078c51eb7f66369e444dd3a6c11807581a2d619efe47df76402b8f1a8d93f6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTZDOjFEQzc6NzgwOTg1Ojk2ODc1RTo2OTdFNzg5NCIsInZpc2l0b3JfaWQiOiI3NDAyNDIxOTc5NjU2MDA5MTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac787438e4b053b0661133aea42a8f2a105a5a669f3fc9dc8bfe700657981c12de
hovercard-subject-tagissue:556029060
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/trung/InMemoryJavaCompiler/29/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2321dd0fc0fee7d8f8a849851899f64c8a7cb393f1e38b33bf6002f6c3a188b8/trung/InMemoryJavaCompiler/issues/29
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2321dd0fc0fee7d8f8a849851899f64c8a7cb393f1e38b33bf6002f6c3a188b8/trung/InMemoryJavaCompiler/issues/29
og:image:altI would like to convert String variables to java code to build a NetCDF file from strings. I have some Strings which contain the commands to write a netCDF. For example: String Variable contains th...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameszabotakacsb
hostnamegithub.com
expected-hostnamegithub.com
None60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6
turbo-cache-controlno-preview
go-importgithub.com/trung/InMemoryJavaCompiler git https://github.com/trung/InMemoryJavaCompiler.git
octolytics-dimension-user_id24930
octolytics-dimension-user_logintrung
octolytics-dimension-repository_id31716516
octolytics-dimension-repository_nwotrung/InMemoryJavaCompiler
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31716516
octolytics-dimension-repository_network_root_nwotrung/InMemoryJavaCompiler
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7c85641c598ad130c74f7bcc27f58575cac69551
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/trung/InMemoryJavaCompiler/issues/29#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftrung%2FInMemoryJavaCompiler%2Fissues%2F29
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftrung%2FInMemoryJavaCompiler%2Fissues%2F29
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=trung%2FInMemoryJavaCompiler
Reloadhttps://github.com/trung/InMemoryJavaCompiler/issues/29
Reloadhttps://github.com/trung/InMemoryJavaCompiler/issues/29
Reloadhttps://github.com/trung/InMemoryJavaCompiler/issues/29
trung https://github.com/trung
InMemoryJavaCompilerhttps://github.com/trung/InMemoryJavaCompiler
Notifications https://github.com/login?return_to=%2Ftrung%2FInMemoryJavaCompiler
Fork 83 https://github.com/login?return_to=%2Ftrung%2FInMemoryJavaCompiler
Star 275 https://github.com/login?return_to=%2Ftrung%2FInMemoryJavaCompiler
Code https://github.com/trung/InMemoryJavaCompiler
Issues 17 https://github.com/trung/InMemoryJavaCompiler/issues
Pull requests 11 https://github.com/trung/InMemoryJavaCompiler/pulls
Actions https://github.com/trung/InMemoryJavaCompiler/actions
Wiki https://github.com/trung/InMemoryJavaCompiler/wiki
Security 0 https://github.com/trung/InMemoryJavaCompiler/security
Insights https://github.com/trung/InMemoryJavaCompiler/pulse
Code https://github.com/trung/InMemoryJavaCompiler
Issues https://github.com/trung/InMemoryJavaCompiler/issues
Pull requests https://github.com/trung/InMemoryJavaCompiler/pulls
Actions https://github.com/trung/InMemoryJavaCompiler/actions
Wiki https://github.com/trung/InMemoryJavaCompiler/wiki
Security https://github.com/trung/InMemoryJavaCompiler/security
Insights https://github.com/trung/InMemoryJavaCompiler/pulse
New issuehttps://github.com/login?return_to=https://github.com/trung/InMemoryJavaCompiler/issues/29
New issuehttps://github.com/login?return_to=https://github.com/trung/InMemoryJavaCompiler/issues/29
compiler does not find the NetcdfFileWriter identifiershttps://github.com/trung/InMemoryJavaCompiler/issues/29#top
https://github.com/szabotakacsb
https://github.com/szabotakacsb
szabotakacsbhttps://github.com/szabotakacsb
on Jan 28, 2020https://github.com/trung/InMemoryJavaCompiler/issues/29#issue-556029060
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.