首页 \ 问答 \ 前言是否有html标签(Is there an html tag for foreword)

前言是否有html标签(Is there an html tag for foreword)

我正在尝试创建一个网站,其中包含相当多的文章,并希望在更重要的文章中使用前言,我已经进行了搜索,但找不到任何似乎可以确定如何做到这一点的内容。 我能想到的只是使用粗体标签......是否有前言的html标签,如果没有,那么标记这个的最具语义的方法是什么?

<p>
    <foreword>
        The start of the article would go in here, typically the first sentence of the article.
    </foreword>
    Rest of the text for the article would go here.
</p>

I'm trying to create a site that has quite a few articles and wanting to have forewords in the more important ones, I've had a search and can't find anything that seems to identify what to do for this. All I can think of is using bold tags... Is there an html tag for foreword and if not, what's the most semantic way to tag this?

EXAMPLE

<p>
    <foreword>
        The start of the article would go in here, typically the first sentence of the article.
    </foreword>
    Rest of the text for the article would go here.
</p>

原文:https://stackoverflow.com/questions/23508208
更新时间:2022-05-24 19:05

最满意答案

如果您的代码在第一个[realm beginWriteTransaction];停止[realm beginWriteTransaction]; 声明,这似乎意味着另一个写事务已在其他地方打开。

Realm只允许一个事务一次修改磁盘上的数据,并故意停止任何新事务,直到当前事务完成为止。 我建议为初学者调查一下。 您可以通过-[RLMRealm inWriteTransaction]属性检查RLMRealm是否已经在事务中。 :)

此外,如果批量写入尽可能少的事务,Realm会更好。 由于您在for循环中为每次迭代打开和关闭事务,因此您在那里创建了2000个单独的事务,这可能会轻易地降低Realm的速度。

如果您将代码组织成这样,代码可能会更快地运行:

[realm beginWriteTransaction];
for (int i = 0 ; i < 2000; i++) {
    PeopleInformation *info = [[PeopleInformation alloc] init];

    info.name = [NSString stringWithFormat:@"%@ %d",@"Rohit",i];
    info.city = @"Delhi";

    [realm addObject:info];
}
[realm commitWriteTransaction];

让我知道这是否有帮助!


If your code is halting at the first [realm beginWriteTransaction]; statement, that would seem to imply that another write transaction is already open somewhere else.

Realm only allows one transaction to modify the data on disk at a time, and it intentionally stops any new transactions starting until the current one has finished. I'd recommend looking into that for starters. You can check to see if a RLMRealm is already in a transaction through the -[RLMRealm inWriteTransaction] property. :)

Additionally, Realm works better if you batch writes into as few transactions as possible. Since you're opening and closing a transaction for each iteration in that for loop, you're creating 2000 separate transactions there, which could easily slow Realm down.

Your code might run more quickly if you structured it like this instead:

[realm beginWriteTransaction];
for (int i = 0 ; i < 2000; i++) {
    PeopleInformation *info = [[PeopleInformation alloc] init];

    info.name = [NSString stringWithFormat:@"%@ %d",@"Rohit",i];
    info.city = @"Delhi";

    [realm addObject:info];
}
[realm commitWriteTransaction];

Let me know if that helped at all!

相关问答

更多
  • 使用设备的当前区域设置将是执行此操作的正确方法。 您无法找到应用程序从哪个应用商店区域下载。 此外,区域设置将告诉您用户喜欢哪种语言/区域设置,GPS或当前位置只会告诉您它们的位置。 例如,我将我的iPhone设置为英国的地方,但我可能去法国度假。 如果我在法国时下载了一个应用程序,我不希望它被设置为法国用户只是因为我就是这样。 区域设置是用户选择的首选项,它不会随用户更改位置而更改。 Using the device's current locale would be the proper way to ...
  • 没有神奇的Frame.OnExit方法。 你在混合框架和应用程序。 与其他窗口一样,框架关闭。 Apps退出。 所以,你可以把你的代码放在你的应用程序类的OnExit方法中。 但这不是你想要的。 看看这个 OnExit方法的简单教程 。 同样,这不是你想要的,但你应该知道它是如何工作的(以及它被调用的对象)。 您始终可以绑定EVT_CLOSE以在窗口中调用任何您想要的内容。 但你必须明确地做到这一点。 通常情况下,你会调用方法OnClose或OnCloseWindow 。 调用OnExit只会导致重大混淆( ...
  • 首先在清单文件中将android:debuggable设置为true。 其次,在Android设备的设置中打开install apk from unknown sources并打开allow to debug through usb developer settings allow to debug through usb设置allow to debug through usb或者有点(不知道这是如何调用英语,我有俄语界面)。 然后在调试模式下运行代码,在IDE中按下debug按钮。 并且还尝试在super ...
  • 当前模式版本应通过领域配置在应用程序中设置,并且您应该增加它,在您将代码模式版本设置为3的代码中,并且如果oldSchemaVersion小于3,将模式版本设置为4,并要求领域迁移领域,工作 var config = Realm.Configuration( // Set the new schema version. This must be greater than the previously used // version (if you've never ...
  • 当停止运行应用程序的Xcode时,它停止从应用程序接收消息。 当你从模拟器再次运行时,Xcode对新进程一无所知。 When you stop Xcode running an application it stops receiving messages from the app. And when you running it again from Simulator Xcode knows nothing about new process.
  • 要停止使用TelephonyManager,您可以“取消注册”侦听器: telephonyManager.listen(callStateListener, PhoneStateListener.LISTEN_NONE); 这样就不需要杀死应用了。 请参阅TelephonyManager的文档 。 此外, www.developer.android.com是一个了解更多和查看文档的好地方。 To stop using the TelephonyManager you can 'unregister' th ...
  • 如果您的代码在第一个[realm beginWriteTransaction];停止[realm beginWriteTransaction]; 声明,这似乎意味着另一个写事务已在其他地方打开。 Realm只允许一个事务一次修改磁盘上的数据,并故意停止任何新事务,直到当前事务完成为止。 我建议为初学者调查一下。 您可以通过-[RLMRealm inWriteTransaction]属性检查RLMRealm是否已经在事务中。 :) 此外,如果批量写入尽可能少的事务,Realm会更好。 由于您在for循环中为每 ...
  • 就像从磁盘中删除Realm文件一样,如果您的应用程序当前没有打开Realm文件,则可以安全地替换磁盘上的Realm文件。 从Realm的删除Realm文件的文档: 由于Realm避免将数据复制到内存中,除非绝对需要,因此Realm管理的所有对象都包含对磁盘上文件的引用,并且必须先释放它才能安全删除文件。 这包括从Realm,所有List , Results和ThreadSafeReference对象以及Realm本身读取(或添加)的所有对象。 实际上,这意味着删除Realm文件应该在应用程序启动之前在打开R ...
  • 正如Android文档中提到的那样 请注意,对Context.startService()的多次调用不会嵌套(尽管它们会导致对onStartCommand()的多次相应调用),因此无论启动多少次,一旦Context.stopService()或stopSelf将停止服务() 叫做; 但是,服务可以使用它们的stopSelf(int)方法来确保在处理完启动意图之前不停止服务。 所以在你的问题上 what would happen if I call startService() for an already ...
  • 尝试在浏览器中查看Google地图Web服务 ,我认为它也不起作用。 由于Google Map API已更改 ,现在为版本2 请查看以下链接: https : //developers.google.com/maps/documentation/android/ Try to check Google map Web-Service in Browser, I think it also not work too. Because Google Map API is changed, now it Vers ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。