I have just started learning to write apps for android using Eclipse. Where can I find free source code that I can use during my learning experience? Thanks.
I have heard developers say that people who write code should not be the ones testing it. I am looking for peoples experience in this situation. Many times I have done my share of development, then released to the QA dept and had the code sent back to me becuase some aspect of the application was broken due to my coding, regardless of how much I had tested it prior to QA release.
Does anyone on this board have a process to follow, that enables them to throughly test their code before releasing to QA?
I have a table called 'highscores' that looks like this.
id udid name score
1 1111 Mike 200
2 3333 Joe 300
3 4444 Billy 50
4 0000 Loser 10
5 DDDD Face 400
Given a specific udid, I want to return the rank of that row by their score value.
i.e. if udid given = 0000, I should return 5.
Any idea how to write this query for a MySQL database?
I am trying to find tutorials on how to write buildout recipes. I haven't found any, except the one on buildout site. But it is very rudimentary. Is there a good tutorial for writing buildout recipes?
I'm trying to write a program that needs smooth orientation sensor samples as the phone is rotated all around. Every time the orientation of the phone is changed, it interrupts the data and freezes the program while the layout changes. How can I lock it in one orientation (landscape or portrait, it doesn't matter)?
I assume it has something to do with android:layout in the xml file, but I can't find anything online.
For example,
static void Main()
{
var someVar = 3;
Console.Write(GetVariableName(someVar));
}
The output of this program should be:
someVar
How can I achieve that using reflection?
Is there a Mathematica function like inject in Ruby? For example, if I want the product of the elements in a list, in Ruby I can write:
list.inject(1) { |prod,el| prod * el }
I found I can just use Product in Mathematica:
Apply[Product, list]
However, this isn't general enough for me (like, if I don't just want the product or sum of the numbers). What's the closest equivalent to inject?
Why are there two ways to "declare" constants in CPP?
Which is better, or should I write, which of them should I use when?
#define MYCON 100
const int MYCON=100
Hello,
I'm writing a GTK-Theme that is pretty dark. It works with most programs but some toolbars look pretty strange (in Bluefish and NetBeans for example).
Now I need to get the name of the toolbar widget to write a workaround.
my vim editor auto highlights php files, html files and so on.
but when i type: vim scriptname
and inside it write a bash script, it doesnt highlight it.
how come?
Is there any cost/drawback (apart from typing too much) to adorning a class with System.Runtime.Serialization attributes (like [DataContract]) such that it can be used locally as a direct reference to a desktop Client project or as a type for a WCF service? The goal here is to write a data-tier class that can be used in both rich client (WPF) and Web scenarios. My data classes will be in a project that is separate from Client and WCF (*.svc code-behind) code. Is this a valid attempt to reuse code?
I know putting code into VSS in general is as safe as putting money into a mutual fund run by Bernard Madoff, but I don't have the luxury of ditching it for subversion.
That said, I need to be able to write code on two machines, I'm considering checking out code to a flash thumb drive.
Anyone know in advance what I should/shouldn't do to avoid loss of work? Do I need to ensure the drive letter stays the same?
hi
i have a linux bash shell 'myshell'
i want it to read two date as parameters, ex: myshell date1 date2
i am a Java programer, but don't know how to write a shell to get this done
the rest of the shell is like this
sed "s/$date1/$date2/g" wlacd_stat.xml tmp.xml
mv tmp.xml wlacd_stat.xml
thanks
I know that drop removes the data as well as the table structure whereas truncate retains table structure.
Does drop/truncate write to roll back segment ?
I have informations about some objects stored in BigTable(coordinates and few more) and I have to put this objects on Google map. How can I do that? (Please write some code example. I am using java for my application).
i have .java file. i need to generate .form file using the java file. when i write a java file then automatically .form file should be created. by using java swings how can we create .form file
I need to parse a command line like
script.rb <mandatory filename> [options]
with optparse.
Sure I can write some custom code to handle the filename, then pass ARGV to optparse, but maybe there's a simpler way to do it?
EDIT: there's another hacky way to parse such a command line, and that is pass '--mandatory-filename ' + ARGV to optparse, then handle the --mandatory-filename option.
I'd like two websites to have read/write access to the same user profile database (named "aspnetdb" by default). Presumably this is possible by configuring the websites appropriately in the web.config. Are there any issues I should be wary of?
I'd like to write a wxPython application that would run in different languages, updating itself automatically (with no need to close it and open it back) whenever I change the language.
Is it possible to make a system that recognises and edits every widget that needs to be updated?
Quickly write PGM header is fprintf(f, "P5 %d %d 255\n", width, height);
Quickly read PGM header is fscanf(f, "P5%d%d%*d\n"); // now can read the data from f, but it fails when the header contains comments (like if saved by GIMP).
How to read PGM header in more compatible way (without a lot of code or extra dependencies, I don't want my program to cease being oneliner because of this)?
Hey everybody,
is there a way to get the logged in user name (and group) from a Tomcat system. I read something about configuring Tomcat, so it is getting the user information out of a database. But I found now information about getting the name of the user (in my GWT Project), which is logged in.
I'm trying to write a little GWT project and would like to publish the user name to the front page.
Thx for your help.
i have debian system in which i have mounted the OS on a ext-3 system . I have got a partition of 60 gb , which is formatted to ext-2 partition . Even if I mount , i cant write anything into it . How can i change that ? How can I make the disk writable?
I had a doubt ..
Why do we need interface in Java ?
Instead of interface can't we write the methods in the class itself ?
Why do we need seperate interface?
Hi all,
I want to display news inside the marquee markup in my banking application but its not happening.Please somebody help me what is the error in my code.Here is my code:
<marquee bgcolor="silver" direction="left" id="marq1" runat="server" behavior="scroll" scrolldelay="80" style="height: 19px" width="565">
<%
String se = Session["countnews"].ToString();
for (int i = 0; i < int.Parse("" +se); i++)
{ %>
<strong><%Response.Write(" " + Session["news"+i] + " "); %></strong>
<% } %>
</marquee>
public class News
{
DataSet ds = new DataSet("Bank");
SqlConnection conn;
String check;
SqlDataAdapter sda;
int i;
public string News_Name;
public int Count_News;
public int newsticker()
{
conn = new SqlConnection(ConfigurationManager.ConnectionStrings["BankingTransaction"].ConnectionString.ToString());
check = "Select NewsTitle from News where NewsStatus = 'A'";
sda = new SqlDataAdapter(check, conn);
sda.Fill(ds, "News");
if (ds.Tables[0].Rows.Count > 0)
{
for (i = 0; i < ds.Tables[0].Rows.Count; i++)
{
News_Name =i+ ds.Tables[0].Rows[i].ItemArray[0].ToString();
}
Count_News = ds.Tables[0].Rows.Count; }
else
{
News_Name =0+ "Welcome to WestSide Bank Online Web site!";
Count_News = 1;
}
return int.Parse(Count_News.ToString());
}
protected void Page_Load(object sender, EventArgs e)
{
News obj = new News();
try
{
obj.newsticker();
Session["news"] = obj.News_Name.ToString();
Session["countnews"] = obj.Count_News.ToString();
}
catch (SqlException ex)
{
Response.Write("Error in login" + ex.Message);
Response.Redirect("Default.aspx");
}
finally
{
obj = null;
}
}