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 |
|---|---|---|---|---|---|
318,632
| 318,633
|
Broser back button
|
<p>How to resolve the issue- Browser back button appears when I directly hit the url of a specific page when IFRAME is used in that particular page.</p>
<p>Its appearing IE 8, IE9, IE 7. where as in mozilla its working fine. For example if I have code like below in one page of my website:</p>
<pre><code><iframe src="javascript:false;" frameborder="0" style="position: absolute; top: 10px; right: -40px; width: 150px; height: 150px; z-index: 99">
</iframe>
<div style="position: absolute; top: 10px; right: -40px; background-color: gray; height: 150px; width: 150px; z-index: 100">
Hello World
</div>
</code></pre>
<p>If I hit the URL of that page directly without traversing from the home page it has the browser back button which is not expected.</p>
|
javascript
|
[3]
|
5,466,299
| 5,466,300
|
Highlight a text on PDF & save the higlighted document
|
<p>I want to highlight a text on PDF & save the document containing the highlighted text.</p>
<p>Is it technically feasible with existing Android API (till OS ver 3.0)?</p>
<p>Kindly provide your suggestions regarding the feasibility.</p>
|
android
|
[4]
|
143,372
| 143,373
|
Kindly provide the source code to determine the last item in the ListView
|
<p>I am trying to implementing pagination in Android.
Currently I am displaying in ListView , a list of 10 items where the data for the list items exist in the database.</p>
<p>Each list item contains an thumbnail Image Url , a text data</p>
<p>I have the following requirement.
i> When the user scrolls to the 10 th list item , I am calling a webservice method of the server to fetch the next set of records.</p>
<p>My question is how can I determine when the user scrolls to the 10 th list item , what kind of validation can I make.</p>
<p>Kindly provide me the sample source code.</p>
<p>Warm Regards,</p>
<p>CB</p>
|
android
|
[4]
|
280,232
| 280,233
|
How do I fix Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE] with Ice Cream Sandwich VM image?
|
<p>I get an error, <code>Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]</code> when installing to the Google APIs version of the ARM EABI v7a system image, revision 1.</p>
<p>How do I fix it? Why is it there?</p>
|
android
|
[4]
|
839,983
| 839,984
|
What's the main difference between stdlib.h and cstdlib in C++?
|
<p>I'm using EXIT_FAILURE macro, so I need to include stdlib.h or cstdlib. But I don't know what the difference is. Should I use cXXX style header file rather than XXX.h?</p>
<p>Thank you.</p>
|
c++
|
[6]
|
2,212,864
| 2,212,865
|
Customise Android Gallery
|
<p>The following requirement is there for my mobile application:</p>
<ol>
<li>The Android default Gallery is displayed which contains the list of photo album.</li>
<li>If the user selects a particular album , all the images with checkbox are displayed.</li>
</ol>
<p>I have already developed a source code which fetches all the pictures from the Gallery(SD Card) & displays all the images with a checkbox. </p>
<p>I need hints/suggestions to implement the above requirement where the checkbox on the images should be displayed only after the user selects any particular album .</p>
|
android
|
[4]
|
1,666,059
| 1,666,060
|
How to concate array elements on value basis in php
|
<p>I have array like this :</p>
<pre><code>Array
(
[attribute] => Array
(
[0] => sku
[1] => sku
[2] => attribute_set_id
)
[value] => Array
(
[0] => 1, 2, 3
[1] => 3, 4
[2] => 4
)
)
</code></pre>
<p>In the above array attributes are like keys and values are values .I want to concatenate same key values like here required <code>sku</code> will be <code>(1,2,3,4)</code>. I can join them by combine array.The result array will be like</p>
<pre><code>array('sku'=>'1,2,3,4',attribute_set_id=>'4');
</code></pre>
<p>The above array will be dynamic.</p>
|
php
|
[2]
|
3,089,508
| 3,089,509
|
When should one use .innerHTML and when document.write in JavaScript
|
<p>Is there a general rule, when one should use document.write to change the website content, and when to use .innerHTML?</p>
<p>So far my rules were:</p>
<p>1) Use document.write when ADDING new content</p>
<p>2) Use .innerHTML when CHANGING existing content</p>
<p>But I got confused, since someone told me that on the one hand ".innerHTML" is a strange Microsoft standard, but on the other hand I read that document.write is not allowed in XHTML.</p>
<p>Which structures should I use to manipulate my sourcecode with javaScript?</p>
|
javascript
|
[3]
|
1,193,432
| 1,193,433
|
forcing page download in php
|
<p>How do I force the browser to download the current page browsed to? a page with the header Content-type: text/plain for example using PHP?</p>
<p>If a user navigates to that page, a download box should appear (the browser download dialog with the usual "Save As"</p>
|
php
|
[2]
|
501,037
| 501,038
|
Use jQuery to make element on page modal (not dialog)
|
<p>I'm fairly new to jQuery, so hopefully this isn't too tough. I'll try to stick to a simple example. </p>
<p>Let's assume I have a web page with a div on it (could be other elements such as img, span, etc). When the user hovers over that div, I'd like the div to remain unchanged, but have an overlay applied to everything else so the rest is grayed out. So essentially it would make this div look like it was modal (similar to a modal dialog). I'd want the div to remain in the same location, have the same background color, etc.</p>
<p>I've found examples of doing a modal dialog, but it always centers in the screen. The functionality would work if I could leave the element in the same place. Any ideas?</p>
<p>Thanks!
Jim</p>
|
jquery
|
[5]
|
2,664,816
| 2,664,817
|
activate speakar of iphone programmitically
|
<p>i want to make a call and activate speaker of iphone programatically.</p>
<p>can any one tell me , how to activate and deactivate speaker mode of iphone through code.</p>
<p>Thanks in advance.....</p>
|
iphone
|
[8]
|
2,383,235
| 2,383,236
|
How to remove $ from javascript variable?
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4846978/remove-characters-from-a-string">Remove characters from a string</a> </p>
</blockquote>
<p>I have a variable <code>p</code> which I would like to remove the <code>$</code> from. This variable will be a number such as <code>$10.56</code>. How can I do this? I thought it could be done using <code>.replace('$','')</code> but i'm not quite sure how to implement this. </p>
<p>Here is my javascript code:</p>
<pre><code>function myFunction() {
var p = parseFloat(document.getElementById('p_input').value);
var q = parseFloat(document.getElementById('q_input').value);
if (!q){
document.getElementById('t').value = '';
}
else {
var t = q * p;
document.getElementById('t_output').value = t;
}
}
</code></pre>
|
javascript
|
[3]
|
3,114,057
| 3,114,058
|
jquery ui button icon change dynamically
|
<pre><code>$("#slideshowadvanceconfig").button({
icons:{ primary: 'ui-icon-circle-arrow-e'} }).toggle(function () {
$(this).button("option", { icons: { primary: 'ui-icon-circle-arrow-s'} });
$(".settings").slideDown('slow'); },
function () { $(this).button("option", { icons: { primary: 'ui-icon-circle-arrow-e'} });
$(".settings").slideUp('slow');
});
</code></pre>
<p>Through this above code i am trying to change the icon of jquery ui button dynamically. Slideup and SlideDown works but image is not changing , can anybody tell me the problem? </p>
|
jquery
|
[5]
|
3,062,832
| 3,062,833
|
PHP pathinfo gets fooled by url in quert string. Any workaround?
|
<p>I am working on a small function to take in a url and return a relative path based on where it resides itself.</p>
<p>If the url contains a path in the query string, <code>pathinfo</code> returns incorrect results. This is demonstrated by the code below:</p>
<pre><code>$p = 'http://localhost/demos/image_editor/dir_adjuster.php?u=http://localhost/demos/some/dir/afile.txt';
$my_path_info = pathinfo($p);
echo $p . '<br/><pre>';
print_r($my_path_info);
echo '</pre>';
</code></pre>
<p>That code outputs:</p>
<pre><code>http://localhost/demos/image_editor/dir_adjuster.php?u=http://localhost/demos/some/dir/afile.txt
Array
(
[dirname] => http://localhost/demos/image_editor/dir_adjuster.php?u=http://localhost/demos/some/dir
[basename] => afile.txt
[extension] => txt
[filename] => afile
)
</code></pre>
<p>Which obviously is wrong. Any workaround?</p>
|
php
|
[2]
|
3,914,822
| 3,914,823
|
eregi_replace depreciated im still lost
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/8679656/deprecated-function-eregi-replace">Deprecated: Function eregi_replace()</a> </p>
</blockquote>
<p>i have an error that reads:</p>
<p>Deprecated: Function ereg_replace() is deprecated in /home/socia125/public_html/wi_class_files/autoMakeLinks.php on line 26</p>
<p>my code is here any help is appreciated...im stumped \</p>
<pre><code><?php
class autoActiveLink {
function makeActiveLink($originalString){
$newString = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a
href=\"\\0\" target=\"_blank\">\\0</a>", $originalString);
return $newString;
}
}
?>
</code></pre>
|
php
|
[2]
|
5,842,359
| 5,842,360
|
Bluetooth socket only returns null. Android Bluetooth
|
<p>Iam trying to connect to a socket by using the <code>connect</code> method. Iam generating a String containing the UUID like this:</p>
<pre><code>MY_UUID = UUID.fromString("45341da0-c9c1-11e1-9b21-0800200c9a66");
</code></pre>
<p>Then constructing a <code>BluetoothSocket</code> like this: </p>
<pre><code>BluetoothSocket tmp = null;
</code></pre>
<p>I also want to connect to a specific device by its mac-address:</p>
<pre><code>BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice("00:1B:DC:0F:EC:7E");
</code></pre>
<p>and then making the <code>bluetoothSocket</code></p>
<pre><code>try {
tmp = device.createInsecureRfcommSocketToServiceRecord(MY_UUID);
} catch (IOException e) {
Toast.makeText(getApplicationContext(), "Exception1: " + e.getMessage(), Toast.LENGTH_LONG).show();
}
</code></pre>
<p>Just for to test I added a breakpoint where the <code>tmp</code> object is been initialized inside the <code>try catch</code>. But it's only containing <code>NULL</code> The remote device does support OBEX OPP, but this is just a layer above the <code>RFCOMM</code> in the bluetooth stack, so I think my device should support RFCOMM for connections. Can anybody tell me why my <code>tmp</code> object is set to <code>null</code>? </p>
<p>Is there anyway I can test whenever the socket is created? </p>
|
android
|
[4]
|
3,983,434
| 3,983,435
|
Calculate Array values using For-In Loop
|
<p>I have the following Javascript. I am trying to calculate the total of the myCosts array values using the 'for in; loop and then display them on the page. I think i am nearly there.</p>
<pre><code>function enterFood()
{
var myFoods = new Array()
var myCosts = new Array()
for (i = 1; i <= 5; i++)
{
myFoods[i] = prompt("Enter name of Food","");
myCosts[i] = parseFloat(prompt("Enter cost of food",""));
document.getElementById("cost").innerHTML += i + ". " + myFoods[i] + ". Cost: £" + myCosts[i] + "<br />";
}
for (var i in myCosts)
{
document.getElementById("total_cost").innerHTML =+ i;
}
}
</code></pre>
<p>Can anybody offer any help so I can complete this?</p>
|
javascript
|
[3]
|
4,547,812
| 4,547,813
|
File listing problem through apache
|
<p>I want list files of a particular directory using php exec function. I have used this </p>
<pre><code>exec('ls /home/vikas/hft/a5/traders/sa/*.bin', $NameOfBinaries);
</code></pre>
<p>code for listing the bin files from <code>/home/vikas/hft/a5/traders/sa/</code> directory. It works fine when I run the script in CLI mode but when I run in browser it return empty array.</p>
|
php
|
[2]
|
1,105,052
| 1,105,053
|
What changes must be made in an android app to run only on a specific phone model?
|
<p>For a android app what changes must be made to run on a specific phone model?</p>
|
android
|
[4]
|
743,628
| 743,629
|
Can't change src in image with jquery
|
<p>I can't change the image with jquery: whats going on??</p>
<pre><code><!DOCTYPE HTML>
<HTML>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script text="text/javascript">
$('#caccia').attr('src', '2.png');
</script>
<img id="caccia" src="1.jpg" />
</HTML>
</code></pre>
|
jquery
|
[5]
|
2,885,634
| 2,885,635
|
Adding phone number to iphone contact - but NOT replacing!
|
<p>I am trying to replicate the behavior that the iphone that happens when you tap and hold on a phone number link in a text field you get a menu "create new contact" and "add to existing contact". I have this working except for one thing. In the "add to existing" apple implementation if there is already a home contact, it just adds another one. It doesn't REPLACE it. So you can have multiple home phone numbers.</p>
<p>In my implementation it replaces it. So how do I do a not-destructive phone number add?</p>
<p>Here is my code:</p>
<pre><code>+(void)updatePhone:(ABRecordRef)person phone:(NSString*)phone{
ABMutableMultiValueRef phoneNumberMultiValue = ABMultiValueCreateMutable(kABPersonPhoneProperty);
ABMultiValueAddValueAndLabel(phoneNumberMultiValue, phone, kABPersonPhoneMobileLabel, NULL);
ABRecordSetValue(person, kABPersonPhoneProperty, phoneNumberMultiValue, nil);
</code></pre>
<p>}</p>
<p>any ideas?</p>
|
iphone
|
[8]
|
2,743,541
| 2,743,542
|
focus to text box
|
<p>I created a form with a label, textbox and a button. In the form load event I called the focus() function for the textbox. But when I run my code the cursor is not coming to textbox. I need the cursor to go to text box as soon as the form is loaded. How to do it?</p>
|
c#
|
[0]
|
5,015,690
| 5,015,691
|
How to fill a DataTable with the result of a LINQ?
|
<p>I have a method that calls a stored procedure. It uses the employee number as a parameter to retrieve the data of a particular employee and then fills the data table with the result.</p>
<pre><code>protected DataTable CreateDT(string empNo)
{
DataTable dataTable = null;
try
{
SqlCommand cmd = new SqlCommand("FIND_EMPLOYEE_BY_EMPNO", pl.ConnOpen());
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@EMPNO", (object)empNo));
SqlDataAdapter da = new SqlDataAdapter(pl.cmd);
dataTable = new DataTable("dt");
da.Fill(dt);
}
catch (Exception x)
{
MessageBox.Show(x.GetBaseException().ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
finally
{
pl.MySQLConn.Close();
}
return dt;
}
</code></pre>
<p>What I'm trying to accomplish is convert this code to LINQ, but I don't know how get the result and fill it to my data table. See below:</p>
<p><img src="http://a.imageshack.us/img706/9017/testki.jpg" alt="alt text"></p>
<pre><code>protected DataTable CreateDT(string empNo)
{
DataTable dataTable = null;
try
{
DataClasses1DataContext dataClass1 = new DataClasses1DataContext();
// I tried to cast it to DataTable, but it doesn't work...
dataTable = (DataTable)dataClass1.findEmployeeByID(empNo);
}
catch (Exception x)
{
MessageBox.Show(x.GetBaseException().ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
finally
{
pl.MySQLConn.Close();
}
return dt;
}
</code></pre>
<p>Please guide me how to properly do this... Thanks in advance..</p>
|
c#
|
[0]
|
2,402,168
| 2,402,169
|
how to check value of undefined $_POST variable index?
|
<p>My question is that how can we check value in posted variables in $_POST without defining them as you can see in the code.</p>
<pre><code>if ($_SESSION["Admin"]=="" AND $_REQUEST[act]!="show_login" AND
$_REQUEST[act]!="chk_login" ) { #not logged in show_login();
return;
</code></pre>
<p>I am getting these errors,</p>
<ul>
<li>Undefined index: act in F:\xampp\htdocs\shangloo\admin\index.php on
line 6</li>
<li>Undefined index: Admin in F:\xampp\htdocs\shangloo\admin\index.php on
line 6</li>
</ul>
|
php
|
[2]
|
5,425,835
| 5,425,836
|
print preg_place unexpected error
|
<p>I have the following code:</p>
<pre><code>print "<a href='".preg_replace($replace, '-', $name."-pid-".$id.".html'>";
</code></pre>
<p>and receive the following error:</p>
<pre><code>Parse error: syntax error, unexpected ';' in C:\xampp\htdocs\s.php on line 98
</code></pre>
|
php
|
[2]
|
3,988,787
| 3,988,788
|
How to override toString() properly in Java?
|
<p>Sounds a little stupid, but I need help on my toString() method and it is very irking.
I tried looking up online because the toString is the one where it is screwing up and "not finding Kid constructor #2" even though it is there and I would even do something else and it doesn't work.
Ok that was a lot so here is my code: </p>
<pre><code>import java.util.*;
class Kid {
String name;
double height;
GregorianCalendar bDay;
public Kid () {
this.name = "HEAD";
this.height = 1;
this.bDay = new GregorianCalendar(1111,1,1);
}
public Kid (String n, double h, String date) { // method that toString() can't find somehow
StringTokenizer st = new StringTokenizer(date, "/", true);
n = this.name;
h = this.height;
}
public String toString() {
return Kid(this.name, this.height, this.bDay);
}
} //end class
</code></pre>
<p>Ok So my toString above (I know, my third parameter is off, should be a String) is off. If I hardcode a value in for the third thing it goes haywire and says it can't find this (up above). So how can I get the date and break it up?</p>
<pre><code>Class calling this is below
class Driver {
public static void main (String[] args) {
Kid kid1 = new Kid("Lexie", 2.6, "11/5/2009");
System.out.println(kid1.toString());
} //end main method
} //end class
</code></pre>
<p>I tried researching multiple constructors and it really didn't help.
I tried researching toString() methods, and tried using previous toString() methods logic that I created previous but this is brand new so it never worked.</p>
<p>Help? </p>
|
java
|
[1]
|
3,651,568
| 3,651,569
|
Sets module deprecated warning
|
<p>When I run my python script I get the following warning</p>
<pre><code>DeprecationWarning: the sets module is deprecated
</code></pre>
<p>How do I fix this?</p>
|
python
|
[7]
|
2,598,828
| 2,598,829
|
Why should I fix E_NOTICE errors?
|
<p>As a developer, I work with E_NOTICE turned on. Recently though, I was asked why E_NOTICE errors should be fixed. The only reason that I could come up with was that it is best practice to correct those problems.</p>
<p>Does anyone else have any reasons to justify the extra time/cost spent to correct these problems?</p>
<p>More specifically, why should a manager spend the money to have these fixed if the code already works?</p>
|
php
|
[2]
|
5,900,971
| 5,900,972
|
Removing an anchor tag surrounding selected images in jquery
|
<p>I have a piece of code that, when the page loads, checks through a series of images and sees whether their id contains the word video.</p>
<p>If it does, I want to be able to remove the anchor tag surrounding the image. However, teh way that I am currently doing this (through .remove()) removes the image as it is within the anchor tag I'm removing.</p>
<p>Is there a way of just removing the anchor tag?
NOTE: the list of images will be pulled in based on the user accessing them, so it won't be pre-determined code that can be appended in.</p>
<p>CODE:</p>
<pre><code>$(document).ready(function() {
$('ul.thumbnails li a img').each(function() {
if($(this).attr('id').indexOf('video') != -1){
var $parent = $(this).closest('a');
$parent.remove();
} else {
$(this).addClass('photo');
}
});
});
</code></pre>
|
jquery
|
[5]
|
1,753,584
| 1,753,585
|
What are the ranges of bands that Android provide in Equalizer class?
|
<p>By default there are 5 bands that android provide in its Equalizer class.
I wan to know what are the ranges of each band.</p>
<p>That is what is the starting & final range(Hz/KHz or any other unit) of each band.</p>
<p>Thanks in advance</p>
|
android
|
[4]
|
5,401,408
| 5,401,409
|
Should you use return or else? Which of these is optimal?
|
<p>Which of these is more optimal? Does it matter which one you use?</p>
<pre><code>If (condition is true)
{
MessageBox.Show("bad data");
return;
}
//mode code here
</code></pre>
<p>or</p>
<pre><code>If (condition is true)
{
MessageBox.Show("bad data");
}
else
{
//mode code here
}
</code></pre>
|
c#
|
[0]
|
4,104,253
| 4,104,254
|
Ant: not able to find tools.jar
|
<p>when I type Ant in command line..
I get following error.. </p>
<p>Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar
Buildfile: build.xml does not exist!
Build failed</p>
|
java
|
[1]
|
3,644,707
| 3,644,708
|
Code needs to work for more possibilities
|
<p><strong>The Question</strong></p>
<pre><code>is_match:
(str, str) -> bool
</code></pre>
<p>The first parameter is a puzzle and the second is a view. Return True iff the view could be a view of the given puzzle.</p>
<p><strong>My Answer</strong></p>
<p>I came up with this:</p>
<pre><code>def is_match(puzzle, view):
if len(puzzle) != len(view):
return False
if len(puzzle) == len(view):
return True
</code></pre>
<p>I also found this online:</p>
<pre><code>def is_match(given_puzzle, view):
if len(given_puzzle) != len(view):
return False
unique_letters = set(ch for ch in view if ch != '^')
for (a, b) in zip(given_puzzle, view):
if a in unique_letters and a != b:
return False
return True
</code></pre>
<p>This issue I am having is that if I input:</p>
<pre><code>is_match('blah', 'tr^^')
</code></pre>
<p>It will return True for both of the given codes. Which must be wrong due to the fact that the characters don't even match only the length of the string does
What could i do to fix this?</p>
|
python
|
[7]
|
200,486
| 200,487
|
Generating unique ID based on hardware/server
|
<p>Is it possible to generate a unique ID based on server hardware/OS? I want to generate license keys for my PHP web app based on customer server, just like Atlassian JIRA does.</p>
<p>Thanks for your help.</p>
|
php
|
[2]
|
1,695,124
| 1,695,125
|
"The process cannot access the file 'D:\dup.jpg' because it is being used by another process."
|
<p>Can anyone guide me in this issue..</p>
<p>How can i avoid this exception in VC# -- </p>
<blockquote>
<p>"The process cannot access the file 'D:\dup.jpg' because it is being
used by another process."</p>
</blockquote>
<p>Have a solution from Adi which doesnt worked out at all..</p>
<p>Snippet of Code is here ..</p>
<pre><code>using (FileStream firstImageStream =
new FileStream(firstImage.FullName, FileMode.Open))
{
using (FileStream secondImageStream =
new FileStream(secondImage.FullName, FileMode.Open))
{
hashingTool = new SHA256Managed();
Byte[] imageOneHash = hashingTool.ComputeHash(firstImageStream);
Byte[] imageTwoHash = hashingTool.ComputeHash(secondImageStream);
hashingTool.Clear();
}
}
</code></pre>
|
c#
|
[0]
|
1,404,141
| 1,404,142
|
Datatype for "NaN" in validation process
|
<p>Goal:<br>
Evaluate a specifik value in my validation code</p>
<p>Problem:<br>
The variable "currentValue" can retrieve a value named "NaN". And i don't know what kind of datatype that shall be applied in the my validation process. </p>
<p>Based on my previous test, NaN is neither a string or int or something similiar.</p>
<p>What datatype is NaN?</p>
<pre><code> var ddd = $('#field_timmar').val();
//datac= $('#field_timmar').val();
//len = currentValue.length;
var currentValue = parseInt(ddd);
// Validating message
if(currentValue <= 0)
{
$('#field_timmar_error1').show();
$('#field_timmar_error2').hide();
$('#field_timmar_error3').hide();
nonError = false;
}
else if(currentValue == "NaN" && ddd != "")
{
$('#field_timmar_error2').show();
$('#field_timmar_error1').hide();
$('#field_timmar_error3').hide();
nonError = false;
}
else if(currentValue == "NaN" && ddd == "")
{
$('#field_timmar_error3').show();
$('#field_timmar_error1').hide();
$('#field_timmar_error2').hide();
nonError = false;
}
else
{
$('#field_timmar_error1').hide();
$('#field_timmar_error2').hide();
$('#field_timmar_error3').hide();
}
</code></pre>
|
jquery
|
[5]
|
5,479,559
| 5,479,560
|
Script Redirecting Even when valid
|
<p>This is a little script that supposed to redirect if someone came from a different page, but it's does not work.
It keeps redirecting to the form page.</p>
<p>Here's the code</p>
<pre><code><?php
define('FORM', 'form.html');
$referer = $_SERVER['HTTP_REFERER'];
// this keeps redirecting even when I came by submiting the form to this page
if ( $referer != FORM ) {
header('Location: ' .FORM);
}
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Testing 123</title>
</head>
<body>
<?php
$name = $_GET['name'];
$surname = $_GET['surname'];
echo 'hello'. $name. 'nice to see you here mr' .$surname;
?>
</body>
</html>
</code></pre>
|
php
|
[2]
|
1,454,431
| 1,454,432
|
Close only target object
|
<p>I use this quick snippet with an image to close a <code>show</code>/<code>hide</code> <code>DIV</code>:</p>
<pre><code> $('a.close').click(function() {
$('#timeline-2010-1').hide();
$('#timeline-2010-2').hide();
return false;
});
</code></pre>
<p>The problem is that when I close one box all of the boxes close...</p>
<p>Is there a way to modify this so that when you click the image "x" on that specific <code>DIV</code> <code>ID</code>, only that one closes, and it doesn't close all of them?</p>
|
jquery
|
[5]
|
3,862,273
| 3,862,274
|
How can I declare a variable outside of a block when the variable defines an anonymous class in C#
|
<p>I have the following code and it works good:</p>
<pre><code>var _data = (from qu in _que.GetAll(
u => u.company == "GE" )
select new {
qu.name,
qu.address
});
</code></pre>
<p>The signature of the GetALL method is </p>
<pre><code>ICollection<T> GetAll(Expression<Func<T, bool>> predicate);
</code></pre>
<p>Now I need to enclose the above in some block so it becomes:</p>
<pre><code>{
var _data = (from qu in _que.GetAll(
u => u.company == "GE" )
select new {
qu.name,
qu.address
});
}
var _abc = _data; <<< doesn't work now
</code></pre>
<p>Once I do this then _data becomes local and I can't access it from outside the block. I assume that what I need to do is to declare _data outside of the block. But what do I declare it too as they type that's returned and placed into _data is an anonymous type. Is there some way I can declare _data without having to change the query or make up some return type?</p>
|
c#
|
[0]
|
1,007,117
| 1,007,118
|
Converting PHP strings to binary format and reconverting them when connecting to server
|
<p>I'm looking to code a php script that would connect to a server using binary protocol, send queries and receive data from it. I wondered how I can implement this in php? So far I have:</p>
<pre><code><?php
$fp = fsockopen("111.111.10.10", "2222", $errno, $errstr, 10);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
fwrite($fp, "You message");
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}
?>
</code></pre>
<p>When I speak of binary, I don't mean the underlying of computer language, I mean that the specific string that is sent to the server should be converted in "0101001", since that is the way server reads and converts info. I need a way to convert php strings to this format and reconvert them back.</p>
<p>I will explain if you don't fully understand the question.</p>
|
php
|
[2]
|
2,333,069
| 2,333,070
|
network path not found error for local machine
|
<p>I am testing an application on my local machine to create a file. The network path I have set for testing to <code>\\127.0.0.1\NEWFILE\test1.txt</code>. I am getting "network path not found" error message. What could be the problem?</p>
<pre><code>filePath = @"\\127.0.0.1\NEWFILE\test1.txt";
File.WriteAllText(filePath, Contents.ToString());
</code></pre>
|
c#
|
[0]
|
4,310,885
| 4,310,886
|
Issue with AspectJ properties
|
<p>When i am using maintainJ for reverse engineering with my application i am getting the following error.
Please assist us with fix</p>
<p>---- AspectJ Properties ---
AspectJ Compiler 1.6.11 built on Tuesday Mar 15, 2011 at 15:31:04 GMT
---- Dump Properties ---
Dump file: ajcore.20120507.210546.187.txt
Dump reason: java.lang.NullPointerException
Dump on exception: true
Dump at exit condition: abort
---- Exception Information ---
java.lang.NullPointerException
at org.aspectj.weaver.bcel.LazyMethodGen.remap(LazyMethodGen.java:1415)
at org.aspectj.weaver.bcel.LazyMethodGen.addExceptionHandlers(LazyMethodGen.java:1269)
Thanks.</p>
|
java
|
[1]
|
5,386,914
| 5,386,915
|
Android list view on click
|
<p>i have a list view with 15 items. when i click on any item i want to change the screen(Intent). how can i change the activity on item selected in android?
any tutorial or source code?</p>
<p>thanks in advance.</p>
|
android
|
[4]
|
483,910
| 483,911
|
Hot to use the second parameter of lastIndexOf() method in javascript string object?
|
<pre><code>"This apple is my apple".lastIndexOf("apple"); // returns value of 17
"This apple is my apple".lastIndexOf("apple",12); // returns value of 5
"This apple is my apple".lastIndexOf("apple", 3); // returns value of -1, not found
</code></pre>
<p>Hi guys!</p>
<p>I understand the first two examples,but why the third doesn't return 5?</p>
<p>Like indexOf, lastIndexOf also takes an optional second parameter, which is an index
value of where to start the search, counted from the right</p>
<p>so the string 'apple' should match the position 5. But I still got the result of -1?</p>
<p>what's the problem?</p>
|
javascript
|
[3]
|
4,570,093
| 4,570,094
|
error in the following code near throw IOException
|
<pre><code>import java.io.*;
import java.lang.*;
public class Propogate1
{
String reverse(String name)
{
if(name.length()==0)
throw IOException("name");
String reverseStr="";
for(int i=name.length()-1;i>0;--i)
{
reverseStr+=name.charAt(i);
}
return reverseStr;
}
public static void main(String[] args)throws IOException
{
String name;
try
{
Propogate1 p=new Propogate1();
p.reverse("java");
}
finally
{
System.out.println("done");
}
}
}
</code></pre>
<p>I have to create a class propogate and main method which will call reverse(). In that if the name.length is null, it will throw an exception. If it is not null it will reverse the string. Pls help me</p>
|
java
|
[1]
|
3,474,568
| 3,474,569
|
JS: join()-ing an array of objects
|
<p>Say I have an array of objects that I want to be able to access as hashes sometimes (to change their values, eh?) and sometimes print. </p>
<pre><code>var test = { members : [] };
test.addMember = function(name, value) {
this.members[name] = { name : name, value : value };
this.members[name].toString = function() {
return this.name + " has a " + this.value; };
};
test.toString = function() {
return this.members.join(" and ");
};
test.addMember("a", "a value");
test.addMember("b", "b value");
alert(test);
</code></pre>
<p>My Goal here is to have test.toString() return:</p>
<pre><code>a has a value and b has b value
</code></pre>
<p>or what-have-you. I was reading on the MDN, and it seems that JavaScript 1.8.5 (or some subrevision) will have a join() that calls toString(). Am I stuck?</p>
<p>Thanks!</p>
<p>EDIT: Here's my FINAL design, with a modify and delete function included (in case anyone was curious)!</p>
<pre><code>var test = {
members : [],
modifyMember : function(name, value) {
var index = this.members.indexOf(this.members[name]);
if(index < 0) {
return;
}
this.members[index].value = this.members[name].value = value;
},
addMember : function(name, value) {
if(this.members[name]) {
this.modifyMember(name, value);
return;
}
this.members[name] = {
name : name,
value : value,
toString : function() {
return this.name + " has " + this.value;
},
};
this.members.push(this.members[name]);
},
removeMember : function(name) {
if(!this.members[name]) return;
this.members.splice(this.members.indexOf(this.members[name]), 1);
delete this.members[name];
},
toString : function() {
return this.members.join(" AND ");
}
};
</code></pre>
|
javascript
|
[3]
|
531,182
| 531,183
|
jqgrid error when deleting row
|
<p>I do some testing on jquery jqgrid but has problems :</p>
<pre><code>jQuery("#navgrid").jqGrid(
"navGrid",
"#pagernav",
{}, //options
{}, // edit options
{}, // add options
{
afterSubmit : function(response, postdata)
{
if(response.responseText == 'success')
{
console.log(postdata);
alert('success and data should be changed')
console.log(postdata.id);
jQuery("#navgrid").delRowData(postdata.id);
}
else
{
alert('failed and data should not be changed');
}
return true;
},
reloadAfterSubmit: true
}, // del options
{} // search options
);
</code></pre>
<p>I do two console.log on firebug for:</p>
<pre><code>postdata => Object { oper="del", id="29"}
postdata.id => 29
</code></pre>
<p>Then I got error like this on my firebug:</p>
<pre><code>postdata.split is not a function
toarr = postdata.split(",");
</code></pre>
<p>I think I have followed this method :
<a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki:methods" rel="nofollow">http://www.trirand.com/jqgridwiki/doku.php?id=wiki:methods</a></p>
|
javascript
|
[3]
|
1,501,107
| 1,501,108
|
Append Vs AppendChild JQuery
|
<p>included the sample code.</p>
<pre><code>function addTextNode(){
var newtext = document.createTextNode(" Some text added dynamically. ");
var para = document.getElementById("p1");
para.appendChild(newtext);
$("#p1").append("HI");
}
<div style="border: 1px solid red">
<p id="p1">First line of paragraph.<br /></p>
</div>
</code></pre>
<p>What is the differnce between append and appendchild. Any real time scenarios ?</p>
<p>PS: May be a silly question just want to know the exact diffrence</p>
<p>Thanks</p>
|
jquery
|
[5]
|
893,314
| 893,315
|
Generate gamma and normal distribution in Java? Has anyone done this before?
|
<p>Has anyone generated Gamma or truncated normal distribution in Java before? I don't think it is in the built-in package.</p>
<p>I have found this for Gamma:
blog.javia.org/docs/Gamma.java</p>
<p>I just tried these 3:</p>
<ol>
<li><p>SSJ from University of Montreal
<a href="http://www.iro.umontreal.ca/~simardr/ssj/indexe.html" rel="nofollow">http://www.iro.umontreal.ca/~simardr/ssj/indexe.html</a> </p></li>
<li><p>The JSC library
<a href="http://www.jsc.nildram.co.uk/downloads/download.html" rel="nofollow">http://www.jsc.nildram.co.uk/downloads/download.html</a> </p></li>
<li><p>The eduni package
<a href="http://www.icsa.inf.ed.ac.uk/research/groups/hase/simjava/distributions/" rel="nofollow">http://www.icsa.inf.ed.ac.uk/research/groups/hase/simjava/distributions/</a> </p></li>
</ol>
<p>None works, this is very frustrating. Am I importing it wrong, or not typing the right command to use it?</p>
|
java
|
[1]
|
2,301,869
| 2,301,870
|
No enclosing instance of type fbMain is accessible. Must qualify the allocation with an enclosing instance of type fbMain
|
<p>So in my class declared as "<strong>public class pcb</strong>", I have the following constructor: <strong>public pcb(int p, int a, int b).</strong></p>
<p>In <strong>public static void main(String[] args)</strong> I try to call the constructor in a for loop where I add a "pcb" into a different position in an array. Here is the for loop where the last line is where I get the error:</p>
<pre><code>for(int i=0; i<numJob; i++){
pI = scan.nextInt();
arr = scan.nextInt();
bst = scan.nextInt();
notHere[i]=new pcb(pI, arr, bst);
}
</code></pre>
<p>What am I doing wrong? Is it syntax or is it the structure of my program. I haven't used Java that much and I think that's my main problem.</p>
|
java
|
[1]
|
2,950,966
| 2,950,967
|
How do I start from a specified value in an array?
|
<p>For example:</p>
<pre><code>String[] someArray = {null, "I want to start from here", "other element", "other element"};
for(int i = 1; i < someArray.length; i++)
{
System.out.println(someArray[i]);
}
</code></pre>
<p>Is there way to set the inital index of an array other than setting the first element to null?</p>
<p>In the for loop, I want to set <code>i = 1</code>.</p>
|
java
|
[1]
|
2,856,628
| 2,856,629
|
How can I remove all empty values when I explode a string using PHP?
|
<p>I was wondering how can I remove all empty values when I explode a string using PHP for example, lets say a user enters <code>",jay,john,,,bill,glenn,,,"</code>?</p>
<p>Thanks in advance for the help.</p>
<p>Here is part of the code that explodes user submitted values.</p>
<pre><code>$tags = explode(",", $_POST['tag']);
</code></pre>
|
php
|
[2]
|
3,739,141
| 3,739,142
|
Diff'ing a mixed lists
|
<p>Forgive me if this is a stupid question, I've done my best to look this up with no success, and I am by no means a Python expert.</p>
<p>I was writing some stuff to "diff" two lists: basically, compare 2 lists and fill a third list with the common values, while removing them from the original two lists. So I wrote this:</p>
<pre><code>list_1 = ["dog", "cat", "bird", "rabbit", "rabbit"]
list_2 = ["fly", "monkey", "bird", "rabbit", "bear", "rabbit"]
matches = []
for thing in list_1:
while thing in list_2:
list_1.pop(list_1.index(thing))
popper = list_2.pop(list_2.index(thing))
matches.append(popper)
</code></pre>
<p>Which gets me:</p>
<pre><code>list_1:
['dog', 'cat']
list_2:
['fly', 'monkey', 'bear']
Matches:
['bird', 'rabbit', 'rabbit']
</code></pre>
<p>That's exactly what I'd expect/want... "rabbit" shows up twice since it's in both lists twice.</p>
<p>But then using the same for loop, this:</p>
<pre><code>list_1 = ["dog", "cat", ["bird", "rabbit"], "rabbit"]
list_2 = ["fly", "monkey", ["bird", "rabbit"], "bear", "rabbit"]
</code></pre>
<p>gets me:</p>
<pre><code>list_1:
['dog', 'cat', 'rabbit']
list_2:
['fly', 'monkey', 'bear', 'rabbit']
Matches:
[['bird', 'rabbit']]
</code></pre>
<p>The second "rabbit" isn't getting added to the matches list, and it remains in the originals. What is going on here that I'm not getting?</p>
|
python
|
[7]
|
4,749,995
| 4,749,996
|
Asp.net Masterpage not working
|
<pre><code><%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link rel="stylesheet" type="text/css" href="Home.css" />
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
<div id="banner" style="font-family: Calibri, Serif; color: #FFFFFF">
blah blah
</div>
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
</code></pre>
<p>Home.aspx</p>
<pre><code><%@ Page Language="C#" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Home"
MasterPageFile="~/MasterPage.master" Title="Welcome to StuartStudios!"%>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
</asp:Content>
</code></pre>
<p>Does Home.aspx not print whatever I define in the ContentPlaceHolder1 ? At the minute it prints nothing out. :S</p>
|
asp.net
|
[9]
|
1,978,463
| 1,978,464
|
Regular expression for maximum digits excluding comma
|
<p>I have the below regular expression:</p>
<pre><code>ValidationExpression="[0-9]+(,[0-9]+)*"
</code></pre>
<p>It allows numbers in the format: 12,2345 or 231,23454</p>
<p>Now I want to include a condition that will on the whole allow only 7 digits max excluding
comma.
<strong>The below is the modified code</strong></p>
<p>The below is in the item template</p>
<p>I also have a radio button in item template</p>
<pre><code><asp:TextBox runat="server" ID="tbText" CssClass="someclass" MaxLength="11"
%>'></asp:TextBox>
<asp:RegularExpressionValidator ValidationExpression="[0-9]+(,[0-9]+)*" ID="ValComp" runat="server" CssClass="asdf"
ControlToValidate="tbMileage" Text="*" Enabled="false" Display="Dynamic"/>
<asp:CustomValidator ID="cvalMileage" runat="server" CssClass="adsf" Text="*" Display="Dynamic">
</asp:CustomValidator>
<asp:CustomValidator ID="CustomValidator1" ClientValidationFunction="functionName"
runat="server" CssClass="asd" Text="*" Display="Dynamic">
</asp:CustomValidator>
</code></pre>
<p>Since I want to validate the radio button checked corresponding textbox in repeater the below is the code I have written</p>
<pre><code>var selText = $(".Class1 input[type=radio]:checked").closest(".Class1").find(".subClassText input[type=text]").val();
alert('Hi');
if (selText.replace(",", "").length <= 7) {
args.IsValid = true;
}
else {
args.IsValid = false;
}
</code></pre>
<p>The alert fires twice and based on args is False i have a popup that is firing twice</p>
<p>Thanks.</p>
|
asp.net
|
[9]
|
1,802,013
| 1,802,014
|
Using OnClick Listener in Listview
|
<p>I want to be notified when an item in a listview has been clicked , I have a main activity that has a ListView , I want to be notified when an Item in a this list has been Clicked , I did not override main activity to ListActivity .</p>
|
android
|
[4]
|
4,170,820
| 4,170,821
|
Block outgoing text
|
<p>How to design the BroadcastReceiver class that will block outgoing SMS.</p>
<p>abortBroadcast(); does not work. Any help will be appreciated. </p>
<pre><code>if ((actionType.equals(Intent.ACTION_SEND)))
{
setResultData(null); // I tried this and abortBroadcast(); as well
}
</code></pre>
|
android
|
[4]
|
2,195,897
| 2,195,898
|
iphone application give up rights
|
<p>Is it possible to give up an iphone application rights to another person or company?</p>
<p>I mean, you make an application, you sell it for a while, and then you don't need it anymore and you give or sell it to another person or company to continue develope it.</p>
<p>And in this case, how persons who already bought a copy of it can continue to receive next updates?</p>
<p>I hope I'm clear.</p>
|
iphone
|
[8]
|
689,494
| 689,495
|
Is a temporary value created in this code?
|
<p>Consider the following code:</p>
<pre><code>class B;
class A
{
public:
A() {}
A(B &b);
};
class B {};
A::A(B &b) {}
int main()
{
B b;
const A &refa = b;// does this line create a temporary value?
return 0;
}
</code></pre>
<p>My question is: does the code <code>const A &refa = b;</code> create a temporary value or not? </p>
|
c++
|
[6]
|
4,959,995
| 4,959,996
|
Can I make a function in C# take an optional parameter or do I need to overload it?
|
<p>I have the following in an interface:</p>
<pre><code>string GetTopic(string rk);
</code></pre>
<p>and this function:</p>
<pre><code>public string GetTopic(string rk)
{
return string.Format("{0}.{1}.{2}",
rk.Substring(0, 2).TrimStart('0'),
rk.Substring(2, 2).TrimStart('0').PadLeft(1, '0'),
rk.Substring(4, 2).TrimStart('0').PadLeft(1, '0'));
}
</code></pre>
<p>I would like to add an optional second parameter, enabling the function to be called like this:</p>
<pre><code>var a = GetTopic("010101")
</code></pre>
<p>or</p>
<pre><code>var b = GetTopic("010101","test")
</code></pre>
<p>In the first case I would like to get the output "1.1.1" and in the second case the output "1.1.1 - test". </p>
<p>Is this possible or do I need to make two functions and have one overload the other one? How can I specify the optional second parameter in my interface?</p>
|
c#
|
[0]
|
5,278,390
| 5,278,391
|
How do I push root view controller?
|
<p>I want to push root view controller. Why doesn't this code work?</p>
<pre><code>RootController *rootController = [[RootController alloc]initWithStyle:UITableViewStylePlain];
[self.navigationController pushViewController:rootController animated:YES];
[rootController release];
</code></pre>
<p>I used addSubview like this before.</p>
<pre><code>- (void)cancel {
[self.navigationController popViewControllerAnimated:YES];
}
- (void)viewDidLoad { // this is root view controller
[super viewDidLoad];
UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(cancel)];
self.navigationItem.leftBarButtonItem = cancelButton;
[cancelButton release];
}
RootController *rootController = [[RootController alloc]initWithStyle:UITableViewStylePlain];
UINavigationController *aNavigationController = [[UINavigationController alloc]initWithRootViewController:rootController];
self.naviController = aNavigationController;
[aNavigationController release];
[rootController release];
[self.view addSubview:[naviController view]];
</code></pre>
<p>And I added cancel button in navigation bar to go back to previous view. It doesn't work.
So, I want to push instead of add.</p>
|
iphone
|
[8]
|
1,143,482
| 1,143,483
|
Partial gridview in asp.net?
|
<p>I am working with Gridview and one of columns takes long time load and makes the whole page to load slowly. I want to know if there is a way I can show everything (other controls and partial gridview) first except for the slow column, and load the gridview(or the column) later as soon as the data for the column is available.</p>
<p>Thanks.</p>
|
asp.net
|
[9]
|
4,010,798
| 4,010,799
|
PHP array print statement
|
<p>Here is my code:</p>
<pre><code> if(is_file($userName.".txt")) {
$userDetails = explode(',', file_get_contents($userName.".txt"));
print($userDetails[0]);
if ($password == $userDetails[0]) {
print('Correct login');
} else {
print('Incorrect login');
}
}
</code></pre>
<p>And I have the following file: Simon.txt with the following contents: simonpassword,4,1
If the $userName is 'Simon', when the code is run, how come 4 is printed out instead of simonpassword at the line: print($userDetails[0])?</p>
|
php
|
[2]
|
4,129,984
| 4,129,985
|
In Python 3.2 how would I dynamically open and compile a class from a specified file?
|
<p>Code is much more precise than English; Here's what I'd like to do:</p>
<pre><code>import sys
fileName = sys.argv[1]
className = sys.argv[2]
# open py file here and import the class
# ???
# Instantiante new object of type "className"
a = eval(className + "()") # I don't know if this is the way to do that.
# I "know" that className will have this method:
a.writeByte(0x0)
</code></pre>
<p><em>EDIT:</em></p>
<p>Per the request of the answers, here's what I'm trying to do:</p>
<p>I'm writing a virtual processor adhering to the SIC/XE instruction set. It's an educational theoretical processor used to teach the fundamentals of assembly language and systems software to computer science students. There is a notion of a "device" that I'm trying to abstract from the programming of the "processor." Essentially, I want the user of my program to be able to write their own device plugin (limited to "read_byte" and "write_byte" functionality) and then I want them to be able to "hook up" their devices to the processor at command-line time, so that they can write something like:</p>
<p><code>python3 sicsim -d1 dev1module Dev1Class -d2 ...</code> </p>
<p>They would also supply the memory image, which would know how to interact with their device. I basically want both of us to be able to write our code without it interfering with each other.</p>
|
python
|
[7]
|
2,876,357
| 2,876,358
|
Swing Application Run In Web Browser
|
<p>I Have Create a One Swing Application and I Want To Run My Swing Application In To My Local Web Browser So Plz Tell Me How Can I Do This Because For Applet Program There Is No Any Longer Process For This.</p>
|
java
|
[1]
|
3,118,530
| 3,118,531
|
why the js code can't control the css code?
|
<pre><code><script>
var divBgTop=0;
function initDivTop()
{
divBgTop=document.getElementById("divBg").style.pixelTop;
alert(divBgTop);
}
</script>
<style>
.divBgCss
{
position:absolute;
left:100px;
top:100px;
width:100px;
height:100px;
background-color:red;
}
</style>
<body onload="initDivTop()">
<div class="divBgCss" id="divBg"></div>
</body>
</code></pre>
<p>the result is always 0. why?</p>
|
javascript
|
[3]
|
107,167
| 107,168
|
jQuery Div parent and child
|
<p>Right, lets say I have these repeated divs.</p>
<pre><code><div class="upcoming">
<div class="roll" style="display:none">Hidden</div>
</div>
<div class="upcoming">
<div class="roll" style="display:none">Hidden</div>
</div>
<div class="upcoming">
<div class="roll" style="display:none">Hidden</div>
</div>
</code></pre>
<p>This is incorrect, but how do I operate this using jQuery to reveal the "roll" class held inside when hovering over one of those divs.</p>
<pre><code><script type="text/javascript">
$(document).ready(function() {
$(".upcoming").hover(function() {
$(this + ".roll").fadeIn("Fast");
}, function() {
$(this + ".roll).fadeOut("Fast");
});
});
</script>
</code></pre>
<p>Any ideas? :)</p>
|
jquery
|
[5]
|
66,292
| 66,293
|
Why does Python return negative list indexes?
|
<p>If I have this list with 10 elements:</p>
<pre><code>>>> l = [1,2,3,4,5,6,7,8,9,0]
</code></pre>
<p>Why will l[10] return an IndexError, but l[-1] returns 0?</p>
<pre><code>>>> l[10]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: list index out of range
>>> l[0]
1
>>> l[-1]
0
>>> l[-2]
9
</code></pre>
<p>What I want to do is throw an error if there are no previous elements in the list.</p>
|
python
|
[7]
|
2,265,556
| 2,265,557
|
Unshorten the URL without downloading whole page in python
|
<p>I want to unshorten URLs to get the real address.In some cases there are more than one redirection. I have tried using urllib2 but it seems to be making GET requests which is consuming time and bandwidth. I want get only the headers so that I have the final URL without needing to get the whole body/data of that page.
thanks</p>
|
python
|
[7]
|
3,796,205
| 3,796,206
|
Is it possible to make User defined DOM changes in runtime?
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/4255472/javascript-object-access-variable-property-name">javascript object, access variable property name?</a> </p>
</blockquote>
<p>I am messing around with JS, learning a stuff and I am wondering about something...
Say you have a function <code>aFunc()</code>, and you accept a string <code>aFunc(val)</code>. The value is user defined and is then used to modify the CSS of an element.</p>
<p><strong>For Example:</strong></p>
<pre><code>function aFunc(val){
document.getElementById('something').style.val = 'red';
}
</code></pre>
<p>Say the user entered <code>borderColor</code>, it would somehow refrence <code>borderColor</code> where <code>val</code> is. I do not know how or if this is possible.</p>
<p><strong>EDIT:</strong>
Please no <code>eval()</code> :)</p>
|
javascript
|
[3]
|
4,454,062
| 4,454,063
|
Adding existing project in c#
|
<p>I have add the existing project in my new project, but when I try to use the existing library, I see the following error:</p>
<blockquote>
<p>the type or namespace name 'com' could not be found (are you missing a using directive or an assembly reference?)</p>
</blockquote>
<p>What would cause this?</p>
|
c#
|
[0]
|
5,961,271
| 5,961,272
|
Python: Random item from list combining only two
|
<p>I'm making a slot machine program in Python and for some reason, the random selector wants to combine a known two elements.</p>
<pre><code> itmlist = random.choice(['banana', 'cherry', 'bar', 'seven', 'banana', 'cherry' 'banana', 'cherry', 'seven'])
print itmlist
</code></pre>
<p>It shows up as "cherrybanana" every once in a while and I am really confused.</p>
|
python
|
[7]
|
3,251,072
| 3,251,073
|
catch & save outging sms to my app & the native app
|
<p>iv`e created an SMS app with a db that saves almost all of the messages.</p>
<p>the problem starts when i want to save (1) my app outgoing messages to the native SMS app - the mmssms.db & the (2) outging native SMS messages to my app db.</p>
<p>i searched all over and failed to find a proper example for that question,especially for the second one.</p>
<p>iv`e found that its all about the ContentResolver like this:</p>
<p><a href="http://stackoverflow.com/questions/2735571/detecting-sms-incoming-and-outgoing">Detecting SMS incoming and outgoing</a></p>
<p>but i cant figure how.</p>
<p>please help me :)</p>
<p>tanks!</p>
<p>EDIT: </p>
<p>the aswer for the (1) question is :
<a href="http://stackoverflow.com/questions/7763575/android-updating-the-sent-box-afer-sending-an-sms">Android: Updating the sent box afer sending an sms</a></p>
<p>still searching for the (2) answer.</p>
|
android
|
[4]
|
3,759,914
| 3,759,915
|
Creating acronyms in Python
|
<p>In Python, how do I make an acronym of a given string?</p>
<p>Like, input string:</p>
<pre><code>'First Second Third'
</code></pre>
<p>Output:</p>
<pre><code>'FST'
</code></pre>
<p>I am trying something like:</p>
<pre><code>>>> for e in x:
print e[0]
</code></pre>
<p>But it is not working... Any suggestions on how this can be done? I am sure there is a proper way of doing this but I can't seem to figure it out. Do I have to use <code>re</code>? </p>
|
python
|
[7]
|
1,466,871
| 1,466,872
|
Why draw operation in android canvas are using float instead of int for (x,y)?
|
<p>Why draw operation in android canvas are using float instead of int for (x,y)?
For example:
<a href="http://developer.android.com/reference/android/graphics/Canvas.html#drawCircle(float" rel="nofollow">http://developer.android.com/reference/android/graphics/Canvas.html#drawCircle(float</a>, float, float, android.graphics.Paint)</p>
<p><a href="http://developer.android.com/reference/android/graphics/Canvas.html#drawRect(float" rel="nofollow">http://developer.android.com/reference/android/graphics/Canvas.html#drawRect(float</a>, float, float, float, android.graphics.Paint)</p>
<p>If I have a lot of objects (say 200) to draw in my application and i have a class for each object, should I use 'int' or 'float' for the x, y attribute (the location of the object when drawn on screen)? i think 'float' use less memory than 'int'.</p>
<pre><code>class MyObject {
public int x;
public int y;
}
</code></pre>
<p>Thank you.</p>
|
android
|
[4]
|
5,564,918
| 5,564,919
|
Custom UITableViewCell always black unless set to anything but clear
|
<p>My custom UITableViewCells always have a black background unless I set the background of the UITableView to clear.</p>
<p>However I want to set the background colour to another colour and as soon as I do the cells turn black (even though the background of the control does change)</p>
|
iphone
|
[8]
|
1,087,182
| 1,087,183
|
how display view when cells select in a tableview
|
<p>i am new to iphone ,my question is in one view i placed a tableview and display some data on that view,i want to add another view(same view to all cell) when select cell(suppose select first cell view will display and newly add view is used to delet that cell information based on cell index)please tell me how to display view. </p>
|
iphone
|
[8]
|
2,317,740
| 2,317,741
|
C++ and Eclipse project - how to work out what headers to include, and what class to forward declare
|
<p>I'm building a C++ project in Eclipse using a third party implementation of <code>gcc</code>. The makefile is auto-generated and the object rules are listed in alphabetical order ( I'm not sure if that's relevant ). </p>
<p>I can't seem to create the correct configuration of #include directives and forward declarations so that it compiles. I'm guessing - and its clearly a bad case of Voodoo Chicken Coding. Can someone tell me how I should work out the include order?</p>
<p>The problem is that the classes refer to each other (e.g. <code>Display</code> refers to <code>Texture2D</code> and vice versa ).</p>
<p>I have the following files:</p>
<pre><code> Display.cpp
Display.h
</code></pre>
<p><code>Display.h</code> defines the following classes:</p>
<pre><code>class Canvas{ ... };
class Display
{
public:
void PaintTexture(Texture2D * tex);
void WriteText(BitmapFont * fnt);
private:
Canvas * c;
};
</code></pre>
<p>and the files:</p>
<pre><code>Texture2D.h
Texture2D.cpp
</code></pre>
<p>Texture2D.h defines the following class:</p>
<pre><code>class Texture2D
{
void PaintTo(Canvas * c);
};
</code></pre>
<p>and finally the files:</p>
<pre><code>BitmapFont.h
BitmapFont.cpp
</code></pre>
<p><code>BitmapFont</code> as defined in <code>BitmapFont.h</code> refers to both <code>Canvas</code> and <code>Texture2D</code>;</p>
<pre><code>class BitmapFont
{
public:
void Paint(Canvas * c);
private:
Texture2D * tex;
};
</code></pre>
<p><code>main.cpp</code> refers to <code>BitmapFont</code> and <code>Texture2D</code>.</p>
|
c++
|
[6]
|
1,897,423
| 1,897,424
|
Android: What's the better practice, using a global string or intents with extra data?
|
<p>On a current Android project, I pass some data between a couple activities. I was just curious if there is a best practice on sending data between activities. I have a string that will be updated/appended based on the results of one activity, then used for a Facebook share two activities later. Should this string be set as a global static string, then shared, or should I pass the string using <code>intent.PutExtra</code>?</p>
<p>The global string is probably less code, but means another static variable. Alternatively, the intent Extra is fine, but seems repetitive since it's being passed through a couple activities. Either way will work, just would like to know if one is preferred above another.</p>
|
android
|
[4]
|
127,740
| 127,741
|
Is this there a defined behavior for this code that deletes a derived class through a base class pointer?
|
<p>Does this code result in defined behavior?</p>
<pre><code>class A {
int x;
};
class B {
short y;
};
class C {
double z;
};
class D : public A, public B, public C {
float bouncy;
};
void deleteB(B *b) {
delete b;
}
void is_it_defined() {
D *d = new D;
deleteB(d);
B *b = new D; // Is this any different?
delete b;
}
</code></pre>
<p>If it's not defined, why not? And if it is, what's it defined to do and why? Lastly, if it's implementation defined, could you give an example of what a common implementation might define the behavior to be?</p>
|
c++
|
[6]
|
4,464,213
| 4,464,214
|
Creating Resource file in C#
|
<p>I am using the beolw code to create a resource file in C#.</p>
<pre><code>IResourceWriter writer = new ResourceWriter(@"C:\ABC\Try1.resources");
writer.AddResource(Name, Value);
writer.Close();
</code></pre>
<p>BUt when I am trying to open the resource file which is being created, its seems to be distorted. Normally when I double clickon any resources file (.resx) it opens in an xml format.</p>
<p>Can anyone help me out here.</p>
|
c#
|
[0]
|
5,369,106
| 5,369,107
|
How can I invoke a javascript trhough a thread?
|
<p>I have a thread that runs querying a DB and returning some values. If this values satisfyes a condition, I want to raise a message box (javascript alert) for the client side.</p>
<p>In my system, users can post some tasks in DB, and the thread is going to constantly query the database to check if user has things to do. If user has, the system must alert him through a message box. The text is very simple, and statik, like "Hey, dude, go work, lazy!" (I'm joking, the message shall be like "You have new task(s). Please check.") Just it! </p>
<p>I've done javascripts invokings with <code>ClientScript.RegisterStartupScript</code>, and <code>Attributes.Add</code> for buttons. But now I want to call the javascript functions (wich will alert the user that he has things to do) from the midle of a sub (that is executed in a thread), without a submit, load or click event. How can I do it?</p>
<p>Thanks!</p>
|
asp.net
|
[9]
|
3,944,819
| 3,944,820
|
count the the number of 1s in its binary representation -- shift right don't work?
|
<p>when asked the question to count the number of 1s in the binary representation , the first answer came to my mind is to shift the number right and count the least important bit</p>
<p>but there is a saying that when the number is negative , this method will cause infinite loop ?</p>
<p>I tried quickly with python</p>
<pre><code>>>> a = -16
>>> a >> 1
-8
>>> a >> 1
-8
>>> -8 >> 1
-4
>>>
</code></pre>
<p>this is what I expect, so what is the issue, will shift the negative number cause the sign bit to be carried over to the right ?</p>
|
python
|
[7]
|
2,860,706
| 2,860,707
|
why do convert numbers to string in Javascript using tostring method?
|
<p>I was wondering why do people have to convert numbers to string. What are the practical uses for that kind of conversion?
Similarly why do developers use parseInt or parseFloat to convert a string to a number.
thanks </p>
|
javascript
|
[3]
|
5,719,529
| 5,719,530
|
What is the correct usage of Alarmmanager and starting boot?
|
<pre><code> public class main extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
///////////Do something////////////////////////
showtext.startScan();
//SEt Alarm
Intent intent = new Intent(this, TextReceiver.class);
PendingIntent pi=PendingIntent.getBroadcast(this, 0, intent, 0);
AlarmManager am=(AlarmManager) getSystemService(Context.ALARM_SERVICE);
am.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis()+9000, pi);}}
/////////////////////////////////////////////////////////
public class TextReceiver extends BroadcastReceiver{
public void onReceive(Context context, Intent intent)
{
///Show text/////
Intent myintent = new Intent(context, main.class);
myintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(myintent);
}
}
</code></pre>
<p>First, my when I run the program after 9sn, I am getting an error that "The app stopped unexpextdly." . My goal is to show the text every 9sn Why I get this error ? </p>
<p>Second, I want to run my program staring boot. Also, I register my manifest to start my broadcast receiver.
The problem is that after i turn off the device, it starts with error and says "the app is stopped"
I think this line "context.startActivity(myintent);" causes the error, but What should i use instead ? </p>
|
android
|
[4]
|
2,392,149
| 2,392,150
|
strange npe in jQuery method
|
<p>I have this jQuery method which <strong>works fine if I am on a page where there are elements found</strong> which have class <code>.singlePaneOfGlassBlock</code>.</p>
<pre><code>function replaceRightClickIcefacesMethod() {
//I only want this to run on IE for now, but the content
//is prepared to run on other browsers too
if (jQuery.browser.msie) {
var elem = jQuery(".singlePaneOfGlassBlock"), oldName = elem
.attr("oncontextmenu"), fn = String;
//IE returns function instead of string so let's try to take the string
//in the right way
if (typeof oldName == "function") {
oldName = elem[0].getAttributeNode("oncontextmenu").value,
fn = Function;
}
//do the replace
oldName = oldName.replace('Ice.Menu.contextMenuPopup',
'contextMenuPopupUpdated');
//change oncontextmenu with the new value
jQuery.each(elem, function() {
this.setAttribute("oncontextmenu", fn(oldName));
})
}
}
</code></pre>
<p>But it failes with this error:</p>
<pre><code>`'undefined' is null or not an object`
</code></pre>
<p>on the line where it tries to do the replace if I am on other pages where those type of elements are missing...</p>
<p>I have add a checking to see if it's null or if it contains that string before doing the replace, but it still fails:</p>
<pre><code>if (jQuery(oldName).length || oldName.indexOf("Ice.Menu.contextMenuPopup") != -1) {
oldName = oldName.replace('Ice.Menu.contextMenuPopup',
'contextMenuPopupUpdated');
jQuery.each(elem, function() {
this.setAttribute("oncontextmenu", fn(oldName));
})
}
</code></pre>
<p>Can you give me a solution? </p>
<p>Thanks.</p>
<p><strong>UPDATE</strong>: when I'm asking a solution I'm just asking on how to correct this method to not run when that type of elements are not found?</p>
|
jquery
|
[5]
|
1,899,358
| 1,899,359
|
jquery greater than/less than only looks at first number?
|
<p>I have a drag script where i'm dragging div.slider, i'm keeping track of the "left" value for div.slider, and having it fade out when it's greater than 68, but the problem is that it fades out when it gets to 6, not 68. If I change the number to 85, then it will fade out at 8, not 85. does anyone know why this is happening?</p>
<pre><code>$(document).ready(function() {
$(".slider").mousemove(function() {
var rightStyleValue = $('div.slider').css('left');
$('.display_value').html(rightStyleValue);
if ($('.slider').css('left') > 68 + 'px') {
$('.container').fadeOut(500);
}
});
});
</code></pre>
|
jquery
|
[5]
|
5,078,166
| 5,078,167
|
Determine where a function has been called with PHP
|
<p>do you guys know how can i determine from what file was a function called inside of that function?</p>
<p>I was thinking of using debug_backtrace .. but that does not look as an elegant way to do it, and they also enumarate other reasons in another question <a href="http://stackoverflow.com/questions/346703/php-debugbacktrace-in-production-code">here</a> </p>
<p>So what other alternatives are there ?</p>
<p>thanks a lot</p>
|
php
|
[2]
|
961,408
| 961,409
|
C++: Comparing sets of points in a data file
|
<p>I have a data file consisting of three columns, x, y, and z (these are numbers). I'd like to do the following:</p>
<ol>
<li>Compare each (x, y) set in the data. </li>
<li>If two sets are equal, say (x1, y1) = (x2, y2),</li>
<li>Then, compare z1 and z2. And depending on the comparison, I'll write a condition and I want to overwrite one of the sets such that it takes the value of the one that pass some conditions I make. </li>
</ol>
<p>The data contains thousands of points, so I'm not sure how to do the comparison effectively, and how to overwrite or omit the point that doesn't pass that conditions.</p>
<blockquote>
<p>So can someone please suggest something, or give a small
example for the case where I have only two points (x1, y1, z1) and (x2, y2, z2).</p>
</blockquote>
|
c++
|
[6]
|
3,037,495
| 3,037,496
|
android: stack based activity back-key mechanism
|
<p>I have two activities, one is a list for item, the other one is the edit view for the item. When user clicks the item in the first view, the second edit view will show.</p>
<p>In android the stack based mechanism, if I do this the behavior is weird.</p>
<p>List view -> click -> edit view -> save -> list view -> click -> edit ->... it's a loop.</p>
<p>If I edit and save the item several times the stack will be full of list view & edit view...</p>
<p>Now the user wants to press back key to exit the program, by stack based activity manager, the user will meet up many times of the two activities.</p>
<p>What's the recommend way to resolve this issue?</p>
|
android
|
[4]
|
421,327
| 421,328
|
android steganography
|
<p>I'm doing steganography on Android. My code is as follows:</p>
<pre><code>public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.src);
picw = mBitmap.getWidth();
pich = mBitmap.getHeight();
pix= new int[picw * pich];
mBitmap.getPixels(pix, 0, picw, 0, 0, picw, pich);
try {
FileOutputStream fos = super.openFileOutput("dest.png", MODE_WORLD_READABLE);
mBitmap.compress(CompressFormat.PNG, 100, fos);
fos.flush();
fos.close();
}catch (Exception e) {
tv.setText(e.getMessage());
}
</code></pre>
<p>My problem is that whenever I save source image with the <code>Bitmap.compress()</code> method, the <code>pix[0]</code> value changes during compression, so I'm unable to extract original data. How can I fix this?</p>
|
android
|
[4]
|
1,260,883
| 1,260,884
|
Multiple players for an android game
|
<p>I am trying to make a game, very simple, kind of a game where you simply have to solve some questions.
Now I want to make it possible to make multiple players. One way is to make an sql table with players, and just put each score, for each question, for each player in it.
To know which player was last, I can save it to a table 'currentplayer' or something. </p>
<p>Now I was thinking, isn't this a little bit too much? Is there a easier, or better way of handling this? </p>
|
android
|
[4]
|
3,578,077
| 3,578,078
|
How do you package multiple sets of native class files into a single jar?
|
<p>I have some external C code which has been built for multiple platforms(Windows, Linux, Mac), and want to package them all in a single .jar so that this .jar can be used as a library regardless of the platform.</p>
<p>This would allow me to pass a Java project around from computer to computer with the same single external library. </p>
<p>There are existing class files which are calling the code using JNI, and those classes are the ones which differ on different platforms. In the current state, we swap out jars with different classes which call native functions for that particular platform.</p>
<p>Is there a way to package them in such a way that I can dynamically load the correct class file without having to use Ant/Maven or create an abstraction layer?</p>
|
java
|
[1]
|
3,795,550
| 3,795,551
|
unique object identifier in javascript
|
<p>I need to do some experiment and I need to know some kind of unique identifier for objects in javascript, so I can see if they are the same. I don't want to use equality operators, I need something like the id() function in python. </p>
<p>Does something like this exist ?</p>
|
javascript
|
[3]
|
297,538
| 297,539
|
How to coordinate toast and dialog box? Toast partially covers loading dialog box. Can I resize toast?
|
<p>Here is exact situation. User signs in, and gets a Welcome Toast that lasts a few seconds AND they are switched to an account page where there is a loading dialog ... So its kind of ugly because the Toast is going on at the same time as the dialog. Actually it partially covers it. I want the user to see the Toast and then the Loading Dialog if its still ongoing after the toast is over. .... So if I could resize the toast dialog to same size location that would work or if I could hide Loading dialog until Toast was over ..</p>
|
android
|
[4]
|
1,538,110
| 1,538,111
|
php - resize and save an image?
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/747101/resize-a-picture-to-a-fixed-size">Resize a picture to a fixed size</a> </p>
</blockquote>
<p>I am using the following php code to resize (the width) and save an image, the code is working no error but the image is not getting resized.</p>
<pre><code><?php
$old_path = "users_images/".$name.".".$type;
$new_path = "main_images/".$name.".".$type;
$image_size = getimagesize($new_path);
if($image_size['0'] > 700){
$image_size['0'] = 700;
}
rename($old_path, $new_path);// save image
?>
</code></pre>
<p>basically if the image width is grater than 700 I want to set it to 700 ? what I am doing wrong ?</p>
|
php
|
[2]
|
5,424,944
| 5,424,945
|
Map-summing items in a multidimensional array
|
<p>I have an array that looks roughly like this:</p>
<pre><code>[ (0.5, 0.6, 0.7), (0.1, 0.9, 0.8), (0.9, 1.0, 0.4),
...
(0.3, 0.8, 0.3), (0.2, 0.4, 0.9), (0.5, 0.5, 0.3) ]
</code></pre>
<p>What I need is a sum of [0][0], [0][1], [0][2], etc. as well as [1][0], [1][1], [1][2], etc. I need a way to get a sum of the first index of all items in the array, then a sum of the second index of all items in the array, etc. </p>
<p>How can I do this in Python? The ultimate result would be to have a single tuple that contained the average of each index of all of the tuples.</p>
|
python
|
[7]
|
1,148,798
| 1,148,799
|
What is the best way to handle multiple object dependencies in C++?
|
<p>I'm building a C++ application, and I've got several utility objects that all of my classes need to use. These are things like the logging object, the global state object, the DAL object, etc...</p>
<p>Up until this point, I've been passing all of these objects around as references into my class constructors. </p>
<p>For example:</p>
<pre>
class Honda : public Car
{
public:
Honda ( const GlobalState & state,
const Log & logger,
const DAL & dal );
...
private:
const GlobalState & my_state;
const Log & my_logger;
const DAL & my_dal;
}
</pre>
<p>This gets tedious fast, because each time I add a utility object that all of my classes need to access, I have to go and change the constructors everywhere.</p>
<p>I've heard that the correct way to solve this problem is to create one struct that contains all the different utility objects and pass that around (as a reference) to all of the objects that need to access it.</p>
<p>Is this the right way to handle this problem? Thanks!</p>
<p><b>UPDATE:</b> Thank you to everyone for the feedback. After some additional research, I've decided to continue using Dependency Injection.</p>
|
c++
|
[6]
|
4,342,421
| 4,342,422
|
Warnings when file_get_content wrong url
|
<p>I have this code:</p>
<pre><code><?php
$url = "http://asdsfsfsfsfsdfad.com";
$file = file_get_contents($url);
if(preg_match("/<title>(.+)<\/title>/i",$file,$m))
print "$m[1]";
else
print "The page doesn't have a title tag";
?>
</code></pre>
<p>It works fine when the url is a proper url, but when I put in nonsense then I get two warning messages:</p>
<pre><code>Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Navn eller tjeneste ukendt in /var/www/web17/web/administration/custom_pages.php(71) : eval()'d code on line 4
Warning: file_get_contents(http://asdsfsfsfsfsdfad.com) [function.file-get-contents]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Navn eller tjeneste ukendt in /var/www/web17/web/administration/custom_pages.php(71) : eval()'d code on line 4
</code></pre>
<p>Any way to prevent this?</p>
|
php
|
[2]
|
3,086,177
| 3,086,178
|
how to save highscore for each level
|
<p>I have 3 levels in the game and I want to store each levels highscore as they are played. User can go back to the level and can challenge their own highscore. Now how will I save the level highscore of the each level ?</p>
|
android
|
[4]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.