有没有办法在bootstrap 4中禁用响应式navBar?我不希望移动版本中的下拉菜单仍然可以看到该品牌旁边的2个链接.作为一个加号,我想知道是否可以将链接放在栏中的右侧.Pull-xs-right似乎无法正常工作.
我当前的代码如下所示:
<nav class="navbar navbar-fixed-top navbar-toggleable-sm navbar-light bg-faded">
<a href="/" class="navbar-brand">PIM</a>
<ul class="nav navbar-nav pull-xs-right">
<li class="nav-item"><Link class="nav-link" to="/login">Login</Link></li>
<li class="nav-item"><Link class="nav-link" to="/signup">Sign up</Link></li>
</ul>
</nav>
Run Code Online (Sandbox Code Playgroud)
首先十分感谢.
我正在使用UNUserNotificationCenterDelegate(> ios 10)和其中一个委托方法,我可以检查来自通知的响应总是actionIdentifier等于"com.apple.UNNotificationDefaultActionIdentifier",无论我做什么."response.notification.request.content.categoryIdentifier"是正确的,具有预期值,但request.actionIdentifier永远不会正确(下面的示例中为"mycustomactionidentifier").有谁知道我错过了什么?
extension NotificationManager: UNUserNotificationCenterDelegate {
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Swift.Void) {
completionHandler([.alert,.sound])
}
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Swift.Void) {
if response.notification.request.content.categoryIdentifier == "TEST" {
if response.actionIdentifier == "mycustomactionidentifier" {
NSLog("it finally works dude!")
}
}
completionHandler()
}
}
Run Code Online (Sandbox Code Playgroud)
我将操作和类别添加到通知中心:
let uploadAction = UNNotificationAction(identifier: "mycustomactionidentifier", title: "Uploaded", options: [])
let category = UNNotificationCategory(identifier: "TEST", actions: [uploadAction], intentIdentifiers: [])
center.setNotificationCategories([category])
Run Code Online (Sandbox Code Playgroud)
并发送请求正确的标识符:
let uploadContent = …Run Code Online (Sandbox Code Playgroud) 是否有一种简单的方法来声明字典或将 SQL 结果(查找活动)转换为字典?
例子:
SQL 查找响应:
{
"Id": "12313ased",
"Name": "john"
},
{
"Id": "123dsada",
"Name": "doe"
}
Run Code Online (Sandbox Code Playgroud)
我想要什么:(
Dict("12313ased": "john", "123dsada", "doe")或者任何最适合此目的的 Azure 数据工厂格式)。
我正在尝试使用 Spring Data/Crud Repository(.save) 在 DB 中保存一个实体,其中包含另一个通过 @Cache 方法加载的实体。换句话说,我试图保存一个包含 Attributes 实体的 Ad Entity,并且这些属性是使用 Spring @Cache 加载的。
因此,我将分离的实体传递给持久性异常。
我的问题是,有没有办法保存实体仍然使用@Cache 作为属性?
我查了一下,但找不到任何人做同样的事情,特别是我知道我使用的 CrudRepository 只有方法 .save(),据我所知,它管理持久化、更新、合并等。
很感谢任何形式的帮助。
提前致谢。
广告.java
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "ad")
public class Ad implements SearchableAdDefinition {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne(fetch = FetchType.LAZY, optional = false)
private User user;
@OneToMany(mappedBy = "ad", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
private Set<AdAttribute> adAttributes;
(.....) }
Run Code Online (Sandbox Code Playgroud)
广告属性.java
@Entity
@Table(name = "attrib_ad")
@IdClass(CompositeAdAttributePk.class)
public class AdAttribute {
@Id
@ManyToOne(fetch …Run Code Online (Sandbox Code Playgroud) azure ×1
bootstrap-4 ×1
hibernate ×1
ios ×1
ios10 ×1
jpa ×1
navbar ×1
spring ×1
spring-data ×1
swift ×1