text stringlengths 8 267k | meta dict |
|---|---|
Q: Android: Telnet using Socket - missing last line I'm trying to write some MUD Client for android, and I run into problem with output from server. I can't get my app to show last line (Login prompt) in console..
try {
Socket socket = new Socket("studnia.mud.pl", 4004);
OutputStream out = socket.getOut... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549164",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Global Application_Start not firing calling my service using Named Pipes I have a service running on Named Pipes. The service should do some stuff on startup, so I defined this in the Global.asax. Now I am experiencing that this is not being when the service receives it first call. Is using Named Pipes different in ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549166",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Keyboard navigation of cell grouping hierarchy? I find cell grouping very useful in organizing my notebooks. I've been navigating this hierarchy by clicking with the mouse in the brackets on the right hand side of the notebook, but that's kind of tedious and requires some hand-eye coordination that degrades in the e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549168",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Is '\0' guaranteed to be 0? I wrote this function in C, which is meant to iterate through a string to the next non-white-space character:
char * iterate_through_whitespace(unsigned char * i){
while(*i && *(i++) <= 32);
return i-1;
}
It seems to work quite well, but I'm wondering if it is safe to assume that... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549170",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: Can this CSS class written in shorter, better way? Can you write this CSS class in a shorter way? Thank you.
.MessageTitle a, .MessageTitle a:visited, .MessageTitle a:active, .MessageTitle a:hover,.MessageSender a, .MessageSender a:visited, .MessageSender a:active, .MessageSender a:hover
{
text-decoration: none;... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549176",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Expires vs max-age, which one takes priority if both are declared in a HTTP response? If a HTTP response that returns both Expires and max-age indications which one is used?
Cache-Control: max-age=3600
Expires: Tue, 15 May 2008 07:19:00 GMT
Considering that each one refers to a different point in time.
A: See this... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549177",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "49"
} |
Q: SignalR + posting a message to a Hub via an action method I am using the hub- feature of SignalR (https://github.com/SignalR/SignalR) to publish messages to all subscribed clients:
public class NewsFeedHub : Hub
public void Send(string channel, string content)
{
Clients[channel].addMessage(content);
}
This work... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549179",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "65"
} |
Q: Search for file by creation Time I'm trying to write C++ code in windows to find a file by creation time, not by name of file. Can't seem to find anything. Any help or suggestions are welcome.
A: If you are looking for files that are under 20 seconds old, searching the whole tree could take longer than that.
If y... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549180",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Coercing from Arrays Suppose I have this simple class:
class Color
attr_accessor :rgb
def initialize(ary)
@rgb = ary
end
def +(other)
other = Color.new(other) unless Color === other
Color.new(@rgb.zip(other.rgb).map {|p| [p.reduce(:+), 255].min })
end
end
I know this is a bad way to implement ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549181",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Android Paint: .measureText() vs .getTextBounds() I'm measuring text using Paint.getTextBounds(), since I'm interested in getting both the height and width of the text to be rendered. However, the actual text rendered is always a bit wider than the .width() of the Rect information filled by getTextBounds().
To my su... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549182",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "201"
} |
Q: What is the correct term for ->,->* and .* operators? Wikipedia refers to them as:
-> Member b of object pointed to by a
->* Member pointed to by b of object pointed to by a
.* Member pointed to by b of object a
But I need to refer to them without using "a" and "b". Do they have any names?
A: The standard has... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549187",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Are event listeners in jQuery removed automatically when you remove the element using .html()? In jQuery if we use .remove() for removing some element, then all bound events and jQuery data associated with the elements are removed.
But what happens if we "remove" the elements with .html()?
Do we need to unbind ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549188",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: Phonegap error using web database : "result of expression mydb.transaction is not a function" I'm trying to use html5's web-database using phonegap for an iOS app for the first time. But I'm stuck at this error which says "result of expression mybd.transaction is not a function"
If I check using alerts, initDB is ge... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549190",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Asynctask and onclicklistener android 2.3.3 versus 3.2 On my nexus One (android 2.3.3) the following program behaves differently from my xoom (android 3.2):
public class TestOnclickWithAsyncTask extends Activity {
private int mClicked = 0;
private final static String TAG = "TestOnclickWithAsyncTask";
@Override
pu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549192",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: boost single thread libraries in cygwin I just built and installed boost_1_47_0 using the following on cygwin
./bootstrap.sh --with-libraries=chrono,date_time,exception,filesystem,graph,graph_parallel,iostreams,math,program_options,random,serialization,signals,system,test,thread,wave link=static link=shared threadi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549195",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Compilation Error Error:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0103: The name 'movies' does not exist in the current context
So... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549197",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Dynamic HTML Form Generation via GUI I'm looking to create a system where users can create a survey. Pretty much I'm trying to make a form that makes forms. It needs to be fairly extensive and cover inputs, selects, textareas, and other form elements.
Right now, I'm using a templating engine with jQuery, but it's ge... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549198",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Make a unique object JavaScript I am trying to create a program which saves info about an element into a new JavaScript Object, or really into any sort of object from any language. Here's an example. Somebody clicks a create button and It prompts them to name a CSS Class. After that, they are asked to fill out a for... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549201",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to disable animation for code nested in a UIView animation block? There's a method which is called inside an animation block by a third party API. In that method I'm supposed to build some subviews. But in this case I don't want animation to happen when constructing the subviews.
Is there a way of saying "[UIVie... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549207",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Type conversion of &self causes compiler error In an ARC environment, I have the following code:
NSInvocation* invocation = [NSInvocation invocationWithMethodSignature:signature];
[invocation setTarget:delegate];
[invocation setSelector:@selector(restClient:loadedFile:contentType:eTag:)];
// Error Here!
[invocation ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549209",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Sorted linked list and the addSorted function problem. So I've been working on this for awhile and I can't seem to figure out what's wrong. This addSorted function adds in all the correct values in their respectable places of the sorted array but when it goes into add a 0 to the front of the list, the program will ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549211",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Rails 3.1 and Asset Pipeline: Trouble on deploying with Capistrano I just switched from Ruby on Rails 3.0.10 to 3.1.0 and I would like to deploy my asset files by using the Capistrano gem (my local machine is a MacOs running Snow Leopard, my remote machine is running Ubuntu 10.04 Lucid). So, as wrote in the Official... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549214",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Zend_Db_Table: Delete multiple entries I wanted to delete some db entries and each of them has a unique ID. My current code looks so, taken from here: Zend Framework: How to delete a table row where multiple things are true?
$where = array();
foreach ($IDs as $ID) {
$where[] = $this->getAdapter()->quoteInto('id =... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549217",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Iterating over a JavaScript object to bind keys Considering the following code:
controls = {
'w': 'up',
's': 'down',
'a': 'left',
'd': 'right'
};
keysPressed = [];
for (control in controls) {
direction = controls[control];
$(document).bind('keydown', control, function() {
keysPressed.push(direction... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549218",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: reed solomon library I'm about writing a qr code generator , should I write reed solomon error correction methods by myself or is there any free library in PHP or Python to do that ?
thank you
A: Yes.. There is an QR code library in PHP.
Check the link below:
http://phpqrcode.sourceforge.net/
A: Here's a Python an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549222",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Facebook Open Graph OG: Meta Tags - Works only sometimes? I have a like button on my site, i have defined all the og: meta tags and its works for most of most pages, but doesnt for 2 other pages. Its using a template so its exactly the same code, how can it work for some but not all pages?
For the pages it doesnt wo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549223",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Java program will not output to file This is a very basic program for Uni which writes user data to a file. I have followed the instructions clearly yet it does not seem to output the data to a file. All it does is create an empty file. I'm using Ubuntu, if this makes a difference.
import java.util.Scanner;
i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549224",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: mysql database logic My question is more of trying to understand what and how I can get something done. Here's the thing:
I got a job to build this application for a school to manage student bio data, work-out and handle student information and basic finance management.
Based on requirements I got from meets with m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549230",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Getting a profile report for images and js files I'm using mvc3, and mvc mini profile is displaying multiple popup boxes for a single page request because it is profiling for images and js files.
Have you guys experienced this also? What did you do?
A: You are seeing those timings cause they are going through the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549232",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Multiple Pushpin and UI Lag I am currently disaply over 500 pushpins on my bing map using the below code. Loading of these pushpins is causing a serious lag on the UI, so I was wondering if it is possible to load these incrementally based on the users position, but still use this code?
I have seen other examples usi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549234",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: jQuery UI Tabs - ajax php I have some really standard jQuery UI tabs that work fine on my Mac in Safari, Chrome and Firefox however the content doesn't load on the iPad / iPhone and I don't understand why, here's a link:
http://www.hostelcities.com/dev/tabbed_layout/jquery-ui-tabs/ajaxjqueryuitabs.php
The first two ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549241",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: looping through an object passed in via JQUERY as an array and using c# webmethod to get data out all,
I'm getting to my webmethod in my code behind but I'm having problems deserializing my json data.
I have no good reference but here is what I"m trying to do. My the code in my webmethod is not allowing me to get t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549244",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Activity wont start with "startActivity();" Here's my code for DroidArmoryActivity
package com.maxgenero.droidarmory;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
public class DroidArmoryActivity extends Ac... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549252",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: C++ program to calculate greatest common divisor I have started this program to calculate the greatest common divisor. This is what I have so far:
#include <iostream>
#include <math.h>
using namespace std;
int getGCD(int a, int b)
{
a = a % b;
if (a == 0)
{
return b;
b = b % a;
}
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549255",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: NSManagedObject Faulted I have an NSManagedObject that has some of its properties initialized at the start of the program. When I refer to this object later, it appears to be faulted, and the properties are not accessible. I'm not sure what I need to do.
This is related to a new feature added to a program that has b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549257",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Regular expressions - remove all non-alpha-numeric characters CRLF problem First off, if it's not clear from the tag, I'm doing this in PHP - but that probably doesn't matter much.
I have this code:
$inputStr = strip_tags($inputStr);
$inputStr = preg_replace("/[^a-zA-Z\s]/", " ", $inputStr);
Which seems to remove a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549258",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Is there a quick way to unbind keys in Emacs? I did a ctrl h b to view all my bindings in emacs. Now I want to unbind a lot of keys, simply because I never use those functions of Emacs and I don't want to perform them when I accidently press the bound keys! This also frees up a lot of keys for other tasks (for use w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549259",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "28"
} |
Q: WPF black spaces on resize When i create a band new WPF project without changing any code whatsoever does this on resize.
It stays this way if i minimize or drag across monitors. Is this supposed to happen? It does this with all of my WPF applications so i set ResizeMode="CanMinimize" .
Thanks
| {
"language": "en",
"url": "https://stackoverflow.com/questions/7549262",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: When to use CCSpriteBatchNode? in Cocos2d I will be playing an animation. The animation has about 12 frames, and each frame is rather big. In fact, the -hd version of each frame is quite huge.
Anyway, first, I created it by putting all 12 frames in a texture using Zwoptex. The texture is about 2048x2048.
This is so ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549266",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: omniauth gowalla strategy error: comparison of String with Bignum failed as far as I can get gowalla auth code response contains both expires_at and expires_in but
expires_at is not valid date string so it throws error while comparing dates
any idea to hack omniauth or gowalla strategy would be very welcome!!!
rail... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549272",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Auto-Load a html table with combobox I want to load different html tables when I select an option in my combobox.
For example if I have a combobox with 4 categories (Cars, Bikes, Motorbikes and Airplanes) I would like that when I select one of the options, the specific table loads... and the tables may be different ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549274",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: c++ char arrays, use in cin.getline() I have the following code:
char myText[256];
cin.getline(myText,256);
Why exactly do I have to pass a character array to cin.getline() and not a string?
I have read that in general it is better to use strings than character arrays. Should I then convert a character array to a ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549280",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: sqlite iphone best practice for reading data I'm trying to make an app, that reads from an SQLite3 database. I plan to pre-load data during development, so the app does not need to modify anything in the database, only read from it, make queries, etc.
What is the best practice for solely reading data? Should I open ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549281",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How can you make a java object override its methods? Here's what I'm thinking. So lets say I have a class called intro and I want to do something when it starts and finishes. I'm wondering how could I do something like this:
public Main(){
//Calls the object that overrides its own methods
new Intro(){
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549283",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: how to merge two images into one with asp.net I am working on an asp.net project. I am searching for a solution such that after a background image of a div is chosen. The user selects another image and coordinate. Then, this image will be merged on the background image with the defined coordinate.
Thanks in advance.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549285",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What's the equivalent syntax of while($row = mysql_fetch_array($result)) for a "for loop" I wanted to know if it was possible to write the following expression
while($row = mysql_fetch_array($result))
with a "for loop" instead of a "while loop." So that the below code would print the same result.
while($row = mysq... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549286",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I access a model in JSTL outside of EL? In Expression Language, I can access my model like so: ${model.member}
How do I achieve the same thing when I want to use <%=some_method(${model.member}); %>
The reason is because I have some HTML helper methods I created to separate logic from UI, and I need to pass a ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549287",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: DOM GetElementsByTagName Problem I am just starting out learning JavaScript and I have just reach the DOM section of my course.
I have a page with 10 tags on it and I have created the following JavaScript to tell me how many I have.
<script type="text/javascript">
var myLinks = document.getElementsByTagName("a");
c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549290",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Reading IA32 Assembly Code pertaining to using double arrays This is the exact question:
The following Code transposes the elements of an M x M array, where M
is a constant defined by #define:
void transpose(Marray_t A) {
int i, j;
for (i = 0; i < M; i++)
for (j = 0; j < i; j++) {
int ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549291",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: C# Windows forms cascading windows I currently have a menu button that allows users to open a new dialog which I would like to be placed directly to the right of the main form. The user can open as many of these dialogs as they would like but I would like them to cascade on top of the first dialog that they opened (... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549300",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: pushing onto navigation stack not within the nav controller I have this ad class which contains an UIImageView. I've added an instance of the class to my appdelegate onto the "window" view.
Now, I want to, when the user taps the ad, push my "detailedViewController" onto the current navigation controller, which all o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549303",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Referencing ActionScript file I have a process set up to create action script files. They hold functions that are called upon by my flash project. How can i reference these files so that the project knows the functions are there.
with asp.net i would simply reference the .js file. Is it the same process?
A: The pro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549304",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: "Single-page" JS websites and SEO There are a lot of cool tools for making powerful "single-page" JavaScript websites nowadays. In my opinion, this is done right by letting the server act as an API (and nothing more) and letting the client handle all of the HTML generation stuff. The problem with this "pattern" is t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549306",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "127"
} |
Q: set a div image on another div image asp.net Would it be possible to set a div image over another div image in asp.net?
For example: after having an image A, the user chooses an image B with location 10, 10 then the image B will be placed at location 10, 10 on the image A (not merging).
Or it is required to use jQu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549308",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to return both stream and file length from WCF Restful json webservice? Hihi all,
I am able to return stream from my WCF restful json webservice, everything works fine. But when I mixed the stream with another piece of data (both wrap into a custom class), upon consuming the webservice from my client, it gives a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549314",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: MPI partition matrix into blocks I want to partition matrix into blocks (not stripes) and then distribute this blocks using MPI_Scatter.
I came up with solution which works, but I think it is far from "best practice". I have 8x8 matrix, filled with numbers from 0 to 63. Then I divide it into 4 4x4 blocks, using MPI_... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549316",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Creating an array list of names on SD Card Android I am in the process of developing an android app, and I need a way for the user to enter a Name and then save this name to a .txt file in the SD card. When the user adds another name, this file should be modified to include that name. I was thinking of an array list... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549319",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Constraining other application's window sizes through Qt Application I'm looking for a way in Qt to constrain other application window's (some will not be Qt) so that when maximized don't overlap my Qt application. Essentially I want to create the Windows Taskbar. I'd like the applications edge to dock to the appr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549323",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: html drop-down on Opera is missing padding On IE9, Firefox, and Chrome my dropdown lists look great. But Opera's are missing 2-3 pixels of padding, and I've got some forms with single-character entries in these menus and it looks bad.
A space on either side will make it look good but it will look bad on the rest o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549325",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: OpenGL Ortho Coordinates I have an OpenGL view overlaid on top of an MKMapView. My goal is to have the coordinates of the glView to have the same values of the MKMapPoints on the map. To do this I found the values for the MKMapPoint on the top left and the bottom right of the map.
CLLocationCoordinate2D coordinate... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549327",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Can I make a spark datagrid columnSeparator render before a rowSeparator? I have a black row separator and a grey column separator, but because the row separator gets rendered first, the column separator appears over the top of it, causing what appears to be breaks in the row separator.
Is there any way to change th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549328",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: facebook getloginurl authentication permissions seems having updated to the latest version of the facebook php sdk the following code is not working-
$loginUrl = $facebook->getLoginUrl(array(
'canvas' => 0,
'fbconnect' => 1,
'req_perms' => 'publish_stream,status_update,offline... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549330",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Google Chrome doesn't follow a link then scroll to #tag Chrome fails to follow a link and then scroll.
For example if I am on the home page of my website (nanite.com.au) and the user clicks a link that contains products.html#build or http://nanite.com.au/products.html#build it fails to redirect to the new page. Howe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549334",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Passing query expressions over the wire with WCF I want to implement something like a WCF OData provider but using NetTcpBinding instead of WebHttpBinding / REST. I want the client to be able to write linq queries that are transparently serialized and sent to the server (or potentially, multiple servers, to consolid... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549336",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I pass an object by value? import std.stdio;
class IntegerContainer
{
public int Integer = 1;
}
void DoubleInteger(IntegerContainer Container)
{
Container.Integer *= 2;
}
void main()
{
IntegerContainer Container = new IntegerContainer; // Internal integer defaults to one.
DoubleInteger(Cont... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549338",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: php arrays get the order number of a certain element Lets say i have an array in PHP
$test['michael_unique_id'] = 3;
$test['john_unique_id'] = 8;
$test['mary_unique_id'] = 10;
.
.
.
.
$test['jimmy_unique_id'] = 4;
(the values (3,8,10.........4) are unique)
Lets say i want to search for the unique id 10, and get the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549339",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Can't encode slash in URL http://myhost/MyController/DoSomething/Anything%252fAnything is a bad request
http://myhost/MyController/DoSomething/Anything%2fAnything is the same as http://myhost/MyController/DoSomething/Anything/Anything
What URL sends the string "Anything/Anything" to my controller?
How to make Html.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549340",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: PHP strlen - appending numbers based on string length I am trying to append random numbers to different numbers of characters. Can anyone tell me why this isn't working?
$userName = $_SESSION['username'];
if(strlen($userName == 3)){
$userName = $userName . rand(000,999);
}
else if (strlen($userName == 4)){
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549342",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: as2 loadmovie problem When I am use this mc is loaded.
loadMovie("contact/contact.swf",1);
But When I use this not load mc.
example = "contact/contact.swf";
loadMovie(example,1);
How can I do this? Thanks for answers.
A: try:
var example:String = "contact/contact.swf";
loadMovie(example,1);
| {
"language": "en",
"url": "https://stackoverflow.com/questions/7549343",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: PHP Flush All Levels of Output Buffering I'm trying to implement a simple Http Response class that implements Http Streaming (or Chunked-Encoding). For this to be possible, I need to set output_buffering = Off in the php.ini, and flush the output at certain intervals.
PHP does a good job of this automatically - e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549347",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: not converted to the button in latest Firefox I've been working with https://github.com/webtechnick/CakePHP-Facebook-Plugin
Anyways, the output to the page in html shows fb:login-button but it doesnt get convereted to the actual facebook button in Firefox. I have the facebook html tag, the fb init() at the bottom ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549348",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: HTML5 clearRect dont work Hello could somebody tell me wath is wrong with my code. When i do the clear rect, it's doesn't work.
I just try to move the ball in the canvas. Actually my ball leave a mark. This kind of line is leave.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549356",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: "java" succeeds," java emmarun" fails Disclaimer: I am new to java and emma. Details:
*
*I installed emma, and have worked through some of the examples. No problems.
*I have a java project with a number of files that I wish to get a coverage report.
*I type "javac -d out *.java". No errors.
*I type "java -c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549362",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: asp.net MVC3 global route and hardcoded routes I have an application that I am using a global route to query for the current path and return page specific data. I have the routes setup like this...
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Pages",
"Pages",
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549364",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to Get the Authorization header from wcf request interceptor I need to authenticate every request to wcf services
public class AuthenticationInterceptor : RequestInterceptor
{
public AuthenticationInterceptor() : base(false)
{
}
public override void ProcessRequest(ref Syst... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549368",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: preg_replace() Question Currently, I'm using the following code:
preg_replace('/\s+/m','<br>',$var);
to replace line ends with <br> elements. An example of what I want:
Text Text Text
Text Text Text
Text Text Text
Should end up being:
Text Text Text<br>Text Text Text<br><br>Text Text Text
This does what it needs... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549369",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Eclipse launch shortcuts for debug history The Run > Debug History menu item in Eclipse (Helios) contains a MRU list of debug history. These items are numbered from 1 to N suggesting that there is probably some keyboard shortcut or keyboard sequence I should be able to enter to relaunch a previous program but I cann... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549371",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Set a custom template variable in expressionengine I need to output the category for an entry a few times in an entry's template.
So I want to get the output from the following and assign to a variable so I can reuse within the template:
{exp:channel:entries channel="product" limit="1" status="open"}
{categories... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549372",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Adding two Xpath with union in PHP function? With the code below I show the titles of many RSS. Those RSS must be in the format of rss->channel->item where in the item you find title,description, pubDate and so on.
My question is how to modify this, so It will also accept RSS that are in the format of feed->entry wh... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549376",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Windows Active Directory Emulator Is there a LDAP server emulator or a Windows Active Directory emulator, I'm talking something in the lines of smtp4dev which doesn't have to be configured and just work for a development environment in order to test authentication code.
A: I suspect you might want to try Active Dir... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549378",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: HTML image map outside an image I have to generate <map> and <area> elements on a web page containing many images. Each image would have to be linked to its appropriate <map> via usemap="#map1", usemap="#map2", etc...
As a nasty hack for this situation, I'd like to add one 1x1 absolutely positioned (top:0, left:0) <... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549380",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Trying to set up a countdown timer in Android through multiple Activites I'm trying to create a app for airports, that the top line will always display a countdown timer to when the plane leaves. This is the code I had.
This class is declared in each activity class. /countdowntimer is an abstract class, so extend ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549383",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: EER : Superclass/subclass Entity relationship, primary key mapping Here is the scenario.
STUDENT, FACULTY are sub-classes of PERSON entity, and they have specialized attributes.
Normally, we store common attributes in PERSON table (with p_id as pk) and store specialized in the subclasses. We map the subclass to t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549392",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Is it a code smell that a repository has change events? I've not seen change events being used in repository pattern implementations, but I'd like to have my repository like this:
interface IEntityRepository
{
event EventHandler<EntityChangedEventArgs> EntityAdded;
event EventHandler<EntityChangedEventArgs> ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549394",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Only Allow IMDB LINK REGEX solution PHP I want a regex solution to allow only
http://www.imdb.com/title/ttANYNumberWOrdetc/ links
Otherwise SHOW us error.. Incorrect link
I am not too good with regex
I just create this petren ..
preg_match('/http:\/\/www.imdb.com\/title\/(.*)\//is', 'http://www.imdb.com/title/tt008... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549401",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to program in Windows 7.0 to make it more deterministic? My understanding is that Windows is non-deterministic and can be trouble when using it for data acquisition. Using a 32bit bus, and dual core, is it possible to use inline asm to work with interrupts in Visual Studio 2005 or at least set some kind of fla... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549402",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Check files in current directory How can I tell python to scan the current directory for a file called "filenames.txt" and if that file isn't there, to extract it from a zip file called "files.zip"? I know how to work zipfile, I just don't know how to scan the current directory for that file and use if/then loops wi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549403",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: BASH script to pass variables without substitution into new script As part of a system build script I have a script that creates various files and configurations.
However one part of the build script creates a new script that contains variables that I don't want resolved when the build script runs. Code snippet exam... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549404",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: What platform(s) to use for developing an audio mixing web app? I am working on a browser-based application that is essentially a Digital Audio Workstation. I've seen one out there (at http://www.indabamusic.com), and it looks like it is a Java applet. Is a Java applet the best way to do this?
I've read that C++ i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549408",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Counting number of unique pairs and instances of non-unique pairs in unsorted data I have data in the form of:
ID ATTR
3 10
1 20
1 20
4 30
... ...
Where ID and Attr are unsorted and may contain duplicates. The range for the IDs are 1-20,000 or so, and ATTR are unsigned int. There may be anywhere betw... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549410",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Logging in Scala: what to use when writing a library There are questions (here and here) about what library to use for logging in Scala, but I'd like to ask a more specific version of the question.
When you're writing a library - ie some code that will become part of lots of different applictions - you don't have as... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549415",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Marking view as dirty from another class Right now I'm building a game for Android. I have a class game.java that calls board.xml as it's view. Board.xml has the following:
... //Score info
<edu.xxx.yyy.zzz.BoardView android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_weight="1"/>
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549419",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I chain methods in PHP? jQuery lets me chain methods. I also remember seeing the same in PHP so I wrote this:
class cat {
function meow() {
echo "meow!";
}
function purr() {
echo "purr!";
}
}
$kitty = new cat;
$kitty->meow()->purr();
I cannot get the chain to work. It generates a fatal error right af... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549423",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "23"
} |
Q: CSS dimming overlay I have a fullscreen (100% width and height) div that has a 60% opacity for the android browser (on a z index). On top of it, i have a form. However, everytime i try to open up the keyboard to enter any text, it seems like the keyboard is trying to push the div upwards, and it eventually just fail... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549427",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: jQueryUI accordion causes wrapping when using the icon Using the baic redmond theme from jQueryUI, my accordians are not sitting right. I thought something in my stylesheet was causing issues, but I removed it and it is still funky. I stripped it way, way back to this and it's still wrapping the triangle icon and te... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549431",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Sencha Touch-- List in TabPanel not working So, I just started working with Sencha Touch. I want to include a list in a TabPanel but for some reason it isn't working. Please help. Thanks!
HTML:
<!DOCTYPE html>
<html>
<head>
<title>Hello World</title>
<script src="lib/touch/sencha-touch.js" type="text/javascr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549432",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do you hide your php source code? I have a php page which contains keys and salts and I would like to hide such information just in case. Anyone know a good free software that could do this?
I have both zend and ion installed on my server, which I heard some source scramblers use. Any ideas?
A: Your PHP source... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549433",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Alternatives to Stateful Parsing I don't like stateful parsing. It seems to me there should be a better approach. Is there?
Let me illustrate by example. Let's say I'm parsing a text file (YAML in this case, but it could be plain-text or XML. I'm making a simple trivia game; my game will contain sets of questions, e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549437",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Catch onclick adsense event ? I wan't to send an ajax request if the user clicked on adsense .
But because adsense code is in iframe I can't find a way to catch the onclick event .. any ideas plz ??!
A: The simple answer is that you can't. Since adsense is likely on another domain, most access to the inside of the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549439",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: android long running service without notification I see this example with programs like Advance Task killer, Watch Dog, eBay, battery widgets, ect. There is a background service running that monitors device activity, a broadcastreceiver, but there is an option to disable the notification icon displayed. Currently ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549442",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.