I have a function where I need to do something to a string. I need the function to return a boolean indicating whether or not the operation succeeded, and I also need to return the modified string.
In C#, I would use an out parameter for the string, but there is no equivalent in Python. I'm still very new to Python and the only thin...
I have 6 sound files (1.wav 2.wav etc..) of which 3 different ones have to be heard each time the web page opens. The numbers are selected randomly.
I have tried multiple "embeds" but only the last sound selected gets produced.
I have also tried javascript routines that fiddle the bgsound attribute, however, I was not able to produce mor...
Hello,
I'm trying to run some commands in paralel, in background, using bash. Here's what I'm trying to do:
forloop {
//this part is actually written in perl
//call command sequence
print `touch .file1.lock; cp bigfile1 /destination; rm .file1.lock;`;
}
The part between backticks (``) spawns a new shell and executes the command...
Hi
This is a problem I constantly face. I know how to execute a certain task in one enviroment / framework / language but I am a complete stranger in another.
What's more, sometimes the gap between languages / enviroments is really too big to be simply adapted (like porting a prolog application to C#)
So, I guess the question is: how...
In asp.net, you can retrieve MULTIPLE datatables from a single call to the database. Can you do the same thing in php?
Example:
$sql ="select * from t1; select * from t2;";
$result = SomeQueryFunc($sql);
print_r($result[0]); // dump results for t1
print_r($result[1]); // dump results for t2
Can you do something like this?
...
Hi
Some Background :
Many moons ago, i wrote a Library (SDK) which makes it possible to integrate with some 3rd party accouting software. One public class exposed by the SDK was the Customer class, which in turn collaborated with a CustomerContacts collection. These classes supports n-level undo + validation rules ect. In order to user...
Hi,
I have two windows services running on the same machine. Both the services uses
private HttpListener listener;
I specify the baseURL as "http://IPAddress:8080/" & "http://IPAddress:8081/" respectively for each of the services. Then I do the needful and call
listener.Start();
The first service starts successfully at 8080 port. Bu...
This is the sequel to this question.
I would like to combine three columns into one on a MySql select. The first two columns are boolean and the third is a string, which is sometimes null. This causes strange results:
Select *, (payment1_paid && ((payment2_paid || payment2_type ="none"))) as paid_in_full from payments
Note: payment1_...
I'm trying to write a log parsing script to extract failed events. I can pull these with grep:
$ grep -A5 "FAILED" log.txt
2008-08-19 17:50:07 [7052] [14] DEBUG: data: 3a 46 41 49 4c 45 44 20 20 65 72 72 3a 30 32 33 :FAILED err:023
2008-08-19 17:50:07 [7052] [14] DEBUG: data: 20 74 65 78 74 3a 20 00 ...
I currently have two text boxes in which accept any number. I have text block that takes the two numbers entered and calculates the average. I was wondering if there was a way I could bind this text block to both text boxes and utilize a custom converter to calculate the average? I current am catching the text changed events on both text...
Hi,
I've got an MS access database and I would need to create an SQL query that allows me to select all the not distinct entries in one column while still keeping all the values.
In this case more than ever an example is worth thousands of words:
Table:
A B C
1 x q
2 y w
3 y e
4 z r
5 z t
6 z y
SQL magic
Result:
B C
y w
y e
z r
z...
It seems that when I have one mysql_real_query() function in a continuous while loop, the query will get executed OK.
However, if multiple mysql_real_query() are inside the while loop, one right after the other. Depending on the query, sometimes neither the first query nor second query will execute properly.
This seems like a threadin...
In Visual C# 2008, I have a solution with two projects.
First project contains Form1 that displays one Label with Text set to a string from Properties.Resources, like this:
label1.Text = Properties.Resources.MY_TEXT;
In the second project, I "Add as link" this Form1 from the first project. I want to show this form, so it displays the...
I need to modify the following MySQL statement to include information from a third table... but I suck at joins.
select
ss.*,
se.name as engine,
ss.last_run_at + interval ss.refresh_frequency day as next_run_at,
se.logo_name
from
searches ss join search_engines se on ss.engine_id = se.id
where
ss.user_id='.$user_id.'
group by ss...
Hi,
I'm having a bit of a problem here.
We have 2 urls let me call them http://www.testUrl.com/ and http://www.test-url.com/
This url points to a server using an "A-Record".
In IIS I've appointed these url's through "Advanced Website Identification" to the correct application.
Now we have 2 apps. One application is version one the ot...
How do I inner join multiple columns from the same tables via Linq?
For example:
I already have this...
join c in db.table2 on table2.ID equals table1.ID
I need to add this...
join d in db.table2 on table2.Country equals table1.Country
...
Hi folks,
I am creating a java class that will search a directory for xml files. If the are some present it will use JDOM to parse these and create a simplified output outlined by the xslt. This will then be output to another directory while retaining the name of the original xml i.e. input xml is "sample.xml", output xml is also "sampl...
Hi,
I have 6 classes, which are all document types. All the document types have the same 8 fields. There is one class which consists of only these 8 fields. The rest of the classes have more fields. Some of these classes have the same fields (beside the 8 fields).
Example:
class Document: fields 1 to 8
class Form: fields 1 to 8 and ...
Hi,
I have a SSRS report and using PL/SQL for the dataset creation.
My report needs two tables
1 one gives detailed view.(dataset 1)
2 one below that gives a summary table (data should come from the calculations based on the data in 1 table)
I am using a temporary table for the dataset one.
What are the methods to get calculated ...
Hi all,
java -classpath ../classes;../jar;. parserTester
How can i get the functionality in the above command programmatically? Like, is it possible to run as:
java parserTester
and get the same result? I tried using URLClassLoader but it modifies the classpath and does not add to it.
Thanx!
Thanks for the response Milhous. But tha...