text stringlengths 8 267k | meta dict |
|---|---|
Q: android:capitalize not working I have a TextView. I'm trying to capitalize the first letter in every word.
Here's the TextView:
<TextView
android:text="TextView"
android:id="@+id/textView1"
android:layout_height="wrap_content"
android:layout_width="wrap_content" ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573095",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Equivalent of "shift" for a hash to create a $class->next() method I almost feel like saying "it's me again!".
Anyway, here we go.
I like using while $object->next() style constructs. They appeal to me and seem "neat".
Now, when the thing I'm iterating over is an array, it's straightforward ("shift @ary or return un... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573096",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Where does the limitation of 10^15 in D.J. Bernstein's 'primegen' program come from? At http://cr.yp.to/primegen.html you can find sources of program that uses Atkin's sieve to generate primes. As the author says that it may take few months to answer an e-mail sent to him (I understand that, he sure is an occupied m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573104",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: What is mutation in cassandra? What is mutation in cassandra? What is it doing? i didnt find any full information about it...
Can you answer or share the link with manual or description
Thanks
A: Mutation is a thrift-generated class defined in the cassandra.thrift file. You can find this file in the interface fold... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573106",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Android kernel source code I downloaded Android 2.2 source code a long time ago but it didn't have the kernel source code. I looked online and it seems like there is a separate Android kernel source I should download.
Someone gave me this address
git clone https://android.googlesource.com/kernel/common
but I think... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573110",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Delete item from list in Python while iterating over it I'm writing a round robin algorithm for a tournament app.
When the number of players is odd, I add 'DELETE' to the list of players, but later, when I want to delete all items from schedule list that contain 'DELETE', I can't -- one is always left. Please take ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573115",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: how to compare two objects using asp.net mvc these are two same object but my condition is going into else block. how to compare two objects values same or not?
baObject b = new baObject();
baObject b1 = new baObject();
if (object.Equals(b, b1))
{
// Equal
}
else
{
// not equal
}
what about this kind of behav... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573116",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Linq to entities in asp.net and generic delete method I am having trouble creating generic delete method, not even sure if this possible. I have a delete method which will delete record from db based on entity type and row id value (pk),
that works ok but it needs to know the type in advance. In some cases I can onl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573117",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: CSS Form Layout funny I have a weird problem. I have a ASP.Net MVC 3 site, containing a user registration page with the following markup:
<div>
<fieldset>
<legend>Personal Information</legend>
<div class="editor-label">
First Name
</div>
<div class="editor-field">
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573118",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: iPad/iPhone double click problem I'm having a very similar problem to iPad/iPhone hover problem causes the user to double click a link where a user tapping a link has to tap twice to actually go to it.
I implemented the solution in that question, but I have a new problem now. The redirection happens when the user t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573126",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: javascript validation two fields comparation I have two fields in a form
<div class="form">
<label class="title">{'webmasterSubmitWebsite_rss_feed_title'|lang}</label>
<div class="infos"><input type="text" class="input_text_large" name="rssTitle" value="" /> <img src="{"/templates/$templateName/images/icone_info... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573127",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Handling ViewExpiredException depending on the current view I am using JSF 2.0 and Primefaces in my project.
I have two xhtml pages namely Cars.xhtml and Bikes.xhtml.
I am using ViewScoped backing beans.
Currently If get view expired exception from any of the two pages,im handling it in the web.xml.
through the erro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573135",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Specializing STL algorithms so they automatically call efficient container member functions when available The STL has global algorithms that can operate on arbitrary containers as long as they support the basic requirements of that algorithm. For example, some algorithms may require a container to have random acce... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573139",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to use ddply to add a column to a data frame? I have a data frame that looks like this:
site date var dil
1 A 7.4 2
2 A 6.5 2
1 A 7.3 3
2 A 7.3 3
1 B 7.1 1
2 B 7.7 2
1 B 7.7 3
2 B 7.4 3
I need add a column called wt to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573144",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: How to trigger a new view when MPMoviePlayer stops playing? I'm new to iOS programming, and although I understand ObjC, It seems to me there is a lack of fundamental iOS programming knowledge. I'm doing the project for iPad where I need to show videos in fullscreen and some additional information on separate views (... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573146",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to stop a WCF service on IIS from becoming idle .NET 4.0/IIS 7
What is the best way to ensure that a WCF is always available on IIS? Currently if a service is not used it goes to sleep and takes approximately 10 seconds to wake up.
Should I change the idle time-out from the default of 20 to 0? Also, would the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573149",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: error_reporting(0) throws 500 error So - strange situation I got here.
The statement error_reporting(0); has been giving me a server 500 error.
However, error_reporting(1); works just fine..
And its killing me, too many warnings for some of my URL validators. What's up with this? Any idea on how this can be fixed?
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573151",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Add banner to corner of wordpress with css How can I add a banner to the corner of a wordpress post using css or within the post itself. I've attacked a screen of what I'd like it to look like, but I don't know how to get it done.
A: Add a background image to your post class and set the background-position propert... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573158",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-2"
} |
Q: Conditionally delete XML elements in XML field in SQL Server using T-SQL I would like to conditionally remove elements in an XML field on SQL Server 2005. For example, I have the following data:
<stats>
<stat date="2011-09-25 00:00:00" val="1"/>
<stat date="2011-09-26 00:00:00" val="5"/>
<stat date="201... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573160",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: javascript: object property is array, but append isn't working var objs = {
'prop': []
}
objs['prop'].append('q');
Error: TypeError: objs.prop.append is not a function
Why this code is not working ?
Why console.log(typeof(objs['prop'])); is object not array ?
A: Because there are no associative arrays in JavaS... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573161",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Is it possible to train Rhinomocks for arbitrary input? I am trying to set up a unit test for a piece of code that uses a spelling corrector. I have the code properly dependency injected, so setting up the stub in Rhinomocks is not a problem, but the block of text I've created for the test is a good 50 words long a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573162",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Creating A C# & XNA 'Monster Dash' Like Game I decided that my last year C# project would be a 'Monster Dash' like game, I would develop it using C# and XNA, and it would be targeted for PCs, I am using Microsoft Visual Studio 2010, and XNA Game Studio 4.0. The game would be a 2D game, not 3D.
Thinking on the develo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573165",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: PHP Nested Static Variable Access for Dependency Injection I would like to use this pattern to enable dependency injection in my code.
I feel that it keeps with the play-doh nature of dynamic languages [1].
class A {
static $FOO = 'Foo';
function __construct() {
$this->foo = self::$FOO::getInstance();
}
}
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573166",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: WatiN, IE instances and grabbing them by their hWnd value I am currently using WatiN to automate a proprietary website at my work, and am running into an issue with being able to grab an IE session by its hWnd value.
As of this writing, I can start IE, handle the pop-up that occurs (the site uses JavaScript to gener... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573168",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Returning strings in PERL I am trying to get SOAP to return a message, at the moment it just returns hello world.
package RAM;
sub ram {
#!/usr/bin/perl
use Sys::MemInfo qw(totalmem freemem totalswap);
return SOAP::Data->name('result')->type('string')->value("hello world");
}
1;
I am trying to get SOAP to return:
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573175",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Routing for multiple controllers for a single resource in Rails 3.1 I asked a question similar to this one about a week ago, but this is a slightly different perspective on it. The nature of the question involves being redirected to the correct controller.
I have a single resource, posts, and I have 4 different cat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573177",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: XSLT ClassCastException in WebSphere when Spring tries to create an AnnotationMethodHandlerAdapter When starting WebSphere, I get this exception:
Could not instantiate bean class [org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter]:
Constructor threw exception; nested exception is java.lan... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573179",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Insert form data into database Is it possible to just iterate through the post results and insert them into the appropriate fields in a table? Instead of doing Request.Form["something"] for each one?
A: Yes:
Request.Form is a NameValueCollection. This means you can refer to specific keys how you are already doing ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573185",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Different pages for different login roles I'm a beginner in JSP. While developing a web application for a sample scenario,
I came across this subtlety.
I have the following pages:
*
*index.jsp
*login.jsp (and LoginServlet.java)
*account.jsp
To facilitate code reuse I divided all pages into 3 parts - menu-hea... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573186",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Unable to populate lsitbox in asp.net web application I am trying to populate a list box from a customers table in SQL database.I tested with WPF list box the code is working good but when i try to implement in asp.net web application i am unable to populate the list box. Here is my code
try
{
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573187",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to capture console output of Eclipse plugin with custom Launch Configuration? I'm writing an Eclipse plugin with a custom launch configuration, i.e. a launch() method inside a subclass of LaunchConfigurationDelegate. This method essentially just calls Runtime.exec(), but when I write to System.out from within la... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573188",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Can I access a property from my manifest.json in my extension's JavaScript files? I'd like to refer to the version number as defined in my manifest.json in my extension's JavaScript files.
Is there any way to do this?
A: I think that this is what you're looking for http://www.martinsikora.com/accessing-manifest-js... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573191",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "48"
} |
Q: Impersonation in .NET in Windows 7 (Requested registry access is not allowed) So I am using a user to run the following code that is a member of the "User" group on a Windows 7, x64 machine. I am trying to use impersonation (by logging in as a user that is part of the Administrator group) to allow the current user t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573192",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Using pastebin API in VB .Net I have a small problem, I've just changed from the public Pastebin API to the new API. I get an invalid api error: Bad API request, invalid api_option
Here is my code:
Dim Exposure As Integer = 0
System.Net.ServicePointManager.Expect100Continue = False
If ComboBox1.Text ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573193",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Html select dropdown list - how to choose the selected value from server code I have a select list say of states in the country, which i have in a helper to include easily in any form. (removing most options to make it brief).
I have the value of the current selection stored in the database say "CA". How would i set... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573195",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: how select second item az default in dropdownlist? i have a dropdownlist, in mvc 3 razor:
@Html.DropDownList(
"SelectedLicensesID",
new SelectList(Model, "LicensesID", "LicenseUI"))
It contains 5 items. How can i set second item as the default item?
A: It depends, what's it's LicensesID value. ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573196",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: to unicode or not to unicode I'm getting a value from the registry. This value might have double byte characters in it.
I will later have to transfer this across the network to a C# client to display. C# is all unicode.
The function returns MBCS if you call it non-unicode.
What should I use?
string result = string... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573200",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Core Data Model change app update I would like to update my app, but I have completely changed the data structure, so is the Core Data model entirely different. Now, the data in the app does not have to be preserved, but you can't just update the app with this new model as it will crash.
What is the best way to upda... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573201",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Take a temporarily control of the system using Java I have developed an app for showing some information to the employees of a company. One of the specification was that this information must be seen at least 1 time by the employee once a while. For this purpose, I want to take the maximum control of the system for ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573203",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: mySQL Nested Update using COUNT/MIN/MAX from another Table I have two large tables, products (500k records) and store_products (> 3mm records). Products is the master and product_stores is individual locations with the product.
I need to run a single QUERY totaling up information from product_stores and updating th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573209",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: MSAccess VBA code not working on second run The below code is bound to a button. For some reason the below code executes correctly the first time. On the second time, for some users, it does not populate the fields on the website. What could the issue be?
Me!WebBrowser0.Navigate "http://bk00app0001/PMD Image Upload/... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573213",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: jQuery and the this object jQuery is too overpowering :(
String.prototype.trim = function () {
return this.replace(/^(\s| |\u00A0)+|(\s| |\u00A0)+$/g, "");
}
when I try to add the above code, I get "this.replace is not a function".
I realise that jQuery references itself as this, so how are you meant ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573214",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: InnerHTML doesn't work in FF?
i'm pretty new to Javascript and basiclly everything related to web
coding. i have a simple problem using InnerHTML in FF, i hope you can
help me.
i'm using this code, that should generate a simple html input line,
and in IE it works fine (although when i load it i get the "shoul... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573220",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Two Values in Dropdown Access 2007. Is there a way to display two values in a combobox. I realize the combobox is bound to a field in a table, and it can only be bound to one field, but when you click the combobox I have it showing two field, then when you choose and release we would like to display both values. I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573222",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Returning an exit code from a shell script that was called from inside a perl script I have a perl script (verifyCopy.pl) that uses system() to call a shell script (intercp.sh).
From inside the shell script, I have set up several exit's with specific exit codes and I'd like to be able to do different things based on... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573224",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Is this a correct way to find the derivative of the sigmoid function in python? I came up with this code:
def DSigmoid(value):
return (math.exp(float(value))/((1+math.exp(float(value)))**2))
a.) Will this return the correct derivative?
b.) Is this an efficient method?
Friendly regards,
Daquicker
A: Loo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573229",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: New Open Graph Beta meta tags? I cannot find confirmation on any of the docs pages - does the new Open Graph Beta include new meta tags, other than those defined on the OGP page?
A: You can find a list of the OG: tags Facebook is using mid-way through their documentation page at http://developers.facebook.com/docs/... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573234",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: json for parsing video for iOS I have a video file stored in json(in a URL), that requires a jsonp parse request to play, and I need to do this in an iPad app. I am not sure where to start, I know how to parse data with json. But I need to figure out how to parse video and then play it in an app.
Thanks!
EDITS:is t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573242",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: PHP reload page when adding forms (maybe needs ajax) Sorry for maybe incorrect title for the topic, but this is the best that I came up with.
So, I'm building admin panel for a website.
I have a page, and in some part of the page, i'd like to refresh it and load another form.
let's say add a schedule, and somewhere ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573243",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: UIActivityIndicatorView not working when added to UITableView I'm trying to add a UIActivityIndicatorView to the center of my UITableView while it waits for the UITableViews data to load. I am doing this as follows:
UIActivityIndicatorView *activityIndicatorTemp = [[UIActivityIndicatorView alloc] initWithActivityInd... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573244",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to access the window object from the document object Is it possible to access the window object directly from the document object in Javascript?
For example:
// window.frames[0] returns the document object of the first frame or iframe found on the page
myFunc(window.frames[0]);
function myFunc(doc) {
// I wan... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573248",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Right way to set the OAuth Authorization header? I want to set a request header for a url xyz.com
is it the right way to set it in php?
header('Authorization: AuthSub token="xxxxxx"');
header('location:https://www.google.com/accounts/AuthSubRevokeToken');
I am trying to set the header for this URL for a call.But th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573251",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Method for runtime comparison of two programs' objects I am working through a particular type of code testing that is rather nettlesome and could be automated, yet I'm not sure of the best practices. Before describing the problem, I want to make clear that I'm looking for the appropriate terminology and concepts, s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573253",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How do you minify and/or compress JavaScript that is in a php file? I am looking at optimization options, and after checking SO questions, I don't quite see an answer for what I am trying to do. Hopefully that doesn't indicate that what I am doing is a bad practice!
I have an intranet application that loads page con... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573255",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Problems doing syscall hooking I use the following module code to hooks syscall, (code credited to someone else, e.g., Linux Kernel: System call hooking example).
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/unistd.h>
#include <asm/semaphore.h>
#include <asm/cach... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573256",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Cocos2D: Passing a CGPoint through CCCallFuncND What is the appropriate way to call a method with an action, and what should the method itself look like for passing a CGPoint parameter? I've tried to look up examples online without much luck, so I've been pretty much guessing.
What I have tried is this for calling i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573257",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: jsTree + jsTreeGrid -> render icons for newly created node I successfully implements jsTree + jsTreeGrid in admin panel for
managing categories for products.
The only one problem is, that when i create new node via right mouse button context menu, the newly
created row does not contain columns with icons set in jsTr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573262",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Convert Image to Byte[] I have an image that sits inside some folder in my MVC3 application. In my controller, how do I convert that image into a Byte array.
A: byte[] buffer = File.ReadAllBytes("foo.png");
and because that's inside a controller you probably want to calculate the path relative to the root:
string ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573263",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: how to write to file in an multithreaded environment I have a program that runs on multithread but all of them need to save results to same text file
I get access violation error
how can i avoid doing that
A: Wrap file IO into a lock statement:
private static object _syncRoot = new object();
and then:
lock(_syncRo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573264",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Just switched to JRuby, having some trouble getting rails started I just installed JRuby on my mac using the following command:
rvm install jruby-1.6.4
And then installed rails using the following command:
rvmsudo gem install rails
When I try to start my server, I get the following error:
Invalid memory access of ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573267",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: what is the difference between ? and T in class and method signatures? why does
public interface ArrayOfONEITEMInterface <T extends ONEITEMInterface>{
public List<T> getONEITEM();
}
compile, but not
public interface ArrayOfONEITEMInterface <? extends ONEITEMInterface>{
public List<?> getONEITEM();
}
what ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573269",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: How do I lock files using fopen()? I wonder if there is any way to lock and unlock a file in Linux when I open a file using fopen (not open)?
Based on Stack Overflow question C fopen vs open, fopen is preferred over open.
How can I implement my own file lock (if possible) by creating and deleting lock files?
A: Fil... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573282",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "22"
} |
Q: Adding class attribute from code behind I have the following code:
div1.Attributes.Add("class", "displayNone");
it works on page load but doesn't on an OnClick event.
This is because my html <div id="div1"></div> seems to change to:
<div id="div1_ucSomeControl_SoemthingElse"></div>
after the page has been rendered.
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573287",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Perl threads and hash keys If a have a hash shared between 2 threads and if I ensure that thread1 just interacts with key1 and thread2 just with key2, can I assume it as thread-safe? If so, do I need to create key1 and key2 before share the hash over the treads or can each thread create its own key?
Is there any pla... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573288",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Bing maps with world spanning polygons not working in IE7 and IE8 I have an application using Bing Maps that draws polygons on a map. For most polygons, the system works fine, and shows the shape correct. However, with huge polygons (covering almost the entire planet), I get errors in IE7 and IE8. The errors are rel... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573295",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Semaphores in operating system Well, what exactly changes the context of processes.
Say i have a algo, in which say
S=0;
begin
signal(S);
<critical>
wait(S);
end
Now in this, when my signal is executed, will the process be preempted and the process from the queue will be executed?
A: I think what you want to do th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573296",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How does Aspect Oriented Programming (AOP) influence code quality? Aspect Oriented Programming (AOP) seems like an interesting concept. At first I was pretty enthusiastic about it, but as I read more and saw the use cases people were describing I grew disappointed.
A lot of sites I saw, plus a presentation from the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573300",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: SqLite3 NFS mount issue with locking - can I use something like CIFS nobrl? I'm having a locking problem where an SQLITE3 databse is permanently locked when created on an NFS file system. I have read that an option called nobrl can help this issue when the file system in question is CIFS. (its an option to the moun... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573301",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Can you do entity inheritance in EF on an entity that is mapped to stored procedures? I have a question about inheritance in Entity Framework 4. We are using a database-first approach and would like to restructure our model to use inheritance. Here is a white board mock up of the hierarchy we would like to use in ou... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573305",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Google Apps Script UrlFetchApp Exception Im in the process of creating a custom timesheet using Google Docs and Google Apps Script. One of the requirements is to save the timsheet as a PDF when the user submits the timesheet. Heres what I currently have:
function createPdf(){
var ss = SpreadsheetApp.getActiveSpre... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573309",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to run queries in the background I have listed of products with different category. I have to sort them. Because of the queries, It is taking more time to load. Between two activities, the screen is coming black. I want to run the query in the background. How can I do that and how to use its result in main activ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573310",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Facebook Canvas application with Rails 3: Detect if user is a fan Hello and excuse me again
I am trying to know if user in my canvas application is fan or not. I am working with Rails 3 with fbgraph gem.
So in my controller I try:
def find_auth
if params.has_key? :signed_request
session[:signed_request] =... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573318",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: DB2/iSeries SQL clean up CR/LF, tabs etc I need to find and clean up line breaks, carriage returns, tabs and "SUB"-characters in a set of 400k+ string records, but this DB2 environment is taking a toll on me.
Thought I could do some search and replacing with the REPLACE() and CHR() functions, but it seems CHR() is n... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573321",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Powershell - assign source code of ASP page to a variable probably it is a silly question, but I couldn't find the answer in Google so far.
I need to read the HTML source code of a page
http://Mysite/ViewRequest.aspx?request_id=xxx.
I've setup following
wc = new-object -com internetexplorer.application
$wc.visible ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573326",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: php counter is being reset each loop I've got a rather complicated set of loops that pulls data out of mysql and compares it to values in an array and increments a counter. When I echo a flag when the counter is incremented, I get a bijilion flags (there're like 2600 records returned from the mysql query). But each ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573331",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Trying to pass struct with Vector4 array to cbuffer I'm playing around with SlimDX (with DX10/11) a bit and I got some nice results so far, but I'm stuck on passing an array of Vector4s to the shaders.
If I try the following struct:
[StructLayout(LayoutKind.Sequential)]
public struct PerFrameBuffer
{... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573333",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Architecture behind large-scale social sites like Twitter - help with a new startup. I apologize in advance for this not being a specific programming question, but I believe this is the best place for such an inquiry.
Basically, I have an idea for what I believe to be an interesting social networking site (not just ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573337",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Put condition on select command : charindex - SQL I need help with the following query. I want to put a condition on the returned value of select command which is an integer between 0 and any number.
DECLARE @month varchar(50);
set @month ='01-03-05-07-09-11'; <--- clarification: these are all months
Declare @cur_... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573339",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Method Sleep Until Notification Is there any way that I can have a method sleep until a notification is posted? This is for an asynchronous NSURLConnection. I cannot move to a synchronous connection for multiple reasons.
A: Methods cannot "sleep"; that only applies to threads. Just split the code that needs to wait... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573350",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Regex validation of operators in conditional statements I've built a dynamic conditional validator in C# that can validate if a condition written in a textbox input is true or false.
string a = "25 > 20";
bool aResult = ValidateInput(a); // Will generate true
string b = "10 != 10";
bool bResult = ValidateInput(b); ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573351",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What is the difference between no-cache and no-store in Cache-control? I don't find get the practical difference between Cache-Control:no-store and Cache-Control:no-cache.
As far as I know, no-store means that no cache device is allowed to cache that response. In the other hand, no-cache means that no cache device i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573354",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "77"
} |
Q: JQuery Tokenizing Autocomplete w/ trigger key Is there a good solution to create textfield inputs like those of Facebook or Google+ status updates and posts where a tokenizing autocomplete is allowed to happen after certain trigger keys like "@" or "+"?
It seems like there are a couple of good tokenizing autocomplet... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573360",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Publish/deploy exe from Visual Studio 2010 Trying to deploy a little C# app to another server...in visual studio am doing the publish from the menu,it creates a publish folder & subfolders,etc. Copy those to another machine and try to run the setup.exe there - gets following error, also tried just copying the exe c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573363",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: AIR multiple HTTPService call Mac OSX I am instantiating and sending multiple instances of HTTPService
On a Mac, however, many of the calls fail with a 2032 error.
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adob... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573365",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: In-place edits with sed on OS X I'd like edit a file with sed on OS X. I'm using the following command:
sed 's/oldword/newword/' file.txt
The output is sent to the terminal. file.txt is not modified. The changes are saved to file2.txt with this command:
sed 's/oldword/newword/' file1.txt > file2.txt
However I d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573368",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "242"
} |
Q: Silverlight 4 Overloaded Textbox's textchanged event is fired by parent textbox I have an custom textbox that I got from http://blog.roboblob.com/2010/07/16/custom-silverlight-textbox-control-that-immediately-updates-databound-text-property-in-twoway-binding/comment-page-1/:
public class ImmediateTextBox : TextBox
{... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573374",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Base 64 encoder on localhost? I've placed this script on my localhost but it appears to be malformed (should display an input field for encoding and one for decoding base64.
The author's site has apparently gone dark. Any ideas how to fix it or get a new one?
<?
// PHP OBFUSCATOR
// (C)2003 Richard Fairthorne -- htt... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573377",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: basic question about setting up event listeners in jquery I come from as3 and I'm a bit lost with jQuery.
I have the feeling I haven't grasped the concept of how events work with jQuery, or javascript for that matters. I'm trying to do this:
animation 1 ends --> load image --> animation 2 starts
By now I'm doing t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573378",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to create a multiline string or multiline label as a CGPath in iOS? Does the API support this? If not, how could I do it?
There is CTFontCreatePathForGlyph in Core Text, which can translate a single character into a path. I could use that in a loop to create my string as a path, but I'd have to deal with spacing... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573383",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Solr: match results with and without whitespaces The data in our solr field looks like this:
<str name="property_Info_Hd">320 GB SATA 7200RPM</str>
<str name="property_Info_Hd">320GB SATA</str>
<str name="property_Info_Memory">4 GB of DDR2</str>
<str name="property_Info_Memory">2GB of DDR3</str>
The field is dynam... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573385",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: In Java how to extract string from the phrase with split() function Can I extract string from the phrase using split() function with subphrases as delimeters? For example I have a phrase "Mandatory string - Any string1 - Any string2". How can I extract "Any string1" with delimiters as "Mandatory string" and "[a-zA-Z... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573388",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Datagrid MouseOver and Selected States when using arrow keys I have a wpf datagrid. I have added styling to show a mouseover color on a row.
What I am trying to achieve is when the mouseover appears, and a user starts using the arrow keys to navigate up and down, the mouseover needs to disappear and only the row tha... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573393",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Pushing JAX-B object over network I have some interface description in text describing a RESTful webserver. I also have JAX-B annotated objects that I want to push and receive from that interface.
I'm not sure how much support for such a task is already implemented. There is some Jersey thing around, but is that sti... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573395",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Can pointers be used with Dictionary? Let's say I have the following class:
public class MyClass {
public string FirstAttribute {
get {
return Attributes["FirstAttribute"];
}
set {
Attributes["FirstAttribute"] = value;
}
}
public string SecondAt... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573399",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: API usage conventions Im quite new to the usage of API in web development. Im working on a web application in python/django that makes ajax jsonp requests to the giantbomb api. As I learn how to use this api to get the info want, im beginning to realize certain things should probably be handled better in my code f... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573401",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I programmatically add new row to gridview on button click handler? This is my markup:
<asp:Button runat="server" ID="btnabc" Text="Hello"
onclick="abc_Click" /> <br /> <br />
<asp:GridView runat="server" ID="test" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField>
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573405",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Ruby singleton class I am unsure about the difference between this.
def String.hello
puts "hello there"
end
and
x = Person.new
def x.hello
puts "hello there"
end
From my understanding the second code block will create an object of class Person. When I do the def x.hello it creates an anonymous... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573407",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Redirect all file IO in Windows I'm using a virtual file system (PhysFS) and I'd like the entire application to do file IO through this VFS (that includes third-party libraries).
How can I redirect all file IO operations (C FILE* objects and C++ streams) through this VFS in Windows?
Also, a related question. Is file... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573410",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: PHP model design with caching I'm designing the model for an application that will get/set objects in a remote database. For performance, we need to cache the data locally. I've read in various threads that it's best to put the caching logic into a parent model rather than the main controller. This is probably a bas... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573414",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: On Linux, how do you determine which individual pages are resident? How can one determine which individual pages are resident (i.e., committed in RAM)? On Linux, /proc/pid/smaps gives, for a fixed set of ranges, how many bytes are resident in that range, but this information doesn't tell you what actual ranges of m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7573418",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.