This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//In spreadsheet_cfg.go | |
func readSpreadsheetTemplates() error { | |
fp := "config-templates/spreadsheet-templates.json" | |
jsonFile, err := os.Open(fp) | |
if err != nil { | |
return err | |
} | |
defer jsonFile.Close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
fmt.Println("Setup initialized...") | |
//setup all the routes | |
port := ":" + os.Getenv("PORT") | |
log.Println("Press ctrl+E to stop the server.") | |
srv := &http.Server{ | |
Handler: handlers(), | |
Addr: port, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)uploadImage:(UIImage *)image | |
completionHandler:(void (^)(NSDictionary *uploadResponse, NSError *error))completionHandler { | |
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; | |
[self get:[self uploadURL] completionHandler:^(id responseData, NSError *error) { | |
if (error) { | |
completionHandler(nil, error); | |
} else if (!responseData) { | |
completionHandler(nil, [NSError errorWithDomain:@"Upload Failed" code:500 userInfo:nil]); | |
} else { | |
NSDictionary *response = (NSDictionary *)responseData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)uploadImage:(UIImage *)image | |
completionHandler:(void (^)(NSDictionary *uploadResponse, NSError *error))completionHandler { | |
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; | |
[self get:[self uploadURL] completionHandler:^(id responseData, NSError *error) { | |
if (error) { | |
completionHandler(nil, error); | |
} else if (!responseData) { | |
completionHandler(nil, [NSError errorWithDomain:@"Upload Failed" code:500 userInfo:nil]); | |
} else { | |
NSDictionary *response = (NSDictionary *)responseData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.servlet; | |
import java.io.IOException; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; |