Hey guys...
$bookA = "123";
$crack = "A";
I want to do something similar to this:
echo $book$crack;
Such that the output is 123.
What is the correct syntax for the echo command?
Thanks.
I have a Java String that contains XML, with no line feeds and indentations. I would like to turn in into a String with nicely formatted XML. How do I do this?
String unformattedXml = "<tag><nested>hello</nested></tag>";
String formattedXml = new [UnknownClass]().format(unformattedXml);
Note: My input is a String. My output is a String.
How can you invoke shell commands from Squeak and Pharo? Do these environments have anything in them like the system() function in certain unix languages to run external shell commands, or the backticks (can't make them here do to the editor, but what you get when you push the key left of "1" and above "TAB") to capture the output of commands?
Given set of words, we need to find the anagram words and display each category alone using the best algorithm
input:
man car kile arc none like
output:
man
car arc
kile like
none
the best solution I am developing now is based on a hashtable, but I am thinking about equation to convert anagram word into integer value
exmaple: man = 'm'+'a'+'n' but this will not give unique values
any suggestions?
I have a command which lists Weblogic instances directories on a server.I want to display contents of a file in the parent directory of each directory listed.
An additional feature would be to display the name of the file in addition to displaying the contents
/usr/ucb/ps auwwx | grep weblogic | tr ' ' '\n' | grep security.policy | grep domain | awk -F'=' '{print $2}' | sed -e 's/weblogic.policy//' -e 's/security\///' | sort
The output of the above command looks like this
/opt/<some_directory>/<domain_name>/<app_name>/
/opt/<some_directory>/<domain_name>/<app_name>/
I want to cat a file somefile.cf in the directory
I am writing a program that will be executing on the cloud. The program will generate an output that should be written on to a file and the file should be saved on the blob container.
I don't have a idea of how to do that
Will this code
FileStream fs = new FileStream(file, FileMode.Create);
StreamWriter sw = new StreamWriter(fs);
generate a file named "file" on the cloud...
i have div id="abc"/div
I executed RootPanel.get("abc").add(new Label("aaaaaaaaaaaaa")); from GWT.
then acutually GWT generates what kind of html tag??
is it like fontaaaaaaaaaaaa/font????
which i mean the output will be
div id="abc" font aaaaaaaaaaaa/font/div ??
This is hurting my brain!
I want to recurse over a tree structure and collect all instances that match some filter into one list.
Here's a sample tree structure
type Tree =
| Node of int * Tree list
Here's a test sample tree:
let test =
Node((1,
[Node(2,
[Node(3,[]);
Node(3,[])]);
Node(3,[])]))
Collecting and filtering over nodes with and int value of 3 should give you output like this:
[Node(3,[]);Node(3,[]);Node(3,[])]
Hi Everyone,
I have a date_select field in my rails application as follows:
<%= f.date_select :dateinstructed %>
I would like to re-order the drop down lists show they output as:
DD/MM/YYYY
According to what I have read you can use the :order option, but I am unsure how to actually use this option:
<%= f.date_select :dateinstructed, :order = {:day, :month, :year} %>
Obviously this isn't right, but what am I supposed to put in place of the:
:day, :month, :year
Any help would be appreciated!
Thanks,
Danny
Hello
Got Link error (Fatal: Access violation. Link terminated) in Borland 6.0.
How do I know what is the cause of it ?
Is there any output file that I can open and get more informative message ?
Thanks in advance.
I have been trying to get my MBUnit tests suite to work on Team City for many days now without any success.
My solution builds no problem. The program is with my tests. After googling for Gallio integration with Team City I tried many ways to make this thing work and I think I am close but need help.
I have included the gallio bin directory to my repository and also on my TC Server.
Here is my build runner set up in Team City :
Build runner : MSBuild
Build file path : Myproject.msbuild
Targets : RebuildSolution RunTests
Here is Myproject.msbuild file I created and included in the Source control trunk directory :
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This is needed by MSBuild to locate the Gallio task -->
<UsingTask AssemblyFile="C:\Gallio\bin\Gallio.MSBuildTasks.dll" TaskName="Gallio" />
<!-- Specify the tests assemblies -->
<ItemGroup>
<TestAssemblies Include="C:\_CBL\CBL\CoderForTraders\Source\trunk\UnitTest\DomainModel.Tests\bin\Debug\CBL.CoderForTraders.DomainModel.Tests.dll" />
</ItemGroup>
<Target Name="RunTests">
<Gallio IgnoreFailures="false" Assemblies="@(TestAssemblies)" RunnerExtensions="TeamCityExtension,Gallio.TeamCityIntegration">
<!-- This tells MSBuild to store the output value of the task's ExitCode property into the project's ExitCode property -->
<Output TaskParameter="ExitCode" PropertyName="ExitCode"/>
</Gallio>
<Error Text="Tests execution failed" Condition="'$(ExitCode)' != 0" />
</Target>
<Target Name="RebuildSolution">
<Message Text="Starting to Build"/>
<MSBuild Projects="CoderForTraders.sln"
Properties="Configuration=Debug"
Targets="Rebuild" />
</Target>
</Project>
Here are the errors displayed by Team City :
error MSB4064: The "Assemblies" parameter is not supported by the "Gallio" task. Verify the parameter exists on the task, and it is a settable public instance property
error MSB4063: The "Gallio" task could not be initialized with its input parameters.
Thanks for your help
I am trying to determine a file's mime type. I've tried a few methods, but haven't come up with anything that gives consistent output. I've tried $mime = mime_content_type($file) and $mime = exec('file -bi ' . $file). I am serving up images, CSS, JavaScript, and images.
Hi,
I have been busy creating an app for Red5. Imagine what was my surprise when I tried to configure basic/digest authentication and I couldn't.
What struck me as strange is that I have a running tomcat instance that works and authenticates correctly with the following xmls:
web.xml (part of)
<security-constraint>
<web-resource-collection>
<web-resource-name>A Protected Page</web-resource-name>
<url-pattern>/stats.jsp</url-pattern>
</web-resource-collection>
<auth-constraint>
<description/>
<role-name>tomcat</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>DIGEST</auth-method>
<realm-name>BLAAAAAAAAAAAAAAAAA</realm-name>
</login-config>
<security-role>
<description/>
<role-name>tomcat</role-name>
</security-role>
and a tomcat-users.xml in /conf that looks kinda like this:
<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users>
<role rolename="tomcat"/>
<user username="ide" password="bogus" roles="tomcat"/>
</tomcat-users>
The annoying thing is that configuration authenticates correctly when on tomcat's servlet container, but on the red5's modified one, it just keeps asking for authentication. Am I becoming mad or it should work like a charm?
Red5 is version 0_9_1
The stats.jsp is accessible in both
servlet containers, the only
difference is that when you input
the correct password and username in
tomcat, you are logged in, and in
red5 you are not, it just keeps
asking you for the password.
Any pointers? Am I missing something?
Here is a stack trace of the error I receive AT the moment I try the login:
Caused by: java.io.IOException: Unable to locate a login configuration
at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:250) [na:1.6.0_22]
at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:91) [na:1.6.0_22]
... 27 common frames omitted
[ERROR] [http-127.0.0.1-5080-1] org.apache.catalina.realm.JAASRealm - Cannot find message associated with key jaasRealm.unexpectedError
java.lang.SecurityException: Unable to locate a login configuration
at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:93) [na:1.6.0_22]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [na:1.6.0_22]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [na:1.6.0_22]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [na:1.6.0_22]
at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [na:1.6.0_22]
at java.lang.Class.newInstance0(Class.java:355) [na:1.6.0_22]
at java.lang.Class.newInstance(Class.java:308) [na:1.6.0_22]
at javax.security.auth.login.Configuration$3.run(Configuration.java:247) [na:1.6.0_22]
at java.security.AccessController.doPrivileged(Native Method) [na:1.6.0_22]
at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:242) [na:1.6.0_22]
at javax.security.auth.login.LoginContext$1.run(LoginContext.java:237) [na:1.6.0_22]
at java.security.AccessController.doPrivileged(Native Method) [na:1.6.0_22]
at javax.security.auth.login.LoginContext.init(LoginContext.java:234) [na:1.6.0_22]
at javax.security.auth.login.LoginContext.<init>(LoginContext.java:403) [na:1.6.0_22]
at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:394) [catalina-6.0.24.jar:na]
at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:357) [catalina-6.0.24.jar:na]
at org.apache.catalina.authenticator.DigestAuthenticator.findPrincipal(DigestAuthenticator.java:283) [catalina-6.0.24.jar:na]
at org.apache.catalina.authenticator.DigestAuthenticator.authenticate(DigestAuthenticator.java:176) [catalina-6.0.24.jar:na]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:523) [catalina-6.0.24.jar:na]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [catalina-6.0.24.jar:na]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [catalina-6.0.24.jar:na]
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555) [catalina-6.0.24.jar:na]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [catalina-6.0.24.jar:na]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) [catalina-6.0.24.jar:na]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) [tomcat-coyote-6.0.24.jar:na]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) [tomcat-coyote-6.0.24.jar:na]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) [tomcat-coyote-6.0.24.jar:na]
at java.lang.Thread.run(Thread.java:662) [na:1.6.0_22]
Caused by: java.io.IOException: Unable to locate a login configuration
at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:250) [na:1.6.0_22]
at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:91) [na:1.6.0_22]
... 27 common frames omitted
In addition, here is the configuration of red5-web.properties
webapp.contextPath=/project
Even futher information:
Seems to me like it is using the right realm: MemoryRealm
[INFO] [main] org.red5.server.tomcat.TomcatLoader - Setting connector: org.apache.catalina.connector.Connector
[INFO] [main] org.red5.server.tomcat.TomcatLoader - Address to bind: /127.0.0.1:5080
[INFO] [main] org.red5.server.tomcat.TomcatLoader - Setting realm: org.apache.catalina.realm.MemoryRealm
[INFO] [main] org.red5.server.tomcat.TomcatLoader - Loading tomcat context
[INFO] [main] org.red5.server.tomcat.TomcatLoader - Server root: C:/Program Files/Red5
[INFO] [main] org.red5.server.tomcat.TomcatLoader - Config root: C:/Program Files/Red5/conf
[INFO] [main] org.red5.server.tomcat.TomcatLoader - Application root: C:/Program Files/Red5/webapps
[INFO] [main] org.red5.server.tomcat.TomcatLoader - Starting Tomcat servlet engine
[INFO] [main] org.apache.catalina.startup.Embedded - Starting tomcat server
[INFO] [main] org.apache.catalina.core.StandardEngine - Starting Servlet Engine: Apache Tomcat/6.0.26
However, immediately after bootstraping Tomcat, I am presented with the following error:
Exception in thread "Launcher:/administration" org.springframework.beans.factory.BeanDefinitionStoreException: Could not resolve bean definition resource pattern [/WEB-INF/red5-*.xml]; nested exception is java.io.FileNotFoundException: ServletContext resource [/WEB-INF/] cannot be resolved to URL because it does not exist
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:190)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:458)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:388)
at org.red5.server.tomcat.TomcatLoader$1.run(TomcatLoader.java:594)
Caused by: java.io.FileNotFoundException: ServletContext resource [/WEB-INF/] cannot be resolved to URL because it does not exist
at org.springframework.web.context.support.ServletContextResource.getURL(ServletContextResource.java:132)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.isJarResource(PathMatchingResourcePatternResolver.java:414)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:343)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:282)
at org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1156)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:177)
... 7 more
This error is kinda strange, because after this it seems that /WEB-INF/ is found by the rest of the program by the following output:
[INFO] [Launcher:/SOSample] org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from ServletContext resource [/WEB-INF/red5-web.properties]
[INFO] [Launcher:/installer] org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from ServletContext resource [/WEB-INF/red5-web.properties]
[INFO] [Launcher:/] org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from ServletContext resource [/WEB-INF/red5-web.properties]
[INFO] [Launcher:/LiveMedia] org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from ServletContext resource [/WEB-INF/red5-web.properties]
What really annoys me is that, as you can see in the output, when I try to login, I get a JAASRealm-related exception, but in the debug output when Tomcat is loading, it is clear to me that it expects a MemoryRealm. I was wondering where and how in red5.xml should I specify bean properties such that I force red5 to use MemoryRealm that is under /conf/tomcat-users.xml, because it certainly doesn't do so now.
It seems like the biggest question I have posted so far, but I tried to explain it as fully as possible as to avoid confusion.
I've seen the post that deal with this issue but I still can't solve my issue:
I've got XML with CDATA and when I parse the XML, it includes the CDATA (which I don't want).
XML sample:
<mainnav>
<nav path="/" xmlpath="home.xml" key="footer" navigator="">
<display><![CDATA[Home]]></display>
<title><![CDATA[Home]]></title>
</nav>
<nav path="/nav1/" xmlpath="nav1.xml" key="primary" navigator="primary" iconid="0">
<display><![CDATA[Nav 1]]></display>
<title><![CDATA[Nav 1]]></title>
<overdesc><![CDATA[test nav 1]]></overdesc>
<sub path="/nav1/sub1/" xmlpath="nav1/sub1.xml" key="sub">
<display><![CDATA[sub 1<br />of nav 1]]></display>
<title><![CDATA[sub 1<br />of nav 1]]></title>
</sub>
</nav>
<nav path="/nav1/" xmlpath="nav2.xml" key="primary" navigator="primary" iconid="1">
<display><![CDATA[Nav 2]]></display>
<title><![CDATA[Nav 2]]></title>
<overdesc><![CDATA[test nav 2]]></overdesc>
<sub path="/nav2/sub1/" xmlpath="nabv2/sub1.xml" key="sub">
<display><![CDATA[sub 1<br />of nav 2]]></display>
<title><![CDATA[sub 1<br />of nav2]]></title>
</sub>
</nav>
</mainnav>
jQuery:
$(document).ready(function(){
$.ajax({
type: "GET",
url: "site_xml/config.xml",
//contentType: "text/xml",
dataType: ($.browser.msie) ? "xml" : "text/xml",
success: parseXML,
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert(errorThrown);
}
});});
function parseXML(xml) {
$(xml).find('nav').each(function(){
if ($(this).attr("key")=="primary") { // this is a primary nav item;
var title = $.trim( $(this).find('title').text() );
alert(title);
$("#output").append(title); //nothing showing up in my output DIV, presumably due to the CDATA tags?
}
});
}
Hello everyone,
I am using scp command to copy file from a MacBook Pro OS X 10.5 to another Linux box (Red Hat Linux Enterprise 5).
I am using the following command on Mac, sudo scp ~/.ssh/mykey.rsa [email protected], there is no output from Mac command line. I am not sure whether the scp is success or not. Where is the location the file mykey.rsa on remote computer 10.10.100.101?
thanks in advance,
George
Hi all,
Our professor is making us do some basic programming with java, he gaves a website and everything to register and submit our questions, for today I need to do this one example I feel like I'm on the right track but I just can't figure out the rest .. here is the actualy question :
**Sample Input:**
10 12
10 14
100 200
**Sample Output:**
2
4
100
And here is what I've got so far :
public class Practice {
public static int calculateAnswer(String a, String b) {
return (Integer.parseInt(b) - Integer.parseInt(a));
}
public static void main(String[] args) {
System.out.println(calculateAnswer(args[0], args[1]));
}
}
Now I always get the answer 2 because I'm reading the single line, how can I take all lines into account? thank you
For some strange reason everytime I want to execute I get this error:
C:\sonic>java Practice.class 10 12
Exception in thread "main" java.lang.NoClassDefFoundError: Fact
Caused by: java.lang.ClassNotFoundException: Fact.class
at java.net.URLClassLoader$1.run(URLClassLoader.java:20
at java.security.AccessController.doPrivileged(Native M
at java.net.URLClassLoader.findClass(URLClassLoader.jav
at java.lang.ClassLoader.loadClass(ClassLoader.java:307
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.
at java.lang.ClassLoader.loadClass(ClassLoader.java:248
Could not find the main class: Practice.class. Program will exit.
Whosever version of answer I use I get this error, what do I do ?
However if I run it in eclipse Run as Run Configuration - Program arguments
10 12
10 14
100 200
I get no output
EDIT
I have made some progress, at first I was getting the compilation error, then runtime error and now I get wrong answer , so can anybody help me what is wrong with this :
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
public class Practice {
public static BigInteger calculateAnswer(String a, String b) {
BigInteger ab = new BigInteger(a);
BigInteger bc = new BigInteger(b);
return bc.subtract(ab);
}
public static void main(String[] args) throws IOException {
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
String line;
while ((line = stdin.readLine()) != null && line.length()!= 0) {
String[] input = line.split(" ");
if (input.length == 2) {
System.out.println(calculateAnswer(input[0], input[1]));
}
}
}
}
What is the fastest way to sort the values in a smooth 2D array?
The input is a small filtered image:
about 60 by 80 pixels
single channel
single or double precision float
row major storage, sequential in memory
values have mixed sign
piecewise "smooth", with regions on the order of 10 pixels wide
Output is a flat (about 4800 value) array of the sorted values, along with the indices that sort the original array.
i have iphone project based on tabbar template . want to convert it to ipad,
final output i want is to move tabbar inside a splitviewcontroller .
How to go about?
I'm having difficulty getting XQuery to work. I downloaded Saxon-HE 9.2. It seems to only want to work with XSLT.
When I type:
java -jar saxon9he.jar
I get back usage information for XSLT. When I use the command syntax for XQuery, it doesn't recognize the parameters (like -q), and gives XSLT usage information.
Here are some command line interactions:
>java -jar saxon9he.jar
No source file name
Saxon-HE 9.2.0.6J from Saxonica
Usage: see http://www.saxonica.com/documentation/using-xsl/commandline.html
Options:
-a Use xml-stylesheet PI, not -xsl argument
-c:filename Use compiled stylesheet from file
-config:filename Use configuration file
-cr:classname Use collection URI resolver class
-dtd:on|off Validate using DTD
-expand:on|off Expand defaults defined in schema/DTD
-explain[:filename] Display compiled expression tree
-ext:on|off Allow|Disallow external Java functions
-im:modename Initial mode
-ief:class;class;... List of integrated extension functions
-it:template Initial template
-l:on|off Line numbering for source document
-m:classname Use message receiver class
-now:dateTime Set currentDateTime
-o:filename Output file or directory
-opt:0..10 Set optimization level (0=none, 10=max)
-or:classname Use OutputURIResolver class
-outval:recover|fatal Handling of validation errors on result document
-p:on|off Recognize URI query parameters
-r:classname Use URIResolver class
-repeat:N Repeat N times for performance measurement
-s:filename Initial source document
-sa Use schema-aware processing
-strip:all|none|ignorable Strip whitespace text nodes
-t Display version and timing information
-T[:classname] Use TraceListener class
-TJ Trace calls to external Java functions
-tree:tiny|linked Select tree model
-traceout:file|#null Destination for fn:trace() output
-u Names are URLs not filenames
-val:strict|lax Validate using schema
-versionmsg:on|off Warn when using XSLT 1.0 stylesheet
-warnings:silent|recover|fatal Handling of recoverable errors
-x:classname Use specified SAX parser for source file
-xi:on|off Expand XInclude on all documents
-xmlversion:1.0|1.1 Version of XML to be handled
-xsd:file;file.. Additional schema documents to be loaded
-xsdversion:1.0|1.1 Version of XML Schema to be used
-xsiloc:on|off Take note of xsi:schemaLocation
-xsl:filename Stylesheet file
-y:classname Use specified SAX parser for stylesheet
--feature:value Set configuration feature (see FeatureKeys)
-? Display this message
param=value Set stylesheet string parameter
+param=filename Set stylesheet document parameter
?param=expression Set stylesheet parameter using XPath
!option=value Set serialization option
>java -jar saxon9he.jar -q:"..\w3xQueryTut.xq"
Unknown option -q:..\w3xQueryTut.xq
Saxon-HE 9.2.0.6J from Saxonica
Usage: see http://www.saxonica.com/documentation/using-xsl/commandline.html
Options:
-a Use xml-stylesheet PI, not -xsl argument
// etc...
>java net.sf.saxon.Query -q:"..\w3xQueryTut.xq"
Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/saxon/Query
Caused by: java.lang.ClassNotFoundException: net.sf.saxon.Query
// etc...
Could not find the main class: net.sf.saxon.Query. Program will exit.
I'm probably making some stupid mistake. Do you know what it could be?
Hi,
I was wondering how to apply a custom render to a event... I want to be able to preppend the "patient" name of a practice agenda...
eventRender: function(event, element) {
console.log(element[0]);
}
This currently shows the HTML output in the console, but I don't know how can I access it (in a pretty jquery manner) in order to manipulate the data within.
Thanks
Hi all,
Is it possible to make system call in Objective-C?
I have the following code:
if (!system("ls -l")) {
NSLog(@"Successfully executed");
} else {
NSLog(@"Error while executing the command");
}
How to get the output?
Thanks
Say I have an array of number
a <- c(1,2,3,6,7,8,9,10,20)
if there a way to tell R to output just the range of the continuous sequence from "a"
e.g., the continuous sequences in "a" are the following
1,3
6,10
20
Thanks a lot!
Derek
I'm using PHP and OCI8 to execute anonymous Oracle PL/SQL blocks of code. Is there any way for me to bind a variable and get its output upon completion of the block, just as I can when I call stored procedures in a similar way?
$SQL = "declare
something varchar2 := 'I want this returned';
begin
--How can I return the value of 'something' into a bound PHP variable?
end;";
I am trying to execute a powershell script from Ruby, I have entered the below command:
scriptPath = system('powershell \"C:\\Scripts\\DB_Setup.ps1\"')
The ruby Script is handling exceptions when an error is raised to stop the script as below command:
rescue => ex
message = "\nscript on server '#{`hostname`.strip()}' terminated unexpectedly:\n\nMessage: '#{ex.message}"
raise ex
Output Error:
script on server 'TestDB1' terminated unexpectedly:
Message: 'can't convert true into String'
Thanks