I have a checkedlistbox and when i populate it i want to have an empty space between each check box. i can create them with an empty string but the check box is still there. can anyone please help me.
thank you
Hello,
I have a CouchDB database in production. One of the documents has been edited (in Futon by an other developer).
And it's lost it's ID (don't ask me how he did it).
So now the document's id is an empty string, which makes it impossible to edit or delete via Futon.
Is there a way I could hack into CouchDB to delete that document anyway ?
I have a rather simple hadoop question which i'll try to present with an example
say you have a list of strings and a large file and you want each mapper to process a piece of the file and one of the strings in a grep like program.
how are you supposed to do that? I am under the impression that the number of mappers is a result of the inputsplits produced. I could run subsequent jobs, one for each string, but it seems kinda... messy?
I would like something similar to the string formatting from the standard library.
'%' Percentage. Multiplies the number
by 100 and displays in fixed ('f')
format, followed by a percent sign.
In my application I detect the out going call when a call is dialled from the dialer or contacts.
This works fine and I then pop up a dialog saying I have detected the call and then the user presses a button to close the dialog which calls finish() on that activity.
It all works fine except that when I then hold the home key to bring up the recently used apps the dialer icon is there.
And when it is clicked the dialog is brought back into focus in the foreground when the dialog activity should be dead and gone and not be able to be brought back to the foreground.
Here is a picture of what I mean.
So two questions arise, why would the dialer icon be getting placed there and why would it be recalling my activity to the foreground?
Here is the code for that Activity which has a dialog theme:
public class CallDialogActivity extends Activity{
boolean isRecording;
AudioManager audio_service;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.dialog);
audio_service = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
Bundle b = this.getIntent().getExtras();
String number = b.getString("com.networks.NUMBER");
String name = b.getString("com.networks.NAME");
TextView tv = (TextView) findViewById(R.id.voip) ;
tv.setText(name);
Intent service = new Intent(CallAudio.CICERO_CALL_SERVICE);
startService(service);
final Button stop_Call_Button = (Button) findViewById(R.id.widget35);
this.setVolumeControlStream(AudioManager.STREAM_VOICE_CALL);
stop_Call_Button.setOnClickListener(new View.OnClickListener(){
public void onClick(View v){
Intent service = new Intent(CallAudio._CALL_SERVICE);
//this is for Android 1.5 (sets speaker going for a few seconds before shutting down)
stopService(service);
Intent setIntent = new Intent(Intent.ACTION_MAIN);
setIntent.addCategory(Intent.CATEGORY_HOME);
setIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(setIntent);
finish();
isRecording = false;
}
});
final Button speaker_Button = (Button) findViewById(R.id.widget36);
speaker_Button.setOnClickListener(new View.OnClickListener(){
public void onClick(View v){
if(true){
audio_service.setSpeakerphoneOn(false);
}
else{
audio_service.setSpeakerphoneOn(true);
}
}
});
}
@Override
protected void onResume() {
super.onResume();
}
@Override
protected void onPause() {
super.onPause();
}
public void onCofigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
}
}
It calls a service that uses AudioRecord to record from the Mic and AudioTrack to play it out the earpiece, nothing in the service to do with the dialler.
Has anyone any idea why this might be happening?
string createTable = "CREATE TABLE IF NOT EXISTS " + m_strDatabase + "_TimeLogs (logName VARCHAR(16), logTime INTEGER, logCountry TEXT, UNIQUE(logName)) TYPE=MyISAM;";
When this runs, no table is created.
No errors either.
Im using an ODBC connector.
the variable passes in the db name, so that the table created would be users_TimeLogs if the database was called users for example.
Am I doing something wrong?
I am using the Html.TextBox helper to create textboxes. I want to set attributes on the textbox, which I understand is done using the following overload:
Html.TextBox (string name, object value, object htmlAttributes)
However, I want to maintain the functionality where the html helper automatically uses the value from either ViewData or ViewData.Model and I do not see a way to just specify the name and the htmlAttributes. Is this possible?
ParameterExpression parameter = Expression.Parameter(typeof(Product), "x");
MemberExpression Left = Expression.MakeMemberAccess(parameter, typeof(Product).GetProperty("Name"));
ConstantExpression Right = Expression.Constant(value, typeof(String));
BinaryExpression expression = Expression.Equal(Left, Right);
LambdaExpression lambada = Expression.Lambda<Func<Product, bool>>(expression, parameter);
Now how do I add this lambada to an instance of an IQuerybale, lets say _query
_query.Where(lambada.Compile());?
Hi,
I have a curiosity about application updates . What happens after such a process with the resources supposing that the update needs different resources than the ones the old version used ? Are they overwritten ?( like overwrite string.xml) or the old resources are deleted and replaced with the new ones ?
I would like to implement a method that can get the svn revision number from the path where a SVN repository has been checked out. The method declaration would look something like this:
long getRevisionNumber(String localPath) { ... }
I'm trying to use SVNKit for this, but it seems to require an SVN URL to start with. Is there any way to start with a local path?
In c# I can declare object o; then I can assign Obj=(float)5.0; or Obj="a string." Is there an equivalent for objective C? I tried to use id but it does not take primitive type like float or integer. Thanks for helping.
hi all ! Newbie need help !!!
I have a plist made of string, what i'd like to do is to replace the content if this plist by the content of an another array is it possible ????
thanks to all !
Hi,
i need a function (c#) or regular expression that makes me a nice URL out of a string. (and replaces invalid characters)
Something like here on stackoverflow..
example:
Short URL or long URL for SEO - short-url-or-long-url-for-seo
Thanks
I am trying to embed an AppleScript in a Python script. I don't want to have to save the AppleScript as a file and then load it in my Python script. Is there a way to enter the AppleScript as a string in Python and have Python execute the AppleScript? Thanks a bunch.
HI there
I was wondering if there is a better way of testing that a view has rendered in MVC.
I was thinking perhaps I should render the view to a string but perhaps there are simpler methods?
Basically what I want to know if that the view for a given action has rendered without errors
I m already testing the view model but I want to see that rendering the view giving a correct ViewData.Model works
One-Liner to list TXT-files.
import java.io.File;
import java.io.FilenameFilter;
...
files = dir.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.toLowerCase().endsWith(".txt");
}
}
);
Source.
Is there an one-liner to list dirs in a dir?
Hi all,
Anybody know how can I add multiple email addresses in Outlook field "To" via C#?
foreach (var to in mailTo)
newMail.To += to + "; ";
When I try do it how I described this above I receive next kind of string:
[email protected]@[email protected]
I have three text boxes on the stage id=red, blue, green same as the keys in my
cars Object/Array
public function carsToBox():void
{
var cars:Object={red:"300zx",blue:"Skyline",green:"Supra"};
for(var tempObj:String in cars)
{
tempObj.text= cars[tempObj];//this trows errors
}
}
So I'm thinking "tempObj.text" would equal red.text but I can't stick "tempObj" with ".text" is there a way this can be done?
I'm using libxml2 for SOAP-Actions in an iPhone App.
The big problem is that i want send an SQL-Statement with
NSString *query = @"SELECT test FROM database WHERE test = \"string\""
But libxml2 converts the qotes " into &quot;
Any ideas how to prevent this?
hello mates i am trying to store value from dropdown list to an integer but i am getting an exception Input string was not in a correct format.
int experienceYears = Convert.ToInt32("DropDownList1.SelectedValue");
please help.