小编Cod*_*iak的帖子

在Electron(Atom Shell)应用程序中存储用户设置的位置?

我似乎无法找到存储用户设置的内置机制.我希望电子提供了一种在所有桌面平台上存储用户设置的标准方法.如果没有先例,我可以自己实现它,我只是不想立即跳转到自定义解决方案.该领域的在线研究相当稀少.谢谢!

electron

72
推荐指数
4
解决办法
4万
查看次数

如何刷新后退按钮点击页面?

我使用.htaccess将我的所有流量路由到单个index.php文件.下面的代码用于指示流量,但由于某种原因,它不能与后退按钮一起使用.我不知道如何让后退按钮工作.我已经尝试了各种各样的东西,谷歌搜索了一点,没有一个有效,所以我希望有人在这里可以提供帮助!

<?php
   if(isset($_GET['parameters'])) {
      if($_GET['parameters'] == "repair")
         include 'repair.html';
      else if($_GET['parameters'] == "training")
         include 'training.html';
      else if($_GET['parameters'] == "products")
         include 'products.html';
      else if($_GET['parameters'] == "about")
         include 'about.html';
      else if($_GET['parameters'] == "employees")
         include 'employees.html';
      else if($_GET['parameters'] == "training")
         include 'training.html';
      else if($_GET['parameters'] == "newaccount")
         include 'newaccount.html';
      else if($_GET['parameters'] == "contact")
         include 'contact.html';
      else if($_GET['parameters'] == "recommended")
         include 'recommended.html';
      else if($_GET['parameters'] == "careers")
         include 'careers.html';
      else
         include 'home.html';
   }
   else
      include 'home.html';
?>
Run Code Online (Sandbox Code Playgroud)

到目前为止,我已尝试过但未能使用: window.onbeforeunload body onunload=""

必须有办法onunload=location.reload()或某事!不知何故必须知道语法!!

javascript php ajax .htaccess jquery

23
推荐指数
5
解决办法
9万
查看次数

不正确的sources.list导致apt-get更新失败Ubuntu 13.04

我试图使用rvm安装ruby,由于apt-get update的问题,它失败了.我发现这是由etc/apt目录中的sources.list文件出现问题引起的.我试图使用这个http://blog.ubuntu-tweak.com/guide/how-to-fix-the-source-list-files来理解和修复我的源文件.当我从sources.list删除"坏线"时,没有留下任何行.此时我能够成功地进行apt-get更新,但是rvm install ruby​​仍然失败,因为它现在无法找到必要的依赖项.我开始考虑一个完整的全新安装,因为我不知道还能做什么,但我想我会先在这里寻求帮助.

的sources.list

# deb cdrom:[Ubuntu 13.04 _Raring Ringtail_ - Release amd64 (20130424)]/ raring main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ raring main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ raring main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ raring-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ raring-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu …
Run Code Online (Sandbox Code Playgroud)

ruby linux ubuntu

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

如何在 Java 中创建自定义对象列表?

Arraylists 使用以下语法:ArrayList<Object> = new ArrayList<Object>; 我需要向我的 GameList 类添加一个构造函数,它允许您指定要创建的列表类型。我不明白如何让我的班级能够像这样定义:

GameList<objectType> = new GameList();
Run Code Online (Sandbox Code Playgroud)

我在游戏中的所有对象都来自于游戏对象类。

public class GameObject
{
    String name;
    public GameObject
    {
        name = "Stat";
    }
    public String getName()
    {
        return name;
    }
    public void setName(String newName)
    {
        name = newName;
    }
}

public class GameList
{
    GameObject[] theList;
    public GameList(int size)
    {
        theList = new GameObject[size];
    }
    public GameObject parseList(String objectName)
    {
        for(int i = 0; i < theList.length; i++)
            if(theList[i].getName() == objectName)
                return theList[i];
        return null;
    } …
Run Code Online (Sandbox Code Playgroud)

java arraylist

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

当运行Electron App打包以在OS X上分发时抛出ENENENT

当我打包我的应用程序以进行分发时,我开始生成任务的所有按钮现在抛出ENOENT.

它只发生在我打包发行时...当使用电子预制时我没有问题.我希望有人能给我一些关于可能造成这种情况的信息!我验证了我的PATH变量包含可执行文件,以及我正在执行ChildProcess.spawn的文件夹存在.

如果有任何更多信息有帮助请告诉我.谢谢!

http://prntscr.com/7qrzk0

electron

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

标签 统计

electron ×2

.htaccess ×1

ajax ×1

arraylist ×1

java ×1

javascript ×1

jquery ×1

linux ×1

php ×1

ruby ×1

ubuntu ×1