问题列表 - 第42161页

柠檬的力量与否?

对于语法分析器,我曾经与Bison "玩",它有其优点/缺点.

上周,我在SqLite网站上注意到该引擎已经完成了另一个语法分析器: Lemon

阅读精简文档后听起来很棒.
你有关于这个解析器的一些反馈吗?

无法真正看到谷歌和维基百科上的相关信息(只是一些例子,相同的教程)它似乎不太受欢迎.(Stack Overflow中没有标签[编辑:现在有:P])

c parsing bison parser-generator lemon

18
推荐指数
2
解决办法
3177
查看次数

解析多线程make的输出(-j N)

我在公共目录中有很多源目录.当我通过发出命令开始make:

make -j 4
Run Code Online (Sandbox Code Playgroud)

我从make的线程和调用的gcc编译器实例中收到了很多字符串.对于解析错误,我必须运行make两次,第二次使用一个线程:

make -j 1
Run Code Online (Sandbox Code Playgroud)

所以我可以正确解析make的输出.

有没有办法运行多线程make一次并正确地决定哪个错误与哪个项目(源目录)相关?

谢谢!

parsing multithreading gcc makefile

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

通过发送报告发送短信

我使用GSM通信库(GSMComm)与GSM调制解调器发送和接收SMS.如何通过发送报告发送短信?如何获取发送消息的状态?

c# windows sms

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

如何在Floyd-Warshall算法中输出最短路径?

我正在尝试实现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)

c# algorithm floyd-warshall

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

在ImageView中获取可绘制的ID

我有一个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 android-imageview android-drawable

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

在Android上加密图像文件 - 密码(输出|输入)流问题

我正在尝试使用基于密码的加密来加密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)

java android

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

在运行时获取android os版本

可能重复:
android获取系统版本

我必须在运行时检测当前的android os版本.我怎么能这样做,如果有人知道请帮助我.

android

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

在WPF中访问SQL Server报表查看器控件

我试图在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

wpf reportviewer

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

"DoEvents"在vb6中做了什么?

"DoEvents"在vb6中做了什么?为什么我收到错误消息"堆栈空间不足"?这是什么意思 ?

vb6 doevents

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

增量运算符(++)如何在C#中的DateTime上工作

如果在C#中的DateTime类型上使用增量运算符(++)会发生什么?

例如,如果我这样做:

DateTime blah = new DateTime(2010, 12, 24);

blah++;
Run Code Online (Sandbox Code Playgroud)

什么会变成什么?这会增加一个刻度还是一天?

或者这甚至是合法的?

我周围没有开发环境,也不会有几天,或者我会试着找出来.我太好奇不能等待,所以我想我会问社区.

c# datetime operator-overloading

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