text stringlengths 8 267k | meta dict |
|---|---|
Q: Windows Phone - SavePicture - InvalidOperationException Why this code throws InvalidOperationException no metter if I am conncted to PC or not?
MemoryStream ms = new MemoryStream();
picture.SaveAsJpeg(ms, 480, 800);
ms.Seek(0, SeekOrigin.Begin);
MediaLibrary l = new MediaLibrary();
l.SavePicture("test11", ms);
l.Dis... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588582",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: how to z-index parent's background So here is what I'm trying to do.
<div class="gallery">
<a href="link_to_large_image.jpg" style="z-index:2; position:relative; background: url(roundedcorners.jpg) norepeat;">
<img src="thumbnail.jpg" style="z-index:1; position:relative;" />
</a>
</div>
In the gallery I'm trying to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588583",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Android, AsyncTask, check status? This is my code:
In onCreate:
new LoadMusicInBackground().execute();
Then towards the end of my main class I have this code
/** Helper class to load all the music in the background. */
class LoadMusicInBackground extends AsyncTask<Void, String, Void> {
@Override
protect... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588584",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "40"
} |
Q: Is WPF required to learn XAML I am planning to learn XAML. I wanted to know if I should first learn about WPF and then start XAML?
Please advice.
A: It depends on what your future plans are with XAML/WPF. If you want to get up and running and use it as quick as possible you might consider starting with XAML and WP... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588587",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: DbUnit testing a PostgreSQL database using JPA without Hibernate or Spring I'm trying to write a Java EE 6 application using JPA but without using Hibernate or Spring. I used Netbeans to generate the JPA classes, and I created the tables in Postgres, but I am not able to run DbUnit tests in those JPA classes.
I have... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588593",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Testing whether an ordered infinite stream contains a value I have an infinite Stream of primes primeStream (starting at 2 and increasing). I also have another stream of Ints s which increase in magnitude and I want to test whether each of these is prime.
What is an efficient way to do this? I could define
def isPri... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588596",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Is it possible to mock a type with an attribute using Rhino.Mocks I have this type:
[RequiresAuthentication]
public class MobileRunReportHandler : IMobileRunReportHandler
{
public void Post(MobileRunReport report)
{
...
}
}
I am mocking it like so:
var handler = MockRepository.GenerateStub<IMobileRunRepor... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588597",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: extjs4 how to automatically set grid column width to max width of contents? If you create a grid with no column width or flex attributes, the columns will default to 100px each.
If you then double click on a header separator, the column to the left auto expands to the size of the largest data item in that column.
Is... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588598",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Is there something like data-* attributes for css? I want to pass a value that's set in a stylesheet so it can be read by javascript/jQuery? I thought of creating an invisible element and giving it a value, but then I would have to include that element in all the pages, which is pretty hacky. Just want to know if th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588604",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Getting an Error when trying to connect Visual Studio application to Oracle I am new to Oracle.I amy trying to connect my Visual Studio 2010 VB application with an Oracle Server on a remote server.
I configured my tnsnames.ora by proving the host name and service name. When I tried to test the connection using the A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588605",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: ClickOnce application won't accept command-line arguments I have a VB.NET application that takes command-line arguments.
It works fine when debugging provided I turn off Visual Studio's ClickOnce security setting.
The problem occurs when I try to install the application on a computer via ClickOnce and try to run i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588608",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to have SQL INNER JOIN accept null results I have the following query:
SELECT TOP 25 CLIENT_ID_MD5, COUNT(CLIENT_ID_MD5) TOTAL
FROM dbo.amazonlogs
GROUP BY CLIENT_ID_MD5
ORDER BY COUNT(*) DESC;
Which returns:
283fe255cbc25c804eb0c05f84ee5d52 864458
879100cf8aa8b993a8c53f0137a3a176 126122
06c181de7f35ee... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588612",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "44"
} |
Q: Is it possible for JavaScript to prevent people from right clicking to save images? I have been studying JavaScript and I've found so many things what it can do and I feel comfortable using this language, but I'm getting worried about the right click savers out there. Is there a way to prevent people from ever savin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588615",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Help with Ajax post to action method I am a new to MVC an need a little help.
In my view I make an ajax post as below.
function PostCheckedPdf(e) {
var values = new Array();
$('input:checked').each(function () { values.push(this.value); });
$.post("/UnregisteredUserPreview/Downl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588619",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: os.walk multiple directories at once
Possible Duplicate:
How to join two generators in Python?
Is there a way in python to use os.walk to traverse multiple directories at once?
my_paths = []
path1 = '/path/to/directory/one/'
path2 = '/path/to/directory/two/'
for path, dirs, files in os.walk(path1, path2):
my_... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588620",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: FTP added extra character I have a instream that takes in raw binary data from Bluetooth on Android 2.2 phone. The data coming in goes into a buffer 1024 in size. I read() the data and then take that and write to a file. I send that file via FTP to my computer. I noticed a disturbing pattern when ftp'ing that an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588625",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to parse YouTube Playlist into ListView I have a GDATA link that contains a playlist from a public YouTube Channel. I need the videos of this playlist to appear in a listview. Is this possible? If os, how can I implement it? Could someone point me towards an example?
EDIT:
Here is the gdata link I need to parse:... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588634",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Matlab: how to find which variables from dataset could be discarded using PCA in matlab? I am using PCA to find out which variables in my dataset are redundand due to being highly correlated with other variables. I am using princomp matlab function on the data previously normalized using zscore:
[coeff, PC, eigenval... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588637",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Authorize attribute Need help on this authorize code to define a specific sub group in my controller.
[Authorize(Roles = "RABEE\domain user accounts\zam gas industry\california\domain local groups\ZamReader")]
RABEE is the domain name that is why I have \
Group Name i have added users is: ZamReader
what I am doing ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588645",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Java setText make application error I have simple application in Android
main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Te... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588648",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: The Live stream Plugin - When people share it post to wall. the link back does not go to my site,instead my fb app, how to make go to my site? Newbee - The Live stream Plugin - When people share in the discussion it posts to their wall. The link back from their wall does not go to my site,instead to my fb app. I do ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588656",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Force Hibernate Insert Without Select Statements I am attempting to insert a new record into a table that I know is unique before hand. I have tried calling save() on the object, but that does a bunch of SELECT statements before doing any INSERTs, which I don't want to do because I know the object is already unique.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588657",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: vba positive lookahead is too greedy I'm using Access VBA to parse a string with regex. Here's my regex function:
Function regexSearch(pattern As String, source As String) As String
Dim re As RegExp
Dim matches As MatchCollection
Dim match As match
Set re = New RegExp
re.IgnoreCase = True
re.pattern = pattern
S... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588658",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: I don't understand the code for avoiding DoubleRenderError The official page has this snippet:
def show
@book = Book.find(params[:id])
if @book.special?
render :action => "special_show" and return
end
render :action => "regular_show"
end
Why isn't this equivalent?
def show
@book = Book.find(params[:id... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588661",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to programatically determine if an Android application is obfuscated? I have and Android app where various people test both development builds and release builds. The development builds are not obfuscated and I would like to be able to programatically determine at runtime if the application has been obfuscated o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588664",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Ruby On Rails jQuery AJAX Post Ok, in PHP I can do this in 5 minutes. With Rails I am completely lost. I am so new to Rails and I have a requirement to do more advanced stuff with it then I am comfortable with currently. The Big guy decided lets go Rails from PHP. So its crash course learning. Fun times..
I understa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588665",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: T-SQL (date) - how to get value within one hour? I am looking for an optimal decision of how to get table values according to their date and time but within just ONE past hour.
I mean something in this way (a pseudocode):
SELECT value FROM Table WHERE date BETWEEN getdate() AND getdate()-ONE_HOUR
For the purpose o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588671",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: jQuery: Why is it that `:first` only returns the first of the result array and not of the selector http://jsfiddle.net/vol7ron/s5fS8/
*
*HTML:
<div class="container">
<span class="foo">a</span>
<span class="bar">1a</span>
<span class="bar">2a</span>
</div>
<div class="container">
<span cla... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588674",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: why doesnt my jsp request.getParameter() get the data? ive created a form in which user will check off checkboxes, select radio buttons, and drop downs in 1.jsp...
i want to use the information from 1.jsp to determine the output of 2.jsp...
jsfiddle for 1.jsp: http://jsfiddle.net/VWczQ/
action="/2.jsp">
now in 2.js... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588677",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: In .NET, System.Threading.Thread.CurrentPrincipal isn't updating I'm missing something elementary here when debugging some .NET code:
public static void CreateServiceSessionStore()
{
ServiceSessionStore serviceSessionStore = new ServiceSessionStore();
serviceSessionStore.SetIdentity(System.Th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588678",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Oracle ODP.NET Cursor Leak? I'm running into an open cursor limit issue with using the following code. The open cursor limit on the oracle db is set to around 1000. The following code seems to hold onto the cursors even though I've got everything in a using statement (I think) that requires it. (Note, I don't nee... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588689",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: User authentication for mobile clients in RESTful WCF 4 service I'm trying to develop a web service to be consumed by mobile clients (iOS clients, for now), I read that RESTful services are much more lightweight than SOAP services, so I'd like to try my hand at this.
Most methods will require authentication, but I'm... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588691",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Play! - End Job dynamically So, let's say I start a job from a controller asynchronously and then render some template.
MyJob job = new MyJob();
job.doJob();
render();
MyJob looks like:
import play.jobs.*;
public class MyJob extends Job {
public void doJob() {
// execute some application logic her... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588694",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How does Mongoid "criteria" work? I'm trying to do something straight forward such as:
User.all(:criteria => {:project_id => 2})
This returns an instance of Mongoid::Criteria
What can I do with this criteria? What if I just want the array of documents returned for further evaluation?
A: Criteria is something like ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588700",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Dynamically generate a webpage in GWT I have a unique challenge that I'm not sure how to approach:
I need to manufacture a new HTML page from scratch, one that contains a script tag and a paragraph tag with some words in it. Very simple! Once the page is built, I just need to open it in a new tab. As long as a I can... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588701",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Jquery, Ajax tooltip help im using a Jquery + Ajax tooltip which displays a box displaying the context thru AJAX, but the title of the tooltip box is set to be "kbay.in" and the text in the "a" tag ,, now how do i change it to display the title as the value, id, name ,or anythin else of the "a" tag , than the text... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588702",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Multiline Regular Expression replace Ok, there's lots of regular expressions, but as always, none of them seem to match what I'm trying to do.
I have a text file:
F00220034277909272011
H001500020003000009272011
D00150003103497000040050002000000002500000... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588706",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Fetch Data by variable with Javascript How would I go about fetching a piece of text that has been outputted via a piece of javascript code and assigning it to the end of the link in the below script:
$(document).ready(function(){
$(document).bind('deviceready', function(){
var name = $('#name');
var logo =... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588712",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Returning *Bare* JSON from WCF Web Service I have a WCF web service that returns JSON data back to an app (not an ASP.NET web app.) Here is the code:
[ServiceContract(Namespace = "Navtrak.Services.WCF.MobileAPI")]
public interface IJobServiceJSON
{
[OperationContract]
[ServiceKnownType(typeo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588713",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Keyboard dismisses after multiple UIAlertViews are opened I am having a weird issue with my keyboard automatically closing and then reopening when I open multiple UIAlertViews. If I have a keyboard (from a separate UITextField) and I display a UIAlertView, then upon dismissal of that alert I open another (opening t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588714",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Get lightbox(or its alternatives) to dynamically show a gallery when a link is clicked Note: I have used lightbox and its many alternatives in an attempt to fix this and im using clearbox at the moment.
The Problem: Currently i have javascript code that depending on the element that is clicked, the modal popup of th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588716",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: static or objects what's better in this case? I have WCF method that looks something like this:
public GetRecordsResponse GetRecords(GetRecordsRequest request)
{
GetRecordsResponse response = new GetRecordsResponse();
Util.GetRecords.VerifyMandatoryParameters(request);
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588717",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Nested EditorTemplates in Telerik MVC Grid Edit Popup Window Not Displaying in Custom Edit Template I have a grid using AJAX DATABINDING.
When I issue a POPUP EDITING command with TEMPLATENAME SPECIFIED my NESTED EDITOR TEMPLATES are not populating.
My Models
namespace eGate.BackOffice.WebClient.Model
{
public c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588718",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Add new column to existing SSIS package
I've created an SSIS package using the Import/Export Wizard - it involves several tables with some of the original columns dropped(). It seems like I 'ignored' one too many columns, but I can't figure out how to get it back. When I go to edit the mappings, I can see the colum... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588722",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: "Freeze" the slider Is it possible to "freeze" the slider (NSSlider)? I'd like to make my slider unmovable (with a fixed value) when I press the button "Start", which starts my application... And when I press the button "Stop", which terminates my apllication, I'd like the slider to become movable again.
Thanks for ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588725",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Three Entity Constraint in Object Role Model in NORMA I am trying to model the constraint depicted in the ORM diagram below using NORMA for Visual Studio 2010:
Merchant transacts in a Currency if and only if that Merchant uses a Processor that supports that Currency.
According to this link, what I am trying to mode... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588729",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: PowerShell Start-Job and Oracle I have a ps script (say Set-Data.ps1) that calls a ps Run.ps1 with Start-Job as :
Start-Job -FilePath Run.ps1 -ArgumentList 1, 2
In Run.ps1 I have a line of code as:
$cs = ...;
Write-Output "1";
$conn = New-Object Oracle.DataAccess.Client.OracleConnection($cs);
$conn.Open();
Write-Ou... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588730",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to sort items in ListView by column bound to an Observable Collection? How to sort items in ListView by column bound to an Observable Collection ?
I've looked all over the place and I can't find anything easy enough or simple on this.
A: Is the example here too complicated? It just shows how to use a ListColle... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588731",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Titanium Developer, Android Emulator - Passing Custom Arguments I seem to be plagued by an issue that a lot of people run into, when I run my Android Emulator it fails to have any usable internet connection. If I run the emulator manually and pass "-dns-server 8.8.8.8" it works just fine.
emulator.exe -dns-server 8... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588741",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: jquery / javascript: regex to replace instances of an html tag I'm trying to take some parsed XML data, search it for instances of the tag and replace that tag (and anything that may be inside the font tag), and replace it with a simple tag.
This is how I've been doing my regexes:
var emailReg = /^([\w-\.]+@([\w-... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588749",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: reload current page in asp.net I have a session variable that changes some things about how a page looks. I have a button that changes the value of this session variable. But ... the onClick event happens after page load, so by the time I update the session variable based on the button click, it's too late, the page... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588754",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: expanding Dots pushing link or text down I created a spanned line with dots to fill in between text of links and phone number, but i cant get it so that if i have to many dots that the text does not go underneath. The problem is on some different brwosers and computers the .... will look fine or it will push it out ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588757",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Inspect element attributes with Google Chrome Although the Google Chrome developer tools show the properties of a selected element, it doesn't list the attributes.
Am I missing something?
A: Under properties, click the top expandable menu. It should have all the attributes.
A: Just right click on the element you w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588758",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How can I display the same content on two pages with different styles? There are two related sites.
Each has its own CSS.
Some of the content (contact info, etc) needs to be appear on a page in each site, but with the appropriate styles applied.
Is there a way to do this without duplicating the content?
A: Define t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588759",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How can I retrieve a column value from a table into a PHP variable? This is my current code:
$thisImage = "Select * from `posts` where `id`=" . $id;
$imgRow = $d->GetData($thisImage); // returns one record through mysql_get_assoc
$scode = "#"; // init $scode
if (is_array($imgRow))
$scode = $imgRow["shortcode"]; ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588761",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I Insert records in database multiple Tables using winforms c# I have a winform which i have attached here.. When i Insert record in Customer table, I also want to add the record in the orderlineitems table in my database as of which the record in the Order table will also be inserted.
I have inserted the rec... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588763",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Question on Specular reflection behaviour? Why Specular reflected light will be in bright color(usually white) while other parts of the object are reflecting the perceived color wavelength?
A: From a physical perspective, this is because:
*
*specular reflection results from light bouncing off the surface of mat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588769",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: HttpContext.Request.UrlReferrer null when changing domain Hi have a website that is host on 2 servers, on in Europe for the french version of the website (.fr) and the other in the Us for the other versions (.com). When I do a RedirectResult("http://domain.fr") from my .com website in a controller, my Referrer is nu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588771",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do you specify Cascade Delete for base tables using fluent api? Question: How do I get EF 4.1 to specify the ON DELETE CASCADE option on the foreign key constraint using the fluent api for base tables? I know how to do it with relationships to other tables, but how do I have it generate this for TPT (Table Per T... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588772",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: QPointer in multi-threaded programs According to http://doc.qt.io/qt-5/qpointer.html, QPointer is very useful. But I found it could be inefficient in the following context:
If I want to show label for three times or do something else, I have to use
if(label) label->show1();
if(label) label->show2();
if(label) label-... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588775",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to install certificates on other's machine? On my machine, I’m using a signed application with an installed certificate to get a trusted publisher dialog from Windows. I’ve created a certificate with makecert.exe and installed it to the certification store in windows. From there, I’ve exported the PFX and signed... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588777",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Create a margins editor component like the one in Microsoft word I have a Java Swing application that i want to create a nice component in it like a component in Microsoft word. In Microsoft word you can change the margins of your document like in here :
The trick here is that if you change the Top margins to (Let'... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588783",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Java, "Variable name" cannot be resolved to a variable I use Eclipse using Java, I get this error:
"Variable name" cannot be resolved to a variable.
With this Java program:
public class SalCal {
private int hoursWorked;
public SalCal(String name, int hours, double hoursRate) {
nameEmployee = name;
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588784",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: GZipStream effectivness I am trying to save big UInt16 array into a file. positionCnt is about 50000, stationCnt is about 2500. Saved directly, without GZipStream, the file is about 250MB which can be compressed by external zip program to 19MB. With the following code the file is 507MB. What do I do wrong?
GZipStrea... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588785",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Configure one app to be built using two Android name spaces? I have an app that, for release, needs building as two apps. The app will self-reconfigure based on the app's namespace, so I just need to build two versions, each with its own slightly different namespace.
I obviously want to avoid changing source code pa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588787",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How can I reauthenticate with Facebook after the OAuth 2.0 changes to the sdk? In our app we had some actions that we required the user to reauthenticate before proceeding. We used code like below to make this happen.
FB.login(
function(response) { /* code here */ },
{auth_type: 'reauthenticate', auth_nonce: '.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588789",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: iOS - UIWebView - Need Submitted form to Open in Safari I have been developing an HTML5 / Javascript webapp for the iOS platform. I am relatively new to Objective and XCode, but I know my way around the program. I am attempting to have the UIWebView open a form, once submitted (submit button) in Safari as opposed to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588792",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: One to many mapping. NHibernate I was looking at 'NHibernate 3 Beginner's Guide' book and found interesting tip:
In a real life inventory application, you will probably want to avoid
putting a Products collection on the Category entity, as it is
possible that a category can have hundreds, if not thousands, of
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588795",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: MVC2 scaffolding - can't see any data I'm having a problem seeing any data in my MVC2 application.
I'm using your typical scaffolding setup, but when I view the index or details page I see no data at all.
I'm sure I'm missing something simple here as I get no errors when compiling or running.
Here is my model(Users.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588797",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Can't figure how to retrieve data of a particular row from a ListView I am developing an android application pertaining to sms. I have managed to display a listView of all the messages in my android emulator, but i can't figure out what code should i write in the onItemClickListener such that whenever i click any ro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588799",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Java EE: EJB Entity, Web Standalone Can you please tell me how is best to do?
How can I create a new instance of an entity on web application if I have only the interface..
I have :
*
*EJB(3.1) Project
*Web project
I have an EJB Project like:
User.java
@Entity
public class User {
//variables.. getters and ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588804",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Redirect after FB App Request I found some sample code that does fb requests:
But my goal is to redirect after this jquery post? Im not familiar with jquery post....
This code just brings the dialogue box then closes. I want to refresh the page or redirect to another. I am sending the requests to fbrequests which ex... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588806",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Display a custom login control in Windows Phone with Mvvm light Ok, so what I am looking to do is to display some sort of login control (maybe a UserControl with a TextBox and PasswordBox) when the app is started.
In a non-mvvm situation, a way of doing this would be to use the PopUp primitive control, add the userc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588807",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to convert a List into a comma-separated list, using the class's Id property as the value I have a List<User> collection, and I want to create a comma seperated string using the User.Id property, so:
"12321,432434,123432452,1324234"
I have done it using a loop, but was hoping someone could show me the linq way?... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588811",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "47"
} |
Q: Managed C++, Object reference not set to an instance of an object I've run into this problem before, but never in a situation like this. I'm completely confused. As the question states, I'm getting the runtime error "Object reference not set to an instance of an object." Using the debugger tools, I think I've pinpoi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588819",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: array manipulation results can someone provide me more insight on why this code works the way it works
#include <stdio.h>
int main()
{
int a[5] = {1,2,3,4,5};
int i;
for(i=0;i<5;i++)
{
printf("%d,%d \n",i[a],i[a]++);
}
return 0;
}
The result is
2,1
3,2
4,3
5,4
6,5
Thanks
A: The... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588829",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Android Issue with 'createBitmap' and Sub-pixel Data I'm currently developing a small Android application to familiarize myself with the API. However, I have come across a problem regarding sub-pixel data while using createBitmap. I currently have these blocks of code. (NOTE: Image being read in is a 128x128 RGB56... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588834",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: OpenID Architecture for Java I'm trying to understand the concept and benefits of implementing OpenID in your project. And, since I'm a Java developer, I'm more or less equally interested in understanding its main Java implementation, openid4java.
My understanding is that OpenID is a standard for provisioning decent... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588838",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Redis ignores maxmemory setting Redis has the following settings:
"config get maxmemory"
1) "maxmemory"
2) "2147483648"
(which is 2G)
But when I do "info"
used_memory:6264349904
used_memory_human:5.83G
used_memory_rss:6864515072
Clearly it ignores all the settings... Why?
P.S.
"config get maxmemory-policy" shows:
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588843",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: When to access the attribute (vs the property)? I gather from this post that almost always one wants to be accessing the DOM property, not the HTML attribute.
So what are the rare useful exceptions? In what situation is accessing the HTML attribute better than accessing the DOM property?
A: A rare exception is the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588846",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: how to persist grid-view row backcolor in EDIT MODE how to persist grid-view row in EDIT MODE backcolor when hover over the other rows
if the ROW is in EDIT MODE it highlighted with yellow backcolor
the problem is when you try to hover over the other rows then it loses the backcolor,
so my question is :
how can i ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588852",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do you set a session variable in JavaScript? Can this be done with a PageMethods call? I need to save some variables in a control so that they can be used by a control on another page at a later time. Is there a way to do this via JavaScript?
A: Sounds like you need cookies, localStorage, or sessionStorage.
A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588854",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Using time in a bash script: how to get the "normal" output? If I use time in the shell, I get an output like
$ time sleep 1
real 0m1.003s
user 0m0.000s
sys 0m0.000s
However, if I use the same command in a bash script, the output is this
0.00user 0.00system 0:01.00elapsed 0%CPU (0avgtext+0avgdata 2176max... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588855",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Need a consistent TimePicker gizmo for mobile web site We have a mobile web site that requires users to enter a specific time value--basically in hh:mm form. We're having a great deal of difficulty with the consistency of displaying and entering time from various browsers.
In looking for existing examples, we kee... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588857",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: A developer tool for designing an SQLite database for Android I'm fairly new to Android, I'm trying to create a rather complex app (something more advanced than notepad or task reminder), with some serious underlying data model. I'm using Eclipse with the Android SDK plugin, everything is working well. But what shou... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588865",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: has_many :through in fixtures in rails 3.1 I want to set up some has_many, :through objects using fixtures for testing in rails 3.1.
If you look at the documentation on the association as an example, I want to know how to assign assemblies to parts. The only way I've found to do it is to explicitly create the manife... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588868",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Engine routes in Application Controller I have a before_filter hook in my main app's application controller that does something like: (It doesn't just put a link in the flash, there is a message, but it isn't relevant to the question, it just accesses the route in the method)
class ApplicationController < ActionCont... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588870",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Where to put model “utility” functions in Ruby on Rails, if it is also required in a rake task? This is a 2nd part to the following question:
Where to put model "utility" functions in Ruby on Rails
Problem is, I need access to these utility functions from a rake task as well. Using the accepted technique in in the o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588874",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Why does this enumerate this way? For the following function
KEYS = {}
def get(kind):
"returns a new key of a particular kind"
global KEYS
try:
return KEYS[kind].pop(0)
except (KeyError, IndexError):
handmade_key = Key.from_path(kind, 1)
start, end = allocate_ids(handmade... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588878",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: CakePHP Count syntax I am writing an app in CakePHP and need to get a count of posts for an image. its a one (image) to many (comments) link.
I have tried the following but it doesnt work as it cant find the table? I know I have managed to do this with just SQL queries in previous applications.
This is the code
$dat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588880",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: bzr merge - reviewing another branches commit notes ('merge tips') before committing I have a developer who has made some changes, and has asked that I merge them in. In order to be safe, I haven't merged/committed his work outright, but instead made a copy of his branch so that I can do a 'bzr log --forward -n 0 -... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588881",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: NHibernate,Entity Model or LightSpeed which is preferable? Can any one tell which is best suited for performance oriented applications?
A: All of the above. Or none of the above. No way to tell without measuring performance and seeing which one does or does not work for you.
A: I would agree with the existing answ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588882",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: jQuery validation: allowing form submission in spite of errors I am running into issues with the jquery form validation plugin. It is allowing the form to be submitted in IE, also, it is allowing form submission in Firefox if two previously invalid required fields are fixed (even if there are other invalid fields).
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588886",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: c++ Gregoraian and Julian calendar inheritance I have this dilemma where i need to choose between differant types of inheritance for the Gregorian and Julian calanders. I want to have one class named Date as a base class.
My question is as follows: Should I have a class for the Gregorian that inherits from the date... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588898",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Custom UITableView Dynamic Cell Height I have search and searched through endless blogs and articles on how to determine a dynamic height for a custom UITableViewCell and its detailed text. I have really had a hard time finding any good documentation on this.
What I need to do is have the cell grow according to the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588899",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: ASP.net MVC - Should I use AutoMapper from ViewModel to Entity Framework entities? I am currently using AutoMapper to map my Entity Framework entities to my View Model:
public class ProductsController : Controller
{
private IProductRepository productRepository;
public ProductsController(IProductRepository p... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588907",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "22"
} |
Q: How can I use the selected rows in GridView as a source for a GridView in another page? I am writing a web site in Visual Studio, something like an on-line library. I have a GridView on the first page that presents all of the books available from the data source and some other properties also contained in the data s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588908",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Java cache mechanism I need to use cache solution in my project.
I've used jcs and looks pretty good, but I read that its library is based on jdk1.3 spec.
Ehcache looks another good choice too.
Which library should I use, apache jcs, ehcache or other?
A: I've used EhCache successfully in the past. Very easy to conf... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588910",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Similar pattern to promises/deferred's that support multiple results and cancellation Similar to the promises pattern I'm looking for an event pattern that avoids needing to pollute objects with addEventListener/etc methods, I want to be able to return an object, that can be cancelled as well as 'resolved' multiple ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588916",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: how to use php set_error_handler for undefined indexes in arrays I want to make a single function for set_error_handler() to deal with undefined indexes in an array with a specific name. For instance, the array is called: $products.
If I have
$products = array(1 => 'a', 2 => 'b' // etc...
and later execute call:
$a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7588918",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.