问题列表 - 第22545页

针对具有API支持的SMS网关的建议

我正在构建一个需要通过短信发送通知的Web应用程序.

具有API支持的SMS网关服务提供商满足以下要求:

  • 可靠
  • 全球交付 - 我将在全球发送,没有特定区域发送给其他人
  • 理想的便宜

你有什么建议?为什么?

api

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

在静态类中存储连接(ASP.NET)

由于我使用Postgresql并且无法使用LINQ to SQL,因此我编写了自己的包装类.

这是Student课程的一部分:

public class Student : User
{
    private static NpgsqlConnection connection = null;

    private const string TABLE_NAME = "students";

    public int Id { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public string Password { get; set; }

    /// <summary>
    /// Reads data from the data reader and moves it to the Student class.
    /// </summary>
    private static void ReadFields(Student student, NpgsqlDataReader dr)
    {
        student.Id = Int32.Parse(dr["id"].ToString());
        student.FirstName …
Run Code Online (Sandbox Code Playgroud)

database asp.net static class

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

格式化一个数字保持其在PHP中的标志

有没有办法在PHP中格式化一个始终保持其符号(+或 - )的数字?

在.NET中,这将是这样的:

string myString = number.ToString("+#;#");
Run Code Online (Sandbox Code Playgroud)

php number-formatting

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

如何加载联系人照片?

我在Android中为联系人加载照片时遇到问题.我已经google了一个答案,但到目前为止已经空了.有没有人有查询联系人,然后加载照片的例子?

因此,给定一个来自一个名为using的Activity结果的contactUri

startActivityForResult(new Intent(Intent.ACTION_PICK,ContactsContract.CommonDataKinds.Phone.CONTENT_URI),PICK_CONTACT_REQUEST) 
Run Code Online (Sandbox Code Playgroud)

是:

内容://com.android.contacts/data/1557

loadContact(..)工作正常.但是,当我调用getPhoto(...)方法时,我得到了照片InputStream的空值.它也令人困惑,因为URI值不同.contactPhotoUri评估为:

内容://com.android.contacts/contacts/1557

请参阅下面代码中的内联注释.

 class ContactAccessor {

    /**
     * Retrieves the contact information.
     */
    public ContactInfo loadContact(ContentResolver contentResolver, Uri contactUri) {

        //contactUri --> content://com.android.contacts/data/1557

        ContactInfo contactInfo = new ContactInfo();

        // Load the display name for the specified person
        Cursor cursor = contentResolver.query(contactUri,
                                            new String[]{Contacts._ID, 
                                                         Contacts.DISPLAY_NAME, 
                                                         Phone.NUMBER,
                                                         Contacts.PHOTO_ID}, null, null, null);
        try {
            if (cursor.moveToFirst()) {
                contactInfo.setId(cursor.getLong(0));
                contactInfo.setDisplayName(cursor.getString(1));
                contactInfo.setPhoneNumber(cursor.getString(2));
            }
        } finally {
            cursor.close();
        }        
        return contactInfo;  // <-- returns info for contact
    }

    public Bitmap …
Run Code Online (Sandbox Code Playgroud)

android contactscontract

43
推荐指数
5
解决办法
8万
查看次数

限制在CodeIgniter中直接访问您的视图文件?

我是CodeIgniter的新手,我想知道限制直接访问您的视图文件是否被视为一种好习惯?显然,它们将包含许多依赖变量的php代码,以及未从控制器传递给它们的内容,因此,如果直接访问php代码,则很容易出错,不是吗?

额外的问题:为什么助手文件夹,库文件夹,钩子文件夹等在应用程序文件夹中为空?

谢谢你的时间。

php codeigniter

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

C#:通过TextReader的ReadLine()解析带有一个分隔符的字符串的有效方法是什么?

C#:对于TextReader的每个ReadLine(),用一个分隔符解析字符串有什么有效的方法?

我的目标是将ListView的代理列表加载到从.txt文件读取的两列(代理|端口)中.我如何继续使用分隔符":"将每个readline()拆分为代理和端口变量?

这是我到目前为止所得到的,

    public void loadProxies(string FilePath)
    {
        string Proxy; // example/temporary place holders
        int Port; // updated at each readline() loop.

        using (TextReader textReader = new StreamReader(FilePath))
        {
            string Line;
            while ((Line = textReader.ReadLine()) != null)
            {
                // How would I go about directing which string to return whether
                // what's to the left of the delimiter : or to the right?
                //Proxy = Line.Split(':');
                //Port = Line.Split(':');

                // listview stuff done here (this part I'm familiar with already) …
Run Code Online (Sandbox Code Playgroud)

c# listview split

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

clickonce - clickonce的一个很好的开源替代品?(DDay.Update)?

什么是clickonce的开源替代品?我觉得最受欢迎和积极开发的一个?

谢谢

PS.我从搜索中得到了一些,但是会感谢人们的反馈如何审查这些,并了解哪个是最受欢迎/值得先研究的.

clickonce auto-update dday

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

如何将String数组中的所有项添加到Java中的向量中?

我的代码看起来像这样:

Vector<String> My_Vector=new Vector<String>();
String My_Array[]=new String[100];

for (int i=0;i<100;i++) My_Array[i]="Item_"+i;
......
My_Vector.addAll(My_Array);
Run Code Online (Sandbox Code Playgroud)

但是我收到了一条错误消息,正确的方法是什么,没有循环添加每个项目?

坦率

java arrays string vector add

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

TFS 2010与Axosoft OnTime相比有哪些优势?

我目前正在创建一个商业案例,推出TFS 2010作为我们的源代码控制和错误/发布管理工具.

我们目前使用OnTime作为我们的SCM的bug跟踪软件和颠覆.

我想知道TFS 2010比OnTime有什么优势?

到目前为止,我已经做了一些思考,并希望听到回复:

  • TFS 2010允许链接变更集 - >工作项 - >构建
  • TFS 2010提供了比OnTime更高的工作流自定义
  • TFS 2010已集成到Visual Studio IDE中 - 这需要打开更少的应用程序并减少窗口轻弹

提前致谢.

tfs ontime

7
推荐指数
3
解决办法
5687
查看次数

使用Numpy查找一组点中的平均距离

我在未知的维空间中有一系列点,例如:

data=numpy.array(
[[ 115, 241, 314],
[ 153, 413, 144],
[ 535, 2986, 41445]])
Run Code Online (Sandbox Code Playgroud)

我想找到所有点之间的平均欧氏距离.

请注意,我有超过20,000点,所以我想尽可能高效地完成这项工作.

谢谢.

python algorithm performance numpy distance

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