After we tested the code in repository is OK,
how to automate the building process, say, updating the production code with those in svn?
If it matters, I'm talking about PHP source code.
Hi all,
I am looking for a simple function that will take a number entered into a single cell say 20 and divide it evenly and randomly over three other cells, none of the values can be 0.
ie. A1 = 20
then
B1=6
C1=8
D1=6
Thanks!!
To begin with, I just can say that I have always been programming by my own. I use php mostly. So, can you explain me why I should learn Zend Framework or other framework? Why just don't write a pure code by own?
Hi!
I'm a web developper/objective-c developper and I'd like to learn quickly to make some apps for windows.
I say quick because I'm used to learning many languages and I don't need any overview on concepts, patterns, etc.
Any answers will be very appreciated :)
Thanks!
Lets say I'm starting a site that users can enter content but all my categories are empty except one or two, how should the empty categories be displayed to my users if at all using MySQL & PHP?
Hi,
On the MSDN is there some sort of reference which details every native function inside the Windows API for different versions say from Windows XP upwards?
I have been googling and looking round the MSDN but I must not be looking for the correct thing.
Any help would be appreciated.
Cheers,
Andrew
Code snippet from here:
/* retireve the position of the ip header */
ih = (ip_header *) (pkt_data +
14); //length of ethernet header
But this image doesn't say it's necessarily 14:
How should I do it properly?
My question is: can i have 2 repositories without losing my original repository.
Lets say i want the the eclair source repository
repo init -u
git://android.git.kernel.org/platform/manifest.git
-b eclair
(already synced and working)
and i would also like to sync with cyanogens repository
repo init -u
git://github.com/cyanogen/android.git
-b eclair
All i basically want to do is have both repositories without altering or messing up the original.
thanks.
Does anyone know the answer and/or have an oppinion about it?
Since tuples would normally not be very large I would assume it would make more sense to use structs than classes for these. What say you?
I was psyched about the possibility of using SQLite as a database solution during development so that I could focus on writing the code first and dynamically generating the db at runtime using NHibernate's ShemaExport functionality. However, I'm running into a few issues, not the least of which is that it seems that SQLite requires me to use Int64 for my primary keys (vs, say, Int32 or Guid). Is there any way around this?
I would like to show a banner in an Android activity.
The banner should be:
Aligned at the bottom of the layout
Take all the width and have relative height (say 100dip)
Be dismissable
When dismissed the rest of the layout should strech to fill the area that was occupied by the banner.
What's the best way to implement this in Android?
Thanks!
How to randomly pick up N numbers from a vector a with weight assigned to each number?
Let's say:
a = 1:3; % possible numbers
weight = [0.3 0.1 0.2]; % corresponding weights
In this case probability to pick up 1 should be 3 times higher than to pick up 2.
Sum of all weights can be anything.
I'm really not sure what else to say about this:
Random r = new Random();
class SomeClass {
public SomeClass(){
new SomeClass(r.nextInt(5));
}
public SomeClass(int i){
...
Throws a NullPointerException where r.nextInt(5) is called. Any ideas?
Code snippet from here:
void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data)
{
....
/* retireve the position of the ip header */
ih = (ip_header *) (pkt_data +
14); //length of ethernet header
....
But this image doesn't say it's necessarily 14:
How should I do it properly?
UPDATE
What's const struct pcap_pkthdr *header for, when do we need it?
using : ksh
*abc = 1
efg = 2
hgd = 3 not known to me *
say if i have
Value="abc efg hgd"
abc efg hgd all contains some value which i dnt know.
Now I want to grep the value contained inside abc.
like
for i in $Value
do
grep "echo $(($((echo $i | cut -d'|' -f2))))"
done
this grep should look for the value inside abc efg hgd
grep 1
grep 2
grep 3
The title is a bit difficult to put together for this question.
Say I have two models, Foo and Bar. Foo has many Bar's. Bar belongs to one Foo. How do I use Foo.find to find all of the Foos that currently have zero Bars? In SQL this would translate into something like:
SELECT * from foo where id NOT IN (select foo_id from bar);
in book algorithm in c++ by robert sedgewick
there is such kind of problem
how many parallel steps would be required to sort n records that are distributed on some k disks(let say k=1000 or any value ) and using some m processors the same m can be 100 or arbitrary number
i have questions
what we should do in such case? what are methods to solve such kind of problems?
and what is answer in this case?
After writing all the comments inside the code about the javadoc such as
/**
* This method compares the student's answer to the standard answer * @param ans The student's answer
* @return True for correct answer; False for incorrect answer
*/
boolean compareAnswer(int ans);
I guess it starts with :
javadoc [optionss] [packages|files]
I'm not sure what is the regular or default [option] and how can I say to produce it in my current home directory?
What would you say are these kind of questions good way to improve your skills or just waste of time since they have no application in real life(or not).
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=3
hi.
I need to decorate all the activities shown in designer with some icons or other pictures.
is there any way to show all activities with some decoration (lets say cross "X" as picture )
I have some data tracked and I want to show that this activity finished OK and this failed because of ... etc.
do someone of you know? It would really help me a lot.
Hi.
I'm about to build an app that has a database of places that has a location (lon/lat) and i'm about to build the dataModel.
Actualy the app is very simple and all i want is to be able to fetch all places around the user (say in a radius of 30miles).
Is it better to user SQLite (is there any geo-spatial extension out there)?
I'll have around 5000 places in the database and i'm wondering where i can ask a database without affecting performances.