Unnamed: 0
int64 65
6.03M
| Id
int64 66
6.03M
| Title
stringlengths 10
191
| input
stringlengths 23
4.18k
| output
stringclasses 10
values | Tag_Number
stringclasses 10
values |
---|---|---|---|---|---|
2,277,032 | 2,277,033 |
Android Tutorials or book recommendations?
|
<p>I want to write an Android application(a port from a windows mobile phone) but I need to learn a couple things</p>
<ol>
<li>How to program for different screen
sizes and resolutions (so my
controls get bigger smaller or
whatever)</li>
<li>How to dynamically create controls
such labels and checkboxes ( and
checkbox listeners)</li>
<li>How to create a menu</li>
<li>How to create a context menu( a menu
when you right click on the screen
it pops up)</li>
<li><p>how to program for landscape and
portrait mode</p>
<p>How to consume a webservice</p></li>
</ol>
<p>Most of what I am after is mostly the display aspect as all my logic is on a webservice so I could port all my stuff to different phones faster.</p>
<p>So I am looking for tutorials or a book to get me up to speed to do these things</p>
|
android
|
[4]
|
3,847,583 | 3,847,584 |
php: refreshing script without browser
|
<p>I know that this can be done with a cron tab, but I was wondering if there was any way to refresh a php script at a certain interval, say one second, without using a browser/javaScript. </p>
<p>I have a device that outputs data constantly and I need a php script that can run independent for a browser to load that data into a database should it change.</p>
<p>My server is a Linux box and it houses a lot of different development projects so I just have access to one partition of it.</p>
<p>The device is actually using a node and python to pull the data and I cam creating a web interface and a logging system for a charting interface I am creating. So it needs to pullt he data at a consistent interval for charting the data I am storing. </p>
<p>Thank you all for your fatnastic responses and giving me a lot to work from here. I will look into the solutions offered and see if I can be more specific in my request.</p>
|
php
|
[2]
|
3,099,263 | 3,099,264 |
How to draw shapes (rectangle,circle) on finger swipe in xcode programatically?
|
<p>I am trying to draw custom shapes like rectangle,circle,traingle on finger swipe in an iphone application.But i am not getting the way ,how will do it.even i googled a lot but still i don't have any solution.any help would be appreciated</p>
|
iphone
|
[8]
|
2,901,432 | 2,901,433 |
How do I fake a sms system notification?
|
<p>Hello everyone I have a question...
I'm trying to make my sms faker app, and I can insert the fake sms into the inbox but I cant trigger the notification about the new sms...
anyone know how can I trigger it?</p>
|
android
|
[4]
|
3,661,875 | 3,661,876 |
Can a telephony.Phone object be instantiated through the sdk?
|
<p>I am trying to get a phone object so that I can call and conference two numbers from within my application.</p>
<p>I have tried using the static PhoneFactory.makeDefaultPhones((Context)this) but have not had any luck.</p>
<pre><code>String phoneFactoryName = "com.android.internal.telephony.PhoneFactory";
String phoneName = "com.android.internal.telephony.Phone";
Class phoneFactoryClass = Class.forName(phoneFactoryName);
Class phoneClass = Class.forName(phoneName);
Method getDefaultPhone = phoneFactoryClass.getMethod("getDefaultPhone");
Object phoneObject = getDefaultPhone.invoke(null);
</code></pre>
<p>Error - Caused by java.lang.RuntimeException: PhoneFactory.getDefaultPhone must be called from Looper thread</p>
|
android
|
[4]
|
3,265,659 | 3,265,660 |
Pointer in managed Code? C#
|
<p>I use C#.net.</p>
<p>These is my method now:</p>
<pre><code> [DllImport(DLLPath, CallingConvention = CallingConvention.Cdecl)]
unsafe public extern static int AMRecoveryModeDeviceReboot(AMRecoveryDevice device, byte[] paramByte, int u1, int u2, int u3)
</code></pre>
<p>I must have a Pointer in it, the AMRecoveryDevice is a struct:</p>
<pre><code>[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
internal struct AMRecoveryDevice
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
public byte[] unknown0; /* 0 */
public DeviceRestoreNotificationCallback callback; /* 8 */
public IntPtr user_info; /* 12 */
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
public byte[] unknown1; /* 16 */
public uint readwrite_pipe; /* 28 */
public byte read_pipe; /* 32 */
public byte write_ctrl_pipe; /* 33 */
public byte read_unknown_pipe; /* 34 */
public byte write_file_pipe; /* 35 */
public byte write_input_pipe; /* 36 */
};
</code></pre>
<p>Now I must have AMRecoveryDevice as a Pointer in the first method, but then it gives an error.
Is it impossible? </p>
|
c#
|
[0]
|
3,497,842 | 3,497,843 |
NavigationController Problem
|
<p>In navigationcontroller application , i used</p>
<p>ViewController *modalViewController=[[ViewController alloc]initWithNibName:@"ViewController" bundle:nil];</p>
<pre><code>[[self navigationController]presentModalViewController:modalViewController animated:NO];
[modalViewController release];
</code></pre>
<p>above code will load an anotherviewcontroller....
I want to push one moreviewcontroller from this viewcontroller(ViewController)...</p>
<p>Can any one help me?</p>
<p>Thanks in advance...</p>
|
iphone
|
[8]
|
4,972,435 | 4,972,436 |
ASP.NET Enter key log out?
|
<p>I have created Website. After I login When I hit enter key for add Product, my Website just kick me out.? I dont have problem with adding my cart with mouse click. Does Any One have same Issue or Any suggestion ..</p>
|
asp.net
|
[9]
|
2,847,740 | 2,847,741 |
Basic if..elseif...else question in PHP
|
<p>Sorry, just a very basic question on conditionals in PHP</p>
<pre><code>If {}
elseif {}
else {}
</code></pre>
<p>If the <code>if</code> condition comes out to be true, will PHP still evaluate the <code>elseif</code> to see if that is true as well?</p>
|
php
|
[2]
|
4,563,948 | 4,563,949 |
The page will closed & saved after a few minutes
|
<p>I work with asp.net in c# and i want that if someone is opened his page and didnt do nothing after 5 minutes the page will closed and the changes will saved. how i write it?
(this feature is exist in a banks pages or another pages with protection)</p>
|
asp.net
|
[9]
|
3,609,557 | 3,609,558 |
Is there a simple command to hide or display an imageview?
|
<p>I have a series of imageviews that I want to display, but on a button press there needs to be less or more. These imageviews are stored in a list. Is there a simple way to hide or display them?</p>
|
android
|
[4]
|
3,610,602 | 3,610,603 |
Save a java source code to a file?
|
<p>I'm having a problem to save my java source code to a file, I want to prompt the user for the name of the java source file and then write java source code to that file.
let me elaborate more,
I have created a simple bean builder tool to allow users to add components like JLable or JButton or other components to a design palette and they can customize the properties of the added components as i have created the means to, now they want to save the source code of that to a file and i want to ask them for the name of the file, this is my problem?!?!
Any ideas will be appreciated.</p>
|
java
|
[1]
|
1,394,126 | 1,394,127 |
PHP uploading images in the correct dimensions
|
<p>I know this question is very common but the main point in my question is that i want to know how facebook or some other websites upload their pictures in the correct size. for example. if we upload a picture of the dimension : width : 1000px , height : 20px. then facebook updates the status updates with that pic but makes the image size small in the correct ratio. its jus scales down the picture but we can know that the image is very widthy (my own word for very high width :P) where as long heighty pictures are also posted in the correct proportion.</p>
<p><img src="http://i.stack.imgur.com/YEePN.png" alt="PIC NUMBER 1"></p>
<p><img src="http://i.stack.imgur.com/2n8K6.png" alt="PIC NUMBER 2"></p>
<p>I have included the image examples above. how does facebook calculate the size n ratio of the pics and echo out the pic by keeping the right dimensions but scaling it down at the same time. </p>
|
php
|
[2]
|
3,737,261 | 3,737,262 |
Can i provide services in Android app
|
<p>My question may seem foolish to you! I just have a doubt that, what happens if i dev an android app, showing a text that </p>
<p>"Do you want an android app like this? Just contact me on [email protected]"</p>
<p>What does happen? Does google ban! </p>
<p>Thank you!</p>
|
android
|
[4]
|
3,765,599 | 3,765,600 |
HTML tags in string for TextView
|
<p>If I put simple HTML formatting tags, such as <b>...</b> into a string resource and display the string in a TextView, the expected formatting is applied. But how can I do this if I build up my own String and display it? If I do something like String str = "This is <b>bold</b>";, the actual tags get displayed -- not the expected bolding.</p>
<p>Do I have to run the string through some other method to cause the tags to be recognized as tags?</p>
|
android
|
[4]
|
2,551,548 | 2,551,549 |
Transparent STATIC text changing
|
<p>I have this STATIC control displayed over a window that has an image as its background. When I initiate the control it displays a text. If I want to change the text inside a WM_TIMER message it is displayed over the initial text (it is not removed) I have tried UpdateWindow and InvalidateRect but id doesn't work.
This is my code</p>
<pre><code>WM_CREATE:
HWND control = CreateWindowEx(
WS_EX_TRANSPARENT,
L"STATIC",
L"FirstText",
WS_CHILD|WS_VISIBLE|ES_LEFT,
0,
0,
200,
20,
hWnd,
HMENU(LABEL1),
Instance,
NULL
);
break;
case WM_TIMER:
SetWindowText(GetDlgItem(hWnd, LABEL1), L"SecondText");
KillTimer(hWnd, MYTIMER);
// Here I tried UpdateWindow and InvalidateRect but no result
break;
</code></pre>
<p>So, the second text is drawn over the first one. It looks like the STATIC content is not updated after changing it. What could be going wrong? Thanks! </p>
|
c++
|
[6]
|
5,885,346 | 5,885,347 |
window.location not working when button is clicked
|
<p>Check out this link:
<a href="http://humorjots.com/Barry/BarryWashington.htm" rel="nofollow">http://humorjots.com/Barry/BarryWashington.htm</a></p>
<p>The part in the script that says: </p>
<pre><code>if(emailInput.value != '' && zipInput.value != ''){
window.location = "sea206.html";
}
</code></pre>
<p>for some reason doesn't work in loading sea206.html. However when you go to type <code>window.location = 'sea206.html'</code> in the developers console, it loads the page. I don't understand why it won't work when the button is clicked.
The if statement does work. If an alert is inserted within the statement, it runs run when the button is clicked.</p>
|
javascript
|
[3]
|
3,382,008 | 3,382,009 |
Can I create a custom configuration qualifier for android?
|
<p>I know that I can use the android configuration qualifiers for different screen sizes and different orientations. (I am using android 2.2).</p>
<p>But I need to build my app to a very specific tablet with its unique screen size/resolution.</p>
<p>Can I have another configuration qualifier for my specific tablet so whenever one runs my app using that tablet it will get its layout/dimentsions etc from that specific configuration qualifier?</p>
<p>For example: I want to have a directory named "drawable-specialtablet" and "values-specialtablet".</p>
<p>How can I do it?</p>
|
android
|
[4]
|
4,716,161 | 4,716,162 |
sending email in android
|
<pre><code>public class AndroidEmailActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final EditText edittextEmailAddress = (EditText) findViewById(R.id.email_address);
final EditText edittextEmailSubject = (EditText) findViewById(R.id.email_subject);
final EditText edittextEmailText = (EditText) findViewById(R.id.email_text);
Button buttonSendEmail_intent = (Button) findViewById(R.id.sendemail_intent);
buttonSendEmail_intent.setOnClickListener(new Button.OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
String emailAddress = edittextEmailAddress.getText().toString();
String emailSubject = edittextEmailSubject.getText().toString();
String emailText = edittextEmailText.getText().toString();
String emailAddressList[] = { emailAddress };
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("plain/text");
intent.putExtra(Intent.EXTRA_EMAIL, emailAddressList);
intent.putExtra(Intent.EXTRA_SUBJECT, emailSubject);
intent.putExtra(Intent.EXTRA_TEXT, emailText);
startActivity(Intent.createChooser(intent,
"Choice App t send email:"));
}
});
}
}
</code></pre>
<p>This is my code.I am not getting any emails.I need to send emails through this intent method.how can I acheive that?Where I went wrong?pls give some suggestions.</p>
<p>I am getting the error when I click the Send email button as "No applications can perform this action."</p>
|
android
|
[4]
|
2,271,369 | 2,271,370 |
Allocation Bar like View in Android
|
<p>I am developing an app for Surveys. I want to have Allocation Bar like view in Android.
<img src="http://i.stack.imgur.com/fid5w.png" alt="enter image description here"></p>
<p>Can anybody tell me how to implement this kind of view.
Please help me to solve this issue. Thanks in advance.</p>
|
android
|
[4]
|
1,593,448 | 1,593,449 |
res.getIdentifier - find packagename
|
<p>I need to display an image which I save under res/drawable folder. I get the image name from a web service call and I try to find this image in the drawable folder using the following code</p>
<pre><code>ImageView backgroundImage = (ImageView) findViewById(R.id.ivFormBackgroundImage);
Resources res = getResources();
String mDrawableName = formSummary.backgroundImageName;
int resID = res.getIdentifier(mDrawableName , "drawable", getPackageName());
Drawable drawable = res.getDrawable(resID );
backgroundImage.setImageDrawable(drawable );
</code></pre>
<p>The resID always returns 0 and i wonder if it is because of the packagename. I have set my package name to be package="com.x.y.z.classes.ui.screens" in the Android_Manifest file, but the image is in res/drawable. Any help on how to get the path of the image is much appreciated.
thanks...</p>
|
android
|
[4]
|
244,368 | 244,369 |
Can I override the Javascript Function object to log all function calls?
|
<p>Can I override the behavior of the Function object so that I can inject behavior prior t every function call, and then carry on as normal? Specifically, (though the general idea is intriguing in itself) can I log to the console every function call without having to insert console.log statements everywhere? And then the normal behavior goes on?</p>
<p>I do recognize that this will likely have significant performance problems; I have no intention of having this run typically, even in my development environment. But if it works it seems an elegant solution to get a 1000 meter view on the running code. And I suspect that the answer will show me something deeper about javascript.</p>
|
javascript
|
[3]
|
3,496,134 | 3,496,135 |
DLMS/COSEM in PHP
|
<p>I'm creating a simple web based AMR (Automated Meter Reading) system, but can't find any implementations of <a href="http://www.dlms.com/index2.php" rel="nofollow">DLMS/COSEM</a> in php, maybe someone has a solution?</p>
<p>DLMS/COSEM are communication standards (definitions, rules and methods) for meters</p>
|
php
|
[2]
|
1,246,503 | 1,246,504 |
Opening new activity with fixed width and height in android
|
<p>I am creating an enterprise app on android 2.3 which is like the default launcher app with some modifications. The home and back button of the device is hidden behind an enclosing, thus a user won't be able to click them. My problem is that: once users launch an app from the launcher then how do I give them an option to go back (as they wont be able to click the back button of the device). I was thinking of inserting a bar at bottom with a button - clicking on which takes the user back, more like what happens in Android 3.0.<br/><br/>
<strong>So my question is:</strong> Is there a way to limit the height and width of launched activity and also can I show a bar with a button on it below other activities?</p>
|
android
|
[4]
|
2,219,437 | 2,219,438 |
How to make a variable timer sequence which runs infinitive
|
<p>I have <code>n</code> parameters which have to be run in sequence for <code>t</code> seconds each. All the data is stored in an array which is loaded dynamically through ajax and json and exists of: function parameters <code>p</code> and time to sleep <code>t</code></p>
<p><code>function(p1)</code>, for 30 seconds; when it completes <code>function(p2)</code> for 15 seconds etc etc </p>
<p>Until the array is complete; then we have to start all over.
The number of parameters and its time being displayed are not determined on forehand. </p>
<p>How can I implement this with javascript?</p>
<p>//edit:
I tried to make one big function with function(p1) starting at t=0; function(p2) starting at t=t1; function(p3) starting at t=t1+t3</p>
<p>But it felt 'stupid' and overdone....</p>
|
javascript
|
[3]
|
376,860 | 376,861 |
It is an error to use a se`enter code here`ction registered as allowDefinition='MachineToApplication' beyond application level.
|
<p>Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.</p>
<p>Parser Error Message: It is an error to use a se<code>enter code here</code>ction registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.</p>
<p>when i m trying to run my asp site it comes this error how can i fix this error</p>
|
asp.net
|
[9]
|
367,638 | 367,639 |
Javascript shorthand if-else and returning
|
<p>Can the javascript shorthand for if-else return out of a function? If so how would this work. </p>
<p>eg.
I have this:</p>
<pre><code>if(boolean){
return;
}
</code></pre>
<p>and I would like to write it as this:</p>
<pre><code>(value)? return;
</code></pre>
<p>Chrome complains that return is unexpected. Is there anyway to write something like this so that it is valid?</p>
|
javascript
|
[3]
|
3,144,411 | 3,144,412 |
Core Data Vs File System
|
<p>What is the difference between storing data in CORE data and storing them in File system. And on what basis should one choose between them?</p>
|
iphone
|
[8]
|
1,077,711 | 1,077,712 |
intermediate javascript: assign a function with its parameter to a variable and execute later
|
<p>I have a function in javascript:</p>
<pre><code>function alertMe($a)
{
alert($a);
}
</code></pre>
<p>Which I can execute like this: alertMe("Hello");</p>
<p>I want to do is assign alertMe("Hello") with the "Hello" parameter to a variable $func,
and be able to execute this later by doing something like $func();</p>
|
javascript
|
[3]
|
414,725 | 414,726 |
How to print a numpy array without brackets
|
<p>I want to convert <code>a = [1,2,3,4,5]</code> into <code>a_string = "1 2 3 4 5"</code>. The real numpy array is quite big (50000x200) so I assume using <code>for loops</code> is too slow.</p>
|
python
|
[7]
|
6,002,963 | 6,002,964 |
Android custom tabs
|
<p>Actually i want 4 tabs in my app but i dont want to show default tabs. i Want to have something like dragging tabs. when i click on first tab and does not pick my finger up and drags to next tab and so on.</p>
<p><img src="http://i.stack.imgur.com/lcES5.png" alt="enter image description here"></p>
<p>The tab bar like this below..when i press on one tab i can move to another tab as well by this moving of finger.</p>
|
android
|
[4]
|
2,770,536 | 2,770,537 |
how to include currency convertor?
|
<p>Is There any free API for currency convertor for iphone. So I can get live updates for currency convertor for my application.</p>
|
iphone
|
[8]
|
980,851 | 980,852 |
C++ Pointers to Pointers in Java
|
<p>I am a Java noob. I have been able to grasp the concept of converting C/C++ pointers into Java references and this has gone fairly smoothly.</p>
<p>I hit a piece of code that has pointers to pointers (ie **ptr). I need to dereference the pointer and change the value of the pointer it is pointing to (ie *ptr = &newthing;)</p>
<p>This seems alot tougher in java. Does anyone have any ideas on how to solve this issue? Quick google search turned up nothing.</p>
<p>Here's a code example in C++. I want to get something similar working in java but the ptr_to_ptr variable is a problem:</p>
<pre><code>struct _coord
{
int x;
int y;
_coord * next_coordinate;
} coordinate_t;
coordinate_t buffer[100];
coordinate_t * head;
coordinate_t ** ptr_to_ptr;
if (wednesday)
{
ptr_to_ptr = &head;
}
else
{
ptr_to_ptr = &head->next_coordinate;
}
*ptr_to_ptr = &buffer[3]; // <<<---- HOW DO YOU MAKE THIS WORK?
</code></pre>
|
java
|
[1]
|
5,272,558 | 5,272,559 |
My application wont allow me to open any other application
|
<p>I created a sample package listener application which get launched when user clicks any other application. But currently I am not able to uninstall old version and even not able install updated version. The application is not allowing me to open settings or task manager or anything else. i am not able to do anything Please help me out. My phone get hacked by the application.</p>
<p>Is there any way to uninstall application?</p>
|
android
|
[4]
|
4,815,073 | 4,815,074 |
Problem re-factoring multiple timer countdown
|
<p>I create my multiple timer countdown from easy or simple script. <a href="http://jsfiddle.net/jowan/6jkSJ/" rel="nofollow">entire code</a></p>
<p>The problem's happen
when i want to add timer countdown again</p>
<p>i have to declare
variable current_total_second</p>
<p>CODE:</p>
<pre><code>elapsed_seconds= tampilkan("#time1");
</code></pre>
<p>and variable timer who set with setInterval..</p>
<pre><code>timer= setInterval(function() {
if (elapsed_seconds != 0){
elapsed_seconds = elapsed_seconds - 1;
$('#time1').text(get_elapsed_time_string(elapsed_seconds))
}else{
$('#time1').parent().slideUp('slow', function(){
$(this).find('.post').text("Post has been deleted");
})
$('#time1').parent().slideDown('slow');
clearInterval(timer);
}
}, 1000);
</code></pre>
<p>i've already know about re-factoring and try different way
but i'm stack to re-factoring this code
i want implement flexibelity to it..
when i add more of timer countdown..
script do it automatically or dynamically without i have to add a bunch of code..
and the code become clear and more efficient.</p>
<p>Thanks in Advance</p>
|
jquery
|
[5]
|
5,386,480 | 5,386,481 |
Jquery clone of a textbox without the content
|
<p>Can I clone one textbox without its content??Means if I enter some values in the textbox after cloning I want an empty textbox.Is it possible?Or jquery clone returns this as an innerHtml?</p>
|
jquery
|
[5]
|
1,192,339 | 1,192,340 |
check if an input with specific type is selected
|
<p>I'm using the folowing code to check if an input field is selected but I don't no where the problems is, because it is not working!</p>
<pre><code> <html>
<head>
<title>Test </title>
<head>
<body>
<form >
<input type="text" id="select" value="select"/>
</form>
<script type="text/javascript" >
var d, len,i, j, el;
d=document.forms;
len=d.length;
for(i=0; i<len; i++){
el=d[i].elements;
for(j=0;j<el.length; j++)
if(el[j].type == "text" && el[j].focus())
{
alert("you selected an input field with type text");
}
}
</script>
</body>
</html>
</code></pre>
<p>Any help would be much appreciated! Thanks!</p>
|
javascript
|
[3]
|
19,512 | 19,513 |
Javascript Document.bgColor does not work
|
<p>In the below code, I get the two dialog boxes, but the bgColor of the page is never changed. Is there any standard that font / color changes are not honored in JavaScript ?</p>
<pre><code> <html>
<head>
</head>
<body bgColor="GRAY">
<script type="text/javascript">
document.write("This message is written by JavaScript");
alert('Am here');
alert('Am here again');
document.bgcolor="WHITE";
</script>
</body>
</html>
</code></pre>
|
javascript
|
[3]
|
72,659 | 72,660 |
PHP - file_put_contents . How to suppress ouput of it?
|
<p>When I try to create a file with file_put_contents then it also outputs the file directly in the browser.</p>
<p>Code:</p>
<pre><code>file_put_contents($file, utf8_encode($seite));
</code></pre>
<p>Is there a way to suppress this output? Documentation seems to not have a solution :(</p>
|
php
|
[2]
|
4,212,736 | 4,212,737 |
Android Notification Icon
|
<p>New to Android development. I'm wondering if its possible to programmatically draw an icon to put in the notification bar? What if we want the icon to display some dynamic text for something like battery level? </p>
<p>If anyone has a code sample it would be nice. Thanks.</p>
|
android
|
[4]
|
5,054,183 | 5,054,184 |
Javascript Object initialization
|
<p>I am trying to initialize a Javascript object like.</p>
<pre><code>function showKabineninfo(W3CElement) {
params = params || {};
...
...
}
</code></pre>
<p>But I am getting Javascript error that "params is undefined"</p>
|
javascript
|
[3]
|
4,002,303 | 4,002,304 |
tabbar controller's tabbar is not getting hid
|
<p>I am using a UITabBarController in my application and when I switch between tabs I want to hide the tabbar in one of the tabs. </p>
<p>I tried</p>
<pre><code>self.tabBarController.tabBar.hidden = YES;
</code></pre>
<p>Although the tabs dont appear I can still see the tabbar on the bottom of my screen. </p>
<p>I also tried setting the frame of tabbar but of no use. I tried setting height of it to zero which was also of no use. </p>
<p>my app design is something similar to this. I have two navigation controllers with root view controllers initialised and I added these navigation controllers to a tabbar controller. I've searched other related topics and tried methods told over there but nothing helped me. </p>
<p>Does anyone have any idea how to do it?</p>
|
iphone
|
[8]
|
1,581,967 | 1,581,968 |
How to open a jquery dialog in MVC
|
<p>I have an aspx page and UserControl [ it contains a button,textbox ]
and userControl is added onto aspx page</p>
<p>So When i click button in aspx page it should make a Jquery ajax call to the Controller to open a dialog .</p>
<p>how can i do this....in this we have to make a call to controller </p>
|
jquery
|
[5]
|
3,322,336 | 3,322,337 |
How to get items in listbox in to Settings.Default C#
|
<p>Im trying to save the items in the listbox in Settings.Default but it will not work, this is what i have so far.</p>
<pre><code>test.Properties.Settings.Default.list = listBox1.Items;
</code></pre>
|
c#
|
[0]
|
4,780,005 | 4,780,006 |
Can I install Microsoft Visual Studio 2010 Service Pack 1 in Microsoft Visual Web Developer 2010 Express
|
<p>Can I install Microsoft Visual Studio 2010 Service Pack 1 in Microsoft Visual Web Developer 2010 Express? Thanks!</p>
|
asp.net
|
[9]
|
2,985,388 | 2,985,389 |
Query Result: What is $row[0]
|
<p>I know this may sound like a stupid question from a programming-newbie, but I just want to make sure I understand correctly.</p>
<p>After a query, what does <code>$row[0]</code> stand for/ result in?</p>
<p>Is my understanding correct that <code>$row[0]</code> shows ALL results?</p>
<p>HERE ARE EXAMPLES:</p>
<pre><code>$query = "SELECT count(commentid) from comments where jokeid = $jokeid";
$result = mysql_query($query);
$row=mysql_fetch_array($result);
if ($row[0] == 0)
{
echo "No comments posted yet.&nbsp;&nbsp;\n";
} else
{
echo $row[0] . "\n";
echo "&nbsp;comments posted.&nbsp;&nbsp;\n";
</code></pre>
<p>AND THIS ONE</p>
<pre><code>$query = "Select count(prodid) from products where catid = $catid";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
if ($row[0] == 0)
{
echo "<h2><br>Sorry, there are no products in this category</h2>\n";
}
else
{
$totrecords = $row[0];
</code></pre>
<p>Thanks in advance.</p>
|
php
|
[2]
|
3,956,890 | 3,956,891 |
Synchronous HttpPost on a separate thread
|
<p>Im currently posting some data to a php webservice using a class that extends <code>AsyncTask</code>.</p>
<p>Now i need to make a synchronous call, because i want to show the default exception popup that my app has crashed once the data is sent (<code>previousHandler.uncaughtException(t, e)</code>).</p>
<p>Can i just disable the async functionality on the <code>AsyncTask</code>, or do you have any other suggestions</p>
<p>Here is my current code, thanks in advance:</p>
<pre><code>public void uncaughtException(Thread t, Throwable e) {
final Writer result = new StringWriter();
final PrintWriter printWriter = new PrintWriter(result);
e.printStackTrace(printWriter);
String stacktrace = result.toString();
printWriter.close();
String deviceUuid = Utilities.DeviceUuid(ctx, cr);
String bluetoothName = Utilities.LocalBluetoothName();
AsyncTasks.ErrorLogTask logTask = new AsyncTasks.ErrorLogTask(e, bluetoothName, deviceUuid, stacktrace);
logTask.execute();
//task wont be complete before this code below runs since its async.
previousHandler.uncaughtException(t, e);
}
</code></pre>
|
android
|
[4]
|
3,103,687 | 3,103,688 |
Back button on Android Phones
|
<p>A couple questions about the back button (as seen on the emulator)...</p>
<p>1) Do all Android phones have the back button as a hard, tactile button?</p>
<p>2) If so, is it still recommended to put a back button in your software?</p>
<p>3) Is it possible to change the animation between activities when this back button is pressed? I would like it to be consistent with the animations in my app.</p>
|
android
|
[4]
|
958,311 | 958,312 |
The server tag is not well formed. in asp.net using another sql result in repeater
|
<p>Parser Error Message: <strong>The server tag is not well formed.</strong>
Source Error: </p>
<pre><code>Line 27: <asp:Label ID="Label1" runat="server" Text='<%# Bind("PCName") %>' />
Line 28: </li>
Line 29: <asp:AccessDataSource ID="AccessDataSource2" runat="server"
Line 30: DataFile="~/Database/PDetail.mdb"
Line 31: SelectCommand="SELECT DISTINCT [PBName] FROM [PDETAIL] WHERE PCName= <%# Eval("PCName")%> ">
</code></pre>
|
asp.net
|
[9]
|
3,259,618 | 3,259,619 |
JavaScript document.referrer
|
<p>I've got two webpages one</p>
<pre><code><html>
<body>
<p><a href="page2.html">Link</a></p>
</body>
</html>
</code></pre>
<p>And the second page.</p>
<pre><code><html>
<body>
<script type="text/javascript">
document.write(document.referrer);
</script>
</body>
</html>
</code></pre>
<p>The second page is always blank, it doesn't seem to be picking up the referrer, any idea's why?</p>
|
javascript
|
[3]
|
3,819,262 | 3,819,263 |
Creating buttons in android splashscreen to move to next location
|
<p>I have created a splash screen in which i want to create two buttons PLAY and INFO.I want that when i click INFO it will go to the next splashscreen that is of Instruction Manual and also want that these two buttons should not be visible on splashscreen.</p>
|
android
|
[4]
|
1,832,528 | 1,832,529 |
Checking if a jQuery selector doesn't find any results
|
<p>I'm used to Prototypejs, where $$("selector") will return null if no elements were found. This is convenient because I can do</p>
<pre><code>if ($$("selector")) {}
</code></pre>
<p>to check if an element is in the DOM.</p>
<p>However, in jQuery $(selector) will return [] if no element is found, so now I need to do:</p>
<pre><code>if ( $(selector).length > 0 )
</code></pre>
<p>This makes code slightly harder to read.</p>
<p>My question: What's the best way of doing this? Should I extend the jQuery object with methods like .empty() and .any(), or are there built in functions to do this?</p>
<p>Update: This also applies to other selectors on jQuery which should, anyways, only return one result (like parent(), or closest())</p>
|
jquery
|
[5]
|
5,459,292 | 5,459,293 |
Finding a line number certain text is on
|
<p>what is the best way to find on which line certain string is on? I know I could iterate though all of the lines, but the catch is that the string being searched might be multiline. Would this be solvable by regex for example?
Thanks</p>
|
php
|
[2]
|
13,905 | 13,906 |
How do I convert a java ArrayList<Double> to the equivalent double[]
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/6018267/how-to-cast-from-listdouble-to-double-in-java">How to cast from List<Double> to double[] in Java?</a> </p>
</blockquote>
<p>So far the only method I can get working is to loop through the entire array. I was hoping for something along the lines of:</p>
<pre><code>ArrayList<Double> myArrayList = ... // initiaize
double[] myArray = ... // magic line here
</code></pre>
|
java
|
[1]
|
4,689,719 | 4,689,720 |
Multiplying a matrix and a vector in GLM (OpenGL)
|
<p>I have a transformation matrix, m, and a vector, v. I want to do a linear transformation on the vector using the matrix. I'd expect that I would be able to do something like this:</p>
<pre><code>glm::mat4 m(1.0);
glm::vec4 v(1.0);
glm::vec4 result = v * m;
</code></pre>
<p>This doesn't seem to work, though. What is the correct way to do this kind of operation in GLM?</p>
<p>edit:</p>
<p>Just a note to anyone who runs into a similar problem. GLM requires all operands to use the same type. Don't try multiplying a dvec4 with a mat4 and expect it to work, you need a vec4.</p>
|
c++
|
[6]
|
2,799,087 | 2,799,088 |
Pass variables through Quoted Javascript String
|
<p>I have a function which returns a string which contains a javascript call. Since it is quoted I cannot pass variables through it. </p>
<p>How can I change the return string which would enable me to pass javascript object values. </p>
<p>Ex: How can I pass <code>var i</code> through the return statement.</p>
<pre><code>var i = 'iaa';
</code></pre>
<p><code>return '<a href="javascript:abccd(\'i\');" ><img src="../images/btnsave2.png" style="margin:6px 0 0 6px;" height="13" width="13" /></a> ';</code></p>
|
javascript
|
[3]
|
1,475,146 | 1,475,147 |
How to connect with udp in android?
|
<p>I am new to android.I need to know how to connect (communicate) with PC’s UDP server with android client.Can anyone give a simple example ( Guide me to understand)</p>
|
android
|
[4]
|
5,219,586 | 5,219,587 |
Code behind the wait timer
|
<p>Can someone tell me the code for this expression, <code>"Waiting for" + n + "Seconds"</code>
such that the text displays only once in the output and the variable <code>n</code> keeps changing.</p>
<p>Thanks.</p>
|
c#
|
[0]
|
1,155,652 | 1,155,653 |
Adding icon on arraylist
|
<p>i'm displaying folders from sdcard dynamically. How to add icon on <code>ArrayList</code>. </p>
<p>Code:</p>
<pre><code>if(file.isDirectory())
{
item.add(file.getName() + "/");
}
</code></pre>
<p>I need to add icon to the left of <code>file.getName()</code>.</p>
<p>Can anyone help me?</p>
|
android
|
[4]
|
6,027,414 | 6,027,415 |
isValidUrl source code?
|
<p>Where can I get the source code of this method in android : URLUtil.isValidUrl() ?</p>
|
android
|
[4]
|
5,459,619 | 5,459,620 |
Do Android controls/widgets have choice of styles?
|
<p>I have a column of Checkboxes and associated EditTexts and I want one pair of these to have a distinct appearance because it has a distinct significance. </p>
<p>Short of writing custom controls, or using custom drawables, does Android have any way to style or alter the appearance of basic controls like buttons, checkboxes, etc, in the XML where the control is declared? Or is there just one native style or appearance for all Android Checkboxes, Buttons, EditTexts, etc? </p>
<p>Thanks in advance. </p>
|
android
|
[4]
|
5,247,500 | 5,247,501 |
Default.png
|
<p>Ok. I've got an openGL ES application up and running on the iPhone.</p>
<p>And my project has a Default.png to show something other than a black screen on powerup.</p>
<p>This image appears when I compile a DEBUG version for the simulator and the device. If I do a compile for the DEVICE in RELEASE mode, the image does not show up (black screen instead).</p>
<p>I'm running OS3.0 Beta 5. Anyone got a clue?</p>
<p>Thanks.</p>
|
iphone
|
[8]
|
442,872 | 442,873 |
Defining a class instead of attribute
|
<p>How could I properly edit the below line to include a specific class, as opposed to the href attribute?</p>
<pre><code>var activeTab = $(this).find("a").attr("href");
</code></pre>
|
jquery
|
[5]
|
5,771,183 | 5,771,184 |
How Can I count excel column name?
|
<p>I Want to import data from excel to sql,in this operation if a user can add one column extra,how can I check which column is newly added and at the same time in sql table also added the new column with the same column name like excel sheet...</p>
<p>I can Done read the excel column count-like below my coding</p>
<pre><code> protected void btn_upload_Click(object sender, EventArgs e)
{
//Add Path to Local system dynamically
string path = string.Empty;
path = Server.MapPath("~//files//") + Fup_Excel.PostedFile.FileName;
Fup_Excel.SaveAs(path);
//-----------------Execl Connection & Count Part-------------------------------------
//create Oledb connection for Excel Fetch
OleDbConnection oconn = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=Excel 8.0");
OleDbCommand olcmd = new OleDbCommand("select * from [sheet1$]", oconn);//create command for select excel file
OleDbDataAdapter adapter = new OleDbDataAdapter();
adapter.SelectCommand = olcmd;//adap the command
DataSet ds = new DataSet();//collection of data
adapter.Fill(ds);//data's are filled to dataset
string count = ds.Tables[0].Columns.Count.ToString();//taking the Excel sheet column count
}
</code></pre>
<p>Here after I done take count from sql table also
that code's are</p>
<pre><code> SqlConnection sconn = new SqlConnection(@"Data Source=C07-PC\SQLEXPRESS;Initial Catalog=excel;User ID=sa;Password=**********");
string asdf = null;
SqlCommand scmd = new SqlCommand();
scmd.CommandText = "select count(*) from information_schema.columns where table_name='table_1'";
scmd.Connection = sconn;
sconn.Open();
SqlDataReader sr = null;
sr = scmd.ExecuteReader();
while (sr.Read())
{
asdf =sr[0].ToString();
}
</code></pre>
<p>and from here onwords i dont know how to check which column is newly added in excel?then that ssame name i want to insert column in sql table also..</p>
|
c#
|
[0]
|
5,706,184 | 5,706,185 |
Hide Folders/ File with Python
|
<p>is it any way to hide folders/ files with python. </p>
<p>Im working a huge project (a vulnerability scanner) the project creates alot of files and folders, so back to the question, is it any way to make a script that hides files and folders.</p>
|
python
|
[7]
|
4,870,898 | 4,870,899 |
Android Emulator api level11
|
<p>I just updated <code>android</code> from 2.3.3 api Level 10 to <code>android</code> 3.0 api Level 11. But I am getting these two problems. I have searched the internet but could not find anything helpful. </p>
<p>Here are my problems:</p>
<ol>
<li>My emulator is in the portrait mode but my activities runs in landscape mode always.</li>
<li>The Application Launcher com.android.launcher has stopped unexpectedly.</li>
</ol>
|
android
|
[4]
|
5,787,548 | 5,787,549 |
Iphone Differentiate between lite version and full version
|
<p>I have developed an app for iphone. it is quiz app.
It has main topics say 5.
All topics has 20 question.
Now I want to create lite and full version.
in Lite Version, when user download app, user gets 5 question in all topics.
and in full version user can buy topic wise.
for eg there are topic 1,2,..5. user want to buy topic 2 and topic 3,
then how can i develop code for this functionality.
I know this is possible, but how that I dont know.</p>
<p>Please help in this case and suggest best solution.</p>
<p>thankyou all</p>
|
iphone
|
[8]
|
646,234 | 646,235 |
PySQLPool getting old data until restart
|
<p>I am facing a problem where data from MySQL retrieved using PySQLPool is returned as the db was at start of process, INSERT or UPDATE queries from python or MySQL client do not show up until a kill and re-run of the python process.</p>
<p>Would appreciate any help regarding this.</p>
|
python
|
[7]
|
4,452,536 | 4,452,537 |
What's the difference between array.sort() and array.sort(function(a,b) { return a - b; })?
|
<p>I have a piece of code which triggers some actions. Before that it simply sorts weights. Everything works well when I use: <code>weight.sort()</code> where <code>weight</code> is an non-empty array e.g. <code>[10 20 30 40]</code>, but when I change that to:</p>
<pre><code>weight.sort(function(a,b) {
return a - b;
});
</code></pre>
<p>one of the actions has no effect (display a div). Being honest I don't know what might cause the difference. It seems strange to me because <code>weight</code> is the same after sorting with both methods and clearly changing that piece of code makes my script working or not. There are no errors in FireBug.</p>
|
javascript
|
[3]
|
2,202,852 | 2,202,853 |
Get window up from the taskbar if it is minimized
|
<p>I want a code that shows my Form / Window when it is minimized. Kind of like this:</p>
<pre><code>WindowState = FormWindowState.Maximized;
</code></pre>
<p>But this also maximizes my window, I just want to pop it up from the taskbar.</p>
|
c#
|
[0]
|
1,663,298 | 1,663,299 |
How can I click a flash object with javascript?
|
<p>I want to click the video on this page <code>http://37.128.191.200/?640</code> using JavaScript but can't figure out how</p>
<pre><code>document.getElementById('container').click()
</code></pre>
<p>does not work</p>
|
javascript
|
[3]
|
1,663,088 | 1,663,089 |
Why does Java Pattern class use a factory method rather than constructor?
|
<p>There's a good discussion of this in the <a href="http://stackoverflow.com/questions/628950/constructors-vs-factory-methods">general case</a>.</p>
<p>However, I was wondering specifically why the Pattern class uses the <code>compile</code> static method to create an object, rather than the constructor?</p>
<p>Seems to me to be more intuitive to use a constructor.</p>
|
java
|
[1]
|
1,745,093 | 1,745,094 |
Jquery move element on scroll?
|
<p>Example: I have menu horisontally (on header), then if I scroll page down (about >100px from top) the menu (horisontal) will move to left side of browser (vertical) and fixed there...</p>
<p>Any help?</p>
|
jquery
|
[5]
|
4,537,069 | 4,537,070 |
All possible jQuery methods?
|
<p>I'm trying to find all jquery methods.</p>
<pre><code>$("#submit").click()
</code></pre>
<p>Like all possible ones, as I only know .hover and .click. I've tried searching on google on jQuery docs, but I can't find them anywhere. And these are pretty necessary to know?</p>
|
jquery
|
[5]
|
1,409,187 | 1,409,188 |
Execute python commands passed as strings in command line using python -c
|
<p>Is it possible to execute python commands passed as strings using python -c? can someone give an example.</p>
|
python
|
[7]
|
1,078,460 | 1,078,461 |
Common cases in which all sessions are thrown
|
<p>I have a website where the id of the users saved in session object
And any action that the user does, the session is tested to see whether or not it null
Sometimes an Exception occurs in one of the users actions and then all sessions thrown out
What makes all users thrown out to login page, and this very serious problem.
I must find the cases where failure throws all sessions
I have a sample error that happened to me, Not sure if these cases are the reason:
For example:</p>
<ol>
<li>Object reference not set to an instance of an object.</li>
<li>This is an invalid script resource request.
at System.Web.Handlers.ScriptResourceHandler.Throw404()</li>
<li>This is an invalid webresource request.
at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessReques<br>
(HttpContext context)</li>
<li>Only one usage of each socket address (protocol/network address/port) is normally permitted
127.0.0.1:3306</li>
<li>Invalid viewstate. Client IP: 77.127.17.24</li>
</ol>
<p>In short, what should I do?
Where to start looking?
Thanks
Micha</p>
|
asp.net
|
[9]
|
4,046,264 | 4,046,265 |
What is the best way to receive back (to Fragment) data from DialogFragment
|
<p>I'm fighting couple of days with a such simple think like receiving back a data from a <code>DialogFragment</code>. First I tried to make a <code>DialogFragment</code> as a nested class, but it happened it fails on orientation change. Then I decided to user <code>interfaces</code> passing a <code>listener</code> to a <code>DialogFragment</code>, but here is a problem on how to persist the <code>listener</code> after <code>orientation change</code>. Then someone from here suggested to use <code>setTargetFragment()</code>, but it is also doesn't work because of a <a href="http://code.google.com/p/android/issues/detail?id=17423#c1" rel="nofollow">known issue</a>. </p>
<p>It is such a common task, how you guys get data back from <code>DialogFragment</code>s. </p>
|
android
|
[4]
|
699,794 | 699,795 |
Parsing files in java/android
|
<p>I have a text file that has is set out like the following</p>
<pre><code>Title - Welcome to the Dibb
Date - 13/03/11
Information - Hello and welcome to our website.
Title - Welcome to student room
Date - 06/05/11
Information - Hello and welcome to the student room. We are a online forum that allows previous and current students to ask questions.
</code></pre>
<p>I need to parse this text file and save things like the title line, date line and the rest will be saved as information. I know how to read the file and save the full file as a string but I am stuck on getting the select information. </p>
<p><strong>CODE</strong></p>
<p>This is the code I have used to read the text file</p>
<pre><code>helloTxt.setText(readTxt());
}
private String readTxt() {
InputStream inputStream = getResources().openRawResource(R.raw.pages);
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
int i;
try {
i = inputStream.read();
while (i != -1) {
byteArrayOutputStream.write(i);
i = inputStream.read();
}
inputStream.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String str = byteArrayOutputStream.toString();
return str;
}
</code></pre>
|
java
|
[1]
|
5,781,541 | 5,781,542 |
Where should I begin to look for information on creating a remote control app for Android that can communicate with a PC over wifi?
|
<p>I am trying to create a new <em>Android</em> application that can send commands to a <em>PC</em> over wifi (or USB). Basically, it is a remote control for a PC application I am creating. As I am knew to Android development, I have no idea where to begin. Can anyone point me in the right direction?</p>
|
android
|
[4]
|
4,793,278 | 4,793,279 |
Most efficient way to empty an array
|
<p>I have an array containing several keys, values, objects etc.. I need to empty that array but I'd like to do it in the most efficient manner.</p>
<p>The best I can come up with is:</p>
<pre><code>foreach ($array as $key => $val) unset($array[$key]);
</code></pre>
<p>But I don't like the idea of having to loop through the array to just empty it.. surely there's a nice slick/clever way of doing this without wasting memory creating a new array?</p>
<p>Note: I'm not sure myself if it does cost extra memory in creating the array as new again. If it doesn't then $array = new array(); would be a fine way of 'emptying' it.</p>
|
php
|
[2]
|
131,730 | 131,731 |
In Web application, could not load type? asp .net?
|
<p>In web applicaiton, when i am running the asp.net project i am getting the error like :</p>
<pre><code>Could not load type 'Com.ajSolutions.CosmacCRM.Web.EmpInserting'.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EmpInserting.aspx.cs" Inherits="Com.ajSolutions.CosmacCRM.Web.EmpInserting" %>
</code></pre>
<p>can you help me thank you.</p>
|
asp.net
|
[9]
|
1,285,422 | 1,285,423 |
Custom Popup Dialog Asp.Net
|
<p>I'd like to create email dialog that has several inputs including message textbox plus some other custom info. I'd like it to display center screen over top of main page setting the opacity to like 50%. </p>
<p>do i create the pop up as anohter aspx page or panel?</p>
<p>Not sure what to use here, z-index, modalPopupExtender, Javascript, jquery. looking for easy and something stable.</p>
|
asp.net
|
[9]
|
3,063,678 | 3,063,679 |
Python regular expression with raw string prefix
|
<p>I'm new with python and regular expressions.</p>
<p>I have this regular expressions and i don't know what is the purpose of this</p>
<pre><code>r'(\d+)\.(\d*)'
</code></pre>
<p>all I know is it matches a digit from 0 to 9.</p>
<p>can anyone help me explain it?</p>
<p>thanks..</p>
|
python
|
[7]
|
3,036,166 | 3,036,167 |
Can't write a binary file
|
<p>I have the following piece of code in C++.</p>
<pre><code>int arr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
ofstream output("Sample.txt", ios::out | ios::binary);
for(int i = 0; i < 10; i++)
{
output<<arr[i];
}
</code></pre>
<p>Now the Sample.txt is like this:</p>
<pre><code>12345678910
</code></pre>
<p>Isn't the "Sample.txt" supposed to be in binary? Why doesn't it convert everything into binary when i opened the stream in binary mode. What should I do, incase i need binary of every element in the array and then print it to the file.</p>
|
c++
|
[6]
|
3,241,194 | 3,241,195 |
How to mimic passing a file using python variable
|
<p>I am trying to figure out how to mimic passing a file to a program and instead of passing the file pass a python variable that has what information the program needs in it.</p>
<p>The syntax I need to mimic:</p>
<pre><code>msfconsole < setofcommands.txt 2>/dev/null
</code></pre>
<p>What I would like to do:</p>
<pre><code>answer = os.system('msfconsole < ' + myvariable + ' 2>/dev/null')
</code></pre>
<p>I also would be extremely happy if someone knew how to interact with something like msfconsole over a period of time so that when the msfconsole shell is open I could continually get python to type different commands without have to relaunch a new application for each time I wanted to type a series of commands</p>
<p>Thanks a lot in advance.</p>
|
python
|
[7]
|
5,316,768 | 5,316,769 |
$.each and animation confusion
|
<p>I am expecting when I go</p>
<pre><code>$.each($(something).find(something), function(){
$(this).delay(1000).fadeOut();
});
</code></pre>
<p>then for each matching element I get a second of delay before it is gone. but what I get is a second of delay and then it all fades out. its 3am and I can't think. please help </p>
|
jquery
|
[5]
|
835,607 | 835,608 |
Animating a div to 100% height
|
<p>I am trying to animate a div to 100% of its content but it just flashes and rather than animate the div the background disappears at the end of the animation. i am stumped because it works when i enter a number for the height rather than a percentage.</p>
<pre><code>$("#artbutton").click(function(event){
event.preventDefault();
var $self=$(this);
$("#media").animate({height:0},"slow");
$("#music").animate({height:0},"slow",function(){
document.location = $self.attr('href');
$("#art").animate({height:"100%"},"slow");
});
});
</code></pre>
|
jquery
|
[5]
|
5,667,892 | 5,667,893 |
Setting Initially checked CheckedTextViews in ListView for choiceMode="multipleChoice"
|
<p>I am having a really difficult time trying to work with android's ListView multipleChoice mode. Here is what I am trying to do:</p>
<p>I have a "players" button in a game setup screen. When this is clicked it opens another activity with a multipleChoice ListView of all the players in the database in CheckedTextViews. I have this working properly and when you click on a player they will be added or removed from the game via a query to the game_players table. </p>
<p>The problem I am having is in setting up the ListView so that the players that have already been added to the game get checked initially when the activity opens. </p>
<p>I have tried to do this by iterating over the entire list in the ListView activity but this doesn't work because the Views that are not currently visible can't be accessed to check. </p>
<p>So now I'm trying to do this in my extended SimpleCursorAdapter in bindView but I can't even get this simple code to work:</p>
<pre><code>@Override
public void bindView(View _view, Context _context, Cursor _cursor) {
String name = c.getString(c.getColumnIndexOrThrow(from[0]));
this.player = (CheckedTextView)_view.findViewById(to[0]);
this.player.setText(name);
this.player.setChecked(true);
}
</code></pre>
<p>It correctly sets the player's name with setText(), but I can't get any of the boxes to check in bindView. Is there somewhere else I should be doing this or am I just doing it incorrectly?</p>
|
android
|
[4]
|
640,776 | 640,777 |
show data in listview from webservice according to keypress in android
|
<p>i am developing a apps for korean client.i have to search a data according to key press. like if i press A then all the data who started from A show in listview where data come from a webservice in listview.is it possible?if yes,then how to do it.if possible give me some code or link which i can use.</p>
<p>thanks</p>
|
android
|
[4]
|
1,417,538 | 1,417,539 |
Android: How to solve slow response after clicking TabWidget
|
<p>I have four Tab at the top of my apps<br>
The content of the fourth tab is that it will get data from sql server and then display in listview<br>
since the amount of data retrieved is quite big, it takes 2-3 sec<br>
The problem is that:<br>
After I click the fourth tab, it has no response, then after 2-3sec, it displays the content<br>
As I know it is loading the data from database, I will not continue to click<br>
However, when users click it and no response, he may click and click and click<br>
How to show something to user so that they know it is loading data??</p>
|
android
|
[4]
|
2,348,025 | 2,348,026 |
iPhone Bundle Display Name vs. Long Name?
|
<p>I am creating two apps, let's call them Foo Bar and Foo Bar Pro. When I install them and open iTunes, I see both apps there, but they both say Foo Bar because "Foo Bar Pro" won't fit as a bundle display name. However, in iTunes, I want to see "Foo Bar" and "Foo Bar Pro".</p>
<p>I see a whole bunch of other apps with really long names in iTunes, and it's NOT what the Bundle Display Name shows up as. For the life of me, tho, I can't figure out where that longer name is entered. I assume in the Info.plist.</p>
<p>Can someone help? :-/</p>
|
iphone
|
[8]
|
4,036,454 | 4,036,455 |
Python saving xml from webservice
|
<p>I'm using a webservice to get a certain xml file from it. It works fine with urllib2 I get the xml as fileobject. So I want to know what would be the fastest way to store that somewhere in memory or not even store just parse it.</p>
<p>I tried iterparse on that object and it takes too long unless I save it first in file, then iterparse takes much less time.</p>
<p>So now I'm using this code to store it locally first and then do with that file what I want, and I would like to know is there a fastest way of doing it, fastest way of storing files.</p>
<pre><code>url = "webservice"
s = urllib2.urlopen(url)
file = open("export.xml",'wb+')
for line in s:
file.write(line)
</code></pre>
<p>Thanks</p>
|
python
|
[7]
|
4,153,090 | 4,153,091 |
Android :: Background Thread across the Application
|
<p>i want to detect the audio headphone to play the audio file. but i need to detect that earphone is connected or not everytime in each tab like album, aritist, playlist, etc. i when i am trying to do it. i am creating separate asynctask to detect the device in each tab. its working fine. but if i am giving more stress to the application like changing over the tabs fastly. My App's GUI i getting freezed. i think its beacuse of running more thread or thread pool got dumpped.</p>
<p>So i have an other idea that only one background thread will run to check the device connectivity and funtions. we need to share the status to everywhere in the app. but i have no idea to how to implement it. </p>
<p>Any Idea or sample codes on this? Thanks in advance.</p>
<p>Check <a href="http://stackoverflow.com/questions/11646113/android-ui-changes-from-shared-background-thread">this Post</a> Also. </p>
|
android
|
[4]
|
2,602,644 | 2,602,645 |
Dealing with Listeners
|
<p>I know the listeners are supposed to make life easier, especially in a multi-tasking environment like android, but sometimes (to me) it just makes things harder.</p>
<p>Right now I have an ExpandableList activity which presents a list of events, and I want the user to select the group & child of interest and select a notification sound that will play when that event happens. So the list is set up and I have a setOnChildClickListener set up which runs my SetRingtone method:</p>
<pre><code>protected void SetRingtone(int groupPosition, int childPosition) {
Intent intent = new Intent( RingtoneManager.ACTION_RINGTONE_PICKER);
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TYPE,
RingtoneManager.TYPE_ALL);
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TITLE,
"Select Tone");
startActivityForResult( intent, PICK_NOTIFICATION_SOUND);
}
</code></pre>
<p>So that method has access to the selected group and child positions. The problem is that to get the ringtone selected from the ringtone selector, you have to set up another lister, onActivityResult:</p>
<pre><code>protected void onActivityResult(int requestCode,
int resultCode, Intent data) {
if (resultCode == RESULT_OK) {
Uri uri =
data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
if (uri != null) {
String ringTonePath = uri.toString();
ExpandableListView variableView =
(ExpandableListView)findViewById(android.R.id.list);
int p = variableView.getSelectedItemPosition();
Log.d("phca", "The selected item number was: " +
p + "; The sound selected is: " + uri );
}
}
}
</code></pre>
<p>And now I don't have access to the selected group and child. As you can see, I tried to get the position from the getSelectedItemPosition, but it always returns -1 here.</p>
<p>I know I am probably making this harder than it really is.</p>
|
android
|
[4]
|
524,651 | 524,652 |
Android Sliding Menu by Jeremy Feinstein
|
<p>I cloned repo with Android Sliding Menu example from <a href="https://github.com/jfeinstein10/SlidingMenu" rel="nofollow">https://github.com/jfeinstein10/SlidingMenu</a>. I successfully built library. But while building example project I got four same error: </p>
<pre><code>No resource identifier found for attribute 'viewBehind' in package 'com.slidingmenu.example'
</code></pre>
<p>Can anybody explain what this error means and what should I do to get this bug fixed? </p>
|
android
|
[4]
|
1,019,858 | 1,019,859 |
How can I switch adapter for a Gallery
|
<p>Is it possible for me to dynamically switch the adapter of a Gallery?</p>
<p>In the <code>onCreate()</code> of my activity, I did this:</p>
<pre><code>myGallery.setAdapter(adapter1);
</code></pre>
<p>And then later on in my code, I did</p>
<pre><code>myGallery.setAdapter(anotherAdapter1);
</code></pre>
<p>I tried, that but in the emulator, the myGallery never gets update when I do 'setAdapter' again.
How can I force myGallery free up all the items when it was using adapter1 and then makes it repopulate items for anotherAdapter1?</p>
<p>Thank you.</p>
|
android
|
[4]
|
2,803,320 | 2,803,321 |
How can I achieve this in python
|
<p>Here's some code:</p>
<pre><code>li=[1,2,3]
def change(l):
l[2]=10
change(li)
print li
[1, 2, 10]
</code></pre>
<p>But I want this:</p>
<pre><code>li=[1,2,3]
def change(l):
l=[1,2,10]
change(li)
print li
[1,2,3]
</code></pre>
<p>For some reason,I have to change whole list in method,how can I achieve this?Anything wrong or my mistake?</p>
|
python
|
[7]
|
2,401,719 | 2,401,720 |
Remove history entry in Jquery Address
|
<p>When for example a customer adds an item to the cart I set the address through <a href="http://www.asual.com/jquery/address/" rel="nofollow">Jquery Address</a> to <code>/cart/23432 (productid)</code>. After the item has been added to the cart and the cart details have been shown, i want to change the url to <code>/cart/</code>. In that way when the customer refreshes the page, the product is not added again. However, now there will be two history entries </p>
<pre><code> 1. /cart/23432
2. /cart/
</code></pre>
<p>When i change the address to <code>/cart/</code>, how do i delete the previous entry <code>(/cart/23432)</code>?</p>
|
jquery
|
[5]
|
3,842,080 | 3,842,081 |
Developing an universal android application (phone and tablet) - Defining Orientations
|
<p>I have developed an android application, which only supports portrait orientation, for android phones. Now, I need to modify this app because I want to do the universal version (for tablets, too) but I have a problem. The phone version only supports portrait orientation and the tablet version supports portrait and landscape orientations. Is there any way to define different orientations for tablets and phones? </p>
<p>Thanks</p>
|
android
|
[4]
|
4,756,413 | 4,756,414 |
c# MailMessage object question
|
<p>I have a a MailMessage object called message.</p>
<p>I am trying to create the message.Body but I only have a IList to populate it with.</p>
<p>In the body I want the following:</p>
<pre><code>"The following files could not be converted-" + IList<string> testlist
</code></pre>
<p>??????</p>
|
c#
|
[0]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.