text stringlengths 8 267k | meta dict |
|---|---|
Q: Keep posting number on line with for statements PHP I am looking for something that shows a number on each line, rather than just all the numbers after the page has loaded.
the code for instance is:
for($a=0;$a<=10;$a++){
echo $a;
echo '<br>';
}
The output would of course be:
1
2
all the way to 10 after the page wo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591757",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Connection pool detection I am creating an application in java using glassfish server in netbeans. I've created connection pool and data source for sql query execution. I have created a sample jsp page to check the transection using connection pool which is as follows.
And as I run this file in browser I get this in... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591758",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: log4net writing to file. How to open up permissions I was happily using log4net with my WPF program on an XP machine and happily using a fileAppender FileAppender to write log messages to c:\log.txt. All was well. However, it does not work on a Windows 7 machine. No error or anything, just that the file isn't cre... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591762",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Weird glitch when reloading UITableView sections I am seeing a strange visual glitch in UITableView when reloading a section in some tables. Here is a video of this in action. Happens in both simulator and device.
Ideas?
| {
"language": "en",
"url": "https://stackoverflow.com/questions/7591767",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to create screen form in Informix SQL? I am new to Informix-SQL. I am trying to create form in Informix. I referred to some resources online
This is how I am accessing my database at the moment dbaccess database_name. I can't see the 'form' menu for me to create the form. I am an absolute beginner. I would appre... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591769",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How can I convert 0x70, 0x61, 0x73 ... etc to Pas ... etc in C++? I am using MSVC++ 2010 Express, and I would love to know how to convert
BYTE Key[] = {0x50,0x61,0x73,0x73,0x77,0x6F,0x72,0x64};
to "Password" I am having a lot of trouble doing this. :( I will use this knowledge to take things such as...
BYTE Key[] ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591771",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Enum values as dropdown list I am facing an issue populating a dropdown list from Enum class values. My enum class code is:
package abc.xyz.constants;
public enum StateConstantsEnum
{
NEWYORK("NY"),
FLORIDA("FL"),
CALIFORNIA("CA"),
private String fullState;
private S... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591776",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: php code transfer into js the javascript code in php is
<script language="JavaScript" type="text/javascript">
xajax_getCountry('<?php echo $row['mradio_area']?$row['mradio_area']:0 ?>',
<?php echo $row['mradio_country']?$row['mradio_country']:0 ?>,
<?php echo ($row['mradio_rate']==1?1:0); ?>);
</script>
I want to p... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591777",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-5"
} |
Q: Sharing hashmap between different JVM running on the same machien I have some maps that contains cached data from db. Currently 5 instance of the same server is running on same machine in different JVM. How can I share maps between JVM? cache is write once and read many. Currently the problem is because of this cach... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591780",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Is there a way around repetitive tables in Subqueries? Notice that I'm calling and joining the same tables for my main query and subquery.
Now my actually query is using many more subqueries like that.
Is there a way to call a subquery field from the main query thus eliminating the need to reuse the same join table... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591781",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Tricky "grouped" ordering in SQL Been having trouble with this for some time.
I have a database sort of like this:
Car_ID Car_Brand Car_Model Car_Price
1 Ford Fiesta 4000
2 Ford Mustang 29000
3 Ford Focus 12000
4 Honda Civic 15000
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591784",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: jQuery mobile is messing with my links I'm using using jQuery mobile. Testing my web page on iPhone.
Here is the issue:
I am on http://www.mywebsite.com/here.html and I have an anchor on that page that points to
href="http://www.mywebsite.com/some/folder/there.html", I'm navigated to
http://www.mywebsite.com/here... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591788",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: MVC3 DropDownList not validating with [Required] class field as type int? Any idea why the following dropdownlist won't validate with required field as type int (the "Title" field below)?
[Required] // This works!
[Display(Name = "Name")]
public string Name { get; set; }
[Required] ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591791",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Javascript Radio / Checkbox Problems I have this simple script. I'm trying to get the checked values and add them to a running total that's in the diabled input box. I know it's getting checked option but it's not updating to the input box and I'm not sure why. Can anyone help me?
<html>
<head>
<script type="text/ja... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591792",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: mootools clone form element I cannot get a form to submit additional fields that have been cloned. When a form like the one below is submitted, it does not include the cloned form elements. Does anybody know why and how I can alleviate this issue.
<form>
<table>
<tr><td><input type="text" value="50" name="my... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591801",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Xcode 4 will no longer run apps on 4.2.10 device (CDMA iPhone) Up until today, I have been able to test my app on my CDMA iPhone, running 4.2.10. I am building against the 4.3 SDK, with a deployment target of 4.0.
After restarting my phone today, Xcode will no longer allow me to test the app on my phone, with this ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591815",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Android Streaming Video using MediaPlayer I'm back with another problem!
I'm trying to create an app that would list a selected Livestreams, from Own3d.TV, Justin.Tv etc...
If my research isn't totally failed, I can use the MediaPlayer object to Stream video, the only question is how do I use it?
So far my code look... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591817",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: how to create OAuth token with public/private key I'm fairly new to OAuth but have done some PKI in the past. Can anyone point me to some example on how to generate a OAuth token, application secret using public/private key? google didn't turn up any good results.
I've read the google oauth examples and the OAuth i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591818",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Objective c Facebook I am developing an application that posts in IOS Facebook wall.
I'm using SDK Facebook.
My problem is if I have installed Facebook on my iPhone, when I call the permissions, it calls the Facebook app.
If i uninstall the facebook app, the authorization opens inside my application.
There's a way... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591826",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Fit content in various screens I have a html page which is table based. I have a ul as menu few charts and few tables. I am trying to design it such that it just fits in any screen without any scrollbar. My browser doesn't honer the height=100% which i tried for the main table of the page. Any thoughts? Thanks in ad... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591828",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Help with SQL command not working I have an SQL command I am attempting to execute.
The syntax is as follows
Public Shared Function CanRaiseWorkOrder(connection As IDbConnection, ProductID As Guid) As Boolean
Using sqlCmd As IDbCommand = connection.CreateCommand
With sqlCmd
.C... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591830",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Android browser-like implementation, where do I cache images imagine a browser-like implementation and I would like to view html pages offline in this app, where would I store the images?
*
*a cache directory within the app's data folder (not sure if this is persistent data, or if android will wipe it out, or i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591835",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Load local XML file - Chrome 14 I've been trying to get Chrome to load and transform local files. I can attach a style sheet to XML files and that works fine (once the --allow-file-access-from-files switch is added to the command line). However, when trying to load files using xmlHTTPRequest pretty much exactly as i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591840",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Looking for JS/JQuery FULLY modal overlay I need a modal overlay that will block interaction with the rest of the page and is NOT CLOSABLE by the user, but can't seem to find one where I don't have to override existing functionality (like removing the X button or removing the esc-to-close feature).
Anyone know of a ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591843",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Help on extracting a string pattern, typically conference id from a meeting invitation Somebody can help me to extract matching pattern string?
I want to extract conference Id from a meeting invite.
A typical example would be
< meeting agenda text...
....
Conference Id : *12322#
....
more text....
/>
Platform: .Ne... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591846",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: What am I doing wrong? /noob ?Learning to program I am trying to create a simple calculator in the console for single digit numbers.(Well I actually only care about multiplication)
So, here is my code and if someone could help me.
class multiplythisnumber
{
static void Main()
{
int input, inp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591848",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Jquery-related-selects i'm tryng to make 7 related select boxes with this script: https://github.com/tukutela/jquery-related-selects,
here the shot: http://vitrineonline.com/porra/
and so, the problem is: on the 3 select, the script stop to push up the script.
could someone please just give me a hint of what is goi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591850",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Restart passenger synchronously? Is there a way to restart a passenger server synchronously?
Running touch tmp/restart.txt will restart the server, but the touch command is asynchronously.
A: You can follow up the touch tmp/restart.txt command with curl -I http://your-server. That will cause passenger to immediatel... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591852",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Is there a capybara for Node.js? Does anyone know whether there is anything similar to capybara for Node.js?
A: I'm a rails-turned-node developer and I've always been looking for a analogy in the JS world for the winning RSpec/Capybara combination. Here is what I've found what I like best.
*
*Mocha - for running... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591854",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "27"
} |
Q: From random integers to an actual String This is a code that takes in an array of all the printing characters of the ASCII table. I am trying to make it so that any String message in the form of integers (e.g. String "aba" that is converted 97098097 can be put back into its original String form. 100101101 can be t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591858",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-2"
} |
Q: How do I evaluate an expression in bash and assign the value to a variable? I have an expression like this:
if [[ $s == *Mar* ]]; then "match"; else "not"; fi;
How do assign its value to a variable?
command substitution syntax does not work, because bash tries to evaluate the result of the expression:
x=$(if [[... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591859",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Will NSNotificationCenter call back method be called in main thread or background thread? My code is just play a downloaded mp4 files and register the view controller to observe the notification of end of player.
It works pretty good in not only iOS5 but also iOS4.
But I just want to know for sure that whether the c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591861",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Controling Selenium test speed in hudson There is Selenium plugin (RC) in Hudson and the builds are taking to too long and keep failing if the server takes a while to respond. I do not think putting in waits in the test files would be a good Idea as the test code will be bloated with "Waits" and would increase the b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591862",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to render a button depending on the state list? I have a button, which should be disabled if a particular list is empty. And, accordingly, active, if list not empty. When the initial page load button is disabled, because list is empty. And then the list is filled, but the button is still disabled and does not re... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591868",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Linq2SQL Filter on multi columns If I have a data table like this
id, Name, Address, Status
How would I in Linq search across multiple columns?
So if I enter a search term of "slappy" I'd want all matches in columns Name, Address and Status.
Is there an easy way or do I need to apply contains for each column?
A: v... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591870",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: how to change the syntax of this sql query to 92's explicit join systax How can i rewrite the below query in SQL '92's Explicit join syntax using only inner or outre joins
SELECT e.emp_id ,
( SELECT AVG(salary)
FROM #salary d
WHERE d.emp_id = e.emp_id )
FROM #emp e
A: I'm not even sure why you ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591871",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-2"
} |
Q: Fetching Data from PL-SQL Table as OUT parameter in Java I am executing a procedure from java code, which has 2 out parameters, One of those is a Object table. here is the overview of package
PROCEDURE SalesProc (
p_S_table IN t_s_table
, p_T_table IN OUT t_t_table
, x_message ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591879",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Large textinput makes http post fail I have a form in my application where technicians input information about different events or actions taken (like updating a server). The problem is that these inputs can be quite lengthy and then my form stops working. The server returns a 302 error to the browser if the browser... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591885",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: HTML5 Localstorage & jQuery: Delete localstorage keys starting with a certain word I have 2 apps working together with localstorage and I was wondering how can I delete all the keys which start with note- and todo- . I know localstorage.clear() clears everything but thats not my aim.
Here is an example of what I hav... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591893",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: How to check if UDP port is available in iPhone Now I am developing an iPhone project.
I want to iterate UDP port from 5060 to 50xx
How can I check if specific port is already open or free to use?
Thanks~~
| {
"language": "en",
"url": "https://stackoverflow.com/questions/7591900",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Get largest value from array without sorting I am creating a somewhat simple game, and I need to keep track of what players have what score. 25 people will be playing this game at one time, these players will be put into an array:
public static int[] allPlayers = new int[25];
Depending on a correct answer, the curr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591902",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Using Meta Search or Ransack with Geocoder I've created a form that supplies search criteria:
= search_form_for @q do |f|
%h3
Search:
= f.label :category_id
%br
= f.collection_select :category_id_eq, Category.all, :id, :name, :include_blank => true
%br
= f.label "Sub-Category"
%br
= f.collect... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591905",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How do I wait a certain amount of time before continuing in PHP? So this is kind of two questions...
First off, when a user logs out, I want to redirect them back to the login page. I do this by using header('login_form.php');, however, prior to doing such, I try to print out the text "You have successfully logged o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591907",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Setting alpha on a BitmapDrawable in XML I was wondering if its possible to set transparency in XML for a Drawable.
In this case its setting the disabled state of a button. Instead of using a separate image i should like to create a grayed-out version by changing the alpha. I know I could do that in code. But can i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591916",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Jquery UI Accordion - Collapsed & Clickable Links I am attempting to use the Jquery UI accordion as a Side Navigation option. The problem is I am unable to have the accordion totally collapsed on load (and when desired by user) and to have active links on some of the pannel headers.
Using
Jquery 1.6.2 &
Jquery UI 1... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591917",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Mental block with os.walk - want to process a file not the filename string Trying to implement a little script to move the older log files out of apache (actually using a simple bash script to do this in 'real life' - this is just an exercise to practice using Python). I'm getting the filename as a string as the var... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591920",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Check if an IEnumerable has less than a certain number of items without causing any unnecessary evaluation? Sometimes I expect a certain range of items and need to do some validation to ensure that I am within that range. The most obvious way to do this is to just compare the number of items in the collection with t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591921",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: How to move Content Control DataTemplate to Dictionary Resources XML I've been given a great example of how to apply a dynamic style within a Conten Control.
I know my XAML for each style is going to get really big, I'd like to split the DataTemplate off to separate XAML files (I guess ResourceDictionary's). I just ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591929",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Maven : Failed to collect dependencies I have exported a Maven Project . (So i dont have settings.xml file with me )
When i ran the Mavens POM.xml file the build is failin due to this reasson
Failed to execute goal on project bayer-ws: Could not resolve
dependencies for project com.tata:bayer-ws:war:1.0: Failed... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591932",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: C++ compiler from VS2005 If I would like to use the compiler that comes with Visual Studio 2005 but without IDE which Platform/Windows SDK should I install to get it? Windows SDK 2008?
A: Download the .NET Framework 2.0 Software Development Kit (SDK) (x86) for 2005.
A: According to this MSDN blog article:
*
*Up... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591942",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: NoSql Referential Data Disclaimer: by referential Data, i do not mean referential integrity
I am learning nosql and would like to understand how data should be modeled. In a typical relational database for an CMS application, for example, you may have two tables: article and author, where article have an reference ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591943",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: How do I limit the threads in a ATL DCOM service? I have an ATL service which implements a free threaded COM object. Our testers are running more and more threads against the service but this eventually results in an ugly runtime crash when it starts running out of RAM.
How can I configure ATL (or COM) to limit the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591944",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Cocos2D for First Game - Advice for Beginner I never developed in Cocos2D. However, this animated app is not easy to make with regular UIView animation and CAAnimation.
I want a number of UIImageView's (from 1 to 30) to float around the screen with the certain path and I want them to be responsive for touch (they w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591953",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to change gitosis default search path? I installed gitosis on my ubuntu desktop. But when I try "git clone git@localhost:gitosis-admin.git", it kept searching /home/git/, not /home/git/repositories. So I have to type "git clone git@localhost:repositories/gitosis-admin.git".
I guess there's something wrong with t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591958",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: C++ OpenSSL HMACSHA1 works but not how I want it to This HMACSHA1 code below works for converting "Password" and "Message" to AFF791FA574D564C83F6456CC198CBD316949DC9 as evidence by http://buchananweb.co.uk/security01.aspx.
My question is, Is it possible to have:
BYTE HMAC[] = {0x50,0x61,0x73,0x73,0x77,0x6F,0x72,0... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591967",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: counting number of occurrences of an object in a list I am trying to find the number of occurrences of an object in a list:
class Complex{
double re, im;
public:
Complex (double r, double i):re(r), im(i){}
Complex (){re = im = 0;}
friend bool operator == (Complex, Complex);
};
bool operator == (Co... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591968",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: ec2 ami for rails 3.1 apache passenger Is there an ec2 ami available with
*
*apache
*passenger
*rails 3.1
preferably ubuntu or fedora.
A: Rather than look for an AMI with the software pre-installed, simply run an official Ubuntu server AMI and install the standard Ubuntu packages for the software you want.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591971",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: HTTP Server System.out problem So I have an assignment where I have to make a HTTP Server with chosen programming language. No big deal. I have encountered a problem that I cant seem to figure out. Every time I load the homepage that and the server response, it prints out about 5 times. Cant figure out why. Okay so ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591975",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: php foreach key as a class variable Can someone please tell me if this method of doing foreach has drawbacks?
class someclass {
function foo() {
foreach ($my_array as $this->key => $this->value) {
$this->bar();
$this->baz();
}
}
function bar(){
//do something with $this->key or $this->v... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591976",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: MySQL Connector C linking problem on VS2010 I am beginning on MySQL, and I encountered the error message while compiling the code:
error LNK2001: unresolved external symbol _mysql_init@4
I have searched the web, and did everything that seems to be the problem.
#include <my_global.h>
#include <mysql.h>
#define NULL 0... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591977",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to synchronise some threads I do payment online system with asp.net mvc1.0, how can I do to allow only one person to buy something when it's stock is only one. In addtion I use other payment system(like ebay ) in this system.I mean when one product's stock is only one, and more than one person to buy it at one m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591979",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Silverlight ObservableCollection cannot get data from EntityQuery I am trying to get data that are returned from an EntityQuery
public EntityQuery<Product> GetProductsQuery()
and I am using an ObservableCollection to store them
var query = ctx.GetProductsQuery();
ctx.Load(query, op =>
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591980",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Android Image Button I Have scoured the site and several others and I am having a problem finding a way to make a clarity nice icon styled image button. The image buttons I keep using fill the content and look just distorted, I want very nice looking icons styled image buttons, and instead its smudged stamps with l... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591982",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to use Tasks to simplify Delegate.BeginInvoke/Delegate.EndInvoke? Trying to wrap my head around the Tasks class, and more specifically, the Task.Factory.FromAsync method.
Currently in my code I am doing something like this:
var handler = MyEvent;
if (handler != null)
{
handler.Invoke(this, e);
}
Unfortunat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591989",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to turn off Android phone programmatically? I want to make a lock screen application. When the phone is in the lock mode, it will turn off the phone while the USB is plugged for prevent other users from accessing the phone data. Does anyone know how to turn off Android devices programmatically so other people ca... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591993",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Zend Framework _Redirect() not working but header(location:) is working I just got a new server and zend framework seems to be working properly EXCEPT, when a member posts something , they get a white page because $this->_redirect('/somepage'); doesn't work...
Am I unaware of some php setting or vhost setting I'm s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7591999",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Variables in Redis configuration file I would like to set a REDIS_ROOT in my redis.conf file and be able to reuse that same variable across a number of other configuration points. I want to have all my logs, dumps, etc. go somewhere in this directory... something like $REDIS_ROOT/logs/redis.log.
Is there a way to s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592006",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: pythonw.exe processes not quitting after running script Every time I restart the shell or run a script and instance of pythonw.exe*32 is created. When I close out of IDLE these processes don't go away in the task manager. Any ideas on how to fix this?
Thanks!
A: Have you tried using python.exe instead of pythonw.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592008",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: xcode basic explanation needed I am actually a newby at xcode. I can make out a few things be myself but have questions about what some things do and why they are put there. I have tried to read many e-books, watched tutorials, but they never go into the basics, alway just say "Add this, Click here etc"
Could someon... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592009",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: Ideas for optimization algorithm for Fantasy Football So, this is a bit different than standard fantasy football. What I have is a list of players, their average "points per game" (PPG) and their salary. I want to maximize points per game under the constraint that my team does not exceed a salary cap. A team consist... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592010",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Trying to understand of DependencyProperty Being new to WPF, and its apparently amazing ability to change, bind, enable, and otherwise manipulate. I'm trying to get a mental overview of what is happening and hope some can either confirm or correct my readings.
Before WPF, you have delegates and events. You could h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592013",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Got ExceptionInInitializerError when mocking constructor of a class with Powermock. How to fix it? Here is my case. I have a AbstractController class. It has a sub class Controller. In one of AbstractController's methods a new ApplicationLock is instantiated. I'd like to mock ApplicationLock when writing ut for Cont... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592018",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Bitrate limitation on AVFoundation screen capture on OSX Lion I'm using AVFoundation on OSX Lion to do screen capture. Accomplished as follows:
self->screenInput = [[AVCaptureScreenInput alloc] initWithDisplayID:self->screen];
self->dataOutput = [[AVCaptureVideoDataOutput alloc] init];
self->session = [... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592022",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Debugging/bypassing BSOD without source code Hello and good day to you.
Need a bit of assitance here:
Situation:
I have an obscure DirectX 9 application (name and application details are irrelevant to the question) that causes blue screen of death on all nvidia cards (GeForce 8400GS and up) since certain driver ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592025",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Node.js + socket.io + node-amqp and queue binginds when "re" connecting thru socket.io I have one scenario which is very close to this sample:
One main screen:
*
*this screen (client side) will connect to the socket.io server thru server:9090/scope (io.connect("http://server:9090/scope)) and will send one event "... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592030",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to display the same file over the browser even if the file has been changed on the server? I am uploading a file(Image) on the server, and saving it with one unique name. Now previewing it on the browser where file fetched from the server.
Now, I changed the file(image), but save with that previous unique name ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592031",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: Fix width for table with Display Tag I want to fix the table width using Display Tag.
.displayTable table {
border: 1px solid #666;
width: 100%;
margin: 20px 0 20px 0 !important;
}
.displayTable th, .displayTable td {
padding: 2px 4px 2px 4px !important;
text-align: left;
vertical-align: t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592034",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Web Deploy Error with Azure I'm trying to deploy my web app to Azure using this method, but periodically, i get this error. Any ideas? I rebooted the instance, still happens.
Start Web Deploy Publish the Application/package to https://xxx.cloudapp.net:8172/MsDeploy.axd?site=myapp.Web_IN_0_myapp.Web ...
Updating se... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592043",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How Do I lazily load DataTypes other than Lists in Haskell I'm starting to understand the power of Haskell and how lazy loading can be exploited in ways such as
main = do
s <- getContents
let r = map processIt (lines s)
putStr (unlines r)
But the trouble i'm having is extending this kind of "Say whats in the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592044",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: understanding effect of jquery statement I was looking for an easy way to get the contents of a jquery element and came across this page: http://jquery-howto.blogspot.com/2009/02/how-to-get-full-html-string-including.html
It has the following code
var html = $('<div>').append($('#top').clone()).remove().html();
Th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592049",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Automatically filling in 0 and 0% in Excel blank cells I am trying to automatically enter 0 and 0% values in blank cells in Excel. I have a report in Excel that gets automatically filled up from SAS. After I save this report, I want the blank cells get automatically filled as 0 in numeric columns and 0% in percent c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592055",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Am I Using JDBC Connection Pooling? I am trying to determine if I am actually using JDBC connection pooling. After doing some research, the implementation almost seems too easy. Easier than a regular connection in fact so i'd like to verify.
Here is my connection class:
public class DatabaseConnection {
Connection ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592056",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "33"
} |
Q: How to build apple's opensource libc? I'm trying to build apple's opensource libc (from http://www.opensource.apple.com/source/Libc/Libc-763.11/) on my OS X 10.6.8 laptop. This is in an attempt to essentially get a locally generated replica of /usr/lib/libSystem.B.dylib, which I intend to experiment on further.
I se... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592069",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: is there limit on concurrent connection number when browser downloading html resources? Generally, in order to speed up overwhole loading, browser would open serval concurrent connection to download the resource files parallelly.
I want to know, for a certain browser, is there a limit on the concurrent connection ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592071",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: jquery change text on div I need to change only the text inside the div, where there is other elements inside it. I tried the text method but it changed the whole content of the div.
Example div:
<div class="mydiv">
MY TEXT HERE
<ul>
<li>BLAH</li>
<li>BLAH</li>
</ul>
</div>
This is what I have tried for now: ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592074",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: ZEDGraph cannot change axis color Hi I am new to Zedgraph and I can only find few examples and information.
What I need to do is simple just change the color of the axes from default black to white.This is because I want to use black fill for my panes.
So I try the following
pane.XAxis.Type = AxisType.DateAsOrdinal;... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592077",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Trying to 'grep' links from downloaded html pages in bash shell environment without cut, sed, tr commands (only e/grep) In Linux shell, I am trying to return links to JPG files from the downloaded HTML script file. So far I only got to this point:
grep 'http://[:print:]*.jpg' 'www_page.html'
I don't want to use aux... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592082",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Redirect mail.example.com to example.com/webmail Is there any way to redirect HTTP requests that go to mail.example.com (which is my mail server) to go to the webmail interface, example.com/webmail? I've tried to create a subdomain called mail.example.com, but it conflicts with my mail server and cPanel won't allow ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592088",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: Sending email with smtp.secureserver.net with C# and GoDaddy this is driving me absolutely crazy. I am trying to send an email through a web service written in C# through GoDaddy's servers (smtp.secureserver.net) but for some reason it's not working. Here's my code:
public static void SendMessage(string mailFrom, st... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592093",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Dict construction with elements in a list I have a list ['a','b','c','d']. I need to construct a dict out of this list with all the elements of the list as keys in the dict with some default value for all the elements such as None.
How to do that? Should I need to write a function for that or is there a constructor ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592097",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How can I find the references of a class, method, variable in Emacs with Etags? I'd like to find all the references to a class, method, variable in Emacs, the same way I'm able to do it in Eclipse with Ctrl+Shift+G (or Cmd+Shift+G on the Mac) once I've setup my project's ETags.
I can navigate the code fine, but find... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592099",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to use the MATLAB plot function inside a for loop I have this for loop below:
for Vsb = 0:1:5
Vtn = Vto+y*(sqrt(SurfPot + Vsb) + sqrt(SurfPot));
end
I want to plot Vtn vs Vsb for all the values of Vsb. I was trying to use the plot function but it does not seem to work.
A: the Vtn variable should be an arra... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592102",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: UIAlert to popup after the UIPicker is closed I have a UIPicker that triggers a UIAlert when a row is selected. I'm trying to have the alert popup after the UIPicker "done" button is pressed and the UIPicker is closed. At the moment the alert triggers when the row is selected. So, as someone scrolls through each row... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592103",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: jquery animate onStart callback Does jquery animate method have a onStart callback. I know about the complete callback but don't see anywhere to use other callbacks like onStart or initialize .
I want onStart callback because when I am calling animate(), it may not start immediately but queued due to previous animat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592105",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Iterate through memory editing each byte I'm writing assembly code that prompts the user for a string of lower-case characters then outputs the same string with all UPPER-CASE characters. My idea is to iterate through the bytes starting at a specific address and subtract 20H (turns a lower case to upper-case) from e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592115",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Android Viewpager with asynctasks (spinner while page is loading) I want a Viewpager that shows loading while content is coming in from the background. Basically I expect the first View to be loaded, but View+1 and View-1 will still be loading. If the user swipes to either side I want them to be presented with a spi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592117",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Need of Virtual memory? I was recently asked a question that in a computer system, if the primary memory(RAM) is comparable to the secondary memory (HDD) then is there a need for virtual memory to be implemented in such a computer system ?
Since paging and segmentation require context switching, which is purely proc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592119",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How long can a php cron job run for / am I doing it right? I have created a php/mysql scraper, which is running fine, and have no idea how to most-efficiently run it as a cron job.
There are 300 sites, each with between 20 - 200 pages being scraped. It takes between 4 - 7 hours to scrape all the sites (depending on ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592126",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Program is generating same random numbers on each run? I just finished coding a Minesweeper type game, and everything's good except for that each time I run the application, it generates the same number (I ran it 3 different times, saved the output to 3 text files and used the diff command in Linux, it didn't find a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592129",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to write rspec get statements for customized routes? I have defined a user resource, and each user has several items. Now I want to add a route for /user/:id/items(.:format), instead of defining items as nested resource, I use member route:
resources :user do
member do
match "/items" => "items#index", :via... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7592136",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.