小编why*_*yoz的帖子

Xcode 7没有使用Git显示新的远程分支

在Xcode 7中,在使用Jira/Stash创建新的远程分支后,当我拉动master时,新分支用于显示为可选的原始分支.现在,新的分支根本不显示,因此创建新的本地分支并不容易.

在转到"源代码管理"之前>将鼠标悬停在当前工作副本上>选择"切换到分支"并滚动查看新的源/分支.选择后,Xcode会自动创建一个本地分支.

现在我必须在本地手动命名/创建一个新分支并将其推送(创建)远程分支,如果你正在工作副本不是主分支,这可能会导致很多冲突.

有没有办法强制Xcode通过终端查看所有远程分支,或者通过Xcode中缺少的东西?

git xcode jira ios

9
推荐指数
2
解决办法
5566
查看次数

使用findFragmentById的ClassCastException

我尝试使用以下内容获取特定片段:

RohwareFragmentMatlist fragment =    (RohwareFragmentMatlist)getFragmentManager().findFragmentById(R.id.lagerfragment);
Run Code Online (Sandbox Code Playgroud)

但是我收到了来自eclipse的错误消息:

无法从Fragment转换为RohwareFragmentMatlist

活动开始于:

public class RohwareActionBar extends FragmentActivity {...
Run Code Online (Sandbox Code Playgroud)

RohwareFragmentMatlist定义如下:

public class RohwareFragmentMatlist extends ListFragment
        implements LoaderManager.LoaderCallbacks<Cursor>{...
Run Code Online (Sandbox Code Playgroud)

Fragment以这种方式定义:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent" 
android:layout_height="match_parent">

<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="de.ypssoft.RohwareFragmentMatlist"
android:layout_weight="1"
android:layout_width="0px" 
android:layout_height="match_parent"
android:id="@+id/lagerfragment" 
android:layout_margin="5dip" 
android:layout_marginLeft="10dip"
>
</fragment>
<FrameLayout 
android:id="@+id/details" 
android:layout_weight="3"
android:layout_width="0px" 
android:layout_height="match_parent"
 android:background="?android:attr/detailsElementBackground" /> 

</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

使用ListFragment通过"getFragmentById"获取片段不起作用吗?

android-fragments

7
推荐指数
1
解决办法
4910
查看次数

HttpUrlConnection在Android上找不到NTLM挑战

我正在尝试使用HttpUrlConnection类将我的Android应用程序连接到IIS服务器.

我的服务器需要用户进行身份验证,因此它向客户端发送以下质询:

WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
Run Code Online (Sandbox Code Playgroud)

我的问题是HttpUrlConnection似乎没有解析它.因此,getPasswordAuthentication()永远不会调用,并返回IOException"未发现身份验证质询".

这是我的代码:

Authenticator.setDefault(new Authenticator() {
    @Override
    protected PasswordAuthentication getPasswordAuthentication() {                  

            return new PasswordAuthentication("myUsername", "myPassword".toCharArray());
    }               
});

URL url = new URL(myUrl);               
HttpURLConnection conn = (HttpURLConnection) url.openConnection();          

conn.setRequestMethod("GET");
conn.setRequestProperty("Accept-Encoding", "gzip");
conn.setRequestProperty("Accept-Charset", "UTF-8");         
conn.setRequestProperty("Accept", "*/*");
conn.setRequestProperty("Connection", "close");
conn.setDoOutput(true);
conn.setDoInput(true);          

try 
{   
    conn.connect();             
    status_code = conn.getResponseCode();   
}catch (IOException e) {
    ...             
}
Run Code Online (Sandbox Code Playgroud)

我真的开始认为HttpUrlConnection不支持NTLM挑战.我看到一些图书馆似乎在做这项工作,但我不想使用外部库.

有人可以确认是否有可能在没有外部库的情况下使HttpUrlConnection处理NTLM挑战?

android ntlm httpurlconnection android-authenticator

7
推荐指数
1
解决办法
2484
查看次数

Android Studio导致Windows 8.1崩溃

自从我将PC更新到Windows 8.1之后,当我启动Android Studio并运行要测试的简单应用程序时,我得到一个:(带有“ critical_structure_error”,这迫使我的核心i7重新启动!

我注意到任务管理器中的磁盘为100%,但我使用CCleaner清除了所有临时文件,但这似乎并不能解决很多问题(即使我清除了16G!)。

当我再次打开Android Studio时,出现了很多这样的错误:

无法从文件'C:\ Users \ Me \ .AndroidStudioPreview \ config \ options \ feature.usage.statistics.xml'加载设置:java.lang.AssertionError:意外的内容存储修改将重新创建文件内容

如果我将AS保持打开状态,它将一直弹出相同类型的内容存储错误,直到我关闭并重新打开AS。重新打开后,我可以看到该项目并且它可以正常运行。似乎在这一点上,如果我打开仿真器,那就是在使用:(

我真的很想保留Windows 8.1和当前0.5.9版本的AS,而不必还原到Win 8或其他AS版本。更重要的是,我不希望每次使用Android Studio时PC都崩溃!有什么想法吗?

windows android android-studio

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

Visual Studio在运行后关闭文档

不确定这是否与Parallels相关,但我正在运行Visual Studio 2013,有一天我的文档在调试.NET项目后开始关闭.预期的行为是所有打开的文件都会保持打开状态,但现在它们都会关闭.即使在关闭正在调试的程序之后,如果我尝试打开文档来查看代码,则新选项卡不会打开,因为VS认为该文件仍处于"打开状态".

一个修复是转到Window> Close All Documents,它关闭在后台打开的文件,让我在程序调试或不调试时打开文档. 窗口>重置窗口布局在Parallels中造成严重破坏,打开了大量其他面板,如Watch 1,Watch 2,Memory 1等.

我想要的只是保持文件打开,这样我就可以设置断点,或者开放文件的dev开发!需要重置什么默认值或设置才能在运行期间保持所有窗口打开?

.net vb.net parallels virtual-machine visual-studio

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

AndroidPlot:支持绘制虚线图形

是否有线条样式用于虚线,虚线等?

我知道你可以通过将vertexColor设置为null来添加/删除该点,如下例所示:

LineAndPointFormatter blueFormat = new LineAndPointFormatter(Color.rgb(30,144,255), null, null);
Run Code Online (Sandbox Code Playgroud)

但是,我无法在javadoc中找到像"setDottedLine(true)"这样的快速属性设置或类似的东西.我想我可以解析每10个点并在解析时每10个点掉一次,但这可能比需要的开销略高.

是否有使用LineAndPointFormatter创建虚线或通过设置其他小部件属性的解决方法或技巧?

graphing android android-widget androidplot

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

iOS 10:UIAlertController只显示一个动作

我有一个UIAlertController:

UIAlertController *actionSheet = [UIAlertController
                                          alertControllerWithTitle:@"Options"
                                          message:@""
                                          preferredStyle:UIAlertControllerStyleAlert];

        UIAlertAction *start = [UIAlertAction
                             actionWithTitle:@"Start"
                             style:UIAlertActionStyleDefault
                             handler:^(UIAlertAction * action)
                             {

                                 [self DisplayAlert:@"" textval:@"You are about to start. Would you like to continue?"];
                                 [actionSheet dismissViewControllerAnimated:YES completion:nil];
                             }];
        UIAlertAction *idle = [UIAlertAction
                             actionWithTitle:@"Idle"
                             style:UIAlertActionStyleDefault
                             handler:^(UIAlertAction * action)
                             {

                                 [self DisplayAlert:@"" textval:@"You are about to idle. Would you like to continue?"];
                                 [actionSheet dismissViewControllerAnimated:YES completion:nil];
                             }];
        UIAlertAction *stop = [UIAlertAction
                             actionWithTitle:@"Stop"
                             style:UIAlertActionStyleDefault
                             handler:^(UIAlertAction * action)
                             {

                                 [self DisplayAlert:@"" textval:@"You are about to stop. Would you like …
Run Code Online (Sandbox Code Playgroud)

objective-c ipad ios uialertcontroller

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