mardi 1 juillet 2014

How can I execute a simple request with an URL in Groovy?


Vote count:

0




I have the following code:



def http = new HTTPBuilder( 'http://localhost:8080' )
http.post( path: '/this/is/my/path/'+variable) { resp ->
println "POST Success: ${resp.statusLine}"
assert resp.statusLine.statusCode == 201
}


I only want to execute that request, I have a method in another application that when there is a request in that url, I see a result. Problem is that I don't see nothing. am I in the right way? or can you tell me another different that works? Thanks



asked 1 min ago






table income and expense is better to have it together or apart


Vote count:

0




I am developing a small system where I have to record incomes and expenses of the company, and even I can not determine if the income and expense table should be in one table or in separate tables.


The design of the database must allow the system to generate a report of income and expenses by date (in column incomes and other expenses).


I would like to explain what would be the advantage or disadvantage of having them together or separately.



asked 1 min ago






detect a system file running process from an application


Vote count:

0




I am programming for a software company . Our company has an Application called (common component command) ccc.exe . This application is for Sending command to Microsoft IIS server .


Now , and during my program , I want to detect running this process (ccc.exe) .


After this I use this method :



private bool IsProcessRunning(string processName)
{

Process[] pname = Process.GetProcessesByName(processName);
if (pname.Length == 0)
return false;
else
return true;
}


But unfortunately their computers running a System process Called CCC.EXE (It is from ATI Technologies) .


It is running on start up . And if I use this method , It will return a wrong value , cause they have the same name .


So , How can I recognize CCC.EXE (system file) from ccc.exe *32 ?!



asked 26 secs ago






Visual Studio 2012 adding folders


Vote count:

0




When I add any folder to my VS solution...it is not altering the sln file.


So this does not reflected in the check-in at all.


What could be the reason?



asked 1 min ago






How do I launch an android AVD thats not in the default location?


Vote count:

0




I have an AVD in a ~/development/app/test/android folder:



~/development/app/test/android/Test1.ini
~/development/app/test/android/Test1.avd


How can I launch this without moving them into ~/.android/avd?


I've tried adding -sysdir ~/development/app/test/android/ but that didn't work.



asked 1 min ago

Justin808

5,399





Automatic file opening and reading in MATLAB


Vote count:

0




I have a folder with 20 or more files of a specific format. I have to read all them one by one and run a specific code for each one. I use



`[datafile,datapath]=uigetfile('*.format`,'choose a file');


and then read with a specific code details from the file( i need datapath and datafile). Then after making available the details of the file, i run another code that use the details in a struct,dependind on the order of reading.


I want to read the files automatically, and not running every time the code uigetfile. For example, take the names of the files in an array and use a loop to run my code for the struct.


Any response would be helpful.



asked 1 min ago






Maven + Android: exchange resources based on profile


Vote count:

0




I am using the android-maven-plugin version 3.9.0-rc.1. There are differnt resources for different releases. The respective resources should be copied to the "target" based on the maven profile used for the build. For that I'm using the maven-resources-plugin as follows:



<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources</id>
<!-- here the phase you need -->
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/res</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${basedir}/releaseconfigs/beta</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>


This has no effect on the resources that are packed in the .apk. There is however a folder "bin" in the basedir containing a res/crunch/ folder that containing the resources that I want replaced. So I set the outupdirectory to that folder, but this still has no effect on the resources that are packed within the .apk.


Right now my only solution would be to copy them to the basedir/res folder during the validation phase and copy the "original" files back during the install phase or something. But this doesn't seem all too elegant.



asked 34 secs ago

fancy

374