对不起我的英语不好...
我有一个为西班牙开发的rails应用程序,因此,所有内容都是西班牙语,所以,我有一个搜索框在mysql数据库中搜索,所有行都是西班牙语,我想改进我的搜索,以允许用户以单数或复数形式搜索关键字,例如:
keyword: patatas
found: patata
keyword: veces
found: vez
keyword: vez
found: veces
keyword: actividades
found: actividad
Run Code Online (Sandbox Code Playgroud)
在英语中,在单一化和复数化方法的帮助下,这可能相对容易...
where `searching_field` like '%singularized_keyword%' or `searching_field` like '%pluralized_keyword%'
Run Code Online (Sandbox Code Playgroud)
但是,对于西班牙语....
一些帮助?
谢谢!
我有一个小问题,我不知道如何解决.我将从课程中给出who; e代码,以便您可以看到它的作用:
{
class CompetitorDataFile
{
//collection of DataFileRecords - people
public List<DataFileRecord> DataFileRecords;
public string FileName = "";
//called when DataFile created
public CompetitorDataFile(string FileName)
{
//creates the collection
DataFileRecords = new List<DataFileRecord>();
this.FileName = FileName;
}
//fill DataFileRecords with stuff from text file
public void ReadDataFile()
{
foreach (string s in File.ReadAllLines(FileName))
{
if (s == "") continue;
DataFileRecord dfr = new DataFileRecord();
dfr.Name = s.Split(',')[0];
dfr.CPSA = s.Split(',')[1];
dfr.PostCode = s.Split(',')[2];
dfr.Rank = s.Split(',')[3];
dfr.Score1 = s.Split(',')[4]; …Run Code Online (Sandbox Code Playgroud) 我想做以下事情:
aa: ________
bbbb: ________
ccc: ________
Run Code Online (Sandbox Code Playgroud)
所以我写道:
<span>aa:</span><input type="text" /><br/>
<span>bbbb:</span><input type="text" /><br/>
<span>cc:</span><input type="text" />
Run Code Online (Sandbox Code Playgroud)
我得到:
aa:________
bbbb:________
ccc:________
Run Code Online (Sandbox Code Playgroud)
我知道我可以用桌子轻松安排。如果没有尽可能少的 css 表格,我该如何做到这一点。
谢谢。
没有太多运气,我在Razor中有以下if/else语句,效果很好
<small>
@if(deletedView){
@:Deleted
}
else {
@:Created
} by
</small>
Run Code Online (Sandbox Code Playgroud)
我想做这样的事情:
<small>
@(deletedView) ? @:Deleted : @:Created by
</small>
Run Code Online (Sandbox Code Playgroud)
但那失败了.什么是正确的语法?
我有一堆排序date = desc等等的方法,它们是通过$_GET我想要获取所有$_GET变量($_GET['anythingatall'])并将它们转换$_GET['variable]=blah为&variable=blah
有一个简单的方法吗?
有没有办法从特定用户的播放列表中获取视频列表?我尝试了以下调用,但它似乎没有给我一个播放列表中的视频列表
饲料://gdata.youtube.com/feeds/users/USERNAME/playlists/PLAYLIST_ID
提前致谢,
斯科特
这可能看起来像一个愚蠢的问题.事实上,它更像是民意调查:你的Sonar数据库有多大?我需要这个来估计虚拟机托管我的Sonar实例的要求.
也:
我将不胜感激任何帮助.
我们目前通常会记录进出系统的所有XML文档,其中一些文档包含明确的密码.我们希望能够配置执行此操作的logback logger/appender来执行某些模式匹配或类似操作,如果它检测到存在替换它的密码(最有可能使用星号).注意我们不想过滤掉日志条目,我们想要屏蔽它的一部分.我很感激有关如何使用logback完成此操作的建议.谢谢.
我一定是想念她的小事,但无法理解.试图创建一个比较日期,但我似乎无法将currentDate从GMT抵消到EST:
// current date (gmt) //
NSDate *currentDate = [NSDate date];
NSTimeZone *currentDateTimeZone = [NSTimeZone timeZoneWithAbbreviation:@"EST"];
NSDateFormatter *currentDateFormat = [[NSDateFormatter alloc]init];
[currentDateFormat setTimeZone:currentDateTimeZone];
[currentDateFormat setDateFormat:@"yyyy-MM-dd HH:mm:ss zzz"];
NSString *currentDateString = [currentDateFormat stringFromDate:currentDate];
NSLog(@"currentDateString: %@", currentDateString); // returns 2011-01-05 13:30:30 EST
NSDate *currentDateWithOffset = [currentDateFormat dateFromString:currentDateString];
NSLog(@"currentDateWithOffset: %@", currentDateWithOffset); // returns 2011-01-05 18:30:30 +0000
Run Code Online (Sandbox Code Playgroud)
谢谢!
编辑:
我正在使用以下行在一个单独的类中调用一个方法(尝试使其成为可移植的):
[Expiration expires:[[NSDate alloc] initWithString:@"2011-01-07 12:00:00 +0000"] within:1.0]
Run Code Online (Sandbox Code Playgroud)
在expires方法中,我有以下几行:
NSComparisonResult comparison = [currentDateWithOffset compare:expires]; // check for a fixed date to disable the demo
double …Run Code Online (Sandbox Code Playgroud) 我正在完成一个iPad应用程序,对我来说,这意味着填写dealloc我的课程中的所有方法.
我的笔尖中有很多视图,大多数都包含子视图(即UIViews,UILabels等).我应该在释放父母之前释放子视图吗?如果父视图被释放,它的子视图也会被释放吗?
样品:
-(void)dealloc
{
[super dealloc];
[childView release]; // Do I need this if I use the next line?
[parentView release]; // Will this perform the line above?
}
Run Code Online (Sandbox Code Playgroud)
这两个childView和parentView是我的视图控制器的性能.两者都被保留了下来.