我在我的rails项目中使用咖啡脚本,但问题是它只在我加载(刷新)页面而不是页面呈现时才有效,它也应该适用于页面视图更改.
这是我正在使用的脚本:
facebook.js.coffee
jQuery ->
$('body').prepend('<div id="fb-root"></div>')
$.ajax
url: "#{window.location.protocol}//connect.facebook.net/en_US/all.js"
dataType: 'script'
cache: true
window.fbAsyncInit = ->
FB.init(appId: env["app_id"], cookie: true)
$('#sign_in').click (e) ->
e.preventDefault()
FB.login (response) ->
window.location = '/auth/facebook/callback' if response.authResponse
$('#sign_out').click (e) ->
FB.getLoginStatus (response) ->
FB.logout() if response.authResponse
true
Run Code Online (Sandbox Code Playgroud) 我有很多使用“WHERE”子句的 sql 查询命令,我只是想知道我的 postgresql 搜索是否区分大小写。
例如:
Select * From myarea Where area_name = 'Jawa Barat1' --> not found
Select * from myarea Where area_name = 'jawa barat1' --> found
Run Code Online (Sandbox Code Playgroud)
如何关闭 postgresql 中区分大小写的搜索?
请不要建议我将sql命令更改为将两侧设置为小写。
期望 postgresql 区分大小写搜索(Mother = mother)