CUDNN_STATUS_SUCCESS (1 vs. 0) 如何处理呢?

win0下caffe训练时出现Check failed: status == CUDNN_STATUS_SUCCESS (1 vs. 0) CUDNN_STATUS_NOT_INITIALIZE如何处理呢???
图片说明

1个回答

经过测试,发现是电脑配置不行,建议更改一些设置,比如我的电脑compute capacity=2.1
在makefile.configure.examples中更改至如图所示:
图片说明

在CommonSettings.props更改如下配置
图片说明
之后重新编译caffe

就可以解决该问题了

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
phpadmin问题。求大神解决
![CSDN移动问答][1] 访问http://localhost/phpmyadmin/ 出现下面网页。 Index of /phpmyadmin Parent Directory .coveralls.yml CONTRIBUTING.md ChangeLog DCO LICENSE README RELEASE-DATE-4.2.0-beta1 browse_foreigners.php changelog.php chk_rel.php composer.json config.sample.inc.php db_create.php db_datadict.php db_events.php db_export.php db_import.php db_operations.php db_printview.php db_qbe.php db_routines.php db_search.php db_sql.php db_structure.php db_tracking.php db_triggers.php doc/ error_report.php examples/ export.php favicon.ico file_echo.php gis_data_editor.php import.php import_status.php index.php js/ libraries/ license.php locale/ navigation.php phpinfo.php phpmyadmin.css.php phpunit.xml.hhvm phpunit.xml.nocoverage pmd_display_field.php pmd_general.php pmd_pdf.php pmd_relation_new.php pmd_relation_upd.php pmd_save_pos.php prefs_forms.php prefs_manage.php print.css querywindow.php robots.txt schema_edit.php schema_export.php server_binlog.php server_collations.php server_databases.php server_engines.php server_export.php server_import.php server_plugins.php server_privileges.php server_replication.php server_sql.php server_status.php server_status_advisor.php server_status_monitor.php server_status_queries.php server_status_variables.php server_user_groups.php server_variables.php setup/ show_config_errors.php sql.php tbl_addfield.php tbl_change.php tbl_chart.php tbl_create.php tbl_export.php tbl_find_replace.php tbl_get_field.php tbl_gis_visualization.php tbl_import.php tbl_indexes.php tbl_move_copy.php tbl_operations.php tbl_printview.php tbl_relation.php tbl_replace.php tbl_row_action.php tbl_select.php tbl_sql.php tbl_structure.php tbl_tracking.php tbl_triggers.php tbl_zoom_select.php themes.php themes/ transformation_overview.php transformation_wrapper.php url.php user_password.php version_check.php view_create.php view_operations.php webapp.php
oracle语句改成mysql语句
SELECT main.* FROM ( SELECT a.gain_rebate_order_bt_seq, a.rebate_order_internal_code, a.create_time, a.rebate_order_pay_amt, a.biz_mobiz_company_bd_seq, a.biz_mobiz_shop_bd_seq, a.user_user_base_sb_seq, a.mobiz_company_internal_code, a.mobiz_shop_internal_code, a.vmall_bind_account, a.user_base_alais_name, a.rebate_order_status_itype, a.mobiz_company_name, a.mobiz_shop_name, a.shop_fee_operator_itype, row_number()over(ORDER BY a.create_time DESC)rowno, fun_get_account_name( a.rebate_order_internal_code )AS homeAccount, f.order_pay_amt payIngot, f.order_pay_status_itype ingotPayType, g.order_pay_amt payCash, g.order_pay_status_itype cashPayType, a.currency_rate_symbol operatorTypeStr, h.order_pay_amt payPoint, h.order_pay_status_itype pointPayType FROM gain_rebate_order_bt a LEFT JOIN gain_order_pay_bt f ON a.gain_rebate_order_bt_seq = f.gain_rebate_order_bt_seq AND f.order_pay_do_itype = 1 AND f.order_pay_pmethod_itype = 4 LEFT JOIN gain_order_pay_bt g ON a.gain_rebate_order_bt_seq = g.gain_rebate_order_bt_seq AND g.order_pay_do_itype = 1 AND g.order_pay_pmethod_itype IN(1, 2, 3) LEFT JOIN gain_order_pay_bt h ON a.gain_rebate_order_bt_seq = h.gain_rebate_order_bt_seq AND h.order_pay_do_itype = 1 AND h.order_pay_pmethod_itype = 5 WHERE a.active_flag = 'y' )main WHERE main.rowno BETWEEN 0 AND 10
mysql数据库的group by问题
可执行sql: SELECT oc.cabinet_id objectId, CONCAT_WS( '/', di.driver_name, ri.plate_number ) driver, tcc.business_mode businessMode, so.`name` subName, cci.carteam_name affName, oo.order_No orderNo, oo.book_Space_No bookSpaceNo, oc.cabinet_No cabinetNo, oc.cabinet_Type conType, oo.order_type orderType, ss.dispatch_type dispatchType, st.remark remark, oo.address address, date_format( cc.settlement_date, '%Y-%m' ) endDate, date_format( cc.settlement_date, '%Y-%m-%d' ) settlementDate, cc.cost_status costStatus, sum( cc.pay_amount ) total FROM t_ord_cabinet_cost cc LEFT JOIN t_ord_cabinet oc ON oc.cabinet_id = cc.cabinet_id LEFT JOIN t_ord_order oo ON oo.order_id = oc.order_id LEFT JOIN t_sch_task st ON st.cabinet_id = oc.cabinet_id LEFT JOIN t_sch_schedule ss ON ss.id = st.schedule_id LEFT JOIN t_car_carteam_info cci ON cci.carteam_id = ss.carteam_id LEFT JOIN t_dri_driver_info di ON ss.driver_id = di.driver_info_id LEFT JOIN t_car_trailer_info ri ON ss.trailer_id = ri.trailer_id LEFT JOIN t_sys_org so ON so.org_code = oo.org_code LEFT JOIN t_cus_customer tcc ON tcc.customer_id = cc.settlement_customer_id LEFT JOIN sys_user_info us ON us.user_id = tcc.salesman_id WHERE cc.cost_status IN ( 0, 3 ) AND ( cc.settlement_date IS NOT NULL OR cc.settlement_date != '' ) AND cc.break_rule_state IN ( 0, 2 ) AND cc.cost_type_code IN ( '26', '2', '3', '8', '9', '10' ) AND ( cc.pay_amount != 0 AND cc.pay_amount IS NOT NULL ) AND so.LEVEL = 2 AND so.minimum_guarantee = 1 AND oo.order_status != 0 AND ss.schedule_status = 4 AND tcc.settle_accounts = 1 GROUP BY objectId, so.org_code, cci.carteam_id, endDate, di.driver_info_id, ri.plate_number, oo.order_id, ss.id, st.id, tcc.business_mode, cc.cost_status, date_format( cc.settlement_date, '%Y-%m-%d' ) ORDER BY driver, objectId, orderNo, bookSpaceNo, dispatchType, endDate DESC 不可执行sql: SELECT oc.cabinet_id objectId, CONCAT_WS( '/', sc.driver_name, sc.plate_number ) driver, sc.business_mode businessMode, oo.`company_name` subName, sc.carteam_name affName, oo.order_No orderNo, oo.book_Space_No bookSpaceNo, oc.cabinet_No cabinetNo, oc.cabinet_Type conType, oo.order_type orderType, sc.dispatch_type dispatchType, sc.task_remark remark, oo.address address, date_format( cc.settlement_date, '%Y-%m' ) endDate, date_format( cc.settlement_date, '%Y-%m-%d' ) settlementDate, cc.cost_status costStatus, sum( cc.pay_amount ) total FROM t_ord_cabinet_cost cc LEFT JOIN t_sett_cost sc ON cc.cabinet_cost_id = sc.cabinet_cost_id LEFT JOIN t_ord_cabinet oc ON oc.cabinet_id = cc.cabinet_id LEFT JOIN t_ord_order oo ON oo.order_id = oc.order_id LEFT JOIN t_sys_org so ON oo.org_code = so.org_code WHERE cc.cost_status IN ( 0, 3 ) AND ( cc.settlement_date IS NOT NULL OR cc.settlement_date != '' ) AND cc.break_rule_state IN ( 0, 2 ) AND sc.cost_type_class IN ( 0, 1 ) AND ( cc.pay_amount != 0 AND cc.pay_amount IS NOT NULL ) AND so.LEVEL = 2 AND so.minimum_guarantee = 1 AND oo.order_status != 0 AND sc.schedule_status = 4 AND sc.settle_accounts = 1 GROUP BY objectId, so.org_code, sc.carteam_id, endDate, sc.driver_info_id, sc.plate_number, oo.order_id, -- ss.id, -- st.id, sc.business_mode, cc.cost_status, date_format( cc.settlement_date, '%Y-%m-%d' ) ORDER BY driver, objectId, orderNo, bookSpaceNo, dispatchType, endDate DESC 问题:为什么第一个sql语句可以执行,第二个sql语句不可执行?
Android SQL数据库 删除一条数据 更新一条数据 怎么弄?头疼。。。。
/** * 商品数据库 */ public class ShangPinDB { private static ShangPinDBHelper mShangPinDBHelper = null; private static ShangPinDB mInstance = null; /** * 删除一条商品???这个怎么写? */ public void deleteMessage(ShangPinBean model) { SQLiteDatabase db = mShangPinDBHelper.getWritableDatabase(); ContentValues values = new ContentValues(); values.put(ShangPinDBHelper.FIELD_C_GCODE, model.getC_gcode()); values.put(ShangPinDBHelper.FIELD_C_BARCODE, model.getC_barcode()); values.put(ShangPinDBHelper.FIELD_C_NAME, model.getC_name()); values.put(ShangPinDBHelper.FIELD_C_UNIT, model.getC_unit()); values.put(ShangPinDBHelper.FIELD_C_MODE, model.getC_model()); values.put(ShangPinDBHelper.FIELD_C_PRICE, model.getC_price()); values.put(ShangPinDBHelper.FIELD_C_M_PRICE, model.getC_m_price()); values.put(ShangPinDBHelper.FIELD_C_DIS_PRICE, model.getC_dis_price()); values.put(ShangPinDBHelper.FIELD_C_STATUS, model.getC_status()); values.put(ShangPinDBHelper.FIELD_C_PRO_STATUS, model.getC_pro_status()); values.put(ShangPinDBHelper.FIELD_C_PROVIDER, model.getC_provider()); values.put(ShangPinDBHelper.FIELD_C_MEM_LOST, model.getC_mem_lost()); values.put(ShangPinDBHelper.FIELD_C_SCORE_RATE, model.getC_score_rate()); String[] args = {String.valueOf("c_gcode")}; db.delete(ShangPinDBHelper.TABLE_SHANGPIN_MESSAGE, "c_gcode=?", args); db.close(); } /** * 更新一条商品 */ public void update(ShangPinBean model) { SQLiteDatabase db = mShangPinDBHelper.getWritableDatabase(); ContentValues values = new ContentValues(); values.put(ShangPinDBHelper.FIELD_C_GCODE, model.getC_gcode()); values.put(ShangPinDBHelper.FIELD_C_BARCODE, model.getC_barcode()); values.put(ShangPinDBHelper.FIELD_C_NAME, model.getC_name()); values.put(ShangPinDBHelper.FIELD_C_UNIT, model.getC_unit()); values.put(ShangPinDBHelper.FIELD_C_MODE, model.getC_model()); values.put(ShangPinDBHelper.FIELD_C_PRICE, model.getC_price()); values.put(ShangPinDBHelper.FIELD_C_M_PRICE, model.getC_m_price()); values.put(ShangPinDBHelper.FIELD_C_DIS_PRICE, model.getC_dis_price()); values.put(ShangPinDBHelper.FIELD_C_STATUS, model.getC_status()); values.put(ShangPinDBHelper.FIELD_C_PRO_STATUS, model.getC_pro_status()); values.put(ShangPinDBHelper.FIELD_C_PROVIDER, model.getC_provider()); values.put(ShangPinDBHelper.FIELD_C_MEM_LOST, model.getC_mem_lost()); values.put(ShangPinDBHelper.FIELD_C_SCORE_RATE, model.getC_score_rate()); String[] args = {String.valueOf("c_gcode")}; db.update(ShangPinDBHelper.TABLE_SHANGPIN_MESSAGE, values, "c_gcode=?", args); db.close(); } } 这两个怎么写啊?我想在类里面直接调用这两个方法,像这种: ShangPinDB shangpin = new ShangPinDB(getContext()); zhanShiShangPinList = shangpin.findAll(); shangpin.deleteMessage(zhanShiShangPinList.get(0)); 求大神给个正确的删除 或者更新的语句
Maven项目部署到Tomcat的问题
项目不知道怎么回事,maven打包没有任何问题,Tomcat启动后web页面不能正常访问,控制台连续不断地输出以下信息: 七月 26, 2016 6:21:46 下午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["http-bio-8080"] 七月 26, 2016 6:21:46 下午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["http-bio-443"] 七月 26, 2016 6:21:46 下午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["ajp-bio-8009"] 七月 26, 2016 6:21:46 下午 org.apache.catalina.startup.Catalina start 信息: Server startup in 14546 ms 18:21:48.022 [Thread-7] DEBUG o.h.cache.redis.jedis.JedisClient - delete expired cache item in region[hibernate.org.hibernate.cache.internal.StandardQueryCache] expire time=[1469528508021] 18:22:00.015 [schedFactoryBean_QuartzSchedulerThread] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' is desired by: schedFactoryBean_QuartzSchedulerThread 18:22:00.016 [schedFactoryBean_QuartzSchedulerThread] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' is being obtained: schedFactoryBean_QuartzSchedulerThread 18:22:00.018 [schedFactoryBean_QuartzSchedulerThread] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' given to: schedFactoryBean_QuartzSchedulerThread Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.STATUS=0 and order0_.PAYMETHOD_ID=? 18:22:00.144 [schedFactoryBean_QuartzSchedulerThread] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' returned by: schedFactoryBean_QuartzSchedulerThread 18:22:00.153 [schedFactoryBean_Worker-1] DEBUG org.quartz.core.JobRunShell - Calling execute on job DEFAULT.orderPayTimeOutJob Hibernate: select order0_.ID as ID1_29_, order0_.CREATEBY as CREATEBY2_29_, order0_.CREATETIME as CREATETI3_29_, order0_.UPDATEBY as UPDATEBY4_29_, order0_.UPDATETIME as UPDATETI5_29_, order0_.ADDR as ADDR6_29_, order0_.AREA_ID as AREA_ID32_29_, order0_.BUILDING as BUILDING7_29_, order0_.BUYCOUNT as BUYCOUNT8_29_, order0_.CITY_ID as CITY_ID33_29_, order0_.COMM_ID as COMM_ID34_29_, order0_.CONSIGEE as CONSIGEE9_29_, order0_.DELITIME as DELITIM10_29_, order0_.DELIVERY as DELIVER11_29_, order0_.DELIVERYFLAG as DELIVER12_29_, order0_.DELIVERYORDER_ID as DELIVER35_29_, order0_.DISTRCOMPLETETIME as DISTRCO13_29_, order0_.DISTRSTOREID as DISTRST14_29_, order0_.DISTRIBUTIONID as DISTRIB15_29_, order0_.FINSHTIME as FINSHTI16_29_, order0_.FLOOR as FLOOR17_29_, order0_.ORDER_ID as ORDER_I36_29_, order0_.MOBILE as MOBILE18_29_, order0_.NIGHTINCOME as NIGHTIN19_29_, order0_.NUMB as NUMB20_29_, order0_.ONLINEPAYNAME_ID as ONLINEP37_29_, order0_.OPERSTATUS as OPERSTA21_29_, order0_.ORDERBILLNO as ORDERBI22_29_, order0_.ORDERNO as ORDERNO23_29_, order0_.PAYABLE as PAYABLE24_29_, order0_.PAYMETHOD_ID as PAYMETH38_29_, order0_.PROVICE_ID as PROVICE39_29_, order0_.REMARK as REMARK25_29_, order0_.SHIPMENT as SHIPMEN26_29_, order0_.STATUS as STATUS27_29_, order0_.STORE_ID as STORE_I40_29_, order0_.STORETYPE_ID as STORETY41_29_, order0_.SUBMITORDERTIME as SUBMITO28_29_, order0_.TEL as TEL29_29_, order0_.TOTAL as TOTAL30_29_, order0_.UNIT as UNIT31_29_, order0_.USER_ID as USER_ID42_29_ from HS_ORDER order0_ where order0_.STATUS=? and order0_.SUBMITORDERTIME<? and order0_.PAYMETHOD_ID=? limit ? 18:22:00.208 [schedFactoryBean_Worker-1] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' is desired by: schedFactoryBean_Worker-1 18:22:00.208 [schedFactoryBean_Worker-1] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' is being obtained: schedFactoryBean_Worker-1 18:22:00.209 [schedFactoryBean_Worker-1] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' given to: schedFactoryBean_Worker-1 18:22:00.213 [schedFactoryBean_QuartzSchedulerThread] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' is desired by: schedFactoryBean_QuartzSchedulerThread 18:22:00.213 [schedFactoryBean_QuartzSchedulerThread] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' is being obtained: schedFactoryBean_QuartzSchedulerThread 18:22:00.215 [schedFactoryBean_QuartzSchedulerThread] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' given to: schedFactoryBean_QuartzSchedulerThread 18:22:00.286 [schedFactoryBean_QuartzSchedulerThread] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' returned by: schedFactoryBean_QuartzSchedulerThread 18:22:00.286 [schedFactoryBean_Worker-1] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' returned by: schedFactoryBean_Worker-1 18:22:00.290 [schedFactoryBean_Worker-2] DEBUG org.quartz.core.JobRunShell - Calling execute on job DEFAULT.tempOrderSettlementJob 18:22:00.347 [schedFactoryBean_Worker-2] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' is desired by: schedFactoryBean_Worker-2 18:22:00.348 [schedFactoryBean_Worker-2] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' is being obtained: schedFactoryBean_Worker-2 18:22:00.348 [schedFactoryBean_Worker-2] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' given to: schedFactoryBean_Worker-2 18:22:00.395 [schedFactoryBean_Worker-2] DEBUG o.q.i.j.StdRowLockSemaphore - Lock 'TRIGGER_ACCESS' returned by: schedFactoryBean_Worker-2 Hibernate: select dictionary0_.ID as ID1_16_, dictionary0_.CREATEBY as CREATEBY2_16_, dictionary0_.CREATETIME as CREATETI3_16_, dictionary0_.UPDATEBY as UPDATEBY4_16_, dictionary0_.UPDATETIME as UPDATETI5_16_, dictionary0_.CODE as CODE6_16_, dictionary0_.KIND as KIND7_16_, dictionary0_.SORTNO as SORTNO8_16_, dictionary0_.STATUS as STATUS9_16_, dictionary0_.VALUE as VALUE10_16_, dictionary0_.VALUETYPE as VALUETY11_16_ from HS_DICTIONARY dictionary0_ where dictionary0_.CODE=? Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.STATUS=0 and order0_.PAYMETHOD_ID=? Hibernate: select dictionary0_.ID as ID1_16_, dictionary0_.CREATEBY as CREATEBY2_16_, dictionary0_.CREATETIME as CREATETI3_16_, dictionary0_.UPDATEBY as UPDATEBY4_16_, dictionary0_.UPDATETIME as UPDATETI5_16_, dictionary0_.CODE as CODE6_16_, dictionary0_.KIND as KIND7_16_, dictionary0_.SORTNO as SORTNO8_16_, dictionary0_.STATUS as STATUS9_16_, dictionary0_.VALUE as VALUE10_16_, dictionary0_.VALUETYPE as VALUETY11_16_ from HS_DICTIONARY dictionary0_ where dictionary0_.CODE=? Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.STATUS=10 and order0_.PAYMETHOD_ID=? Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.DELIVERY=1 and order0_.STATUS=10 Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.DELITIME<? and order0_.DELIVERY=2 and order0_.STATUS=15 18:22:42.981 [QuartzScheduler_schedFactoryBean-USER-20140708ZJ1469528502606_MisfireHandler] DEBUG o.q.impl.jdbcjobstore.JobStoreTX - MisfireHandler: scanning for misfires... 18:22:43.013 [QuartzScheduler_schedFactoryBean-USER-20140708ZJ1469528502606_MisfireHandler] DEBUG o.q.impl.jdbcjobstore.JobStoreTX - Found 0 triggers that missed their scheduled fire-time. Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.STATUS=0 and order0_.PAYMETHOD_ID=? Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.STATUS=10 and order0_.PAYMETHOD_ID=? Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.DELIVERY=1 and order0_.STATUS=10 Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.DELITIME<? and order0_.DELIVERY=2 and order0_.STATUS=15 Hibernate: select count(deliveryor0_.ID) as col_0_0_ from DELIVERY_ORDER deliveryor0_ where deliveryor0_.CREATETIME<? and deliveryor0_.STATUS=1 18:23:07.397 [Thread-7] DEBUG o.h.cache.redis.jedis.JedisClient - delete expired cache item in region[hibernate.com.hisun.shop.entity.MallVoucherAssignDetail] expire time=[1469528587396] 18:23:07.440 [Thread-7] DEBUG o.h.cache.redis.jedis.JedisClient - delete expired cache item in region[hibernate.org.hibernate.cache.internal.StandardQueryCache] expire time=[1469528587439] Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.STATUS=0 and order0_.PAYMETHOD_ID=? Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.STATUS=10 and order0_.PAYMETHOD_ID=? Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.SUBMITORDERTIME<? and order0_.DELIVERY=1 and order0_.STATUS=10 Hibernate: select count(order0_.ID) as col_0_0_ from HS_ORDER order0_ where order0_.DELITIME<? and order0_.DELIVERY=2 and order0_.STATUS=15 Hibernate: select count(deliveryor0_.ID) as col_0_0_ from DELIVERY_ORDER deliveryor0_ where deliveryor0_.CREATETIME<? and deliveryor0_.STATUS=1 18:23:42.949 [QuartzScheduler_schedFactoryBean-USER-20140708ZJ1469528502606_MisfireHandler] DEBUG o.q.impl.jdbcjobstore.JobStoreTX - MisfireHandler: scanning for misfires... 18:23:42.982 [QuartzScheduler_schedFactoryBean-USER-20140708ZJ1469528502606_MisfireHandler] DEBUG o.q.impl.jdbcjobstore.JobStoreTX - Found 0 triggers that missed their scheduled fire-time. 18:23:42.983 [QuartzScheduler_schedFactoryBean-USER-20140708ZJ1469528502606_ClusterManager] DEBUG o.q.impl.jdbcjobstore.JobStoreTX - ClusterManager: Check-in complete.
UncategorizedSQLException异常原因
执行一条HQL语句:select t.myApp from myPageApp t where t.sysUser.id = ? and t.recordStatus = 1 and t.myApp.recordStatus = 1 ;然后就报了org.springframework.jdbc.UncategorizedSQLException异常,什么原因导致的?查了半天了,求助。 具体报错信息: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [select deskapp1_.id as id2_, deskapp1_.apptype as apptype2_, deskapp1_.count_url as count3_2_, deskapp1_.CREATE_TIME as CREATE4_2_, deskapp1_.default_page as default5_2_, deskapp1_.depicts as depicts2_, deskapp1_.PARENT_ID as PARENT20_2_, deskapp1_.desk_icon_id as desk21_2_, deskapp1_.module_id as module22_2_, deskapp1_.ISAPP as ISAPP2_, deskapp1_.isdefault as isdefault2_, deskapp1_.isload as isload2_, deskapp1_.isresize as isresize2_, deskapp1_.NAME as NAME2_, deskapp1_.news_address as news12_2_, deskapp1_.news_height as news13_2_, deskapp1_.news_width as news14_2_, deskapp1_.page_percent as page15_2_, deskapp1_.RECORD_ORDER as RECORD16_2_, deskapp1_.RECORD_STATUS as RECORD17_2_, deskapp1_.sys_config_id as sys23_2_, deskapp1_.UPDATE_TIME as UPDATE18_2_, deskapp1_.url_address as url19_2_ from desk_page_app deskpageap0_ inner join desk_app deskapp1_ on deskpageap0_.desk_menu_id=deskapp1_.id where deskpageap0_.user_id=? and deskpageap0_.record_status=1 and deskapp1_.RECORD_STATUS=1]; SQL state [null]; error code [0]; Couldn't perform the operation prepareStatement: You can't perform any operations on this connection. It has been automatically closed by Proxool for some reason (see logs).; nested exception is java.sql.SQLException: Couldn't perform the operation prepareStatement: You can't perform any operations on this connection. It has been automatically closed by Proxool for some reason (see logs). ``` ```
a.import_list_no,b.import_no,c.GOODS_MODEL,a,b,c,什么意思?
select IMPORT_GOODS_STATUS,a.import_goods_bar, a.import_id,a.import_list_no,b.import_no,c.GOODS_MODEL,c.Goods_standard,c.Goods_unit,c.Goods_type, a.import_lot_no,import_plan_quantity,import_fact_quantity,import_fulfill_quantity,b.import_date,goods_code,goods_name, a.import_audit_date,a.import_remark from wms_import_notifydetail a left join wms_import_notify b on a.import_id=b.import_id left join wms_base_goods c on c.goods_id=a.import_goods_id where a.import_audit_flag='0' and a.import_noused_flag='0' and a.import_upload_flag='0' and a.import_execute_flag='0' order by a.import_id desc,a.import_list_no asc a.import_list_no,b.import_no,c.GOODS_MODEL,中的啊a,b,c,什么意思
SQL语句中rownum的问题!
select distinct cp.*,ai.* from ACCESSORY_INFO ai RIGHT JOIN CHASE_PEOPLE cp ON AI.BAND_ID = cp.OBJ_ID left join CHASE_CASE_INFO ci on cp.OBJ_ID = ci.CASE_PEOPLE_ID where 1=1 and cp.CHASE_APPLY_STATUS in 2 and cp.CHASE_STATUS in 2 ORDER BY cp.CREATE_DATE DESC 此时,查询语句可以正常查询到数据。 select * from ( select distinct cp.*,ai.* from ACCESSORY_INFO ai RIGHT JOIN CHASE_PEOPLE cp ON AI.BAND_ID = cp.OBJ_ID left join CHASE_CASE_INFO ci on cp.OBJ_ID = ci.CASE_PEOPLE_ID where 1=1 and cp.CHASE_APPLY_STATUS in 2 and cp.CHASE_STATUS in 2 ORDER BY cp.CREATE_DATE DESC ) where ROWNUM < 10; 加上ROWNUM < 10;之后,会报[Err] ORA-00918: 未明确定义列错误,是什么原因呢?,语句看起来没问题啊?
查询商品信息包含销量及销售总额信息?
需要关联订单明细表,现在是如果订单明细中没销量则商品信息都查不到 r_product_info 是商品信息表; r_order_items 是订单明细表; r_order_info 是订单表; 因为要判断订单表是否是退单和删除状态,所以加了AND T7.order_status = 0 AND T7.disabled = 0 AND T6.disabled = 0 因为这3个条件导致了查询不到商品信息,试过嵌入查询,但是速度很慢,小白一枚,钻了一下午,求大神帮忙分析一下,有没有好的解决思路 SELECT T1.pro_code 商品编码(主键), T1.custom_pro_code 自编码, T1.pro_name 商品名称, T1.pinyin_code 助记码, T1.bar_code 条形码, T5.name 单位, T1.retail_price 零售价, T1.vip_price 会员价, ROUND( T1.cost_price, 2 ) 成本价, ROUND( IFNULL(( T1.retail_price - T1.cost_price ), 0 ), 2 ) 毛利额, ROUND( IFNULL( T1.quantity, 0 ), 2 ) 总库存, round ( SUM( T6.quantity ), 2 ) 销售总量, round( SUM( T6.sold_price * T6.quantity ), 2 ) 销售总额, T2.name 分类, T3.name 品牌, T4.name 供应商, T1.spec 规格, T1.art_no 款号, T1.add_time 添加时间, T1.last_time 修改时间 FROM r_product_info AS T1 LEFT JOIN s_category_info T2 ON T1.category_id = T2.id LEFT JOIN s_brand_info T3 ON T1.brand_id = T3.id LEFT JOIN s_supplier_info T4 ON T1.supplier_id = T4.id LEFT JOIN s_unit_info T5 ON T1.unit_id = T5.id LEFT JOIN r_order_items T6 ON T6.pro_code = T1.pro_code LEFT JOIN r_order_info T7 ON T7.order_sn = T6.order_sn WHERE T1.disabled = 0 AND T1.is_no_barcode = 2 AND T7.order_status = 0 AND T7.disabled = 0 AND T6.disabled = 0 GROUP BY T1.pro_code ORDER BY T1.add_time DESC;
JPA关联问题
JPA的PO代码片段如下: 父类: [code="java"] @Entity @Table(name = "message_t") @Inheritance(strategy = InheritanceType.JOINED) public class Message implements Serializable { [/code] 子类: [code="java"] @Entity @Table(name = "draw_message_t") @PrimaryKeyJoinColumn(referencedColumnName = "iwoid", name = "message_oid") public class DrawMessage extends Message implements Serializable { [/code] 子类有多个,此处略。 在查询父类Message 时,生成的sql会自动关联子类 sql: [code="java"] Hibernate: select message0_.iwoid as iwoid2_, message0_.broadcast_type as broadcast2_2_, message0_.content as content2_, message0_.create_time as create4_2_, message0_.creator as creator2_, message0_.invalid_time as invalid6_2_, message0_.modifier as modifier2_, message0_.modify_time as modify8_2_, message0_.msg_time as msg9_2_, message0_.msg_type as msg10_2_, message0_.remark as remark2_, message0_.sender_oid as sender12_2_, message0_.status as status2_, message0_.title as title2_, message0_1_.channel_name as channel1_5_, message0_1_.channel_oid as channel2_5_, message0_2_.draw_issue as draw1_6_, message0_2_.draw_time as draw2_6_, message0_2_.game_type as game3_6_, message0_3_.apply_status as apply1_7_, message0_4_.earn_type as earn1_8_, message0_4_.game_id as game2_8_, message0_4_.game_name as game3_8_, message0_4_.game_oid as game4_8_, message0_5_.ranking_year as ranking1_9_, message0_5_.week_of_year as week2_9_, message0_6_.ranking_date as ranking1_10_, case when message0_1_.message_oid is not null then 1 when message0_2_.message_oid is not null then 2 when message0_3_.message_oid is not null then 3 when message0_4_.message_oid is not null then 4 when message0_5_.message_oid is not null then 5 when message0_6_.message_oid is not null then 6 when message0_.iwoid is not null then 0 end as clazz_ from message_t message0_ left outer join busi_dynamic_t message0_1_ on message0_.iwoid=message0_1_.message_oid left outer join draw_message_t message0_2_ on message0_.iwoid=message0_2_.message_oid [/code] 如果不想关联,还是通过JPAQL该怎么做
求高手解答,mantis的bug_change_status_page.php 中报 APPLICATION WARNING #300:
mantis安装成功后,进行了一些配置文件的修改和配置后,在bug_change_status_page.php 页面中,报APPLICATION WARNING #300:,找了好几天,还是找不到问题所在。请各位大侠指教,估计要懂PHP得高手。具体如下图: ![CSDN移动问答][1] [1]: http://d.hiphotos.baidu.com/zhidao/pic/item/1c950a7b02087bf489c4fc08f0d3572c11dfcf23.jpg
一个sql语句出了问题,麻烦大神给看一下啊,
sql语句 select dd.* from ( select distinct rp.apply_id from t_r_p rp where rp.r_status != 1 and rp.apply_id not in(select di.apply_id from t_d_i di where di.deduct_type in (1, 2, 3) and di.deduct_status = 3) and rp.END_DATE < to_date('2017-07-24','yyyy-mm-dd') )a wher rownum <= 500 )dd where dd.rn>0 ; 在Oracle中执行报错: SQL Error [933] [42000]: ORA-00933: SQL command not properly ended java.sql.SQLSyntaxErrorException: ORA-00933: SQL命令没有正确结束 到底那个不对了?审查了好几遍,还是错误
作为后端,优化才是价值所在!已尽最大能力优化,只求进一步!
视图再进一步优化! 最近遇到sql优化瓶颈 这是一个插入艺术家数据到es的sql查询, ``` SELECT a.id, a.`name`, a.pinyin, a.first_letter, a.gender, a.follow_num, a.art_num, a.audit_status, a.create_time, a.user_id, a.certificate_status, b.exhibition_id, c.avatar, c.birthday, d.academy, d.major, d.edu_degree, e.my FROM artist_artist a LEFT JOIN (SELECT t2.artist_id,GROUP_CONCAT(t1.exhibition_id SEPARATOR ' ') as exhibition_id FROM exhibition_artwork t1 LEFT JOIN artwork_artwork t2 on t1.artwork_id=t2.id and t2.removed=FALSE WHERE t1.removed=FALSE and t1.selected=TRUE GROUP BY t2.artist_id) as b on a.id=b.artist_id LEFT JOIN account_user c on a.user_id=c.id LEFT JOIN (SELECT artist_id,GROUP_CONCAT(academy SEPARATOR ',') as academy,GROUP_CONCAT(major SEPARATOR ',') as major,GROUP_CONCAT(edu_degree SEPARATOR ',') as edu_degree from artist_education WHERE removed=FALSE GROUP BY artist_id) as d on a.id=d.artist_id LEFT JOIN (select t3.artist_id,GROUP_CONCAT(CONCAT_WS(',',t3.id,t3.title,t3.category,t3.creation_age,t3.size_l,t3.size_w,t3.size_h,t3.certificate_status,t4.filename) SEPARATOR ';') as my FROM (select s.artist_id,s.id,s.title,s.category,s.creation_age,s.size_l,s.size_w,s.size_h,s.picture_id,s.create_time,s.certificate_status from artwork_artwork s where (select count(*) from artwork_artwork where artist_id = s.artist_id and create_time > s.create_time and removed=FALSE and audit_status=1)<3 and s.removed=FALSE and s.audit_status=1 order by s.create_time desc) as t3 LEFT join artwork_picture t4 on t3.picture_id=t4.id GROUP BY t3.artist_id ) as e on a.id=e.artist_id WHERE a.removed=FALSE and a.audit_status=1 and a.switch_status=TRUE ``` 这是explain的结果,优化了已经不知何处优化了 ![图片说明](https://img-ask.csdn.net/upload/202001/02/1577957090_253221.jpg) 因为需要处理的数据太过,所以子查询多,涉及的表也多,左关联的第一张表数据量在七八万,管理以后筛选只要三万,但是取数据的速度太慢了,求各位大神帮看看怎么优化?
CentOS安装FastDfs错误
最近在CentOS上安装FastDFS在 编译时出现 /usr/local/lib/libfastcommon.so: undefined reference to `sqrt' /usr/local/lib/libfastcommon.so: undefined reference to `cos' 错误,请哪位大神帮忙解决一下。 详细错误如下: ``` cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_trackerd fdfs_trackerd.c ../common/fdfs_global.o tracker_proto.o tracker_mem.o tracker_service.o tracker_status.o tracker_global.o tracker_func.o fdfs_shared_func.o tracker_nio.o tracker_relationship.o tracker_dump.o ../common/linux_stack_trace.o -L/usr/local/lib -lpthread -lrt -ldl -rdynamic -lfastcommon -I../common -I/usr/include/fastcommon /usr/local/lib/libfastcommon.so: undefined reference to `sqrt' /usr/local/lib/libfastcommon.so: undefined reference to `cos' collect2: ld 返回 1 make: *** [fdfs_trackerd] 错误 1 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_storaged fdfs_storaged.c ../common/fdfs_global.o ../tracker/fdfs_shared_func.o ../tracker/tracker_proto.o tracker_client_thread.o storage_global.o storage_func.o storage_service.o storage_sync.o storage_nio.o storage_dio.o storage_ip_changed_dealer.o storage_param_getter.o storage_disk_recovery.o trunk_mgr/trunk_mem.o trunk_mgr/trunk_shared.o trunk_mgr/trunk_sync.o trunk_mgr/trunk_client.o trunk_mgr/trunk_free_block_checker.o ../client/client_global.o ../client/tracker_client.o ../client/storage_client.o ../client/client_func.o fdht_client/fdht_proto.o fdht_client/fdht_client.o fdht_client/fdht_func.o fdht_client/fdht_global.o storage_dump.o ../common/linux_stack_trace.o -L/usr/local/lib -lpthread -lrt -ldl -rdynamic -lfastcommon -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon /usr/local/lib/libfastcommon.so: undefined reference to `sqrt' /usr/local/lib/libfastcommon.so: undefined reference to `cos' collect2: ld 返回 1 make: *** [fdfs_storaged] 错误 1 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_monitor fdfs_monitor.c ../common/fdfs_global.o ../common/fdfs_http_shared.o ../common/mime_file_parser.o ../tracker/tracker_proto.o ../tracker/fdfs_shared_func.o ../storage/trunk_mgr/trunk_shared.o tracker_client.o client_func.o client_global.o storage_client.o -lpthread -lrt -ldl -rdynamic -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon /usr/lib/gcc/i686-redhat-linux/4.4.7/../../../libfastcommon.so: undefined reference to `sqrt' /usr/lib/gcc/i686-redhat-linux/4.4.7/../../../libfastcommon.so: undefined reference to `cos' ``` 环境:CentOS6.x, FastDFS-5.05 此问题已解决: 此问题是由于 libfastcommon-master 版本问题,改为libfastcommon-1.0.7后,再进行编译就OK了。
这条MYSQL语句要查14秒怎么缩短时间
SELECT t1.id, t1.order_no, t1.order_status, t1.pay_status,t1.shipping_status, t1.pay_method, t1.invoice, t1.remark, t1.seller, t1.buyer, t1.site_id, t1.order_time, t1.pay_time, t1.sign_for_time, t1.delivery_time, t1.subtotal, t1.freight, t1.invitation, t1.cope, t1.is_comment,t1.pay_discount FROM zcwl_order t1 LEFT JOIN zcwl_order_shipping_address t2 ON t2.order_id = t1.id WHERE t1.site_id ORDER BY t1.order_time DESC 因为数据量大
mysql语句查询时间过长如何优化?
SELECT t1.id, t1.order_no, t1.order_status, t1.pay_status,t1.shipping_status, t1.pay_method, t1.invoice, t1.remark, t1.seller, t1.buyer, t1.site_id, t1.order_time, t1.pay_time, t1.sign_for_time, t1.delivery_time, t1.subtotal, t1.freight, t1.invitation, t1.cope, t1.is_comment,t1.pay_discount FROM zcwl_order t1 LEFT JOIN zcwl_order_shipping_address t2 ON t2.order_id = t1.id WHERE t1.site_id ORDER BY t1.order_time DESC 这条sql语句需要查14秒 如何缩短时间? ps:大概有1W条数据
关于hibernate 一对多级联查询的问题,生成的sql报语法错误
描述:主要是实体一对多的关系,不希望懒加载,需要急加载。配置完后,查询时报sql语法错误,将sql语句拷到mysql中执行,把{}去除,花括号其实就是映射的数据库字段,执行成功。仔细看了一下错误,象是hibernate执行时没有把花括号{}给替换成数据库字段名称,直接带着花括号查询了,当然会报错,为什么会出现这种问题,没有找到原因。有没有朋友知道的? po类:一对多的关系,Jpa配置如下(单向关联) [code="java"] @SuppressWarnings("serial") @Entity @Table(name = "mplan_notice") public class MplanNotice implements java.io.Serializable { ..... private Set<MplanNoticePosition> mplanNoticePositions = new HashSet<MplanNoticePosition>(0); @OneToMany(fetch=FetchType.EAGER) @JoinColumn(name = "{notice_id}") @Cascade(value = { CascadeType.SAVE_UPDATE }) public Set<MplanNoticePosition> getMplanNoticePositions() { return mplanNoticePositions; } public void setMplanNoticePositions( Set<MplanNoticePosition> mplanNoticePositions) { this.mplanNoticePositions = mplanNoticePositions; } .... } @SuppressWarnings("serial") @Entity @Table(name = "mplan_notice_position") public class MplanNoticePosition implements java.io.Serializable { private String id; private Position position; private String noticeId; @Id @Column(name = "id" ) @GeneratedValue(generator = "system-uuid") @GenericGenerator(name = "system-uuid", strategy = "uuid") public String getId() { return id; } public void setId(String id) { this.id = id; } //定义外键名称 @ManyToOne(cascade={CascadeType.PERSIST}) @JoinColumn(name="{position_id}") public Position getPosition() { return position; } public void setPosition(Position position) { this.position = position; } @Column(name = "notice_id" ) public String getNoticeId() { return noticeId; } public void setNoticeId(String noticeId) { this.noticeId = noticeId; } } [/code] 操作:采用hibernateTemplate.get(entityclass,id)获取MplanNotice对象,并且设置为fetch.eager,急查询,能直接把MplanNotice的Set集合获取。 错误: org.springframework.dao.InvalidDataAccessResourceUsageException: could not load an entity: [com.thinkwin.mlcm.mplan.po.MplanNotice#1]; SQL [select mplannotic0_.id as id38_10_, mplannotic0_.busstate as busstate38_10_, mplannotic0_.memo as memo38_10_, mplannotic0_.operate_time as operate4_38_10_, mplannotic0_.operate_user as operate8_38_10_, mplannotic0_.plan_month as plan5_38_10_, mplannotic0_.plan_quarter as plan6_38_10_, mplannotic0_.plan_year as plan7_38_10_, mplannotic0_.plantype as plantype38_10_, mplannotic1_.{notice_id} as column4_12_, mplannotic1_.id as id12_, mplannotic1_.id as id39_0_, mplannotic1[color=red]_.{job_id}[/color] as column3_39_0_, mplannotic1_.notice_id as notice2_39_0_, job2_.id as id71_1_, job2_.create_by as create2_71_1_, job2_.create_time as create3_71_1_, job2_.description as descript4_71_1_, job2_.job_name as job5_71_1_, job2_.org_id as org8_71_1_, job2_.position_id as position9_71_1_, job2_.update_by as update6_71_1_, job2_.update_time as update7_71_1_, mplannotic3_.{notice_id} as column4_13_, mplannotic3_.id as id13_, mplannotic3_.id as id40_2_, mplannotic3_.notice_id as notice2_40_2_, mplannotic3_.{person_id} as column3_40_2_, person4_.id as id73_3_, person4_.person_name as person2_73_3_, person4_.sex as sex73_3_, mplannotic5_.{notice_id} as column4_14_, mplannotic5_.id as id14_, mplannotic5_.id as id41_4_, mplannotic5_.notice_id as notice2_41_4_, mplannotic5_.{position_id} as column3_41_4_, position6_.position_id as position1_76_5_, position6_.create_by as create2_76_5_, position6_.create_time as create3_76_5_, position6_.description as descript4_76_5_, position6_.forder as forder76_5_, position6_.parent_position_id as parent9_76_5_, position6_.position_name as position6_76_5_, position6_.update_by as update7_76_5_, position6_.update_time as update8_76_5_, user7_.id as id87_6_, user7_.create_by as create2_87_6_, user7_.create_time as create3_87_6_, user7_.person_id as person9_87_6_, user7_.pwd as pwd87_6_, user7_.status as status87_6_, user7_.update_by as update6_87_6_, user7_.update_time as update7_87_6_, user7_.user_name as user8_87_6_, person8_.id as id73_7_, person8_.person_name as person2_73_7_, person8_.sex as sex73_7_, dictionary9_.DICT_ID as DICT1_94_8_, dictionary9_.DICT_NAME as DICT2_94_8_, dictionary9_.dict_type_id as dict5_94_8_, dictionary9_.DICT_CODE as DICT3_94_8_, dictionary9_.forder as forder94_8_, dictionary10_.DICT_TYPE_ID as DICT1_95_9_, dictionary10_.DICT_TYPE_CODE as DICT2_95_9_, dictionary10_.DICT_TYPE_NAME as DICT3_95_9_, dictionary10_.module_id as module5_95_9_, dictionary10_.state as state95_9_ from mplan_notice mplannotic0_ left outer join mplan_notice_job mplannotic1_ on mplannotic0_.id=mplannotic1_.{notice_id} left outer join org_job job2_ on mplannotic1_.{job_id}=job2_.id left outer join mplan_notice_person mplannotic3_ on mplannotic0_.id=mplannotic3_.{notice_id} left outer join org_person person4_ on mplannotic3_.{person_id}=person4_.id left outer join mplan_notice_position mplannotic5_ on mplannotic0_.id=mplannotic5_.{notice_id} left outer join org_position position6_ on mplannotic5_.{position_id}=position6_.position_id left outer join scy_user user7_ on mplannotic0_.operate_user=user7_.id left outer join org_person person8_ on user7_.person_id=person8_.id left outer join res_dictionary dictionary9_ on mplannotic0_.plantype=dictionary9_.DICT_ID left outer join res_dictionary_type dictionary10_ on dictionary9_.dict_type_id=dictionary10_.DICT_TYPE_ID where mplannotic0_.id=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not load an entity: [com.thinkwin.mlcm.mplan.po.MplanNotice#1]
使用SSH框架,action向jsp 传值,如何把值传进区,并且还是在固定区域
后台传值传过来都是空的,并且值还不在固定区域 select top 12 tkfnews0_.id as id0_, tkfnews0_.TokenId as TokenId0_, tkfnews0_.newsid as newsid0_, tkfnews0_.parentid as parentid0_, tkfnews0_.childcount as childcount0_, tkfnews0_.title as title0_, tkfnews0_.titlePicUrl as titlePic7_0_, tkfnews0_.subject as subject0_, tkfnews0_.keywords as keywords0_, tkfnews0_.SiteTitles as SiteTitles0_, tkfnews0_.AreaCodeIds as AreaCod11_0_, tkfnews0_.AreaTitles as AreaTitles0_, tkfnews0_.author as author0_, tkfnews0_.editor as editor0_, tkfnews0_.source as source0_, tkfnews0_.content as content0_, tkfnews0_.content_format as content17_0_, tkfnews0_.content_date as content18_0_, tkfnews0_.classid as classid0_, tkfnews0_.cometype as cometype0_, tkfnews0_.allhits as allhits0_, tkfnews0_.goodscores as goodscores0_, tkfnews0_.badscores as badscores0_, tkfnews0_.comeurl as comeurl0_, tkfnews0_.IsOriginal as IsOriginal0_, tkfnews0_.isTop as isTop0_, tkfnews0_.isIndex as isIndex0_, tkfnews0_.isHao as isHao0_, tkfnews0_.status as status0_, tkfnews0_.userid as userid0_, tkfnews0_.TitleColor as TitleColor0_, tkfnews0_.memid as memid0_, tkfnews0_.deleted as deleted0_, tkfnews0_.createtime as createtime0_, tkfnews0_.updatetime as updatetime0_, tkfnews0_.LinkUrl as LinkUrl0_, tkfnews0_.LinkType as LinkType0_, tkfnews0_.TitleShort as TitleShort0_, tkfnews0_.picnum as picnum0_, tkfnews0_.orders as orders0_, tkfnews0_.SeoDomain as SeoDomain0_, tkfnews0_.SeoTitle as SeoTitle0_, tkfnews0_.MetaKeyWord as MetaKey43_0_, tkfnews0_.MetaDescription as MetaDes44_0_, tkfnews0_.BrandIds as BrandIds0_, tkfnews0_.Summary as Summary0_, tkfnews0_.CaijiId as CaijiId0_, tkfnews0_.HostConfigId as HostCon48_0_, tkfnews0_.AppID as AppID0_, tkfnews0_.PicUrl as PicUrl0_, tkfnews0_.Reader as Reader0_, tkfnews0_.Favorite as Favorite0_ from db_vlaibao_cms.dbo.tkf_News tkfnews0_ [null, null, null, null, null, null]
hibernate奇怪的查询问题,生成的sql能够查询出三条子表数据,但是主vo里的子表对象集只有一条
先看配置文件: 主表: [code="java"] <set name="exPartPurchaseBillBs" inverse="true" lazy="false" sort="natural" cascade="all-delete-orphan" where="status!=0"> <key> <column name="source_bill_id" /> </key> <one-to-many class="com.col.kobelco.exservice.agentpart.purchase.bean.ExPartPurchaseBillB" /> </set>[/code] 子表: [code="java"] <many-to-one name="sourceBillId" class="com.col.kobelco.exservice.agentpart.purchase.bean.ExPartPurchaseBill" fetch="select"> <column name="source_bill_id" /> </many-to-one>[/code] vo类: [code="java"] public Set<?> getExPartPurchaseBillBs() { return exPartPurchaseBillBs; } public void setExPartPurchaseBillBs(Set<ExPartPurchaseBillB> exPartPurchaseBillBs) { this.exPartPurchaseBillBs = exPartPurchaseBillBs; System.out.println(exPartPurchaseBillBs.size()); }[/code] Hibernate生成的sql如下(查询子表的sql): Hibernate: select expartpurc0_.source_bill_id as source3_1_, expartpurc0_.bill_id as bill1_1_, expartpurc0_.bill_id as bill1_246_0_, expartpurc0_.ts as ts246_0_, expartpurc0_.source_bill_id as source3_246_0_, expartpurc0_.part_id as part4_246_0_, expartpurc0_.part_no as part5_246_0_, expartpurc0_.part_name as part6_246_0_, expartpurc0_.part_unit_name as part7_246_0_, expartpurc0_.quantity as quantity246_0_, expartpurc0_.unit_price as unit9_246_0_, expartpurc0_.price as price246_0_, expartpurc0_.complete_quantity as complete11_246_0_, expartpurc0_.debt_quantity as debt12_246_0_, expartpurc0_.depot_id as depot13_246_0_, expartpurc0_.depot_name as depot14_246_0_, expartpurc0_.remark as remark246_0_, expartpurc0_.status as status246_0_ from emisdemothree.ex_part_purchase_bill_b expartpurc0_ where ( expartpurc0_.status!=0) and expartpurc0_.source_bill_id=? 到mysql中执行查找出三条数据 但是打印出的数据为1,真不晓得是因为啥子原因了,求解答!!!!
Kafka实战(三) - Kafka的自我修养与定位
Apache Kafka是消息引擎系统,也是一个分布式流处理平台(Distributed Streaming Platform) Kafka是LinkedIn公司内部孵化的项目。LinkedIn最开始有强烈的数据强实时处理方面的需求,其内部的诸多子系统要执行多种类型的数据处理与分析,主要包括业务系统和应用程序性能监控,以及用户行为数据处理等。 遇到的主要问题: 数据正确性不足 数据的收集主要...
volatile 与 synchronize 详解
Java支持多个线程同时访问一个对象或者对象的成员变量,由于每个线程可以拥有这个变量的拷贝(虽然对象以及成员变量分配的内存是在共享内存中的,但是每个执行的线程还是可以拥有一份拷贝,这样做的目的是加速程序的执行,这是现代多核处理器的一个显著特性),所以程序在执行过程中,一个线程看到的变量并不一定是最新的。 volatile 关键字volatile可以用来修饰字段(成员变量),就是告知程序任何对该变量...
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
有哪些让程序员受益终生的建议
从业五年多,辗转两个大厂,出过书,创过业,从技术小白成长为基层管理,联合几个业内大牛回答下这个问题,希望能帮到大家,记得帮我点赞哦。 敲黑板!!!读了这篇文章,你将知道如何才能进大厂,如何实现财务自由,如何在工作中游刃有余,这篇文章很长,但绝对是精品,记得帮我点赞哦!!!! 一腔肺腑之言,能看进去多少,就看你自己了!!! 目录: 在校生篇: 为什么要尽量进大厂? 如何选择语言及方...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 free -m 其中:m表示兆,也可以用g,注意都要小写 Men:表示物理内存统计 total:表示物理内存总数(total=used+free) use...
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
GitHub开源史上最大规模中文知识图谱
近日,一直致力于知识图谱研究的 OwnThink 平台在 Github 上开源了史上最大规模 1.4 亿中文知识图谱,其中数据是以(实体、属性、值),(实体、关系、实体)混合的形式组织,数据格式采用 csv 格式。 到目前为止,OwnThink 项目开放了对话机器人、知识图谱、语义理解、自然语言处理工具。知识图谱融合了两千五百多万的实体,拥有亿级别的实体属性关系,机器人采用了基于知识图谱的语义感...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发...
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 演示地点演示 html代码如下` music 这个年纪 七月的风 音乐 ` 然后就是css`*{ margin: 0; padding: 0; text-decoration: none; list-...
微信支付崩溃了,但是更让马化腾和张小龙崩溃的竟然是……
loonggg读完需要3分钟速读仅需1分钟事件还得还原到昨天晚上,10 月 29 日晚上 20:09-21:14 之间,微信支付发生故障,全国微信支付交易无法正常进行。然...
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。
数据库优化 - SQL优化
以实际SQL入手,带你一步一步走上SQL优化之路!
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 cpp 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7 p...
通俗易懂地给女朋友讲:线程池的内部原理
餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
将代码部署服务器,每日早上定时获取到天气数据,并发送到邮箱。 也可以说是一个小型人工智障。 知识可以运用在不同地方,不一定非是天气预报。
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
英特尔不为人知的 B 面
从 PC 时代至今,众人只知在 CPU、GPU、XPU、制程、工艺等战场中,英特尔在与同行硬件芯片制造商们的竞争中杀出重围,且在不断的成长进化中,成为全球知名的半导体公司。殊不知,在「刚硬」的背后,英特尔「柔性」的软件早已经做到了全方位的支持与支撑,并持续发挥独特的生态价值,推动产业合作共赢。 而对于这一不知人知的 B 面,很多人将其称之为英特尔隐形的翅膀,虽低调,但是影响力却不容小觑。 那么,在...
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹...
面试官:你连RESTful都不知道我怎么敢要你?
干货,2019 RESTful最贱实践
刷了几千道算法题,这些我私藏的刷题网站都在这里了!
遥想当年,机缘巧合入了 ACM 的坑,周边巨擘林立,从此过上了"天天被虐似死狗"的生活… 然而我是谁,我可是死狗中的战斗鸡,智力不够那刷题来凑,开始了夜以继日哼哧哼哧刷题的日子,从此"读题与提交齐飞, AC 与 WA 一色 ",我惊喜的发现被题虐既刺激又有快感,那一刻我泪流满面。这么好的事儿作为一个正直的人绝不能自己独享,经过激烈的颅内斗争,我决定把我私藏的十几个 T 的,阿不,十几个刷题网...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看...
白话阿里巴巴Java开发手册高级篇
不久前,阿里巴巴发布了《阿里巴巴Java开发手册》,总结了阿里巴巴内部实际项目开发过程中开发人员应该遵守的研发流程规范,这些流程规范在一定程度上能够保证最终的项目交付质量,通过在时间中总结模式,并推广给广大开发人员,来避免研发人员在实践中容易犯的错误,确保最终在大规模协作的项目中达成既定目标。 无独有偶,笔者去年在公司里负责升级和制定研发流程、设计模板、设计标准、代码标准等规范,并在实际工作中进行...
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
Nginx 原理和架构
Nginx 是一个免费的,开源的,高性能的 HTTP 服务器和反向代理,以及 IMAP / POP3 代理服务器。Nginx 以其高性能,稳定性,丰富的功能,简单的配置和低资源消耗而闻名。 Nginx 的整体架构 Nginx 里有一个 master 进程和多个 worker 进程。master 进程并不处理网络请求,主要负责调度工作进程:加载配置、启动工作进程及非停升级。worker 进程负责处...
YouTube排名第一的励志英文演讲《Dream(梦想)》
Idon’t know what that dream is that you have, I don't care how disappointing it might have been as you've been working toward that dream,but that dream that you’re holding in your mind, that it’s po...
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
相关热词 c# clr dll c# 如何orm c# 固定大小的字符数组 c#框架设计 c# 删除数据库 c# 中文文字 图片转 c# 成员属性 接口 c#如何将程序封装 16进制负数转换 c# c#练手项目
立即提问