首页 \ 问答 \ 没有MongoJS的Node.js + MongoDB(Node.js + MongoDB without MongoJS)

没有MongoJS的Node.js + MongoDB(Node.js + MongoDB without MongoJS)

如果我可以使用连接到MongoDB的Node.JS而没有加载MongoJS模块,那么问题就像你可能已经从title中猜到的那样。

我想最大限度地减少应用程序,因此加载外部模块将加载客户端。 MongoJS还有哪些其他选择?


Question is as you might have guessed from title, if I can use Node.JS with connected to MongoDB, without loaded MongoJS module.

I want to minimize application on maximum, so loading external module will load client. What are other alternatives to MongoJS?


原文:https://stackoverflow.com/questions/13963079
更新时间:2022-05-25 08:05

最满意答案

你可以做,如果数据与你同在

if([textField.text length] > 0 || textField.text != nil)
    {
        for(int i = 0; i < [array1 count]; i++)
        {
                NSString *strName = [NSString stringWithFormat:@"%@", [[array1 objectAtIndex:i] valueForKey:@"value"]];         
                if([[strName lowercaseString] hasPrefix:[newString lowercaseString]])
                {
                    [array2 addObject:[array1 objectAtIndex:i]];
                }
            }
        }
    }

添加此代码

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string

根据你的框架在你的UITextField下面添加一个UITableView 。 在UITableView显示Array2详细信息。

试试这可能会帮助你


You Can Do, If The Data is With You

if([textField.text length] > 0 || textField.text != nil)
    {
        for(int i = 0; i < [array1 count]; i++)
        {
                NSString *strName = [NSString stringWithFormat:@"%@", [[array1 objectAtIndex:i] valueForKey:@"value"]];         
                if([[strName lowercaseString] hasPrefix:[newString lowercaseString]])
                {
                    [array2 addObject:[array1 objectAtIndex:i]];
                }
            }
        }
    }

Add This Code in

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string

Add A UITableView below your UITextField According To your Frame. Display the Array2 Details in UITableView.

Try This it May Helps You

相关问答

更多
  • 尝试使用jquery-ui给出小部件 自动完成 Try jquery-ui given widget auto complete
  • 你可以做这样的事情 这就是你要找myAutocomplete.autocomplete("search", $(this).val()); var myAutocomplete = $('input#name').autocomplete({ source: availableTags, minLength: 1 }); $('input#postal').keyup(function(){ console.log('keypress'); myAutocomplete.au ...
  • Google Suggest API似乎正是您所寻找的: http://blogoscoped.com/archive/2006-08-17-n22.html 您可以在该页面上进行尝试,当您单击“提交”时,它将以XML形式显示您的查询结果。 然后,在Android上你会使用一个XML解析器,这里有一个很好的例子: http://www.ibm.com/developerworks/opensource/library/x-android/ 以下是解析XML的官方Android文档: http : //dev ...
  • 那么..到目前为止,我发现了一个简单的解决方案,但不幸的是,它不是完全适合我:( 有一个Filters插件 。 它将在列的子菜单中添加一个新项目并搜索包含在Store中的数据。 正如我告诉它不是我正在寻找什么,所以我会尝试实现它的行为,通过文本字段搜索按钮。 如果有人会有意见; 我会很高兴... 以下是一个示例屏幕截图: Well.. so far I found a simple solution for my question but unfortunately it is not the comple ...
  • 您可以使用您希望在网页中按下的按键来阻止Firefox的搜索框。 所有其他人仍然会打开搜索框 - 这可能是一个很好的功能。 例如,如果您希望输入数字键1 - 4,您可以使用: $(window).keypress(function(e) { var keycode = (e.keyCode ? e.keyCode : e.which); // Prevent default for keys 1, 2, 3, 4 if (keycode === 49 || keycode === 50 || k ...
  • 在ImageMagick中,有一个连接组件工具,可以通过一些小小的unix脚本来做你想做的事情。 它只适用于字符间有白色分隔的情况。 我相信OpenCV也有类似的东西。 输入: 让我们从连接组件开始显示返回的文本数据: convert rUNOP.png -alpha off -threshold 50% -type bilevel \ -define connected-components:verbose=true \ -connected-components 4 null: | sed 's/^[ ...
  • 尝试这样的事情,您可能需要稍微更改代码以适合您, 在你的脚本部分: $("#individual_name").autocomplete({ source : base_url+"controller_name/suggest_names", minLength : 1, select: function( event, ui ) { alert('id :'+ui.item.value) ; //document.locat ...
  • 您可能需要考虑Apache Solr ,它是Lucene的Web服务封装,并在像Tomcat这样的J2EE容器中运行。 你会得到术语建议,拼写检查,移植,阻止等等。 这真的很棒。 请参阅此处以获取与查询相关的功能的完整列表。 Solr有Django和PHP库。 我不建议将Google Suggest用于这样一个专门的语料库,而对于Solr,你不需要它。 希望这可以帮助。 You might want to consider Apache Solr, which is a web service encaps ...
  • 你可以做,如果数据与你同在 if([textField.text length] > 0 || textField.text != nil) { for(int i = 0; i < [array1 count]; i++) { NSString *strName = [NSString stringWithFormat:@"%@", [[array1 objectAtIndex:i] valueForKey:@"value"]]; ...

相关文章

更多

最新问答

更多
  • 使用通配符获取更多servlet请求变量[重复](Get more servlet request variables using wildcards [duplicate])
  • 返回相同的集合类型,参数化不同(Returning same collection type, differently parameterised)
  • C ++朋友函数模板重载和SFINAE在clang ++,g ++,vc ++中的不同行为(C ++ 14模式)(C++ friend function template overloading and SFINAE different behaviors in clang++, g++, vc++ (C++14 mode))
  • 与paure IoT-Hub的Python paho-MQTT连接(Python paho-MQTT connection with azure IoT-Hub)
  • 编译器警告“来自不同的Objective-C类型的赋值”(Compiler warning “assignment from distinct objective-c type”)
  • C ++编译错误(在此函数中未初始化)[重复](C++ Compile Error (uninitialized in this function) [duplicate])
  • unsigned-signed下溢机制(unsigned-signed underflow mechanism)
  • 快速行查询的数据结构?(Data structure for fast line queries?)
  • 饥荒有手机安卓版的吗
  • Jquery可拖动碰撞检测错误(Jquery draggable collision detection bug)
  • sql调优是怎样来实现的?
  • 无法使占位符输入文本消失(Unable to make the placeholder input text disappear)
  • jQuery改变了两个div的CSS属性(JQuery change CSS property of two div's)
  • JDK中包含的库版本(Versions of libraries included in the JDK)
  • 请问下载的是出现ASP是什么意思
  • Firebase MLkit用于数字液晶显示器的文本识别(Firebase MLkit Text recognition for digital lcd displays)
  • 我可以在任何平台上运行C和C ++吗?(Can I run C and C++ on any platform?)
  • 让小组在C#的特定位置(get panel at specific positions in C#)
  • Nagios为通知设置了更高的间隔(Nagios set higher interval for notifications)
  • 无法向SMTP主机发送电子邮件(unable to send an email to SMTP host)
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何在.NET代码中验证全球邮政编码(How can I validate worldwide postal codes in my .NET code)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • Clojure:减少大型懒惰收集会占用内存(Clojure: Reducing large lazy collection eats up memory)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • 显示作为字符串的SVG(Showing an SVG that I have as a string)
  • 从jansson库里创建json请求的自由内存的正确方式是什么?(what is the proper way of free memory in creating json request from jansson libary?)
  • jQuery插件无法正常工作 - 它是附加的(jQuery plugin not working - it's appended)
  • 使用stat_summary自动调整ylim(Automatically adjusting ylim with stat_summary)