What auto layout constraints need to be set so that an image inside a tableview cell expands to the width borders of the cell as in Twitter app?

I can not get it done and wonder which constraints and settings are necessary.

enter image description here

I have just installed the tesseraact ocr using the github instructions but i keep getting this error when building:

 Ld /Users/wayne.rumble/Library/Developer/Xcode/DerivedData/Splitter-fkucamufumrohuhfuivayvewkjdc/Build/Products/Debug-iphoneos/TesseractOCRiOS/TesseractOCR.framework/TesseractOCR normal armv7
 cd /Users/wayne.rumble/Documents/iOS/Splitter/Pods
 export IPHONEOS_DEPLOYMENT_TARGET=8.0
 export PATH="/Applications/Xcode_7.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode_7.3.1.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
 /Applications/Xcode_7.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -dynamiclib -isysroot /Applications/Xcode_7.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -L/Users/wayne.rumble/Library/Developer/Xcode/DerivedData/Splitter-fkucamufumrohuhfuivayvewkjdc/Build/Products/Debug-iphoneos/TesseractOCRiOS -L/Users/wayne.rumble/Documents/iOS/Splitter/Pods/TesseractOCRiOS/TesseractOCR/lib -F/Users/wayne.rumble/Library/Developer/Xcode/DerivedData/Splitter-fkucamufumrohuhfuivayvewkjdc/Build/Products/Debug-iphoneos/TesseractOCRiOS -filelist /Users/wayne.rumble/Library/Developer/Xcode/DerivedData/Splitter-fkucamufumrohuhfuivayvewkjdc/Build/Intermediates/Pods.build/Debug-iphoneos/TesseractOCRiOS.build/Objects-normal/armv7/TesseractOCR.LinkFileList -install_name @rpath/TesseractOCR.framework/TesseractOCR -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -miphoneos-version-min=8.0 -dead_strip -Xlinker -no_deduplicate -fembed-bitcode-marker -weak_library /usr/lib/libstdc++.6.0.9.dylib -llept -lstdc++ -ltesseract_all -framework Foundation -framework UIKit -fobjc-arc -fobjc-link-runtime -framework Foundation -framework UIKit -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/wayne.rumble/Library/Developer/Xcode/DerivedData/Splitter-fkucamufumrohuhfuivayvewkjdc/Build/Intermediates/Pods.build/Debug-iphoneos/TesseractOCRiOS.build/Objects-normal/armv7/TesseractOCR_dependency_info.dat -o /Users/wayne.rumble/Library/Developer/Xcode/DerivedData/Splitter-fkucamufumrohuhfuivayvewkjdc/Build/Products/Debug-iphoneos/TesseractOCRiOS/TesseractOCR.framework/TesseractOCR

I fairly new to using Swift and Xcode and am struggling to read this error code.

Any help would be much appreciated.

Thanks

I understand that the NotificationCenter has changed, and I have looked up how to change it to the new implementation, using this link: NotificationCenter issue on Swift 3, but i still cannot get mine to work! I am doing an assignment from my class using the class text book and this is my class so far:

//
//  ViewController.swift
//  Persistence
//
//  Created by Skyleguy on 10/31/16.
//  Copyright © 2016 Skyleguy. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    @IBOutlet var lineFields: [UITextField]!

    override func viewDidLoad() {
        super.viewDidLoad()
        let filePath = self.dataFilePath()
        if (FileManager.default.fileExists(atPath: filePath))
        {
            let array = NSArray(contentsOfFile: filePath) as! [String]
            for i in 0 ..< array.count
            {
                lineFields[i].text = array[i]
            }
        }

        let notificationName = Notification.Name("applicationWillResignActive")
        NotificationCenter.default.addObserver(self, selector: #selector(Persistence.applicationWillResignActive(notification: NSNotification)), name: notificationName, object: nil)
        // Do any additional setup after loading the view, typically from a nib.
    }

    func applicationWillResignActive(notification: NSNotification)
    {
        let filePath = self.dataFilePath()
        let array = (self.lineFields as NSArray).value(forKey: "text") as! NSArray
        array.write(toFile: filePath, atomically: true)
    }
}

after all of this I am still getting an error:

"Module "Persistence" has no member named 'applicationWillResignActive'"

please help!

I use Alamofire4 and I have a jsonSerializationFailed error in responseJson. It seems that the response is not well formatted Json :

AlmF Failure Reason: jsonSerializationFailed(Error Domain=NSCocoaErrorDomain
Code=3840 "Invalid value around character 0." UserInfo=
{NSDebugDescription=Invalid value around character 0.})
AlmF Underlying error: Optional(Error Domain=NSCocoaErrorDomain Code=3840 "Invalid value around character 0." UserInfo={NSDebugDescription=Invalid value around character 0.})

Here is the code displaying there error:

case .responseSerializationFailed(let reason):
                    print("AlmF Response serialization failed: \(error.localizedDescription)")
                    print("AlmF Failure Reason: \(reason)")
                }

Here is the result of debugPrint(response) for

 .responseJSON { response in:

=>

 [Request]: http://myserver.com/Images.zip
 [Response]: <NSHTTPURLResponse: 0x60000003cde0> { URL: http://myserver.com.com/Images.zip } { status code: 200, headers {
"Accept-Ranges" = bytes;
Connection = close;
"Content-Length" = 117127;
"Content-Type" = "application/zip";
Date = "Tue, 01 Nov 2016 21:28:23 GMT";
Etag = "\"701a02b-1c987-534eb9a863980\"";
"Last-Modified" = "Fri, 10 Jun 2016 12:23:18 GMT";
Server = Apache;
"X-Powered-By" = PleskLin;

Where should I format the Json, I thought Alamofire do that

Edit :

Before my code with Swift2 was:

.response { _, _, _, error in
            if let error = error {
                SpeedLog.print("DownloadVC Failed with error: \(error)")
            } else {
                SpeedLog.print("DownloadVC zip downloaded")
}

I have an app that allow users to download some media files from our servers into app so users can use them. Files integrity is very important for the app to perform properly. But sometimes some of the files became corrupted after use. If that happens just after download i can say it happens because of a download problem but it is happening after use of it.

So what can make a file corrupted after downloaded on iOS and what to do to prevent.

PS: Files are not subject to backup to iCloud

I have an tvOs App on iTunes, and I am now trying to upload (validate) an improved version of that App.

I get the error message:

iTunes Store Operation Failed. Unable to process the app at this time due to general error

When I research this error message on Stack Overflow, I get the advice to be patient and try later. But I have been patient for a week! Meanwhile, I have been able to validate several other Apps. I conclude that Apple's server is not congested, and that my certificate is valid!

I have noticed that the upload dialog does not show the proper icon of the App (see below). In my experience, the icon placeholder usually displays the icon of the previous App, i.e. the App present att App Store. Since no icon is displayed, I guess that Apple does not identify my App correctly!

enter image description here

I know that I have the correct bundle identifier (reverse url followed by a name). But that identifier also identifies an iOS version of the tvOS App (so it does not uniquely pinpoint my tvOS App).

I do not know if all other identifiers (display name, etc) in my project are correct!

So my question is: Which things, names and identifiers, etc, must be correct to upload a new version of an App to iTunes? And how can I find out the correct values of those things by inspecting the App's page on itunesconnect ?

The podcast app stores all podcasts onto the phone storage. Is there any way to save them to SD card? I don't see any option to change this setting.

The EntityFramework Reverse POCO Generator is a Visual Studio extension / T4 template which derives from the PetaPoco template. The PetaPoco project is licensed as Apache 2.0; and the derived work is labelled as being distributed under Apache 2.0 as well.

However, the author has added a clause to the top of the LICENSE file, stating:

This software shall not be automated, placed inside, or wrapped by, other software. Not shall it be sold or used outside of Visual Studio.

This came to my attention after the author responded to a StackOverflow question regarding using the tool outside of Visual Studio. His response included:

By the way, just to be clear: I don't want this project to be automated outside of Visual Studio, or to be included in another product of any kind. This is stipulated in the license.

Confusing matters more the same product is distributed under a non-modified APL 2.0 via VisualStudioGallery.com, where it's license simply cites it as an Apache 2.0 project.

Can a developer arbitrarily modify/restrict an established license?

Probably I am missing some key aspect here, because I simply have no idea how this metric is supposed to tell me anything described by the authors:

Defect Open and Close rate = (Defects found during testing in a release / (Defects found during testing in a release + Defects found after release) *100

What is it?

While there are numerous defect statuses which indicate the current state of an identified flaw, they can typically be categorized as either open or closed.

Why is it important?

The sheer number of defects that are encountered during a project’s run can make them difficult to keep tabs on. If team members are not diligent about measuring the current status of their program’s flaws, certain defects could slip through the cracks and show up in the finalized release. Furthermore, comparing the frequency of open defects with close rates will also provide insight into the ability of testers and developers to work together to identify and address software issues.

http://www.getzephyr.com/resources/whitepapers/qa-metrics-value-testing-metrics-within-software-development

I'm pretty sure this is impossible to pull off without using a VPN or making the database open to the whole world, but networks aren't my specialty and I couldn't find any info relating to this problem:

Is it possible to create a web application, which can connect to a firewalled database on the user's network, WITHOUT using a VPN?

Here is an example usecase:

  1. User opens my webapp, then enters a username, password, hostname, and port for a database.
  2. The webapp establishes a connection to the database, which is only accessible to machines on the user's network (The user's machine can access it, but my server can not).
  3. The user then can use the webapp to manage the database

Is this feasible?

Is it good practice to store Nuget or NPM (or other) packages in the source control with the source, or to keep them in some other place?

My gut says they belong with the source, however a package will probably version less often then the source, i.e. when a release version is created.

I'm wondering what others people do.

Sorry if this a wrong place to talk about it but I have gone through all the branches of stack exchange and I found none suitable.

I am a 12th grader. Here I am following an education system called matric system where one must pass 10 classes first then choose a subject among engineering, medical , computer science, commerce e.t.c before entering the college for his 11th and 12th classes and then finally join the university after choosing a subject among too many. I am, as said, in college now. I have done my matric with computer science just to save myself from Biology and commerce and in college, I picked engineering in stead of computer science and the rest because I felt I was interested in mechanical engineering but what I want is to choose software engineering in university and that I feel as a sudden and a non-suitable switch because I have been studying physics, maths and chemistry very keenly for 2 years and now there is a urge, an intense desire to join software engineering. But I am confused that if it was important for me to choose computer science then, or not.

Hence, I want you guys to help me out. Would it be fine to join software engineering? I mean a computer subject all of a sudden when I am almost an amateur to it? Am I going to need some introduction to this subject before entering the university or it would be enough to start the course/syllabus directly with other students?

From my previous jobs, as a developer, I only got told what to do (non-technical things) by almost everyone in the office, designers and PMs for the most part. So usually they would send me PDFs of the design, and if I have questions I would ask.

My questions is, is this the nature of being a developer? or is it just my experience? Please share how you participate in projects other than just making what other people tell you to. Also specify what industry or the type of company, for reference.

Mine were more design intensive companies.

After changing API level to 17 (was 21 and all worked), application crashed!


I take exception on this line:

   XSSFWorkbook myWorkBook = new XSSFWorkbook(xlsxDoc);

Error log:

11-01 20:50:23.360 1456-1456/? E/AndroidRuntime: FATAL EXCEPTION: main
                                                 Process: com.rostislav.dugin.reminderofwork, PID: 1456
                                                 java.lang.RuntimeException: Error receiving broadcast Intent { act=android.intent.action.DOWNLOAD_COMPLETE flg=0x10 pkg=com.rostislav.dugin.reminderofwork (has extras) } in com.rostislav.dugin.reminderofwork.DownloadHelper$1@421f59d0
                                                     at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:808)
                                                     at android.os.Handler.handleCallback(Handler.java:808)
                                                     at android.os.Handler.dispatchMessage(Handler.java:103)
                                                     at android.os.Looper.loop(Looper.java:193)
                                                     at android.app.ActivityThread.main(ActivityThread.java:5292)
                                                     at java.lang.reflect.Method.invokeNative(Native Method)
                                                     at java.lang.reflect.Method.invoke(Method.java:515)
                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
                                                     at dalvik.system.NativeStart.main(Native Method)
                                                  Caused by: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException
                                                     at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:62)
                                                     at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:456)
                                                     at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:461)
                                                     at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:162)
                                                     at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:241)
                                                     at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:294)
                                                     at com.rostislav.dugin.reminderofwork.XLSXHelper.getNotificationsFromDoc(XLSXHelper.java:55)
                                                     at com.rostislav.dugin.reminderofwork.DocumentHandleObservableOnSubscribe$1.onDownloaded(DocumentHandleObservableOnSubscribe.java:54)
                                                     at com.rostislav.dugin.reminderofwork.DownloadHelper$1.onReceive(DownloadHelper.java:71)
                                                     at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:798)
                                                     at android.os.Handler.handleCallback(Handler.java:808) 
                                                     at android.os.Handler.dispatchMessage(Handler.java:103) 
                                                     at android.os.Looper.loop(Looper.java:193) 
                                                     at android.app.ActivityThread.main(ActivityThread.java:5292) 
                                                     at java.lang.reflect.Method.invokeNative(Native Method) 
                                                     at java.lang.reflect.Method.invoke(Method.java:515) 
                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824) 
                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640) 
                                                     at dalvik.system.NativeStart.main(Native Method) 
                                                  Caused by: java.lang.reflect.InvocationTargetException
                                                     at java.lang.reflect.Constructor.constructNative(Native Method)
                                                     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
                                                     at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:60)
                                                     at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:456) 
                                                     at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:461) 
                                                     at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:162) 
                                                     at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:241) 
                                                     at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:294) 
                                                     at com.rostislav.dugin.reminderofwork.XLSXHelper.getNotificationsFromDoc(XLSXHelper.java:55) 
                                                     at com.rostislav.dugin.reminderofwork.DocumentHandleObservableOnSubscribe$1.onDownloaded(DocumentHandleObservableOnSubscribe.java:54) 
                                                     at com.rostislav.dugin.reminderofwork.DownloadHelper$1.onReceive(DownloadHelper.java:71) 
                                                     at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:798) 
                                                     at android.os.Handler.handleCallback(Handler.java:808) 
                                                     at android.os.Handler.dispatchMessage(Handler.java:103) 
                                                     at android.os.Looper.loop(Looper.java:193) 
                                                     at android.app.ActivityThread.main(ActivityThread.java:5292) 
                                                     at java.lang.reflect.Method.invokeNative(Native Method) 
                                                     at java.lang.reflect.Method.invoke(Method.java:515) 
                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824) 
                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640) 
                                                     at dalvik.system.NativeStart.main(Native Method) 
                                                  Caused by: java.lang.VerifyError: org/openxmlformats/schemas/drawingml/x2006/spreadsheetDrawing/impl/CTDrawingImpl
                                                     at java.lang.reflect.Constructor.constructNative(Native Method)
                                                     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
                                                     at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createUnattachedNode(SchemaTypeImpl.java:1934)
                                                     at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createTypeStoreUser(SchemaTypeImpl.java:1880)
                                                     at org.apache.xmlbeans.impl.store.Xobj.setStableType(Xobj.java:1408)
                                                     at org.apache.xmlbeans.impl.store.Cur.setType(Cur.java:2502)
                                                     at org.apache.xmlbeans.impl.store.Cur.setType(Cur.java:2487)
                                                     at org.apache.xmlbeans.impl.store.Locale.autoTypeDocument(Locale.java:359)
                                                     at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1280)
                                                     at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1264)
                                                     at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
                                                     at org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTDrawing$Factory.parse(Unknown Source)
                                                     at org.apache.poi.xssf.usermodel.XSSFDrawing.<init>(XSSFDrawing.java:85)
                                                     at java.lang.reflect.Constructor.constructNative(Native Method) 
                                                     at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
                                                     at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:60) 
                                                     at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:456) 
                                                     at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:461) 
                                                     at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:162) 
                                                     at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:241) 
                                                     at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:294) 
                                                     at com.rostislav.dugin.reminderofwork.XLSXHelper.getNotificationsFromDoc(XLSXHelper.java:55) 
                                                     at com.rostislav.dugin.reminderofwork.DocumentHandleObservableOnSubscribe$1.onDownloaded(DocumentHandleObservableOnSubscribe.java:54) 
                                                     at com.rostislav.dugin.reminderofwork.DownloadHelper$1.onReceive(DownloadHelper.java:71) 
                                                     at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:798) 
                                                     at android.os.Handler.handleCallback(Handler.java:808) 
                                                     at android.os.Handler.dispatchMessage(Handler.java:103) 
                                                     at android.os.Looper.loop(Looper.java:193) 
                                                     at android.app.ActivityThread.main(ActivityThread.java:5292) 
                                                     at java.lang.reflect.Method.invokeNative(Native Method) 
                                                     at java.lang.reflect.Method.invoke(Method.java:515) 
                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824) 
                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640) 
                                                     at dalvik.system.NativeStart.main(Native Method) 

build.gradle:

apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.3"

    defaultConfig {
        applicationId "com.rostislav.dugin.reminderofwork"
        minSdkVersion 17
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"

        multiDexEnabled true
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.android.support:design:24.2.1'
    compile 'io.reactivex:rxandroid:1.2.1'
    compile 'io.reactivex:rxjava:1.1.6'
    compile 'com.android.support:multidex:1.0.1'
}

Libraries I found in this repository , because default libraries crashes because of xmlbeands library. I think that now application crashed because of xmlbeans too, but why on API 17 (On API 21 - all work)?


Why I take error and how it fix?

I have an endless pinwheel animation in my storyboard. It was working earlier today. I closed and reopened Xcode multiple times and it still is not working. Whats weird is my class files are showing fine however. Below I have it pictured:

My Xcode 8 Project

Thanks!

Hello Everyone i am new to Swift i need to understand this function

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool

specially this : didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?

This works:

TO_DATE(TO_CHAR('12'|| '-' || '12' || '-01'),'YYYY/MM/DD')

This does not work:

IS_DATE(TO_DATE(TO_CHAR('12'|| '-' || '12' || '-01'),'YYYY/MM/DD'))
IS_DATE(TO_DATE(TO_CHAR('12'|| '-' || '12' || '-01'),'YYYY/MM/DD'),'YYYY/MM/DD')

What exactly am I doing wrong? I have tried datatypes STRING and DATE/TIME

I am trying to remotely debug an MVC application on a android Chrome browser. I have enabled my IIS express to my local network and also configured my applicationhost.config file to have the following bindings

<bindings>
 <binding protocol="http" bindingInformation="*:62442:localhost" />
 <binding protocol="http" bindingInformation="*:62442:xxx.xxx.x.xxx" />     
</bindings>

I have also created a new InBound rule in Windows Firewall with the port number.

When I try to open the mvc web app in my android device (Chrome) it gives me the following error

SSL Connection Error

Unable to make a secure connection to the server. This may be a problem with the server or it may be requiring a client authentication certificate that you don't have

I am not sure how to get rid of the SSL error?

im useing googel play service get locaction error: GooglePlayServicesUtil: Google Play services out of date. Requires 9256000 but found 7571434

in android 4.4.2 no problem in android 5.0.2 not working

My Java GUI program launches a program (downloader.exe) that downloads files and prints out status messages as it goes. If you were to launch downloader.exe directly from the command window it would print the messages there. I would like to capture (some) of the status messages and show them in a JTextArea (rather than the whole thing just freezing up during the download, which could take a long time).

So far, I have a SwingWorker thread which collects the output and should send it via publish() to the process method which should show it in the JTextArea. However, it never goes to the process method until after the doInBackground method is finished, and even then all the strings are jumbled up. This thread also owned a thread that monitored the progress of the process. I thought this might be hurting so I commented everything with it out, but that didn't help.

I also tried severely cutting down on the number of lines captured (since I read that someone's process method wasn't being called because of the inundation of publish() calls). And I also tried sending the output to a log file then reading from there. The log file gets filled perfectly, and the doInBackground is reading it fine, I just can't get it sent to the JTextArea!

I am a beginner in threading so please excuse my ignorance. I was thinking maybe I am blocking the EDT somehow (given the window freezes up so it isn't responding to button clicks etc). But I am not sure how, or what I should do instead.

Thanks in advance if you can help :-)

This is where the process starts and I call the thread (in a class's method that gets instantiated in the action event in my main window's class)

        ProcessBuilder pb = new ProcessBuilder("downloader.exe", thing.getId());
        pb.redirectErrorStream(true);

        pb.redirectOutput(new File("./log.txt"));

        Process process = pb.start();

        StreamGobbler sg = new StreamGobbler(process, statusLabel); //statusLabel is a JTextArea from the MainWindow that I passed to this class on construction as a member variable
        sg.execute();

        process.waitFor();

        //do stuff after finished downloading etc

This is my "StreamGobbler" SwingWorker class (only named StreamGobbler because it is left over from something else I tried to do to make it work). ProcMon is from http://stackoverflow.com/questions/11510409/how-to-monitor-external-process-ran-by-processbuilder nearly word for word but finished off a bit

package main;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;

import javax.swing.JTextArea;
import javax.swing.SwingWorker;

public class StreamGobbler extends SwingWorker<Void, String> //Thread
{
    static ProcMon procMon;
    //BufferedReader br;
    InputStream is;
    JTextArea statusLabel;
    List<String> textContents;

    StreamGobbler(Process proc, JTextArea statusLabel)
    {
        textContents = new ArrayList<String>();
        this.statusLabel = statusLabel;
        procMon = ProcMon.create(proc);
        //is = proc.getInputStream();
        try {
            is = new FileInputStream("./log.txt");
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

    public Void doInBackground()
    {
        while(!procMon.isComplete())
        {
            try
            {
                int i = 0;
                final StringBuilder s = new StringBuilder();
                i = is.read();
                while(i != -1)
                {
                    s.append((char)i);
                    if(i == '\n')
                    {
                        if(s.toString().contains(IMPORTANT_THING))
                        {
                            publish(s.toString());
                        }
                        s.setLength(0);
                    }
                    i = is.read();
                }
                //get last line case it doesn't end with a newline character
                publish(s.toString());
            }
            catch (IOException ioe) | InterruptedException ioe)
            {
                ioe.printStackTrace();
            }
        }
        return null;
    }
    protected void process(List<String> chunks)
    {
        for(String s : chunks)
        {
            if(s.contains(IMPORTANT_THING))
            {
                textContents.add(s);
            }
         //am using a list of strings because I also want to be able to delete some before putting them in the JTextArea
        }
        String contents = "";
        for(int i = 0; i < textContents.size(); i++)
        {
            contents += textContents.get(i) + "\n";
        }
        statusLabel.setText(contents);
    }
    @Override
    public void done()
    {
        statusLabel.append("~~~~~~~Finished~~~~~~~\n");
    }
}

Sorry if this is not the correct place to post this question, but as it is before the project as started, I thought it was better here than Stack Overflow. I've also not seen this question anywhere before.

I want to build a simple lightweight contact form in ASP.Net, and if possible not use MVC. It seems to me that MVC is a large and complicated way of doing things, when really all that's needed is a front end form and a back end to handle it. The other issue I have with MVC is that I want to place the app in a sub directory on a static website, and as I understand it the routing system in MVC doesn't allow for this.

I want to write the project in C# and on ASP.Net in Visual Studio, but I'm having trouble finding anything other than MVC tutorials or old web forms ones (which I don't want to use), leading me to believe that MVC really is the only way. Is there something I'm missing? Or will I need to create a simple MVC app and find a way of adding it to a folder?