小编Mr *_*Neo的帖子

ZXing条码扫描器在片段中自定义布局

我在Android Studio上按照此页面开发了ZXing条形码连续扫描仪.

我的应用build.gradle包括:

repositories {
    mavenCentral()

    maven {
        url "https://raw.github.com/embarkmobile/zxing-android-minimal/mvn-repo/maven-repository/"
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile files('src/main/jniLibs/scanditsdk-android-4.7.5.jar')
    compile files('src/main/jniLibs/httpclient-4.0.jar')

    compile 'com.journeyapps:zxing-android-embedded:3.0.3@aar'
    compile 'com.google.zxing:core:3.2.0'
}
Run Code Online (Sandbox Code Playgroud)

Fragment.xml的布局:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#00CC00"
    android:orientation="vertical"
    android:weightSum="100">

    <com.journeyapps.barcodescanner.CompoundBarcodeView
        android:id="@+id/barcode_scanner"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="40"
        >

    </com.journeyapps.barcodescanner.CompoundBarcodeView>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dp"
        android:gravity="center"
        android:orientation="horizontal"
        android:weightSum="100"
        style="?android:attr/buttonBarStyle"
        >


        <Button
            android:id="@+id/btnStartScan"
            android:layout_width="0dp"
            android:layout_height="50dp"
            android:layout_weight="25"
            android:text="Start"
            android:background="@drawable/buttonstyle"
            style="@style/button_style"/>

        <Button
            android:id="@+id/btnStopScan"
            android:layout_width="0dp"
            android:layout_height="50dp"
            android:layout_weight="25"
            android:text="Stop"
            android:background="@drawable/buttonstyle"
            style="@style/button_style"/>

        <Button …
Run Code Online (Sandbox Code Playgroud)

android barcode-scanner zxing android-fragments

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

错误SIPEPS,版本= 5.0.0.0 UCMA 4.0 VS2010/VS2013

我在VS 2013和VS 2010上都开发了一个UCMA 4.0应用程序.运行项目时,我收到了这个错误:

无法加载文件或程序集'SIPEPS,Version = 5.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一.该系统找不到指定的文件.

我使用了.NET4并设置了目标构建平台x64.由dependwalker_x64检查,没有文件丢失.

我还使用了Sample中的App.config文件但没有工作,所以我更改了App.config文件,如下所示:

<runtime>
<assemblyBinding>
  <dependentAssembly>
    <assemblyIdentity name="SIPEPS" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
    <bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="5.0.0.0"/>
  </dependentAssembly>
</assemblyBinding>
Run Code Online (Sandbox Code Playgroud)

我该怎么做这个问题?非常感谢您的帮助!

c# visual-studio-2010 ucma lync-server-2013

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

在Excel和记事本中打开时,将数字格式化为CSV格式的文本

我收到了将数据保存在CSV文件中并将其发送给客户的要求.客户使用Excel和记事本来查看此文件.数据看起来像:

975567EB,973456CE,971343C8

我的数据有一些数字以"E3"结尾,如:

98765E3

因此,当在Excel中打开时,它将更改为:

9.8765E + 7

我编写了一个程序,通过在C#中添加="98765E3"将此格式更改为文本

while(!sr.EndOfStream) {
     var line = sr.ReadLine();
     var values = line.Split(',');

     values[0] = "=" + "\"" + values[0] + "\""; //Change number format to string

     listA.Add(new string[] {values[0], values[1], values[2], values[3]});
}
Run Code Online (Sandbox Code Playgroud)

但对于使用记事本打开CSV文件的客户,它会显示如下:

= "98765E3"

如何将数字保存为CSV文本以在Excel和记事本中打开并获得相同的结果?非常感谢任何建议!

c# csv excel notepad++

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

Google 放置 api 不返回几何图形

我正在使用“google Places autocomplete API”来使用 JavaScript 获取有关不同城市的数据,如下所示:

var service = new google.maps.places.Autocomplete(document.getElementById('search-btn'));
service.addListener('place_changed', function () { 
    var place = service.getPlace();
    console.log(place.geometry.location);
});
Run Code Online (Sandbox Code Playgroud)

问题:该对象没有 (lat,lng) 但有此消息

类型错误:“调用者”和“参数”是受限制的函数属性,无法在此上下文中访问。

在 Function.remoteFunction (:3:14)

在 Object.InjectedScript.callFunctionOn (:750:66)

javascript google-maps google-places-api

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

System.Timers.Timer.Elapsed事件未触发

Timer在Window Form Application上创建了新变量:

intervalTime = new System.Timers.Timer();
intervalTime.Interval = 5000;

intervalTime.Enabled = true;
Console.WriteLine(intervalTime.Enabled.ToString());
intervalTime.Elapsed += new ElapsedEventHandler(intervalTime_Elapsed);
Console.WriteLine(intervalTime.Enabled.ToString());
Run Code Online (Sandbox Code Playgroud)

Timer将每隔5秒执行一次ElapsedEvent:

void intervalTime_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
      //Do something....
}
Run Code Online (Sandbox Code Playgroud)

ElapsedEvent根本不开火.我应该如何解雇呢?我检查intervalTime.Enabledtrue.

我之前找到了这个问题,但它没有解决我的问题

c# timer

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