我正在使用Fortify代碼分析工具。在我的代碼,我從XML獲取字符串並解析它加倍 a= Double.parseDouble(b);
工具給我 The program calls a method that parses doubles and can cause the thread to hang.
我怎樣才能提高我的代碼?
我從來沒有在#1見過這個具體問題和其他問題沒有幫助我(我以前試過開)。 當我嘗試打印二叉樹這種方式如下: data BinTree a = ET | Branch (BinTree a) a (BinTree a) deriving Show
ejC:: BinTree a -> String
ejC ET = ""
ejC (Branch x y z) = (ejC x) ++ "|-"
我在Haskell中編寫了一個cgi腳本。 我只限於使用擁抱/ runhugs。 #!/opt/local/bin/runhugs
module Main where
main = do
putStrLn ("content-type: text/plain\n")
putStrLn ("Hello, Server!")
到目前爲止好。 但現在我想獲得服務器的環
當我運行這段代碼: test1 :: Int -> String
test1 x = do
if x == 1
then "Hello"
我得到以下錯誤: test-if.hs:4:21: error:
parse error (possibly incorrect indentation or mismatched brackets)
我不知道這是爲什麼