小编m.u*_*mar的帖子

使用端口80时Apache服务失败("BUSY")

如何配置我的Apache服务器在端口80上运行?使用端口80时,我的Apache服务失败; 它说BUSY.

当我将config中的端口更改为85时,Apache工作,但这需要每次使用localhost在地址栏中输入85.

我试图找出哪个程序正在使用端口80,但我无法想出任何东西.我第一次进入netstat -n -a -o -p TCPcmd,我想出了这些信息

Local Address 0.0.0.0:80   State: Listening    PID: 4
Run Code Online (Sandbox Code Playgroud)

然后我进入tasklistcmd试图弄清楚哪个服务正在使用这个端口.看起来"System"在PID 4上.我已经将Skype配置为不使用端口80而没有任何运气.我在Windows 7上安装了Microsoft WebMatrix,我甚至删除了IIS 7.5 Server Express以释放此端口,但一切都无济于事.

你能帮帮我吗?我使用的是Windows 7和XAMPP.

apache

16
推荐指数
3
解决办法
3万
查看次数

使用Python / Numpy中的单词构建转换矩阵

我正在尝试使用此数据构建3x3转换矩阵

days=['rain', 'rain', 'rain', 'clouds', 'rain', 'sun', 'clouds', 'clouds', 
  'rain', 'sun', 'rain', 'rain', 'clouds', 'clouds', 'sun', 'sun', 
  'clouds', 'clouds', 'rain', 'clouds', 'sun', 'rain', 'rain', 'sun',
  'sun', 'clouds', 'clouds', 'rain', 'rain', 'sun', 'sun', 'rain', 
  'rain', 'sun', 'clouds', 'clouds', 'sun', 'sun', 'clouds', 'rain', 
  'rain', 'rain', 'rain', 'sun', 'sun', 'sun', 'sun', 'clouds', 'sun', 
  'clouds', 'clouds', 'sun', 'clouds', 'rain', 'sun', 'sun', 'sun', 
  'clouds', 'sun', 'rain', 'sun', 'sun', 'sun', 'sun', 'clouds', 
  'rain', 'clouds', 'clouds', 'sun', 'sun', 'sun', 'sun', 'sun', 'sun', 
  'clouds', 'clouds', 'clouds', 'clouds', 'clouds', …
Run Code Online (Sandbox Code Playgroud)

python numpy markov-chains

5
推荐指数
2
解决办法
3567
查看次数

在 SwiftUI 中删除 LazyVStack 和 ForEach 中的行

使用List一个可以简单地使用.onDelete修饰符从列表中删除行。但是我们如何ForEachLazyVStack. 我正在使用SwipeCell应用拖动手势并显示删除按钮,但我如何实际从 CoreData 中删除,特别是IndexSet在这种情况下如何访问

LazyVStack {
    ForEach(items) { item in
        Text("\(item.name)")
            .swipeCell(cellPosition: .right, leftSlot: nil, rightSlot: slot1)
            .alert(isPresented: $showAlert){
                Alert(title: Text("Delete Task?"), message: nil, primaryButton:.destructive(Text("Delete"), action: {


                               // HOW DO I DELETE HERE ?


                               dismissDestructiveDelayButton()
                            }),secondaryButton: .cancel({dismissDestructiveDelayButton()}))
                        }
     }
}

private func deleteItems(offsets: IndexSet) {
    withAnimation {
        offsets.map { items[$0] }.forEach(viewContext.delete)
        do {
            try viewContext.save()
        } catch {
            let nsError = error as NSError
            fatalError("Unresolved error \(nsError), \(nsError.userInfo)") …
Run Code Online (Sandbox Code Playgroud)

xcode core-data ios swift swiftui

5
推荐指数
1
解决办法
1568
查看次数

试图从swift 2中出现的JSON文件读取过载错误

嗨,所以这里是用于解析Swift 2中的JSON文件的样板代码.我以前使用它并且它可以工作但是由于某种原因它在最新版本的Xcode 7.1和Swift 2中被破坏了.有关这个人的任何想法?错误是"参数标签"(contentsOfFile:,options:,error :)'与任何可用的重载都不匹配"

import Foundation

extension Dictionary {
    static func loadJSONFromBundle(filename: String) -> Dictionary<String, AnyObject>? {
        if let path = NSBundle.mainBundle().pathForResource(filename, ofType: "json") {

            var error: NSError?
            let data = NSData(contentsOfFile: path, options: NSDataReadingOptions, error: &error)
            if let data = data {
                let dictionary: AnyObject? = NSJSONSerialization.JSONObjectWithData(data,
                    options: NSJSONReadingOptions(), error: &error)
                if let dictionary = dictionary as? Dictionary<String, AnyObject> {
                    return dictionary
                } else {
                    print("Level file '\(filename)' is not valid JSON: \(error!)")
                    return nil
                }
            } else …
Run Code Online (Sandbox Code Playgroud)

xcode json ios swift

2
推荐指数
1
解决办法
3812
查看次数

标签 统计

ios ×2

swift ×2

xcode ×2

apache ×1

core-data ×1

json ×1

markov-chains ×1

numpy ×1

python ×1

swiftui ×1