text:
Q: Could not load file or assembly … or one of its dependencies. Exception from HRESULT: 0x80FC3C2C Exception message: Could not load file or assembly System.DirectoryServices or one of its dependencies. Exception from HRESULT: 0x80FC3C2C
Exception raised from CLR SQL procedure. Exception raised from the method in the assembly where one of the classes from System.DirectoryServices is initialized and that assembly is used by the assembly with CLR procedure.
Environment:

*

*MS SQL Server 2005 Std.

*.NET framework 2.0

*Database where assembly is created has parameter TRUSTWORTHY set to ON

*Assembly created with PERMISSION_SET = UNSAFE

A: Keep in mind this answer is from my notes from a training class ... You have to set PERMISSION_SET to EXTERNAL_ACCESS to access the server's file system or to access another server. This would make sense since you are using System.DirectoryServices to access another server (the domain controller).

A: I think System.DirectoryServices assembly is simply not supported inside SQL Server. SQL Server does only allow a very specific (hardcoded) list of assemblies (SQL Server 2005, SQL Server 2008) to be used, in order to not jeopardize it's stability.
Having said that, there seems to be a way to achieve it anyway see this question/answer (haven't tried it).

A: Finally, I found the workaround. I added the reference to the System.DirectoryServices to the assembly that is linked to the MS SQL and in the CLR procedure code create a class from this namespace. And so System.DirectoryServices assembly became visible from the class where the main code for DS is placed.

A: In my case the issue was related to the owner of the database.
It happens pretty often too when you face this error.
After restore of db it might help to fix db owner in master database:
--Update db owner in master database
DECLARE @Command VARCHAR(MAX) = 'ALTER AUTHORIZATION ON DATABASE::[<<DatabaseName>>] TO
[<<LoginName>>]'

SELECT @Command = REPLACE(REPLACE(@Command
            , '<<DatabaseName>>', SD.Name)
            , '<<LoginName>>', SL.Name)
FROM master..sysdatabases SD
JOIN master..syslogins SL ON  SD.SID = SL.SID
WHERE  SD.Name = DB_NAME()

PRINT @Command
EXEC(@Command)

If this does not help, try the following also:
ALTER AUTHORIZATION ON DATABASE::[YourDatabaseName] TO [sa]


text:
Q: var_dump возвращает false при пустой строке У меня есть скрипт, который должен возвращать кол-во 0 или 1 или true,
который проверяет, есть ли в базе такой пользователь или нет. Форма регистрации на мероприятие.
$sql = "SELECT 1 FROM `users_for_events` WHERE `user_event_id`= ? AND `user_event_email`= ? LIMIT 1";

$result = $this->queryExec($sql, array($events_id,$registerData['useremail']) )->fetch();

var_dump($result);

Проблема в том, что когда пользователя такого нету, вардамп возвращает false

A: Во-первых, этот код никакого количества не возвращает.
И для этой задачи возвращать и не должен.
РНР - язык с динамической типизацией. И возвращаемое FALSE будет приравнено 0 при любых проверках кроме строгих. Равно как и непустой массив, возвращаемый в случае существования юзера, будет приравнен к TRUE.
Так что этот код работает именно так, как надо.
И никакого count здесь даром не нужно. Поэтому не надо слушать дурных советов, а надо оставить этот код как есть. Все он показывает правильно.

redpajama_set_name: RedPajamaStackExchange


text:
Q: My URL returns Json in Browser But not works in Postman I have a test URL which returns a Json Result as following
{"result":[{"Users":{"id":"1","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"2","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"3","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"4","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"5","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"6","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"7","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"8","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"9","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"10","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"11","user_name":"raj","user_password":"rajesh123"}},{"Users":{"id":"12","user_name":"raj","user_password":"rajesh123"}}],"error_code":1}

My Problem is When i run this URL On Chrome Browser It returns the Correct response as mentioned above.But incase of Postman it returns errors with the following message
This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support
PS: In localhost it  [http://localhost/test/get_user.php] works fine in both Browser and PostMan.

A: Finally, I found that the problem is from Server Side.I have used the free hosting called Infinity Free in that they won't allow scraping. Now I am migrated to 000WebHost


text:
Q: Gamma square function in R? Does anyone have idea  how to write gamma^2(1+/beta)?
I'm right if  I used gamma(1+/beta)*gamma(1+/beta)?. Any idea or suggestion?
Thanks for helping

A: Yes. Gamma square (x) is just Gamma(x)*Gamma(x)
The MLE estimates for Weibull distribution:
SDcap =  11.4982087*((gamma(1+(2/1.1326673))-(gamma(1+(1/1.1326673)))^2))^0.5

where γ = Weibull, Shape = 1.1326673, α = Weibull, Scale = 11.4982087


text:
Q: how to click cancel in prompt box? I am developing a chrome extension to suppress a prompt box.
The access is protected in server side and user is triggered with prompt box for username/password as shown below,

I am injecting a content_script in the url at document_start and trying to detect the presence of this prompt, if present "cancel" button need to be clicked.
Here is a test link to get the login prompt,
http://128.199.223.179/testing/test.php

A: You technically can't close the prompt only using the javascript api... You might need to use an NPAPI plugin or other external software such as Selenium to emulate a click on the close button.
But, what you can do is prevent that dialog from popping up in the first place by intercepting an authentication request.
First add "webRequest" permission in your manifest. Then try this code:
// to listen to all urls use { urls: ["<all_urls>"] }
chrome.webRequest.onAuthRequired.addListener(function(details) {
  return {cancel: true};
}, {urls: ["http://128.199.223.179/testing/test.php"]}, ["blocking"]);

For better documentation, visit https://developer.chrome.com/extensions/webRequest#event-onAuthRequired


text:
Q: How to include multiple emscripten libraries with multiple preloaded MEMFS filesystems I have to include multiple libraries for a project - I've already succeeded in including multiple emscripten libraries but I cannot seem to access the preloaded MEMFS filesystem in the 2nd one.
In the second library I use the
--embed-file

parameter in the linker to embed a whole directory with the JS file output but when I access the files in the web console via
FS.stat()

I cannot access any file that was embedded.
Has anyone faced the same issue?

A: I initially had a similar behaviour. It turned out to be the "file" part of it that every browser would treat differently.
If your are running your page from a server, then this is not the case.
Otherwise have a look at : https://kripken.github.io/emscripten-site/docs/getting_started/Tutorial.html#tutorial-files

Unfortunately Chrome and Internet Explorer do not support file:// XHR requests, and can't directly load the local file in which preloaded data is stored. For these browsers you'll need to serve the files using a webserver. The easiest way to do this is to use the python SimpleHTTPServer (in the current directory do python -m SimpleHTTPServer 8080 and then open http://localhost:8080/hello.html).


text:
Q: Programmatically add Databricks spark-csv to Spark 1.6.2 client I'm working with Spark 1.6.2, developing a Python Spark client (it runs in yarn-client mode). The important thing here is, always in the client machine, I cannot spark-submit my Python script, but I need to run the script as a Python script.
At certain point of the code, I need to load a CSV file within HDFS as a Spark Dataframe (i.e. using a SQL context). As you may know, Spark 1.6.2 has no native support for CSV-based dataframes, and Databricks spark-csv must be used.
The data loading sentence is as follows:
df = sql_context.read.load(format='com.databricks.spark.csv', path=url, header=True, inferSchema=False, delimiter=',')

The problem is com.databricks.spark.csv is not found.
I know the Databricks spark-csv jars must be downloaded and put somewhere. The question is: where? Is this a requirement in the client machine, or in the cluster?
Since I don't know, I've tried this at the client machine, without success:

*

*export PYTHONPATH=/path/where/jars/were/downloaded/.

*conf = SparkConf().set('spark.jars', '/path/where/jars/were/downloaded/').

*conf = SparkConf().set('spark.driver.extraClassPath', '/path/where/jars/were/downloaded/'). [ref]

I've also tried this at Spark cluster, without success too:

*

*Setting custom spark-defaults property spark.jars through Ambari.

*Setting custom spark-defaults property spark.driver.extraClassPaththrough Ambari.

I'll remember you that command line options as --jars or --packages are not suitable for me, since I'm not running any Spark script :)
Other solutions, such as doing setting the jar in the Spark context using addJar() will not work, since Spark 1.6.2 do not implement it.
So, any idea about how my code can find Databricks spark-csv jar?
Just in case, this is the error trace:
java.lang.ClassNotFoundException: Failed to find data source: com.databricks.spark.csv. Please find packages at http://spark-packages.org
        at org.apache.spark.sql.execution.datasources.ResolvedDataSource$.lookupDataSource(ResolvedDataSource.scala:77)
        at org.apache.spark.sql.execution.datasources.ResolvedDataSource$.apply(ResolvedDataSource.scala:102)
        at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:119)
        at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:109)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:231)
        at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:381)
        at py4j.Gateway.invoke(Gateway.java:259)
        at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:133)
        at py4j.commands.CallCommand.execute(CallCommand.java:79)
        at py4j.GatewayConnection.run(GatewayConnection.java:209)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: com.databricks.spark.csv.DefaultSource
        at java.net.URLClassLoader$1.run(URLClassLoader.java:359)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at org.apache.spark.sql.execution.datasources.ResolvedDataSource$$anonfun$4$$anonfun$apply$1.apply(ResolvedDataSource.scala:62)
        at org.apache.spark.sql.execution.datasources.ResolvedDataSource$$anonfun$4$$anonfun$apply$1.apply(ResolvedDataSource.scala:62)
        at scala.util.Try$.apply(Try.scala:161)
        at org.apache.spark.sql.execution.datasources.ResolvedDataSource$$anonfun$4.apply(ResolvedDataSource.scala:62)
        at org.apache.spark.sql.execution.datasources.ResolvedDataSource$$anonfun$4.apply(ResolvedDataSource.scala:62)
        at scala.util.Try.orElse(Try.scala:82)
        at org.apache.spark.sql.execution.datasources.ResolvedDataSource$.lookupDataSource(ResolvedDataSource.scala:62)
        ... 14 more

Other post I've read...

*

*Add jars to a Spark Job - spark-submit

*Spark submit does automatically upload the jar to cluster?
Thanks in advance.

A: Finally, I found this issue at Databricks Github, and @drorata's answer worked for me:
export PACKAGES="com.databricks:spark-csv_2.11:1.3.0"
export PYSPARK_SUBMIT_ARGS="--packages ${PACKAGES} pyspark-shell"

By exporting the above environment variables, Databrick spark-csv package (and dependencies) where downloaded to my local .ivy2 folder, and automatically uploaded to the cluster while creating the Spark Context.


text:
Q: error while running struts 2 code I am getting a HTTP ERROR: 503 service unavailable error while running a sturts 2 application . the exact error is
HTTP ERROR: 503
Problem accessing /project_47/WEB-INF/classes/action/action_trial.java. Reason:
Service Unavailable

Powered by Jetty://
My console looks like this:
Starting preview server on port 8080
Modules:
  project_47 (/project_47)
2015-01-17 19:08:55.658:INFO:oejs.Server:jetty-8.1.10.v20130312
17 Jan, 2015 7:08:58 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-default.xml]
17 Jan, 2015 7:08:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-plugin.xml]
17 Jan, 2015 7:08:59 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
SEVERE: Dispatcher initialization failed
Unable to load configuration. - bean - jar:file:/C:/project_47/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/project_47/WEB-INF/lib/struts2-gxp-plugin-2.3.20.jar!/struts-plugin.xml:8:162
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
    at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
    at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:719)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
    at org.eclipse.jetty.server.Server.doStart(Server.java:280)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29)
Caused by: Unable to load bean: type:org.apache.struts2.views.gxp.inject.InjectedObjectContainer class:org.apache.struts2.views.gxp.inject.InjectedObjectContainer - bean - jar:file:/C:/project_47/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/project_47/WEB-INF/lib/struts2-gxp-plugin-2.3.20.jar!/struts-plugin.xml:8:162
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:247)
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:240)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    ... 19 more
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.views.gxp.inject.InjectedObjectContainer
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:424)
    at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:377)
    at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:218)
    ... 22 more
2015-01-17 19:08:59.357:WARN:oejuc.AbstractLifeCycle:FAILED struts2: Unable to load configuration. - bean - jar:file:/C:/project_47/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/project_47/WEB-INF/lib/struts2-gxp-plugin-2.3.20.jar!/struts-plugin.xml:8:162
Unable to load configuration. - bean - jar:file:/C:/project_47/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/project_47/WEB-INF/lib/struts2-gxp-plugin-2.3.20.jar!/struts-plugin.xml:8:162
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:493)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
    at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:719)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
    at org.eclipse.jetty.server.Server.doStart(Server.java:280)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29)
Caused by:
Unable to load configuration. - bean - jar:file:/C:/project_47/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/project_47/WEB-INF/lib/struts2-gxp-plugin-2.3.20.jar!/struts-plugin.xml:8:162
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
    at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
    at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:719)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
    at org.eclipse.jetty.server.Server.doStart(Server.java:280)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29)
Caused by:
Unable to load bean: type:org.apache.struts2.views.gxp.inject.InjectedObjectContainer class:org.apache.struts2.views.gxp.inject.InjectedObjectContainer - bean - jar:file:/C:/project_47/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/project_47/WEB-INF/lib/struts2-gxp-plugin-2.3.20.jar!/struts-plugin.xml:8:162
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:247)
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:240)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
    at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:719)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
    at org.eclipse.jetty.server.Server.doStart(Server.java:280)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29)
Caused by:
java.lang.ClassNotFoundException: org.apache.struts2.views.gxp.inject.InjectedObjectContainer
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:424)
    at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:377)
    at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:218)
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:240)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
    at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:719)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
    at org.eclipse.jetty.server.Server.doStart(Server.java:280)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29)
2015-01-17 19:08:59.373:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/project_47,file:/C:/project_47/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/project_47/},C:/project_47/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/project_47
Unable to load configuration. - bean - jar:file:/C:/project_47/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/project_47/WEB-INF/lib/struts2-gxp-plugin-2.3.20.jar!/struts-plugin.xml:8:162
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:493)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
    at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:719)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
    at org.eclipse.jetty.server.Server.doStart(Server.java:280)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29)
Caused by:
Unable to load configuration. - bean - jar:file:/C:/project_47/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/project_47/WEB-INF/lib/struts2-gxp-plugin-2.3.20.jar!/struts-plugin.xml:8:162
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
    at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
    at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:719)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
    at org.eclipse.jetty.server.Server.doStart(Server.java:280)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29)
Caused by:
Unable to load bean: type:org.apache.struts2.views.gxp.inject.InjectedObjectContainer class:org.apache.struts2.views.gxp.inject.InjectedObjectContainer - bean - jar:file:/C:/project_47/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/project_47/WEB-INF/lib/struts2-gxp-plugin-2.3.20.jar!/struts-plugin.xml:8:162
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:247)
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:240)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
    at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:719)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
    at org.eclipse.jetty.server.Server.doStart(Server.java:280)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29)
Caused by:
java.lang.ClassNotFoundException: org.apache.struts2.views.gxp.inject.InjectedObjectContainer
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:424)
    at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:377)
    at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:218)
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:240)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
    at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:719)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
    at org.eclipse.jetty.server.Server.doStart(Server.java:280)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72)
    at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29)
2015-01-17 19:08:59.544:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080

A: 1) Make sure that you have placed following necessary jar files in classpath.
antlr-2.7.2.jar
commons-beanutils-1.8.0.jar
commons-collections-3.1.jar
commons-fileupload-1.3.1.jar
commons-io-2.2.jar
commons-lang3-3.2.jar
commons-logging-1.1.3.jar
struts2-core-2.3.20.jar
xstream-1.4.2.jar
xwork-core-2.3.20.jar
ognl-3.0.6.jar
freemarker-2.3.19.jar

2) Make sure your web.xml is correct, below is one sample
<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >

<web-app>
  <display-name>Struts 2 Web Application</display-name>

  <filter>
    <filter-name>struts2</filter-name>
    <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
  </filter>

  <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

</web-app>

3)Make sure struts.xml is on classpath
.you can place it on default package
.Or you can place it on resources folder if you follow maven approach
.Or you can place it on the folder where manifest.mf is placed(usually it is src/conf/manifest.mf in case of netbeans ide)
4) Finally, if you are planning to use other jar files, include it also on the classpath.


text:
Q: Insert from another sister table with one extra field I have two tables and need top copy one to another INSERT INTO tbl_new SELECT FROM tbl_old
they both have 3 exact same columns, but tbl_new has 4th column called "type" how can i populate it in the same query.
I need to copy row from tbl_old and assign value to cell "type"
INSERT INTO tbl_new SELECT FROM tbl_old, (type) values (floor(rand() * 10))

does not work

A: Say tbl_old has two columns and tbl_new has three
tbl_old
colA | colB

tbl_new
colA | colB | colC

Suppose you want to populate colC with sum of colA and colB values. You can use this:
INSERT INTO tbl_new (colA, colB, colC) SELECT colA,colB,(colA+colB) FROM tbl_old;

In your example:
INSERT INTO tbl_new (colA, colB, colC) SELECT colA,colB,floor(rand()*10) FROM tbl_old;

A: Try below :
 INSERT INTO tbl_new (column1,column2,column3,type)
 SELECT column1,column2,column3,floor(rand() * 10) FROM tbl_old

Note : replace column1,column1.column3 with your column names.

A: These answers above are correct, but imagine the time spent writing out columns if everything is identical except for the extra column.
Here is a much neater query if the tables are identical in order with additional column at the end:
INSERT INTO tbl_new SELECT *, floor(rand()*10) FROM tbl_old;


text:
Q: Calling Lua from C I'm trying to call a user-defined Lua function from C. I've seen some discussion on this, and the solution seems clear. I need to grab the index of the function with luaL_ref(), and save the returned index for use later.
In my case, I've saved the value with luaL_ref, and I'm at a point where my C code needs to invoke the Lua function saved with luaL_ref. For that, I'm using lua_rawgeti as follows:
lua_rawgeti(l, LUA_REGISTRYINDEX, fIndex);

This causes a crash in lua_rawgeti.
The fIndex I'm using is the value I received from luaL_ref, so I'm not sure what's going on here.
EDIT:
I'm running a Lua script as follows:
function errorFunc()
  print("Error")
end

function savedFunc()
  print("Saved")
end

mylib.save(savedFunc, errorFunc)

I've defined my own Lua library 'mylib', with a C function:
static int save(lua_State *L)
{
    int cIdx = myCIndex = luaL_ref(L, LUA_REGISTRYINDEX);
    int eIdx = luaL_ref(L, LUA_REGISTRYINDEX);

I save cIdx and eIdx away until a later point in time when I receive some external event at which point I would like to invoke one of the functions set as parameters in my Lua script. Here, (on the same thread, using the same lua_State*), I call:
lua_rawgeti(L, LUA_REGISTRYINDEX, myCIndex);

Which is causing the crash.

A: My first suggestion is to get it working without storing the function in C at all. Just assign your function to a global in Lua, then in C use the Lua state (L) to get the global, push the args, call the function, and use the results. Once that's working, you've got the basics and know your function is working, you can change the way you get at the function to use the registry. Good luck!

A: As @Schollii mentioned, I was making this call after doing a lua_close(L).


text:
Q: IpOverUsbSvc service is terminated when Windows Phone device is connected I'm trying to deploy windows phone application to device and every time i'm getting the following error:

Error 16  Connection to device failed. For connecting to Windows Phone
  8 device - Windows Phone IP over USB Transport (IpOverUsbSvc) is not
  running. Retry after starting Windows Phone IP over USB Transport
  (IpOverUsbSvc) from the services management console. For Windows Phone
  7 device - Zune software is not launched. Retry after making sure that
  Zune software is launched.        0   0

I went to the services console and discovered that IpOverUsbSvc is down. Unfortunately I failed to restart it with the following error:
https://www.dropbox.com/s/dp7hv9crhdoz6t3/IpOverUsbSvc_Error.png
When I went to the event log I found the following:
Application: IpOverUsbSvc.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 0FE7BEED

Faulting application name: IpOverUsbSvc.exe, version: 8.0.9903.0, time stamp: 0x505d196a
Faulting module name: IpOverUsbPc.DLL, version: 0.0.0.0, time stamp: 0x505d1a08
Exception code: 0xc0000005
Fault offset: 0x0001beed
Faulting process id: 0x18fc
Faulting application start time: 0x01cf11eacc0716b2
Faulting application path: C:\Program Files (x86)\Common Files\Microsoft Shared\Phone Tools\CoreCon\11.0\Bin\IpOverUsbSvc.exe
Faulting module path: C:\Program Files (x86)\Common Files\Microsoft Shared\Phone Tools\CoreCon\11.0\Bin\IpOverUsbPc.DLL
Report Id: 3135e02f-7dde-11e3-bec2-88532e5eb25c
Faulting package full name:
Faulting package-relative application ID:

Then I disconnected my phone and was able to restart the service. It was up and running. Unfortunately when I connected my phone again service was terminated right away with the same errors (above).
Please advise.

A: I had the same problem some time back.. Can you pls try uninstalling your device driver and installing it again. This may resolve your error..

A: I come here to bring solution that u might like
I suggest you to try open service menu on your OS Windows here's the screnshot
on the form try to search Windows phone IP over USB Transport (IpOverUsbSvc)then u should right click and Start it
then you may deploy your apps and see whether this solution works or no.


text:
Q: Resize the image in jupyter notebook using markdown I want to add the image in the Jupyter notebook and I want to have particular height and width.
When I try to add the image using

![](img.png)

the code is adding the complete image but as per the image dimension and I don't have control over it.
I try to use ![](img.png =200x100) but then the image does not appear.
Does anybody know of a way to add an image with pre-specified dimensions?

A: You need to use HTML as Mark showed you, since you cannot do it with ![](img.png) syntax. From John Gruber's website:

As of this writing, Markdown has no syntax for specifying the dimensions of an image; if this is important to you, you can simply use regular HTML  tags.

A: You can also use Image module from IPython.display
https://ipython.org/ipython-doc/3/api/generated/IPython.display.html#IPython.display.Image
for example
from IPython.display import Image
Image(url='https://www.maxpierini.it/ncov/pics/ITA.png', width=200)

Use filename= instead of url= if the image is a local file.

A: You can use html directly

A: Image control in Jupyter markdown is possible but the image needs to be preceded by "attachment" or it doesn't display.

Cf. Simon Byrne.
With a url it works directly:

A: I'm using JupyterLab in a JupyterHub instance and the other answers didn't work for me. I've solved the problem with a
 around my image. Here is my 400px width and right aligned image:

    ![My Image alt text](image.jpg)

A: If you're attaching your images by inserting them into the markdown like this:
![Screenshot.png](attachment:Screenshot.png)

These attachment links don't work:

DO THIS. This does work.
Just add div brackets:

PS I'm using jupyter_core-4.4.0 & jupyter notebook.

A: enter image description here
change this 'Code' to 'Markdown' as like the screenshot. Later add

you are done


text:
Q: Tabs within accordion Jquery I use tabs within accordion from jquery ui.
You can see the code here
My problem is that i want to run the first tab results when the user click on the row (h3 tag) and only this tab.
The code as it is implementing now make the call for the first tab for all rows.
Thank you in advance!
vk

A: $( "#accordion" ).accordion({
    heightStyle: "content",
    collapsible:true,
    active:false,
    activate: function( event, ui ) {
        var active = $(this).accordion( "option", "active" );
        $('#tabs-' + active).tabs({
            beforeLoad: function( event, ui ) {
                ui.jqXHR.error(function() {
                    ui.panel.html(
                        "Couldn't load this tab. We'll try to fix this as soon as possible. " +
                        "If this wouldn't be a demo.");
                });
            }
        });
    }
});

The idea is to assign your tab an id corresponding to its row and on activate event, you select this id through the accordion API, and by extension the tab container, then activate it.
Fiddle: http://jsfiddle.net/limdauto/pSMQy/5/


text:
Q: OpenIMAJ: Maven MojoExecutionException I'm trying to create an OpenIMAJ project following the steps from this source:
http://www.openimaj.org/tutorial/getting-started-with-openimaj-using-maven.html
I ran the command:
mvn -DarchetypeCatalog=http://maven.openimaj.org/archetype-catalog.xml archetype:generate

and chose openimaj-quickstart-archetype, a groupID, an artifactID, left version as 1.0-SNAPSHOT, package as such and was able to make a new project successfully.
The default project created by the archetype contains a small "hello world" application which I tried to compile and assemble by:
cd trial2
mvn assembly:assembly

But the build failed and I got the following error:
F:\OpenImaj\trial2>mvn assembly:assembly
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building trial2 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-assembly-plugin:2.2-beta-5:assembly (default-cli) > package @ trial2 >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ trial2 ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory F:\OpenImaj\trial2\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ trial2 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ trial2 ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory F:\OpenImaj\trial2\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ trial2 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ trial2 ---
[INFO] Surefire report directory: F:\OpenImaj\trial2\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running mec.main_project.group1.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ trial2 ---
[INFO]
[INFO] <<< maven-assembly-plugin:2.2-beta-5:assembly (default-cli) < package @ trial2 <<<
[INFO]
[INFO] --- maven-assembly-plugin:2.2-beta-5:assembly (default-cli) @ trial2 ---
[INFO] ------------------------------------------------------------------------

(Highlighting Build Failure)
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.188 s
[INFO] Finished at: 2015-09-12T19:39:52+05:30
[INFO] Final Memory: 12M/112M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:assembly (default-cli) on project trial2: Error reading assemblies: No assembly descriptors found. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

F:\OpenImaj\trial2>

Most solutions suggested that I check my java_home variable. It is set correctly:
F:\OpenImaj\trial2>echo %java_home%
C:\Program Files\Java\jdk1.7.0_55

Also, my java version is: 1.8.0_31
and maven version:
F:\OpenImaj\trial2>mvn -version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T17:27:37+05:30)
Maven home: F:\Apache Maven\apache-maven-3.3.3-bin\apache-maven-3.3.3
Java version: 1.7.0_55, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_55\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "------", version: "6.3", arch: "amd64", family: "windows"

What could be the problem for this Build Failure?
Help is much appreciated..
Thanks in Advance
EDIT:
I'm trying to generate the jar-with-dependencies.xml file and this isn't working for me.


text:
Q: Finding out when the close button in notepad is clicked I need to open a notepad at runtime. I do this with the help of ProcessBuilder.
ProcessBuilder pb = new ProcessBuilder("notepad.exe" , "file.txt");
pb.start();

After notepad opens, I type in some stuff and when I click the close button. I want my java program to recognize that and continue with the rest of the program. I know that I could do
thread.sleep(*some Long value*)

but I think my program will be more efficient if it recognizes when notepad.exe closes.

A: Do something like this :-
ProcessBuilder pb = new ProcessBuilder("notepad.exe" , "file.txt");
Process pro = pb.start();
int val = pro.waitFor();

with this Process pro will wait for complete execution, also val should be 0 for normal termination, according to convention.
For Getting File Path:
This file.txt will be created at the current directory. SO in order to get the current directory path, you can use :-
File f = new File(".");
String path = f.getCanonicalPath();


text:
Q: Background color of one cell the same as another cell, but keeping the value How can I achieve that one cell has the same color as another cell, but I need to keep the value?
Example: In cell A1 I have a value (e.g. 21.14) and  I want that background color of cell A1 is the same as in cell F1. Background color of F1 is determined by some other conditional formatting, but I really cannot find a way to transfer only color from F1 to A1. Background color of A2 should be the same as F2 and so one...
Any ideas?


text:
Q: Limit of sum of sine terms Given $$L=\lim_{n\to\infty} n\left[f\left(\frac{1}{n}\right)+f\left(\frac{2}{n}\right)+\dots+f\left(\frac{k}{n}\right)-kf(0)\right]$$ where $k$ is a positive integer and $f(x)=\sin(x)$. How to find $L$?

A: $$L=\lim_{n\to\infty} n\left[f\left(\frac{1}{n}\right)+f\left(\frac{2}{n}\right)+\dots+f\left(\frac{k}{n}\right)-kf(0)\right]$$
then
$$L=\lim_{h\to 0} \left[\frac{f\left(h\right)+f\left(2h\right)+\dots+f\left(kh\right)-kf(0)}{h}\right]$$
then
$$L=\lim_{h\to 0} \left[\frac{(f\left(h\right)-f(0))+(f\left(2h\right)-f(0))+\dots+(f\left(kh\right)-f(0))}{h}\right]$$
then
$$L=\lim_{h\to 0} \frac{f\left(h\right)-f(0)}{h}+2\frac{f\left(2h\right)-f(0)}{2h}+\dots+k\frac{f\left(kh\right)-f(0)}{kh}$$
then
$$L=f'(0) + 2f'(0) + \dots + kf'(0)$$
then
$$L = \frac{k(k+1)}{2} f'(0)$$
Finally: the asked question is particular case of this solution. Since $f(x) = \sin x$ is derivable in neighbourhood of $x=0$ we have $f'(x=0) = \cos 0 = 1$ so
$$
L = \frac{k(k+1)}{2}
$$

A: What happens when you consider just the limit $$\lim_{n\to\infty}n\,(f(i/n)-f(0))$$ for a $C^1$ function $f$ and fixed $i$? What happens if we take a finite sum of such limits?

A: We have: $f(0) = \sin (0) = 0, \displaystyle n\cdot \sum_{i=1}^k f\left(\dfrac{i}{n}\right)=n\cdot \displaystyle \sum_{i=1}^k \sin\left(\dfrac{i}{n}\right)=n\cdot \dfrac{\cos\left(\dfrac{1}{2n}\right)-\cos\left(\dfrac{2k+1}{2n}\right)}{2\sin \left(\dfrac{1}{2n}\right)}=\dfrac{\dfrac{\sin\left(\dfrac{2k+2}{4n}\right)}{\dfrac{2k+2}{4n}}\cdot \dfrac{\sin\left(\dfrac{2k}{4n}\right)}{\dfrac{2k}{4n}}}{\dfrac{\sin\left(\dfrac{1}{n}\right)}{\dfrac{1}{n}}}\cdot \dfrac{k(k+1)}{4}\Rightarrow L = \dfrac{k(k+1)}{4}$


text:
Q: how to use SWIGTYPE_p_CHAR class in my main class? I have used typemaps :
%include "typemaps.i"

%apply SWIGTYPE * {char *deci};

This is the proxy class generated by SWIG:
public class SWIGTYPE_p_char {
    private long swigCPtr;

    protected SWIGTYPE_p_char(long cPtr, boolean futureUse) {
        swigCPtr = cPtr;
    }

    protected SWIGTYPE_p_char() {
        swigCPtr = 0;
    }

    protected static long getCPtr(SWIGTYPE_p_char obj) {
        return (obj == null) ? 0 : obj.swigCPtr;
    }
}

A: it seems trivial, but have you tried:
SWIGTYPE_p_char my_p_char;

after all, all that the class contains is a long int representation of the pointer address
clearly you can only use this for a c function that returns a char* or uses a char* parameter as a pseudo return value
if you want to use a char* input parameter then you'll most likely have to write a helper function of some sort
I wrapped this function prototype with SWIG recently:
int load_config(const char *fn, Config *cfg);

which loaded data into my Config data-structure from a file specified by a string (char*)
I was able to call it from Java with the following line:
example.load_config("test.cfg", cfg);

or alternatively:
String cfg_file = "test.cfg";
example.load_config(cfg_file, cfg);


text:
Q: Improve the search functionality How can I improve the search functionality.? I have written some codes to search for something.The search was taking too much time. And the code snippets here,
I am pulling the data from the database using this method.,
   OracleConnection connection = null;
   OraclePreparedStatement ptmst = null;
   OracleResultSet rs = null;
   OracleCallableStatement cstmt = null;
   StringBuffer strBfr = new StringBuffer();
   ArrayList myList = new ArrayList();
    try
    {
      connection = (OracleConnection) TransactionScope.getConnection();
      strBfr.append("select distinct .......... ");
      ptmst = (OraclePreparedStatement)connection.prepareStatement(strBfr.toString());
      rs = (OracleResultSet)ptmst.executeQuery();
      while (rs.next())
                {
                HashMap hashItems = new HashMap();
                hashItems.put("first",rs.getString(1));
                hashItems.put("second",rs.getString(2));
                myList.add(hashItems);
                }

    }
    catch (Exception e) {
        }
    finally {

            try {
                if (ptmst != null) {
                    ptmst.close();
                }
            } catch (Exception e) {
            }

            try {
                if (connection != null) {
                    TransactionScope.releaseConnection(connection);
                }
            } catch (Exception e) {
            }

        }
        return myList;

In my jsp:
 ArrayList getValues = new ArrayList();
    getValues = //calling Method here.
    for(int i=0; i < getValues.size();i++)
    {
    HashMap quoteSrch=(HashMap)allPOV.get(i);
    first = (String)quoteSrch.get("first");
    second = (String)quoteSrch.get("second");
    }

Query:
SELECT DISTINCT(mtl.segment1),
  mtl.description ,
  mtl.inventory_item_id ,
  mtl.attribute16
FROM mtl_system_items_b mtl,
  mtl_system_items_tl k
WHERE 1                           =1
AND mtl.organization_id           = ?
AND k.inventory_item_id           = mtl.inventory_item_id
AND NVL(orderable_on_web_flag,'N')= 'Y'
AND NVL(web_status,'UNPUBLISHED') = 'PUBLISHED'
AND mtl.SEGMENT1 LIKE ?  --Here is the search term

A: Make sure organization_id , inventory_item_id and especially SEGMENT1 is indexed in your table.
Your query is pretty standard , if that doesn't work then it seems like your DB server is responding slow which could be due to number of reasons like low space , low memory , slow disk/read etc.
You can then ask your DBA/Server admins to check that.

A: First you need to find out the real problem

*

*Is it the DB query

*Is it the Network (is the App and the DB located on the same machine?)

Once you have identified that it is the DB query, then it becomes more of a DB question.

*

*How does the two tables look like?

*Any index used?

*How does the data look like (How many rows etc)

After you have analyzed this, you should be able to post the question differently and expect an answer. I am not a DB guy, but I am sure someone would be able to provide some pointers.

A: Tunning has to be done:

*

*Check TransactionScope.getConnection(); is giving connection without any delay.

*Instead of creating new HashMap hashItems = new HashMap(); you can use
while (rs.next()){
  myList.add(rs.getString(1) + "delimiter" + rs.getString(2));
}

in jsp use
first = allPOV.get(i).split("delimter")[0];
second = allPOV.get(i).split("delimter")[1];

so that you can reduce memory.

*

*If possible use limit in your query, and use index on SEGMENT1 link.


text:
Q: Domain mapping (allow my users to have custom domains) Let's assume that I am building an e-commerce SaaS platform with react. Every subscriber of my platform will be able to create an e-commerce site under a subdomain (eg. max.myecom.com), and also have the option to use a custom domain (eg. maxecom.com). How would I approach to do that?
I'm sorry if it is a dumb question, but I am new to react and to javascript apps in general.
I do have experience with PHP, and have implemented a similar project using WordPress multisite.
But not even Google gave me an answer to this problem using react.
Thanks!

A: React is only a frontend framework and can't do anything with subdomains (once it's bundled, it's purely html, css and js that can be served by any html server). You could do the backend for this project in PHP, since you know the language already, or use any other language for this purpose. If you wanted to write the whole project in JavaScript, you would have to play around with Node.js and Express.js like this.


text:
Q: How can I show less or more images based on the device type/size? I have a responsive design for a website, so that it shows correctly either in desktop or mobile. My app is sort of a video gallery. (I'm using blaze, if that's relevant.)
However I would like to change the number of previews in desktop (about 9) and in mobile (probably 3), because a full screen in a desktop is different from a full screen in a mobile device.
I know how to only show some of the content by using CSS to hide/show different layouts on different viewports. However I'm trying to limit the data downloaded by the app, and not the data shown.
I was thinking I could achieve this by filtering my collection, however how do I identify the client device/viewport?

A: Have you considered building logic into your CSS using @media queries? This would manipulate your page display based on viewport, not device, though this is usually what you want anyway and it will require less maintenance going forward.
There are any number of ways you could do this. Here's a example where you tag the blocks you want to show on mobile with class="show-mobile". Then you have a media query to hide all the blocks which don't have this class when the the viewport is over 767px.
https://codepen.io/panchroma/pen/aWBXXM
Hope this helps!
HTML

one

two

three

four

five

six

CSS
@media (max-width: 767px) {
  li{display:none;}
  li.show-mobile{display:inline-block;}
}


text:
Q: Stop Snappy module not found in eslint I am trying to launch my ionic app onto the app store using Appflow (Ionic, MERN stack) but when running build I get an error with Snappy saying modules not found
I am trying to ignore this from my files so I can deploy as I am unable to install them onto my MacOS

This is impacting my deployment as AppFlow is picking up the error and erroring out.
I've tried creating and adding to my .eslintignore:
node_modules/
app/node_modules/
client/dist/

But I still get error, the full build error is:
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve './snappy.android-arm64.node' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve './snappy.darwin-arm64.node' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve './snappy.darwin-x64.node' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve './snappy.freebsd-x64.node' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve './snappy.linux-arm-gnueabihf.node' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve './snappy.linux-arm64-gnu.node' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve './snappy.linux-arm64-musl.node' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve './snappy.linux-x64-gnu.node' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve './snappy.linux-x64-musl.node' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve './snappy.win32-arm64-msvc.node' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve './snappy.win32-ia32-msvc.node' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve './snappy.win32-x64-msvc.node' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve '@napi-rs/snappy-android-arm64' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve '@napi-rs/snappy-darwin-arm64' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve '@napi-rs/snappy-freebsd-x64' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve '@napi-rs/snappy-linux-arm-gnueabihf' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve '@napi-rs/snappy-linux-arm64-gnu' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve '@napi-rs/snappy-linux-arm64-musl' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve '@napi-rs/snappy-linux-x64-gnu' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve '@napi-rs/snappy-linux-x64-musl' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve '@napi-rs/snappy-win32-arm64-msvc' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve '@napi-rs/snappy-win32-ia32-msvc' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/snappy/index.js
[react-scripts] Module not found: Can't resolve '@napi-rs/snappy-win32-x64-msvc' in '/Users/bradleykirkland/YRepo/KPA/node_modules/snappy'
[react-scripts] ./node_modules/mongodb/lib/encrypter.js
[react-scripts] Module not found: Can't resolve 'mongodb-client-encryption' in '/Users/bradleykirkland/YRepo/KPA/node_modules/mongodb/lib'
[react-scripts] Search for the keywords to learn more about each warning.
[react-scripts] To ignore, add // eslint-disable-next-line to the line before.

I've checked and made sure I've added my ignore file to the root, if anyone has gone through this with trying to release an ionic react app please help


text:
Q: S#arp architecture equivalent in Java What's the equivalent of S#arp architecture(.net) in the java world.
A one stop package that encompasses all the best practices and well identified packages to start a web application project.

A: If you're looking for a one-stop package that handles ORMs, web framework, presentation etc., then several options exist in the Java world. Two widely used, but very different ones are:

*

*Spring MVC + Hibernate

*Grails
You'll find other frameworks such as Tapestry or Struts which are geared towards web applications. I can't advise on these other than to say they (again) are widely used and you probably need to perform more investigation.
All the above will ultimately rest atop the base-level Java Servlet framework, which is probably too low-level for your needs (but worth knowing about).


text:
Q: What does add Gauss Random Noise mean? I'm reading a article about LSSVM and in numerical part they created an artificial example and it says:
The two features of samples are uniformly distrubuted in $[0,1)$ and $(1,2]$ with 50% of Gauss random noise for positive and negative class respectively. In this way our data set will be almost separable.
I was trying to reproduce this example in MATLAB, however, I don't know what "with 50% of Gauss random noise" mean, in order to understand it I google it and I discovered the commands awgnand wgn in Matlab but I can't understand what all arguments do. I continued looking for answers and I find that a possible interpretation is
pos = rand(2,10) + 0.5randn(2,10)
pos = 2*rand(2,10) + 0.5randn(2,10)

is it right? Is there a reference to understand more about gauss radom noise?
Thank you for any help.

A: If you think about a simple linear regression model,
Y = BX + e
where e is the random error, we often say that e is assumed to follow a Normal (Gaussian) distribution with mean 0 and variance 1.
This is what we mean by noise. Noise is basically the process that adds variability to the data. We call it noise because it distorts the signal from the underlying function (Y = BX).
Depending on the model that you have, or the data you are working with, your noise may take on different distributions.


text:
Q: Spring MVC http 500 error apache
Above is the directory hierarchy of my program
I am new to spring and learning MVC concepts I have written a program which takes input(Name) into a text box and prints Hello...'name'. Tha following is my directory structure and the various files I have created.
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
  <display-name>MVC_HelloWorld</display-name>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>

  <!-- default configuration -->
  <servlet>
   <servlet-name>HelloWorld</servlet-name>
   <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>hello</servlet-name>
    <url-pattern>*.ap</url-pattern> <!-- this same extension should bbe used in form action -->
  </servlet-mapping>
</web-app>

HelloWorld-servlet.xml
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"
"http://www.springframework.org/dtd/spring-beans-2.0.dtd">

<beans>
<!-- default handler mapping -->
<!--  file should be created under web inf annd it's view resolver file -->

  <!-- handler(Not rqd in case of default handler) -->
  <bean class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping" />

  <!-- controller configuration -->
<bean name="/HelloWorld.ap" class="controller.HelloController"> <!-- mapping url pattern to controller class using 'name' -->

<!-- view resolver -->

<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
       <property name="prefix" vlaue="/"/> <!-- default location (prefix used foor rqd page locations) -->
       |<property name="sufix" value=".jsp"/> <!-- sufix used forr rqd page extensions -->

</bean>

</bean>

</beans>

HelloController.java
package controller;

import java.util.HashMap;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import com.sun.javafx.collections.MappingChange.Map;

public class HelloController implements Controller {

    @Override
    public ModelAndView handleRequest(HttpServletRequest req, HttpServletResponse res) throws Exception {

        String name=req.getParameter("name");

        Map m= new HashMap();   // creating output object
           m.put("msg","Hello..."+name);

          ModelAndView mav=new ModelAndView("success"+m);

        return mav;
    }

}

index.jsp
<h1> Hello World</h1>

<form action="./hello.ap">

NAME: <input type="text" name="name">
      <input type="Submit" value="Say Hello">
</form>

success.jsp
${msg}

when I am running this code the index.jsp page is running properly bur upon further execution It shows Error 404.
what's wrong with the code..??
I am using Eclipse oxygen in that apache 8.5

A: Your servlet name in definition is HelloWorld
but in mapping servlet, is hello.
These names must be the same.

A: <servlet>
   <servlet-name>HelloWorld</servlet-name>
   <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>hello</servlet-name>
    <url-pattern>*.ap</url-pattern> <!-- this same extension should bbe used in form action -->
  </servlet-mapping>
</web-app>

here you have used HelloWorld as the servlet name previously and you referring to that as hello later on which is not correct so please correct that just change the hello in servelt-mapping to HelloWorld and access the servlet as HelloWorld.ap it will work.


text:
Q: network capture program that writes network capture file even when being shut down unexpectedly 1) I am trying to do long running monitoring of my network connection using my desktop computer but if the computer gets shut down without first properly exiting the network monitoring program then the .cap file gets corrupted and I am unable to pull useful data from it.
2) I am looking for a network monitoring tool (like Wireshark, or Microsoft Network Monitor, etc) that will successfully write a (non-corrupted) capture file to disk even if the application is killed inadvertently. The capture program might die inadvertently due to the machine running out of RAM, a system crash, a reboot caused by Windows Update or some other reboot, etc. Basically, the program will need to either stream the data to disk as a .cap file as it is received, or possibly use a different file format - perhaps something that is human readable like a text file so that even if the file is technically corrupted I will still be able to read it myself via a text editor.
3) Using a capture "chain" where the chain files are small does not work for me because I need to see the very last little bit of data. Capturing most of the data but then losing the last bit of data does not get me what I need. I need to be able to inspect the last bit of data that is sent over the wire to see if that data is what is causing the crash / reboot.
4) Alternatively, a tool that can successfully take a corrupted .cap file and fix the file would also work.
5) I can't use a network device to monitor the traffic, the solution needs to be software that runs on a Windows 7 64bit desktop computer.

A: Use tshark and setup tshark to frequently switch to a different new file.  This way you don't lose your entire capture, but possibly just a small portion of the more recent stuff.  There are many options to set how often a new file should be used.
Then simply read in or merge all the files together as needed when doing analysis.


text:
Q: How to use thumb generator inside PHP script I'm trying to use this thumbnail generator, but as you can see you have to go through this link to create an image thumb. This is maybe a dumb question, but how do I get it work inside a php script that saves some variables to database? I tried to include
header("Location: http://www.zubrag.com/thumb.php?src=http://www.test.com/test.jpg&dest=thumb.jpg&x=100&y=50");

but it doesn't work. I bet there's really easy solution but I can't find it.

A: I really can't see your problem...
Do you want to do more than making a thumb at a line where you are calling the script? Just put out the lines of code from the thumb.php and use it in your script.
include('image.class.php');

$img = new Zubrag_image;

// initialize
$img->max_x        = $max_x;
$img->max_y        = $max_y;
$img->cut_x        = $cut_x;
$img->cut_y        = $cut_y;
$img->quality      = $image_quality;
$img->save_to_file = $save_to_file;
$img->image_type   = $image_type;

// generate thumbnail
$img->GenerateThumbFile($images_folder . $from_name, $thumbs_folder . $to_name);

you only have to change the values with your desired one... this should work in my short review of the script.

A: I think you misread the instructions. It's not a web service but a PHP script you have to install to your server. The zubrag.com url is just an example, you replace it with your own site's url.

A: Without any personal prior experience with the particular generator, what you will need to display an image will be something in the form of:
<img src="thumb.php?src=link/to/image.jpg&x=100&y=50&f=0"/>

A: You can try this
<?

$property_id = 1; // for our little example here

define("_IMAGE_PATH","property_images/");
// max dimensions allowed:
define("_IMAGE_WIDTH","640");
define("_IMAGE_HEIGHT","480");
define("_IMAGE_THUMB_WIDTH","100");
define("_IMAGE_THUMB_HEIGHT","75");

// grab the path to the temporary file (image) that the user uploaded
$photo = $_FILES['new_image']['tmp_name'];
// check if it exists
if(is_uploaded_file($photo)){
    //the real image file name
    $real_name = strtolower($_FILES['new_image']['name']);
    // image type based on image file name extension:
    if(strstr($real_name,".png")){
        $image_type = "png";
    }else if(strstr($real_name,".jpg")){
        $image_type = "jpg";
    }else if(strstr($real_name,".gif")){
        $image_type = "gif";
    }else{
        die("Unsupported image type");
    }

    // find the next image name we are going to save
    $x=1;
    while(true){
        $image_name = _IMAGE_PATH."${property_id}/${x}.jpg";
        if(!is_file($image_name))break;
        $x++;
    }

    // start processing the main bigger image:
    $max_width = _IMAGE_WIDTH; $max_height = _IMAGE_HEIGHT;
    $size = getimagesize($photo);
    $width = $size[0];
    $height = $size[1];
    $x_ratio = $max_width / $width;
    $y_ratio = $max_height / $height;
    if(($width <= $max_width)&&($height <= $max_height)){
        $tn_width = $width;
        $tn_height = $height;
    }else{
        if(($x_ratio * $height) < $max_height){
            $tn_height = ceil($x_ratio * $height);
            $tn_width = $max_width;
        }else{
            $tn_width = ceil($y_ratio * $width);
            $tn_height = $max_height;
        }
    }
    switch($image_type){
        case "png": $src=imagecreatefrompng($photo); break;
        case "jpg": $src=imagecreatefromjpeg($photo); break;
        case "gif": $src=imagecreatefromgif($photo); break;
    }
    // destination resized image:
    $dst = imagecreatetruecolor($tn_width, $tn_height);
    // resize original image onto $dst
    imagecopyresampled($dst, $src, 0, 0, 0, 0, $tn_width, $tn_height, $width, $height);
    // write the final jpeg image..
    imagejpeg($dst, $image_name, 100) or die("Error: your photo
    has not been saved. Please contact the administrator");
    // time to clean up
    imagedestroy($src);
    imagedestroy($dst);

    // and now we do it alll again for the thumbnail:
    $max_width = _IMAGE_THUMB_WIDTH; $max_height = _IMAGE_THUMB_HEIGHT;
    $size = GetImageSize($photo);
    $width = $size[0];
    $height = $size[1];
    $x_ratio = $max_width / $width;
    $y_ratio = $max_height / $height;
    if(($width <= $max_width)&&($height <= $max_height)){
        $tn_width = $width;
        $tn_height = $height;
    }else{
        if(($x_ratio * $height) < $max_height){
            $tn_height = ceil($x_ratio * $height);
            $tn_width = $max_width;
        }else{
            $tn_width = ceil($y_ratio * $width);
            $tn_height = $max_height;
        }
    }
    switch($image_type){
        case "png": $src=imagecreatefrompng($photo); break;
        case "jpg": $src=imagecreatefromjpeg($photo); break;
        case "gif": $src=imagecreatefromgif($photo); break;
    }
    $dst = imagecreatetruecolor($tn_width, $tn_height);
    imagecopyresampled($dst, $src, 0, 0, 0, 0, $tn_width, $tn_height, $width, $height);
    $thumbfile = $image_name . ".thumb.jpg";
    if(file_exists($thumbfile))unlink($thumbfile);
    imagejpeg($dst, $thumbfile, 100) or die("Error: your photo thumb has not been saved.
       Please contact the administrator");
    imagedestroy($src);
    imagedestroy($dst);
}
?>


text:
Q: How can I determine if someone's SSH key contains an empty passphrase? Some of my Linux & FreeBSD systems have dozens of users. Staff will use these "ssh gateway" nodes to SSH into other internal servers.
We're concerned that some of these people use an unencrypted private SSH key (A key without a passphrase. This is bad, because if a cracker ever gained access to their account on this machine, they could steal the private key and now have access to any machine which uses this same key. For security reasons, we require all users to encrypt their private SSH keys with a passphrase.
How can I tell if a private key is not-encrypted (e.g. Does not contain a passphrase)? Is there a different method to do this on an ASCII-armored key vs. a non-ASCII-armored key?
Update:
To clarify, assume I have superuser access on the machine and I can read everybody's private keys.

A: If you have access to the private key, I suppose, you can use it without passphrase to authenticate against the public key. If this works you know it has no passphrase. If it had, it would give you an error message.
If you don't have access to the private key, I doubt you can detect this. The passphrase's purpose is to "unlock" the private key, it has no function in regard to the public key.
In fact, if it would, it would make the system less secure. One could use the public key, that is available to try to mount brute force or other attacks trying to crack the passphrase.

A: Well, OpenSSH private keys with empty passphrases are actually not encrypted.
Encrypted private keys are declared as such in the private key file. For instance:
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,7BD2F97F977F71FC

BT8CqbQa7nUrtrmMfK2okQLtspAsZJu0ql5LFMnLdTvTj5Sgow7rlGmee5wVuqCI
/clilpIuXtVDH4picQlMcR+pV5Qjkx7BztMscx4RCmcvuWhGeANYgPnav97Tn/zp
...
-----END RSA PRIVATE KEY-----

So something like
# grep -L ENCRYPTED /home/*/.ssh/id_[rd]sa

should do the trick.

A: I looked all over for this and never found a satisfying answer, but I managed to construct one, so...
Note that this will update the file if it works, so if you're trying to not be noticed by the users whose keys you're testing, you may want to copy the key first.  OTOH, since you just caught your user with a passwordless key, maybe you don't care if they notice.  :D
$ ssh-keygen -p -P '' -N '' -f ~/.ssh/KEYTEST
Key has comment '/home/rlpowell/.ssh/KEYTEST'
Your identification has been saved with the new passphrase.
$ echo $?
0

$ ssh-keygen -p -P '' -N '' -f ~/.ssh/KEYTEST
Bad passphrase.
$ echo $?
1


text:
Q: Understanding meaning of polar If $ A\subseteq\mathbb{R}^n $, one can define the polar
$$ A^\circ=\{x\in\mathbb{R}^n\mid \forall y\in A \ \langle x,y\rangle\le 1 \}, $$
where $ \langle x,y\rangle $ is scalar product.
What's the meaning of this definition? Is there any way to easily calculate $ A^\circ $ for some well-known sets, like ball, plane, etc.?


text:
Q: Copy and paste certain cells on conditions I need an Excel vba macro to...
Loop through sheet 1 - column (C), find the duplicate value (if one exists) on sheet 2 - column (G) and based on a different column's value in sheet 1 - column (D), perform a copy and paste "of a certain cell" from sheet 2 to sheet 1 – column (P).
Example:
If duplicate found and sheet 1 column D = Red, copy and paste value from sheet 2 column T to corresponding row sheet 1 column P.
If duplicate found and sheet 1 column D = Orange, copy and paste value from sheet 2 column V to corresponding row sheet 1 column P.
Etc…etc for each condition in column D.
Sheet 1
C   D   P
219906  Red 01/01/2014
239241  Yellow
239243  Orange  02/15/2013
Sheet 2
G   T   V   X   Z
219906  01/01/2014
254788          10/26/2010
239243      02/15/2013
Any help would be most appreciated
It doesn't have to be a VBA macro if a formula could accomplish the same.  I have around 20 or so conditions.  If I could have the first two created I could use that as a template to build the others.  Thanks

A: Here's a formula that should work for you:
=IFERROR(VLOOKUP(C2,Sheet2!$G:$Z,INDEX({14,16},MATCH(D2,{"Red","Orange"},0)),FALSE),"")

14 is the number of columns from G to T (including both G and T), and 16 is the number of columns from G to V (including both G and V).  Your sample data wasn't clear what dates were in what columns, so that was my guess.
The formula would go in Sheet1, column P.  I assumed row 1 is a header row so actual data starts on row 2.  So with that, the formula would go in cell P2 and get copied down.
Put the column numbers in the same order as the corresponding condition as shown.  You can add more by separating the values within the {} with a comma as shown.
Alternately, instead of the index/match, you could create a separate table containing the conditions and the column numbers and then use a nested vlookup, which would look something like this:
=IFERROR(VLOOKUP(C2,Sheet2!$G:$Z,VLOOKUP(D2,Sheet3!$A:$B,2,FALSE),FALSE),"")


text:
Q: Accessing App code from Notification Service Extension Notification Service Extension modifies the content of a remote notification before it's delivered to the user. For example if a remote notification contains an image URL, Notification Service Extension can be used to fetch the image and show it in the notification content.
But how can I access actual app code in Notification Service Extension? Let's say I have a DataAccess swift class in app code, can I access this class in Notification Service Extension?
Edit: Some folks suggested to add app code to service extension, which is not applicable in my situation.

A: Go to the classes that you want to use in your app project. On your File inspector your are gonna see the Target Membership of your class. Check the extension's name checkbox. Then you can reuse your code.
You can also add the classes you need in the Build Phases -> Compiled Sources in your notification service target. The result is the same.

A: The usual solution is to create a library/framework which includes your DataAccess class, and your app and the Notification Service Extension uses this library/framework.
Make sure you select Do not embed for your framework when adding to Notification Service Extension, and select Embed and sign when adding it to your app.


text:
Q: Error in uploading large files > 1GB from SFTP to s3 bucket I am trying to upload files to s3 bucket directly from SFTP server. It works till 1GB and after that it gives error as shown below. I am using Apache MINA to set up the virtual directory and leaf node of directory structure is linked with s3 store. Below is the code.
public class FileRemotePathChannel extends FileChannel {

@Override
    public int write(ByteBuffer src) throws IOException {
        if (channel == null) {
            pipedInputStream = new PipedInputStream();
            pipedOutputStream = new PipedOutputStream(pipedInputStream);
            channel = Channels.newChannel(pipedOutputStream);
            createS3Thread(this.bucketName);
        }
        log.info("Writing buffer with size :{} to s3", src);
        channel.write(src);
        return src.remaining();
    }

    private void createS3Thread(String bucketName) {
        if (s3WriteThread == null) {
            log.debug("Transfering file : {} to object store in bucket :{}", path.substring(path.lastIndexOf("/") + 1),
                    bucketName);
            s3WriteThread = new Thread() {
                public void run() {
                    try {
                        getAmazonS3Instance().writeFileToBucket(bucketName, path.substring(path.lastIndexOf("/") + 1),
                                pipedInputStream);
                        pipedInputStream.close();
                    } catch (Exception e) {
                        log.error("Error writing file to S3", e);
                    }
                }
            };
            s3WriteThread.start();
        }
    }
}

 public void writeFileToBucket(String bucket, String fileName, InputStream inputStream) throws IOException {
            ObjectMetadata metadata = new ObjectMetadata();
            metadata.setContentType("application/octet-stream");
            log.info("Uploading file to s3 bucket with bucketName :{}, fileName: {}", bucket, fileName);
            s3Connection.awsConnection().putObject(bucket, fileName, inputStream, metadata);
        }

Error log while uploading more than 1gb file:
2020-02-28 19:05:23.664 DEBUG com.sc.xyz.sshd.filesystem.FileRemotePathChannel - Setting new position :0
2020-02-28 19:05:23.664 DEBUG com.sc.xyz.sshd.filesystem.FileRemotePathChannel - Setting the position for Write
2020-02-28 19:05:23.664 INFO  com.sc.xyz.sshd.filesystem.FileRemotePathChannel - Writing buffer with size :java.nio.HeapByteBuffer[pos=57 lim=32761 cap=32825] to s3
2020-02-28 19:05:23.665 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:23.665 DEBUG org.apache.sshd.server.subsystem.sftp.SftpSubsystem - doSendStatus(ServerSessionImpl[user1@/127.0.0.1:52705])[id=117493766] SSH_FXP_STATUS (substatus=SSH_FX_OK, lang=, msg=)
2020-02-28 19:05:23.666 DEBUG org.apache.sshd.server.subsystem.sftp.SftpSubsystem - process(ServerSessionImpl[user1@/127.0.0.1:52705])[length=32757, type=SSH_FXP_WRITE, id=117494022] processing
2020-02-28 19:05:23.666 DEBUG com.sc.xyz.sshd.server.xyzSFTPEventListener - Session is Writing for offset :1073672320, dataoffset :57, and file size :32704
2020-02-28 19:05:23.666 DEBUG com.sc.xyz.sshd.filesystem.FileRemotePathChannel - Setting new position :0
2020-02-28 19:05:23.666 DEBUG com.sc.xyz.sshd.filesystem.FileRemotePathChannel - Setting the position for Write
2020-02-28 19:05:23.666 INFO  com.sc.xyz.sshd.filesystem.FileRemotePathChannel - Writing buffer with size :java.nio.HeapByteBuffer[pos=57 lim=32761 cap=32825] to s3
2020-02-28 19:05:23.666 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:23.666 DEBUG org.apache.sshd.server.subsystem.sftp.SftpSubsystem - doSendStatus(ServerSessionImpl[user1@/127.0.0.1:52705])[id=117494022] SSH_FXP_STATUS (substatus=SSH_FX_OK, lang=, msg=)
2020-02-28 19:05:23.667 DEBUG org.apache.sshd.server.subsystem.sftp.SftpSubsystem - process(ServerSessionImpl[user1@/127.0.0.1:52705])[length=32757, type=SSH_FXP_WRITE, id=117494278] processing
2020-02-28 19:05:23.667 DEBUG com.sc.xyz.sshd.server.xyzSFTPEventListener - Session is Writing for offset :1073705024, dataoffset :57, and file size :32704
2020-02-28 19:05:23.667 DEBUG com.sc.xyz.sshd.filesystem.FileRemotePathChannel - Setting new position :0
2020-02-28 19:05:23.667 DEBUG com.sc.xyz.sshd.filesystem.FileRemotePathChannel - Setting the position for Write
2020-02-28 19:05:23.667 INFO  com.sc.xyz.sshd.filesystem.FileRemotePathChannel - Writing buffer with size :java.nio.HeapByteBuffer[pos=57 lim=32761 cap=32825] to s3
2020-02-28 19:05:23.668 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:23.668 DEBUG org.apache.sshd.server.subsystem.sftp.SftpSubsystem - doSendStatus(ServerSessionImpl[user1@/127.0.0.1:52705])[id=117494278] SSH_FXP_STATUS (substatus=SSH_FX_OK, lang=, msg=)
2020-02-28 19:05:23.668 DEBUG org.apache.sshd.server.subsystem.sftp.SftpSubsystem - process(ServerSessionImpl[user1@/127.0.0.1:52705])[length=32757, type=SSH_FXP_WRITE, id=117494534] processing
2020-02-28 19:05:23.669 DEBUG com.sc.xyz.sshd.server.xyzSFTPEventListener - Session is Writing for offset :1073737728, dataoffset :57, and file size :32704
2020-02-28 19:05:23.669 DEBUG com.sc.xyz.sshd.filesystem.FileRemotePathChannel - Setting new position :0
2020-02-28 19:05:23.669 DEBUG com.sc.xyz.sshd.filesystem.FileRemotePathChannel - Setting the position for Write
2020-02-28 19:05:23.669 INFO  com.sc.xyz.sshd.filesystem.FileRemotePathChannel - Writing buffer with size :java.nio.HeapByteBuffer[pos=57 lim=32761 cap=32825] to s3
2020-02-28 19:05:23.670 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:23.671 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:23.673 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:23.675 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:23.677 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:23.678 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:23.680 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:24.040 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:24.041 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:24.041 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:24.042 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:24.042 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:24.042 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:24.043 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:24.043 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=32761
2020-02-28 19:05:24.043 DEBUG org.apache.sshd.server.channel.ChannelSession - handleData(ChannelSession[id=0, recipient=256]-ServerSessionImpl[user1@/127.0.0.1:52705]) SSH_MSG_CHANNEL_DATA len=448
2020-02-28 19:05:24.040 DEBUG com.amazonaws.http.AmazonHttpClient - FYI: failed to reset content inputstream before throwing up
java.io.IOException: Resetting to invalid mark
    at java.io.BufferedInputStream.reset(BufferedInputStream.java:448) ~[?:1.8.0_241]
    at com.amazonaws.internal.SdkBufferedInputStream.reset(SdkBufferedInputStream.java:106) ~[aws-java-sdk-core-1.11.232.jar:?]
    at com.amazonaws.internal.SdkFilterInputStream.reset(SdkFilterInputStream.java:112) ~[aws-java-sdk-core-1.11.232.jar:?]
    at com.amazonaws.event.ProgressInputStream.reset(ProgressInputStream.java:168) ~[aws-java-sdk-core-1.11.232.jar:?]
    at com.amazonaws.internal.SdkFilterInputStream.reset(SdkFilterInputStream.java:112) ~[aws-java-sdk-core-1.11.232.jar:?]
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.lastReset(AmazonHttpClient.java:1145) [aws-java-sdk-core-1.11.232.jar:?]
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1072) [aws-java-sdk-core-1.11.232.jar:?]
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:743) [aws-java-sdk-core-1.11.232.jar:?]
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:717) [aws-java-sdk-core-1.11.232.jar:?]
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699) [aws-java-sdk-core-1.11.232.jar:?]
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667) [aws-java-sdk-core-1.11.232.jar:?]
    at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649) [aws-java-sdk-core-1.11.232.jar:?]
    at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513) [aws-java-sdk-core-1.11.232.jar:?]
    at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4319) [aws-java-sdk-s3-1.11.232.jar:?]
    at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4266) [aws-java-sdk-s3-1.11.232.jar:?]
    at com.amazonaws.services.s3.AmazonS3Client.putObject(AmazonS3Client.java:1746) [aws-java-sdk-s3-1.11.232.jar:?]
    at com.amazonaws.services.s3.AmazonS3Client.putObject(AmazonS3Client.java:1608) [aws-java-sdk-s3-1.11.232.jar:?]
    at com.sc.xyz.sshd.component.AmazonS3Component.writeFileToBucket(AmazonS3Component.java:96) [classes/:?]
    at com.sc.xyz.sshd.filesystem.FileRemotePathChannel$1.run(FileRemotePathChannel.java:126) [classes/:?]
2020-02-28 19:05:24.670 DEBUG org.apache.sshd.server.subsystem.sftp.SftpSubsystem - doSendStatus(ServerSessionImpl[user1@/127.0.0.1:52705])[id=117494534] SSH_FXP_STATUS (substatus=SSH_FX_FAILURE, lang=, msg=General failure)
2020-02-28 19:05:24.671 DEBUG org.apache.sshd.server.subsystem.sftp.SftpSubsystem - process(ServerSessionImpl[user1@/127.0.0.1:52705])[length=32757, type=SSH_FXP_WRITE, id=117494790] processing
2020-02-28 19:05:24.671 DEBUG com.sc.xyz.sshd.server.xyzSFTPEventListener - Session is Writing for offset :1073770432, dataoffset :57, and file size :32704
2020-02-28 19:05:24.671 DEBUG com.sc.xyz.sshd.filesystem.FileRemotePathChannel - Setting new position :0
2020-02-28 19:05:24.671 DEBUG com.sc.xyz.sshd.filesystem.FileRemotePathChannel - Setting the position for Write
2020-02-28 19:05:24.671 INFO  com.sc.xyz.sshd.filesystem.FileRemotePathChannel - Writing buffer with size :java.nio.HeapByteBuffer[pos=57 lim=32761 cap=32825] to s3

Thing that i have tried to solve this is passing this value in java arguments -Dcom.amazonaws.sdk.s3.defaultStreamBufferSize=5368709120 but the issue still persist.
Please let me know if any ideas or any solutions.