我在公共目录中有很多源目录.当我通过发出命令开始make:
make -j 4
Run Code Online (Sandbox Code Playgroud)
我从make的线程和调用的gcc编译器实例中收到了很多字符串.对于解析错误,我必须运行make两次,第二次使用一个线程:
make -j 1
Run Code Online (Sandbox Code Playgroud)
所以我可以正确解析make的输出.
有没有办法运行多线程make一次并正确地决定哪个错误与哪个项目(源目录)相关?
谢谢!
我使用GSM通信库(GSMComm)与GSM调制解调器发送和接收SMS.如何通过发送报告发送短信?如何获取发送消息的状态?
我正在尝试实现Floyd-Warshall算法(所有对最短路径).在下面的代码中,当我输入一些数字时,它将最后一个数字作为输入.我知道代码不完整.
现在我该怎么做才能为每个i和j打印最短路径?或者你建议我做些什么来完成这段代码.谢谢.
private void button10_Click(object sender, EventArgs e)
{
string ab = textBox11.Text;
int matrixDimention = Convert.ToInt32(ab);
int[,] intValues = new int[matrixDimention, matrixDimention];
string[] splitValues = textBox9.Text.Split(',');
for (int i = 0; i < splitValues.Length; i++)
intValues[i / (matrixDimention), i % (matrixDimention)] = Convert.ToInt32(splitValues[i]);
string displayString = "";
for (int inner = 0; inner < intValues.GetLength(0); inner++)
{
for (int outer = 0; outer < intValues.GetLength(0); outer++)
displayString += String.Format("{0}\t", intValues[inner, outer]);
displayString += Environment.NewLine;
}
int n = (int)Math.Pow(matrixDimention, …Run Code Online (Sandbox Code Playgroud) 我有一个ImageView并设置了一个drawable.现在我需要ImageView动态获取可点击事件的ID .我怎么才能得到它?
imgtopcolor = (ImageView) findViewById(R.id.topcolor);
imgtopcolor.setImageResource(R.drawable.dr); // How do I get this back?
Run Code Online (Sandbox Code Playgroud)
现在触摸事件imgtopcolor我想要绘制id因为我每次都设置不同的drawable并且想要将drawable与其他
我正在尝试使用基于密码的加密来加密Android上的图像文件.要保存加密图像,我只需这样做:
FileOutputStream fos = new FileOutputStream(thumbnailFile);
CipherOutputStream cos = new CipherOutputStream(fos, encryptCipher);
Bitmap thumbnail = Bitmap.createScaledBitmap(bm2, 140, 140, true);
thumbnail.compress(Bitmap.CompressFormat.JPEG, 80, cos);
Run Code Online (Sandbox Code Playgroud)
并阅读它,这:
FileInputStream fis = new FileInputStream(f);
CipherInputStream cis = new CipherInputStream(fis, decryptCipher);
Bitmap b = BitmapFactory.decodeStream(cis);
Run Code Online (Sandbox Code Playgroud)
但是Bitmap最终为null.当我绕过加密时代码有效; 那是我使用文件(输入|输出)流而不是密码(输入|输出)流.
我的密码创建如下:
public void initCiphers(char password[]) {
PBEKeySpec pbeKeySpec;
PBEParameterSpec pbeParamSpec;
SecretKeyFactory keyFac;
byte[] salt = {
(byte)0xc7, (byte)0x73, (byte)0x21, (byte)0x8c,
(byte)0x7e, (byte)0xc8, (byte)0xee, (byte)0x99
};
int count = 20;
pbeParamSpec = new PBEParameterSpec(salt, count);
pbeKeySpec = new PBEKeySpec(password);
try { …Run Code Online (Sandbox Code Playgroud) 可能重复:
android获取系统版本
我必须在运行时检测当前的android os版本.我怎么能这样做,如果有人知道请帮助我.
我试图在WPF中使用VS2010附带的报表查看器.我创建了报告并使用它运行的Windows应用程序进行了相同的测试.然后我使用相同的参数集在WPF中使用相同的RDLC文件,但它失败了.我正在使用的代码如下MainWindow.xaml.cs
public MainWindow()
{
ObjectModel DataObject = new ObjectModel();
DataObject.SetEPSDetails();
WindowsFormsHost host = new WindowsFormsHost();
ReportViewer RptViewer = new ReportViewer();
host.Child = RptViewer;
Grid HostGrid = this.FindName("GrdRow") as Grid;
HostGrid.Children.Add(host);
RptViewer.ProcessingMode = ProcessingMode.Local;
RptViewer.LocalReport.ReportEmbeddedResource = "RDLWPF.PrintPreview.rdlc";
RptViewer.LocalReport.SetParameters(new Microsoft.Reporting.WinForms.ReportParameter("Payer", DataObject.Payer));
RptViewer.LocalReport.SetParameters(new Microsoft.Reporting.WinForms.ReportParameter("ValueDate", DataObject.ValueDate));
RptViewer.LocalReport.SetParameters(new Microsoft.Reporting.WinForms.ReportParameter("FileName", DataObject.FileName));
RptViewer.LocalReport.SetParameters(new Microsoft.Reporting.WinForms.ReportParameter("Description", DataObject.Description));
RptViewer.LocalReport.SetParameters(new Microsoft.Reporting.WinForms.ReportParameter("PrintedDate", DataObject.PrintDate));
RptViewer.LocalReport.SetParameters(new Microsoft.Reporting.WinForms.ReportParameter("FileLastUpdated", DataObject.FileLastUpdated));
RptViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("FileDetails", DataObject.EPSDetails));
RptViewer.RefreshReport();
}
Run Code Online (Sandbox Code Playgroud)
Xaml如下Mainwindow.Xaml
<Window x:Class="RDLWPF.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:viewer="clr-namespace:Microsoft.Reporting.WinForms;assembly=Microsoft.ReportViewer.WinForms"
Title="MainWindow" Height="350" Width="525" AllowsTransparency="False" >
<Grid x:Name="GrdRow">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
</Grid>
Run Code Online (Sandbox Code Playgroud)
我只是得到空的XAML窗口.报告控件也不会显示.我知道我犯了一个错误,却找不到它是什么.有谁可以为我纠正这个问题.此外,如果有人可以在MVVM appraoch中向我发送代码示例,这也很棒
谢谢并问候Venkatesh
"DoEvents"在vb6中做了什么?为什么我收到错误消息"堆栈空间不足"?这是什么意思 ?
如果在C#中的DateTime类型上使用增量运算符(++)会发生什么?
例如,如果我这样做:
DateTime blah = new DateTime(2010, 12, 24);
blah++;
Run Code Online (Sandbox Code Playgroud)
什么会变成什么?这会增加一个刻度还是一天?
或者这甚至是合法的?
我周围没有开发环境,也不会有几天,或者我会试着找出来.我太好奇不能等待,所以我想我会问社区.