mixed

sqlalchemy how to using AND in OR operation?

淺唱寂寞╮ 提交于 2019-12-05 11:04:14
i need to do this query: SELECT * FROM tbl_member WHERE (member_type==1 AND member_status==1) OR (member_type==2 and member_status==2) i've tried: q=session.query(tbl_member) \ .filter(or_(and_(tbl_member.member_type==1,tbl_member.member_status==1), \ and_(tbl_member.member_type==2,tbl_member.member_status==2))) and q=session.query(tbl_member) \ .filter(or_((and_(tbl_member.member_type==1,tbl_member.member_status==1)), \ (and_(tbl_member.member_type==2,tbl_member.member_status==2)))) the query sql still like this: SELECT * FROM tbl_member WHERE member_type==1 AND member_status==1 OR member

JAXB XJC compiler disregarding mixed=true on XML Schema documents

筅森魡賤 提交于 2019-12-03 01:05:28
XJC seems to be completely ignoring mixed="true" on my XML Schema elements thereby not allowing me to extract text content. From the sample XML below, I need to be able to extract "Title Text." Without mixed="true" being recognized, no accessor is created nor is it unmarshalled from XML: <?xml version="1.0" encoding="UTF-8"?> <title xmlns="urn:hl7-org:v3" integrityCheck="true">Title Text</title> Here's a complete but minimized schema that demonstrates the problem: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <xs:schema targetNamespace="urn:hl7-org:v3" xmlns:xs="http://www.w3.org/2001

Error: Invalid character in name at (1)

只谈情不闲聊 提交于 2019-12-02 03:40:34
I am trying to compile a fortran file along with some .h files in FORTRAN. The .h files contain definition for common blocks of variable. When I compile them in Fortran, I get the following error: integer knue,ke,knumu,kmu,knutau,ktau,ku,kd,kc,ks,kt,kb,kgamma, 1 Error: Invalid character in name at (1) The code where this error occurs is, Now my question is, does this "1" point where the error is? The lines of code which this errors points is, integer knue,ke,knumu,kmu,knutau,ktau,ku,kd,kc,ks,kt,kb,kgamma, & kw,kz,kgluon,kh1,kh2,kh3,khc,ksnue,kse1,kse2,ksnumu,ksmu1, & ksmu2,ksnutau,kstau1

Error: Invalid character in name at (1)

醉酒当歌 提交于 2019-12-02 01:41:14
问题 I am trying to compile a fortran file along with some .h files in FORTRAN. The .h files contain definition for common blocks of variable. When I compile them in Fortran, I get the following error: integer knue,ke,knumu,kmu,knutau,ktau,ku,kd,kc,ks,kt,kb,kgamma, 1 Error: Invalid character in name at (1) The code where this error occurs is, Now my question is, does this "1" point where the error is? The lines of code which this errors points is, integer knue,ke,knumu,kmu,knutau,ktau,ku,kd,kc,ks

check if is multibyte string in PHP

梦想的初衷 提交于 2019-11-29 15:33:03
问题 I want to check if is a string type multibyte on PHP. Have any idea how to accomplish this? Example: <?php! $string = "I dont have idea that is what i am..."; if( is_multibyte( $string ) ) { echo 'yes!!'; }else{ echo 'ups!'; } ?> Maybe( rule 8 bytes ): <?php if( mb_strlen( $string ) > strlen() ) { return true; } else { return false; } ?> I read: Variable width encoding - WIKI and UTF-8 - WIKI 回答1: There are two interpretations. The first is that every character is multibyte. The second is

Facebook 'Like' button breaks https/SSL

巧了我就是萌 提交于 2019-11-28 19:45:00
On an e-commerce website I maintain, I added a Facebook 'Like' button per the instructions here: http://developers.facebook.com/docs/reference/plugins/like I am using the iframe method: <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fexample.com%2Fpage%2Fto%2Flike&layout=standard&show_faces=true&width=450&action=like&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"> </iframe> It works, but if a customer happens to be logged into her account, she gets the infamous " mixed

how to select max of mixed string/int column?

て烟熏妆下的殇ゞ 提交于 2019-11-28 09:55:09
Lets say that I have a table which contains a column for invoice number, the data type is VARCHAR with mixed string/int values like: invoice_number ************** HKL1 HKL2 HKL3 ..... HKL12 HKL13 HKL14 HKL15 I tried to select max of it, but it returns with "HKL9", not the highest value "HKL15". SELECT MAX( invoice_number ) FROM `invoice_header` nakosspy HKL9 (string) is greater than HKL15 , because they are compared as strings. One way to deal with your problem is to define a column function that returns only the numeric part of the invoice number. If all your invoice numbers start with HKL ,

http content on a https page - Mixed content

大兔子大兔子 提交于 2019-11-28 06:20:41
问题 I was wondering how I should do this. I have some https pages, but need to call in some http content from my CDN provider. The content I am wanting to load via http is javascript, css and images. Now when doing this at the moment, some browsers give a mixed content warning, and ask if to show just secure or all content. What I would like to do, is get around this, and give no warning, but keep the https page. All I can come up with is: Make a PHP script that uses cURL or file_get_contents,

Sorting a mixed list of ints and strings

感情迁移 提交于 2019-11-27 16:32:31
I am trying to sort the following mixed list of ints and strings, but getting a TypeError instead. My desired output order is sorted integers then sorted strings. x=[4,6,9,'ashley','drooks','chay','poo','may'] >>> x.sort() Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> x.sort() TypeError: '<' not supported between instances of 'str' and 'int' You can pass a custom key function to list.sort : x = [4,6,9,'ashley','drooks','chay','poo','may'] x.sort(key=lambda v: (isinstance(v, str), v)) # result: # [4, 6, 9, 'ashley', 'chay', 'drooks', 'may', 'poo'] This key function

Facebook 'Like' button breaks https/SSL

こ雲淡風輕ζ 提交于 2019-11-27 12:30:55
问题 On an e-commerce website I maintain, I added a Facebook 'Like' button per the instructions here: http://developers.facebook.com/docs/reference/plugins/like I am using the iframe method: <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fexample.com%2Fpage%2Fto%2Flike&layout=standard&show_faces=true&width=450&action=like&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"> <