求助大神们,这个损失函数怎么表达啊!!!!

用16—vgg提取完特征后,batchsize=50,求损失函数用tensorflow怎么写,损失函数如下:

图片说明

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
大神们,求助啊
class代码:rnpackage sale;rnrnpublic class Goods rn public String product;rn public double price;rn public String getProduct() rn return product;rn rn public void setProduct(String product) rn this.product = product;rn rn public double getPrice() rn return price;rn rn public void setPrice(double price) rn this.price = price;rn rn public Goods(String product, double price) rn super();rn this.product = product;rn this.price = price;rn rnjsp页面代码:rnrn rn <%Goods.setProduct("huangjinhua");rn Goods.setPrice(11.11); %>rn 方法一:rn 产品:<%=Goods.getProduct() %>rn 价格:<%=Goods.getPrice() %>rn 方法二:rn 产品:rn 价格:rn rn我一运行就出现如下的错误:rn[color=#FF0000]org.apache.jasper.JasperException: /index.jsp (line: 13, column: 1) The value for the useBean class attribute sale.Goods is invalid.rn org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)rn org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)rn org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:149)rn org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1234)rn org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1182)rn org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)rn org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)rn org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434)rn org.apache.jasper.compiler.Node$Root.accept(Node.java:475)rn org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)rn org.apache.jasper.compiler.Generator.generate(Generator.java:3490)rn org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:250)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)rn org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)[/color]
大神们,这个怎么实现!!!!!!!
[img=https://img-bbs.csdn.net/upload/201704/11/1491887644_370748.png][/img]rn[img=https://img-bbs.csdn.net/upload/201704/11/1491887658_314287.jpg][/img]
这个如何表达!!求助
要求:系统现在的时候减去物品归还的时间计算出是否超期,如何超期的话,rn在datagrid 超期(天)这一列对应的用超期天用红色字体显示。。rn我用一模版列来做超期(天)这一列。我的写话如下:rnrn rn rn rn rn
大神们,求助啊 这异常怎么解决啊
rnrnrntomcat启动过程报错了rnrn严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Unable to execute schema management to JDBC target [alter table cst_customer add constraint FKeh5g36duab8g1h051pdjfwcgd foreign key (cust_source) references base_dict (dict_id)]rn at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)rn at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1481)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1226)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)rn at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)rn at java.util.concurrent.FutureTask.run(Unknown Source)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)rn at java.lang.Thread.run(Unknown Source)rnCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Unable to execute schema management to JDBC target [alter table cst_customer add constraint FKeh5g36duab8g1h051pdjfwcgd foreign key (cust_source) references base_dict (dict_id)]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)rn at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)rn ... 24 morernCaused by: org.hibernate.tool.schema.spi.SchemaManagementException: Unable to execute schema management to JDBC target [alter table cst_customer add constraint FKeh5g36duab8g1h051pdjfwcgd foreign key (cust_source) references base_dict (dict_id)]rn at org.hibernate.tool.schema.internal.TargetDatabaseImpl.accept(TargetDatabaseImpl.java:59)rn at org.hibernate.tool.schema.internal.SchemaMigratorImpl.applySqlString(SchemaMigratorImpl.java:431)rn at org.hibernate.tool.schema.internal.SchemaMigratorImpl.applySqlStrings(SchemaMigratorImpl.java:420)rn at org.hibernate.tool.schema.internal.SchemaMigratorImpl.applyForeignKeys(SchemaMigratorImpl.java:386)rn at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigrationToTargets(SchemaMigratorImpl.java:214)rn at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigration(SchemaMigratorImpl.java:60)rn at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:133)rn at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:101)rn at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:470)rn at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:708)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:724)rn at org.springframework.orm.hibernate5.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:416)rn at org.springframework.orm.hibernate5.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:401)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)rn ... 31 morernCaused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`hibernate_01`.`#sql-744_5f`, CONSTRAINT `FKeh5g36duab8g1h051pdjfwcgd` FOREIGN KEY (`cust_source`) REFERENCES `base_dict` (`dict_id`))rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)rn at java.lang.reflect.Constructor.newInstance(Unknown Source)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)rn at com.mysql.jdbc.Util.getInstance(Util.java:381)rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015)rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)rn at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)rn at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)rn at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2548)rn at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1605)rn at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1524)rn at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:64)rn at org.hibernate.tool.schema.internal.TargetDatabaseImpl.accept(TargetDatabaseImpl.java:56)rn ... 46 morernrnrnrnrn
【求助】大神们帮我看下这个!!!
[code=java]rnpublic static String md5aessign(String content, String password)rn rn MessageDigest md;rn try rn rn KeyGenerator kgen = KeyGenerator.getInstance("AES");rn SecureRandom random=SecureRandom.getInstance("SHA1PRNG");rn random.setSeed(password.getBytes());rn kgen.init(128, random);rn rn SecretKey secretKey = kgen.generateKey(); rn byte[] enCodeFormat = secretKey.getEncoded(); rn SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES"); rn Cipher cipher = Cipher.getInstance("AES");// 创建密码器 rn cipher.init(Cipher.ENCRYPT_MODE, key);// 初始化 rn //准备MD5摘要算法rn byte[] byteContent = content.getBytes("GBK");rn rn md = MessageDigest.getInstance("MD5"); rn // 计算md5函数 rn md.update(byteContent); rn //对md5摘要进行AES加密rn byte[] result = cipher.doFinal(md.digest());rn rn return parseByte2HexStr(result); // 转换为16进制字符串rn rn catch (NoSuchAlgorithmException e) rn e.printStackTrace(); rn catch (NoSuchPaddingException e) rn e.printStackTrace(); rn catch (InvalidKeyException e) rn e.printStackTrace(); rn catch (UnsupportedEncodingException e) rn e.printStackTrace(); rn catch (IllegalBlockSizeException e) rn e.printStackTrace(); rn catch (BadPaddingException e) rn e.printStackTrace(); rn rn return null;rn rn rn public static String encrypt(String content, String password) rn rn try rn rn KeyGenerator kgen = KeyGenerator.getInstance("AES");rn// kgen.init(128, new SecureRandom(password.getBytes()));rn SecureRandom random=SecureRandom.getInstance("SHA1PRNG");rn random.setSeed(password.getBytes());rn kgen.init(128, random);rn System.out.println("new AES Util");rn rn SecretKey secretKey = kgen.generateKey(); rn byte[] enCodeFormat = secretKey.getEncoded(); rn SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES"); rn Cipher cipher = Cipher.getInstance("AES");// 创建密码器rn rn byte[] byteContent = content.getBytes("GBK"); rn cipher.init(Cipher.ENCRYPT_MODE, key);// 初始化 rn byte[] result = cipher.doFinal(byteContent); rn rn return parseByte2HexStr(result); // 加密rn rn catch (NoSuchAlgorithmException e) rn e.printStackTrace(); rn catch (NoSuchPaddingException e) rn e.printStackTrace(); rn catch (InvalidKeyException e) rn e.printStackTrace(); rn catch (UnsupportedEncodingException e) rn e.printStackTrace(); rn catch (IllegalBlockSizeException e) rn e.printStackTrace(); rn catch (BadPaddingException e) rn e.printStackTrace(); rn rn return null;rnrn rn rn public static String parseByte2HexStr(byte buf[]) rn rn StringBuffer sb = new StringBuffer(); rn for (int i = 0; i < buf.length; i++) rn rn String hex = Integer.toHexString(buf[i] & 0xFF); rn if (hex.length() == 1) rn rn hex = '0' + hex;rn rn sb.append(hex.toUpperCase());rn rn return sb.toString();rn rn[/code]rnrn把这个三个方法封在一个类里转成dll!!!,然后可以被C#调用!!!rn用ikvm可以封装,可是我不用java。。。救命啊!!!rn[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/8.gif][/img][img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/11.gif][/img]
求助!!!大神们看看这个怎么改。。。。。。谢谢
[code=C#][/code]rnusing System;rnusing System.Collections.Generic;rnusing System.Collections;rnusing System.Linq;rnusing System.Text;rnrnnamespace CustomerInfornrn class CustomerInfo //定义类表示客户信息rn rn rn private static ArrayList CustomerList = new ArrayList(); //创建储存客户信息的ArrayListrnrn private string id;//表示客户id的字段rnrn private string name;rnrn private string address;rnrn public CustomerInfo() //无参构造函数rn public CustomerInfo(string myid, string myname, string myaddress)//有参数构造函数,rn rn id = myid;rn name = myname;rn address = myaddress;rn rnrn public string IDrn rn set id = value; rn get return id ;rnrn rn public string Namern rn get return name; rn set name = value; rnrn rn rn public string Addressrn rn get return address; rn set address = value; rn rn public static void AddCustomer(CustomerInfo aCustomerInfo) //添加客户信息的方法rn rn CustomerList.Add(aCustomerInfo);rn rn public static void Delete(CustomerInfo oo) //删除客户信息的方法rn rn int i = CustomerList.IndexOf (oo);rn if (i < 0)rn Console.WriteLine("no !");rn elsern CustomerList.RemoveAt(i);rn rn public static void Show() //显示所有客户信息rn rn foreach (CustomerInfo s in CustomerList)rn Console.WriteLine(s.ID + ", " + s.Name + ", " + s.Address);rn rn public static void SortByName() //通过接口实现按照客户姓名排序的方法rn rn [color=#FF0000]CustomerList .Sort ( new CustomerNameCompare());//[/color]实现自定义排序的接口rn rnrn rnrn[color=#FF0000][/color]rn-------------------------------------------------------------------------------------rnrnusing System;rnusing System.Collections;rnusing System.Linq;rnusing System.Text;rnrnnamespace CustomerInfornrn class CustomerNameComparesrn rn public class CustomerNameCompare: IComparerrn rn public int Compare(object x, object y)rn rn return new CaseInsensitiveComparer().Compare(((CustomerInfo)y).Name, ((CustomerInfo)x).Name);rn rn rn rnrn
请问这个怎么表达
date t_drntime t_trnt_d=today()rnt_t=now()rn请问昨天的日期怎么表达?rn谢谢
这个SQL怎么表达?
有一个表:TEMP 表结构和数据如下:(该表没主键)rnID Name VipNo UpdateDatern111 Ivy 12345 2004-01-01rn111 CoCo 12346 2004-02-01rn111 Ivy 12347 2004-03-01rnrn现在我想获得相同ID情况下,UpdateDate为最大的那一整条记录,即:rn111 Ivy 12347 2004-03-01rnrn请问怎么用SQL表达呢,最好只一条语句,谢谢
这个关系怎么表达
select ncye as qcye from accountcount where itembm = '1211001'rnselect jhd from iteminfo where itembm = '1211001'rnrn当 jhd=2时 select -ncye as qcye from accountcount where itembm = '1211001'rn否则 select ncye as qcye from accountcount where itembm = '1211001'rnrn说明jhd (借和贷) 当jhd=2(贷)时 ncye前面加个-号rn
大神们,帮我改改这个查询啊
update arnset a.id=b.id,a.name=b.namernfrom a,brnwhere a.id=b.id and b.time>a.timern得不到想要的结果, 更新结果总是影响了0行
这个MYSQL语句什么意思啊 大神们
select user,classid,(select `path` from userclass where userclass.id=users.classid) `path` from users where url like '%" . $a['host'] . "%'"rn
大神们我这个炸回事啊
/D:/apache-tomcat-7.0.72/webapps/login/WEB-INF/classes/struts.xml:8:69
大神们,这个包具体是什么啊。
package Filekey;rn 我直接网上搜的文件加密代码。但是有个包不知道是什么,想手动改。rnimport java.io.File;rnimport java.io.FileInputStream;rnimport java.io.FileOutputStream;rnimport java.io.IOException;rnimport java.io.InputStream;rnimport java.io.OutputStream;rnimport java.security.GeneralSecurityException;rn rnimport javax.crypto.Cipher;rnimport javax.crypto.SecretKey;rnimport javax.crypto.SecretKeyFactory;rnimport javax.crypto.spec.DESKeySpec;rnimport javax.crypto.spec.SecretKeySpec;rn rnimport lantrack.common.config.Config; //这个包是什么,我猜想是个文件路径??rn rnpublic class FileKey rn rn rn public String keyFile = (new StringBuilder(Config.EWEBEDIT_UPLOAD_PATH)).append("\\xfaj\\moban\\key.txt").toString();rn //文件里有config 。。是文件路径吗。rn public String getKeyFile()rn return this.keyFile;rn rn rn public void setKeyFile(String keyFile)rn this.keyFile=keyFile;rn rn
[求助]JSP大神们帮帮我啊!!
小弟最近遇到一个问题,怎么也解决不了。是关于JSP标签 rn 大体意思是我想点击时能跳到
求助C++啊! C++大神们进!
rn[color=#FF0000]谁能帮我做一下下面的任一题啊?急求!不胜感激....[/color]rnrn10.魔术师的猜牌术(1)rn魔术师利用一副牌中的13张黑桃,预先将它们排好后迭在一起,牌面朝下。对观众说:我不看牌,只数数就可以猜到每张牌是什么,我大声数数,你们听,不信?你们就看。魔术师将最上面的那张牌数为1,把它翻过来正好是黑桃A,将黑桃A放在桌子上,然后按顺序从上到下数手上的余牌,第二次数1、2,将第一张牌放在这迭牌的下面,将第二张牌翻过来,正好是黑桃2,也将它放在桌子上,第三次数1、2、3,将前面两张依次放在这迭牌的下面,再翻第三张牌正好是黑桃3。这样依次进行将13张牌全翻出来,准确无误。问魔术师手中的牌原始顺序是怎样安排的?rn*问题分析与算法设计rn题目已经将魔术师出牌的过程描述清楚,我们可以利用倒推的方法,很容易地推出原来牌的顺序。rn人工倒推的方法是:在桌子上放13空盒子排成一圈,从1开始顺序编号,将黑桃A放入1号盒子中,从下一个空盒子开始对空的盒子计数,当数到第二个空盒子时,将黑桃2放入空盒子中,然后再从下一个空盒子开始对空盒子计数,顺序放入3、4、5…,直到放入全部3张牌。注意在计数时要跳过非空的盒子,只对空盒子计数。最后牌在盒子中的顺序,就是魔术师手中原来牌的顺序。rnrn11.魔术师的猜牌术(2)rn魔术师再次表演,他将红桃和黑桃全部迭在一起,牌面朝下放在手中,对观众说:最上面一张是黑桃A,翻开后放在桌上。以后,从上至下每数两张全依次放在最底下,第三张给观众看,便是黑桃2,放在桌上后再数两张依次放在最底下,第三张给观众看,是黑桃3。如此下去,观众看到放在桌子上牌的顺序是:rn黑桃 A 2 3 4 5 6 7 8 9 10 J Q Krn红桃 A 2 3 4 5 6 7 8 9 10 J Q Krn问魔术师手中牌的原始顺序是什么?rn*问题分析与算法设计rn本题可在上题的基础上进行编程,不同的在于计数的方法和牌的张数,这些并不影响我们求解题目的思路,仍可按照倒推的方法,得到原来魔术师手中的牌的顺序。rnrn12.约瑟夫问题rn这是17世纪的法国数学家加斯帕在《数目的游戏问题》中讲的一个故事:15个教徒和15 个非教徒在深海上遇险,必须将一半的人投入海中,其余的人才能幸免于难,于是想了一个办法:30个人围成一圆圈,从第一个人开始依次报数,每数到第九个人就将他扔入大海,如此循环进行直到仅余15个人为止。问怎样排法,才能使每次投入大海的都是非教徒。rn*问题分析与算法设计rn约瑟夫问题并不难,但求解的方法很多;题目的变化形式也很多。这里给出一种实现方法。rn题目中30个人围成一圈,因而启发我们用一个循环的链来表示。可以使用结构数组来构成一个循环链。结构中有两个成员,其一为指向下一个人的指针,以构成环形的链;其二为该人是否被扔下海的标记,为1表示还在船上。从第一个人开始对还未扔下海的人进行计数,每数到9时,将结构中的标记改为0,表示该人已被扔下海了。这样循环计数直到有15个人被扔下海为止。rn
换行符不懂啊,大神们求助!!!
在自己写的telnet服务器中,当客户端连接上之后,向服务器发送一个字符串,客户端字符串输入完毕之后在键盘上按下enter键,表示输入一次完毕,这时服务器将客户端发送过来的数据,对客户端进行回发,这时问题出现了?当客户端使用的是键盘上中间的enter键时服务器向客户端回发的数据能正常换行,但是使用右下角的enter键时,回发到客户端的数据与原来客户端自己输入的数据之间就不能换行???rnrn这究竟是为什么呢???????????????????????????????rn
大神们 求助!!!
rn我想把word文档里面的内容显示在网页。rn之前试用过了字符流,字节流发现都乱码了。rn后来用了poi工具包,能读取word文档里面的文字,但是word的图片,和表格都不能读取。rn我想请问各位有什么办法能将word比较完整的显示在网页上。rn就是想qq邮箱 网易邮箱里面的word预览那效果那样!
求助大神们
这个地方为什么会有异常,照着模板写的,为什么模板的没有异常呢,求大神解答。[img=https://img-bbs.csdn.net/upload/201804/17/1523947095_576276.png][/img]
大神们求助。。。
为什么这段代码if条件进不去啊!!!rn理论上来说是应该进去的啊,困惑中。。跪求各位路过的大神们指导~rnusing System;[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/11.gif][/img]rnusing System.Collections.Generic;rnusing System.Collections;rnrnnamespace ConsoleApplication1rnrn class Programrn rn static void Main(string[] args)rn rn string test = Console.ReadLine();rn string o = Console.ReadLine();rn int K = Convert.ToInt32(o);rn int n = test.Length;rn for (int i = n; i > 2*n; i++) rn if (i - K < n)rn rn Console.Write(test[i - K]);rn rn elsern rn Console.Write(test[i - n - K]);rn rn rn rn rnrnrnPs:这段代码是为了让字符串右移k位输出。。。rn
大神们,新人求助~
[img=https://img-bbs.csdn.net/upload/201902/08/1549618293_529912.png][/img]rnrn域名的后缀是源码的文件名吗?我在源码文件名名里没找到这个文件名啊~哪位大神指导下rn?
求助啊啊 !!大神们
private void button1_Click(object sender, EventArgs e)rn rn SqlConnection conn = new SqlConnection();rn conn.ConnectionString = "Data Source=(local);Initial Catalog=Tesk;Integrated Security=True";rnrn conn.Open();;rn string sql = "select @a=pwd from pwd where num='" + textBox1.Text + "'";rn SqlCommand sqlCommand = new SqlCommand(sql, conn);rn sqlCommand.CommandType = CommandType.Text;rn conn.Open();rn string a = sqlCommand.ExecuteScalar();最后一句错了,我只想把pwd的值赋值给a
大神们求助
我是新人 刚刚接触myeclipse。。在myeclipse设置tomcat7.0的时候出现[img=https://img-bbs.csdn.net/upload/201407/12/1405155717_213303.jpg][/img]怎么办求助rn用网上给的方法也不行
大神们新人求助
今天新买了一根海力士DDR3 1600的笔记本内存,然后电脑不兼容我就尝试刷SPD,然后忘记备份了,求SPD信息一份,同款或者通用的均可,谢谢!
大神们 小弟求助
今天重新安装了JDK文件,我的系统是xp.安装好后把classpath和path都设置好了,在任意目录下都能够显示javac java和java -version。我的版本是“1.7.0-03”。我编译好java文件后,javac能够正常编译java去显示找不到或无法加载主类。
大神们,毕业设计求助
本人用visual studio 2010 MFC 编写的图片信息查询系统,ODBC连接的数据库,现在只有图片显示不出来。rn[img=https://img-bbs.csdn.net/upload/201605/11/1462943110_553190.png][/img]rn这个是连接odbc数据源自动声明的变量,最后一个是图片,现在想把他通过picture control控件显示出来。该怎么办?[img=https://img-bbs.csdn.net/upload/201605/11/1462943445_670823.png][/img]rn我在网上搜的是用DFX_Binary能显示出来,可是却不行,求大神帮忙!rn
android studio 2.0版本 大神们 这个怎么解决啊
[img=https://img-bbs.csdn.net/upload/201704/27/1493297119_155076.png][/img]
高手大神们进啊,怎么设置这个点击事件
高手们请看以下代码,我怎样才能获取到下面DD被点击rn rn 标题rn 内容一rn 内容二rn 内容三rn 内容四rnrnrnrn
大神们这个类要怎么写啊?
大神们这个自定义类关联控件,类要怎么写啊?rn Form1_Load()rn a = FindWindow(vbNullString, "无标题 - 记事本")rn b = FindWindowEx(a, vbNullString, "Edit", vbNullString)rn t1.IsHandleCreated = brn AddHandler t1.TextChanged, AddressOf Notepad_TextChangedrn End Subrn Private Sub Notepad_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)rn TextBox1.AppendText("嘿嘿得了!" & vbCrLf)rn End Sub
大神们,这个错误怎么解决啊,帮忙看看
[img=https://img-bbs.csdn.net/upload/201708/16/1502815896_839165.png][/img]rn第一条错误是Users下的.gradle缓存文件里的,这些错误都看不懂啊,有大神帮忙解答一下吗
求助,这怎么解决啊,大神们帮忙看一看
代码显示没有错误,但是 一调试就闪退,Log上是找不到“libmpbase.so”按照网上的方法改了sourceSetsrn rn main rn jni.srcDirs = []rn jniLibs.srcDirs = ['src/main/jniLibs']rn rn rnrn之后也没啥变化,有没有大神知道咋回事啊rnrn[color=#FF0000]rnO9j6E_rDYrdM4qvM220OBg==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.jiangdg.usbcamera-O9j6E_rDYrdM4qvM220OBg==/lib/x86, /data/app/com.jiangdg.usbcamera-O9j6E_rDYrdM4qvM220OBg==/base.apk!/lib/x86, /data/app/com.jiangdg.usbcamera-O9j6E_rDYrdM4qvM220OBg==/split_lib_dependencies_apk.apk!/lib/x86, /data/app/com.jiangdg.usbcamera-O9j6E_rDYrdM4qvM220OBg==/split_lib_resources_apk.apk!/lib/x86, /data/app/com.jiangdg.usbcamera-O9j6E_rDYrdM4qvM220OBg==/split_lib_slice_0_apk.apk!/lib/x86, /data/app/com.jiangdg.usbcamera-O9j6E_rDYrdM4qvM220OBg==/split_lib_slice_1_apk.apk!/lib/x86, /data/app/com.jiangdg.usbcamera-O9j6E_rDYrdM4qvM220OBg==/split_lib_slice_2_apk.apk!/lib/x86, /data/app/com.jiangdg.usbcamera-O9j6E_rDYrdM4qvM220OBg==/split_lib_slice_3_apk.apk!/lib/x86, /data/app/com.jiangdg.usbcamera-O9j6E_rDYrdM4qvM220OBg==/split_lib_slice_4_apk.apk!/lib/x86, /data/app/com.jiangdg.usbcamera-O9j6E_rDYrdM4qvM220OBg==/split_lib_slice_5_apk.apk!/lib/x86, /data/app/com.jiangdg.usbcamera-O9j6E_rDYrdM4qvM220OBg==/split_lib_slice_6_apk.apk!/lib/x86, /data/app/com.jiangdg.usbcamera-O9j6E_rDYrdM4qvM220OBg==/split_lib_slice_7_apk.apk!/lib/x86, /data/app/com.jiangdg.usbcamera-O9j6E_rDYrdM4qvM220OBg==/split_lib_slice_8_apk.apk!/lib/x86, /data/app/com.jiangdg.usbcamera-O9j6E_rDYrdM4qvM220OBg==/split_lib_slice_9_apk.apk!/lib/x86, /system/lib, /system/product/lib]]] couldn't find "libmpbase.so"rn at java.lang.Runtime.loadLibrary0(Runtime.java:1067)rn at java.lang.Runtime.loadLibrary0(Runtime.java:1007)rn at java.lang.System.loadLibrary(System.java:1667)rn at com.arcsoft.facerecognition.AFR_FSDKEngine.(AFR_FSDKEngine.java:25)rn at com.jiangdg.usbcamera.arcDetect.FaceDB.(FaceDB.java:56)rn at com.jiangdg.usbcamera.application.MyApplication.onCreate(MyApplication.java:29)rn at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1182)rn at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6423)rn at android.app.ActivityThread.access$1300(ActivityThread.java:220)rn at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1852)rn at android.os.Handler.dispatchMessage(Handler.java:107)rn at android.os.Looper.loop(Looper.java:214)rn at android.app.ActivityThread.main(ActivityThread.java:7319)rn at java.lang.reflect.Method.invoke(Native Method)rn at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)rn at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:934)[/color]rn
大神们,求救啊
private void llbWequal_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)rn rn rn Class1 w = new Class1();rn w.W_equal();rn rn这段代码一运行就抛出异常:The type initializer for 'lubing.Class1' threw an exception.rn调试运行的时候并不报错,只是运行到这个位置的时候就抛异常,运行不过去,各位大神,到底是咋回事啊
救命啊 大神们
[code=c]UINT fun(LPVOID lpParamter)rnrn CInitSock initSock; rn threadparameter* infor=(threadparameter*)lpParamter;rn //创建套节字rn SOCKET s = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);rn if(s == INVALID_SOCKET) rn rn printf("Failed socket() \n"); rn return 0; rn rn //填充sockaddr_in结构rn sockaddr_in sin; rn sin.sin_family = AF_INET; rn sin.sin_port = htons(4567); rn sin.sin_addr.S_un.S_addr = INADDR_ANY; rn //绑定这个套节字到一个本地地址rn if(::bind(s, (LPSOCKADDR)&sin, sizeof(sin)) == SOCKET_ERROR) rn rn return 0; rn rn // 接收数据rn char buff[1024]; rn sockaddr_in addr; rn int nLen = sizeof(addr); rn while(TRUE) rn rn int nRecv = ::recvfrom(s, buff, 1024, 0, (sockaddr*)&addr, &nLen); rn if(nRecv > 0) rn rn buff[nRecv] = '\0'; rn CString temp=buff;rn CString add=::inet_ntoa(addr.sin_addr);rn *(infor->message)="接受数据:("+add+"):"+temp+"\n";rn infor->thisdlg->UpdateData(FALSE);rn rn rn ::closesocket(s); rn[/code]rnC++多线程做的一个udp发送接收的简单程序 这个是服务端的 问题出在infor->thisdlg->UpdateData(FALSE);这里 程序说debug assertion failed! for information on your program can cause an assertion failure! 我是新手 infor是一个struct,里面的thisdlg指向了一个dialog类的指针,我想在线程里面使用这个指针来调用updatedata将message更新到界面上 但是怎么做都不行 我不知道该怎么做 大神们 帮帮我吧 小弟感激不尽
哪位大神们知道这些笔试题怎么写啊,求助。。。
题目一:实现单例   要求:类名是Queue;构造方法有入参&quot;String name&quot;,其含义是队列名称 ,队列的具体实现可以忽略;代码在JDK8下可编译通过。     题目二:数据对象设计   一个简单的论坛系统,需求如下:   - 登录用户可以发帖、回帖;   - 支持“回帖的回帖的回帖…”   - 论坛的首页展示回帖数Top10的发帖   - 用户的个人首页看到最新的10个回复--针对其发帖...
大神们,求助!竖表怎么变横表啊?
大神们,求助!竖表怎么变横表啊?rnrn表一:rnA 1 rnA 2rnA 3rnA 4rnA 5rnA 6rnA 7rnA 8rnA 9rn……rnA 100rnB 1rnB 2rn……rnB 100rn……rnrn怎么变成表二:rnrn 1 2 3 4 5 6 7 8…… 100rnArnB
大神们,救命啊。
公司叫我做排程的安排,这关系到算法问题。影响的因素实在太多了。。。。。。我这里就拿一个因素来让大家帮我参考参考,应该怎么来做这个算法。rnrn1号机器 每小时生成产品数量为 6000rn2号机器 每小时生成产品数量为 6500rn3号机器 每小时生成产品数量为 7000rn4号机器 每小时生成产品数量为 8000rnrn 现在订单来了5个rn 订单1 交货期3小时后 数量20000rn 订单2 交货期2小时后 数量10000 rn 订单3 交货期4小时后 数量50000rn 订单4 交货期2小时后 数量3000rnrnrn要让算出怎么安排机器生产是最优的方式,都能达到按时交货的目的。rn 订单数量我没去计算过,乱写的。。。求大神给思路,要思路,详细点最好。拜谢、!!!
大神们求救啊!
我做了个登入界面,其中登入对象有学生和管理员以及老师,那几个对象放在comboBox中,我该怎么获取这些comboBox里面的值呢?求代码
大神们帮忙啊
SSH整合 struts2+spring2.5.6+hibernate3.3 Myeclipse+tomc7+JDK7rn只先实现登陆功能 但提交后报空指针异常rnThe server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnjava.lang.NullPointerExceptionrn cn.service.impl.PersonServiceImpl.personLogin(PersonServiceImpl.java:20)rn cn.action.PersonAction.execute(PersonAction.java:42)rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn java.lang.reflect.Method.invoke(Method.java:601)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)rn com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)rn org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rn org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)rn org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)rnrnrn[b]PersonDao.java[/b]rnimport org.springframework.transaction.annotation.Transactional;rnrnimport cn.dao.CenericDao;rnimport cn.vo.Person;rnrn@Transactionalrnpublic interface PersonDao extends CenericDaorn rn @Transactional(readOnly=true)rn public Person personLogin(String name, String password);rn rnrnrnrn[b]PersonDaoImpl.java[/b]rnpublic class PersonDaoImpl extends CenericDaoImpl implements PersonDaornrn @SuppressWarnings("unchecked")rn public Person personLogin(String name, String password) rn rn String hql = "from Person as p where p.name=? and p.password=?";rn List person = getHibernateTemplate().find(hql, new Object[]name, password);rn if(person.size() > 0)rn return (Person)person.get(0);rn elsern return null;rn rn rn rnrn[b]PersonService.java[/b]rnrn@Transactionalrnpublic interface PersonService rnrn @Transactional(readOnly=true)rn public Person personLogin(String name, String password);rn rn public void changePassword(Integer id, String newPassword);rn rnrnrn[b]PersonServiceImpl.java[/b]rn@Entityrnpublic class PersonServiceImpl implements PersonService rnrn private PersonDao personDao;rn rn public void setPersonDao(PersonDao personDao) rn this.personDao = personDao;rn rnrn public Person personLogin(String name, String password) rn System.out.println(personDao);rn System.out.println(personDao.personLogin(name, password));rn return personDao.personLogin(name, password);rn rnrn public void changePassword(Integer id, String newPassword) rnrn Person user = personDao.findById(id);rn user.setPassword(newPassword);rn personDao.update(user);rn rnrnrnrnrn[b]PersonAction.java[/b]rnpublic class PersonAction extends ActionSupport rnrn private static final long serialVersionUID = -7259987330558645455L;rn private PersonService personService;rn private Person person;rn private String message;rnrn public String getMessage() rn return message;rn rnrn public void setMessage(String message) rn this.message = message;rn rnrn public Person getPerson() rn return person;rn rnrn public void setPerson(Person person) rn this.person = person;rn rn rn public void setPersonService(PersonService personService) rn this.personService = personService;rn rn rn rn public String execute() throws Exception rnrn personService = new PersonServiceImpl();rn person = personService.personLogin(person.getName(), person.getPassword());rn rn if(null != person)rn rn Map session = ActionContext.getContext().getSession();rn session.put("person", person);rn return SUCCESS;rn rn elsern this.setMessage("用户名或密码错误,请从新登录!");rn return INPUT;rn rn rn
大神们 救命啊!!!!
我用jsp的mvc模式想写一个网页,能够实现读取数据库信息的功能 但不能使用jstl 请大神们帮忙啊 http://bbs.51cto.com/viewthread.php?tid=1016380&pid=5133115&page=1&extra=#pid5133115 请大神们帮忙!!!谢了!!!
大神们,SOS啊
请问下就是我有两张表(A]B),数据相同,怎么用触发器实现当B表数据变动的时候将变动后的数据提取成一个集合返回?返回之后在将原A的数据替换成B的?
大神们求救啊
["totalRows":2,"id":"144430102237537619872417437753","noticeAddTime":"2015-10-08 18:43:42","noticeTitle":"测试公告","id":"144430105343711048084901373147","noticeAddTime":"2015-10-08 18:44:13","noticeTitle":"关于本学期实习工作安排"]rn这个json怎么解,大神们帮帮忙啊rn
相关热词 c# 标准差 计算 c#siki第五季 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池