text stringlengths 8 267k | meta dict |
|---|---|
Q: To use auto-increment in MySQL or not? I have read certain places that it is a good practice to typically use an auto-incrementing Primary key for most MySQL tables, rather than simply relying on a non-increment field that will be enforced to be unique.
My question is specifically about a User table, and a table con... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549720",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Delphi 7 IDE Stack Overflow Error Could anyone tell me, why I keep getting the following errors?
Background:
The project has 320 Embedded Forms.
The projects search path has 205 folders, at a length of just over 11,000 chars.
If I remark out just 1 of the embedded form units, then it compiles without an error.
IMAGE... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549722",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: TimeStamp Standard PHP I am working on creating a log file where log details including timestamp should be written to the log file. But is there any standard timestamp function which I can use in the php code which does not show any sort of errors like "You cannot rely on SYstem's timezone' etc
.
Thanks
A: You coul... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549735",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Refactor rename field in many database tables I am faced with renaming a field where the same fieldname is replicated across many tables.
Looking for a script or free/low cost tool which will go through all the tables and if fieldA exists, rename it to fieldB.
thanks
A: You can use SQL Server metadata tables to cr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549739",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: jquery image-background chrome problem This doesn't seem to work in chrome:
$(function(){
$('body').css('background-image','url(/static/img/b1_left.png');
}
when I apply it in css it works fine:
background-image: url('/static/img/b1_left.png');
in firefox both work fine.
I need it to work in jquery, to process h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549743",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: python: check function parameter types Since I just switched to Python from C++, I feel like python does not care much about type safety. For example, can anyone explain to me why checking the types of function parameters is not necessary in Python?
Say I defined a Vector class as follows:
class Vector:
def _... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549746",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: command line node.js; running script with modules I'm doing some testing with node.js and several modules\libraries. For simplicity I'll focus on underscore.js.
When I run node.exe with the following source:
require("./underscore.js");
_.each({one : 1, two : 2, three : 3}, function(num, key){ console.log(num); });
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549756",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: togglebutton remember state In AIR, I'm create a nativewindow component that will generate a set of togglebutton, as each time the code below is run whether I open a nativewindow, the togglebutton will be reset to the default state. How do I make the state persistent?
for(var i:int=0;i<10;++)
toggbtn.label = "Power ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549761",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Express session store and reapInterval I have a question about express session store memory with setting the reapInterval value. I have an example code, which will output the values of a memorystore every 5 seconds. If i now set a reapinterval of 5000, it should clean up expired session every 5 seconds right? So my ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549770",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What mysql data type should I use for encrypted text? Here's the type of text my encryption function throws out:
I generated several strings and they're never bigger than 50 characters, but I would like to give it 75 characters in mysql. I tried using varchar, but the string gets cut off because it doesn't like som... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549773",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Controller show action code is flawed, but error is silent Here is my User controller show action
def show
@public_groups = Group.public
@groups_member = @user.groups_as_member
@groups_as_owner = @user.groups_as_owner
@random_items = []
@assignments = []
unless @groups_member.nil?
unti... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549774",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: browse button missing from input file in IE8? I've taken a screenshot of my file input method for both IE 9 and 8. Why would IE not show the browse button? the table sits inside a form like so:
<table>
<tr>
<td colspan="2"><h3>Upload Photo</h3></td>
</tr>
<tr>
<td colspan="2"><inp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549777",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: jQuery Ajax not returning success I have this code that goes to form.php instead of pulling the echoed php into a #success div on my main page:
<script type="text/javascript">
data = $(form).serialize();
$('#form').submit(function() {
$.ajax({
url: '../wp-content/themes/MC/form.php',
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549782",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: PhotoShop Define Brush Preset I'm trying to make a brush that gives a sparkle effect. It's just a circle brush with a cross in the middle. Any way, when I try to define the brush preset, it says "Could not complete the command Define Brush Preset because the selected area is empty." Anyone know why this is happen... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549783",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Seeding database from engine root fails to locate db/seeds.rb After creating a new Rails 3.1 gem plugin via:
rails plugin new core --full
I am trying to seed the database with:
rake db:seed
I am running into the following error:
rake aborted!
can't convert nil into String
Moving the seeds.rb file into the test/du... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549784",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: xcode Search Locations on MapKit I want to search places like google map in my app with using MKMapView. I searched and find that i should use webview with integrating google map api. However, i don't want that. Is there any service that i can send place name as input and it returns appropriate results with location... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549787",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: VBA for loop addition I am trying to write a loop that adds odd numbers up to a certain point. How can I get the integer i to go up by 2. I know there is a way, it's something like i by 2, but I don't remember the exact command. If anyone could please help me, I would appreciate it
A: Do you mean:
For i = 1 To 9 St... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549791",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Can I use JAXRS annotations(for example @Produces) in an interface class in Grails I am trying to create an interface class in Grails and implement that in a resource. I wanted to use the @Produces annotation in the interface class and use(implement) that in my resources class. I created my interface in src/groovy. ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549793",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Scala Parallel Sort Using java.util.Arrays and scala.concurrent.ops.par I think I have implemented some of my code wrong. I cannot figure out why my sort (using arrays.sort) is taking longer in the "parallel" version than in the non-parallel version (it's obviously in putting the two arrays back together, but I did... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549795",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Obtaining results from MongoDB with PHP (working with command line) I'm trying to obtain a simple collection doing the next:
<?php
echo "<pre>";
$mongo = new Mongo();
var_dump($mongo);
$db = $mongo->testdb;
var_dump($db);
$cursor = $db->users->find();
var_dump($cursor);
?>
And I get the next output:
object(Mongo)... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549796",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Android Graphical Layout Editor in eclipse can't see my custom class I have created a new class that extends the RelativeLayout and when viewing this using the Grahical Layout editor, I always see this error:
The following classes could not be found:
- eg.package.StripedBackgroundLayout
Has anyone experience this be... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549798",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Save login details(preferences) android I have one android app with login, logout functions. The login form contains Username and password and the login button. I want to save the username and the password when the user checks the "Remember me" check box.
My project.java file is shown below:
public class project ext... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549802",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Using multiple vertex shaders on the same program I'm trying to implements projection, using a vertex shader.
Is there a way to have a separate vertex shader to handle set the gl_Position, and having another vertex shader to set the values required for the fragment shader?
The problem I have it that only the main() ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549805",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Android Animation for hightlight I am trying to learn how to do animation on Android. I want to use tween from my understanding via XML. I want to just highlight a text view, but I can't seem to find any simple examples that work, most seem to go for rotating. Anyone have an idea?
Also once I make the animation work... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549811",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: push empty array as value of an array key I need to push a new array as the value of a parent array key.
this is my array.
asd[
[hey],
[hi]
]
i would like to return.
asd[
[hey]=>[],
[hi]
]
i do:
var asd = new Array();
asd.push(hey);
asd.push(hi);
asd[hey].push(new Array());
so obviously is not ok my code
A: I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549816",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Run two commands in a row after an if statement in Clojure Why does the following Clojure program throw a NullPointerException?
user=> (defn x []
"Do two things if the expression is true."
(if true ((println "first expr") (println "second expr")) false))
user=> (x)
first expr
java.lang.NullPointerEx... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549820",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: Comparing arrays of strings for similarity I have available to me hundreds of JSON strings. Each of these contains an array of 15-20 words sorted by some predetermined weight. This weight, if it's worth noting, is the amount of times these words are found in some chunk of text. What's the best way of finding similar... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549822",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Testing custom standard compliant containers I am making custom versions of the standard containers (many reasons, the main one being educational). The containers have the same interface as the standard containers. Now I want to test the containers properly. Is there perchance tests written for the standard library ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549824",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to make classes in NACHOS (C++) I am trying to implement a player class, so I created two files in my threads folder,
player.cc and player.h
player.h goes like this :
#ifndef PLAYER_H
#define PLAYER_H
#include "utility.h"
class Player()
{
public:
//getPlayerID();
};
#endif
then player.cc goes like
#inclu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549826",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Possible design strategies for login for multi-tenant cloud application? I am working on a multi-tenant cloud application and considering using E-mail addresses/passwords for general login credentials. However, I may have the same user (same E-mail address) associated with multiple tenants based on the planned sal... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549828",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Where should I put the Google Analytics asynchronous snippet Google says
The asynchronous snippet should appear at the top of your page before
the closing tag.
And gives this:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549838",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Python program treating dictionary like a string I set up a dictionary, and filled it from a file, like so:
filedusers = {} # cheap way to keep track of users, not for production
FILE = open(r"G:\School\CS442\users.txt", "r")
filedusers = ast.literal_eval("\"{" + FILE.readline().strip() + "}\"")
FILE.close()
then l... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549839",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-2"
} |
Q: Rails where date is greater than given date query Trying to search where movies coming out have a release date greater than today's date
Movie.where('release > ?', Date.today)
ActiveRecord::StatementInvalid: Mysql::ParseError: You have an error in your SQL syntax; check the manual that corresponds to your My... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549851",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "82"
} |
Q: Why does a process started in a DLL file work when tested using console application, but not when called by another DLL file? Last week I posted the question How can I obtain console application output when running it as a process in a C# DLL file? as I was trying to find out the cause of a problem I was having. How... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549852",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Using a combination of SESSION Vars and COOKIE Vars in PHP Heyo,
Odd question... is it possible/ ok. To use a combination of SESSION variables and COOKIE variables... in PHP?
I know SESSIONS are stored server side and COOKIES client side...
Is there any chance of interference? What is the best practise?
Christopher
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549853",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Load String of comma-separated-values (csv) into Quickoffice or Google Doc I am writing an Android App that collects data as a String of comma-separated-values (terminating each line with '\n') and then emails me the data once a month.
One of my beta-testers has informed me that he would like to be able to view the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549857",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Help with inner loop in Python method I'm having trouble understanding why an inner loop in my method isn't producing the desired behavior I'm expecting and I'm hoping someone can help me understand the problem.
My method takes a series of arguments (*args) and if the argument is an integer I want to add dollar sign... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549858",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to write long formatted text in a Text View with xCode I feel strange asking a question about what's probably the simplest page in my iPhone app but here it is anyway:
I have a controller that a user can invoke to display the rules of the game and some acknowledgment information. I set up a Text View object fil... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549862",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to change the screen orientation before layout / drawing happens? I want to set the orientation of a subactivity when it starts. The orientation has to be set in run-time and not in XML. So I put the code for it in onCreate(). I also have
android:configChanges="orientation|screenSize"
in the manifest for the a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549866",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to implement php facebook sdk into cakephp? All the guides online are self-labeled out of date, and the most popular plugin I assume is Nick Baker's which currently isn't working.
So is there anything recent? Haven't found anything that really explains this after hours of searching google and tinkering with this... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549869",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Reachability code blocking main thread I'm currently working on an app that requires me to check for reachability.
Owing to that, I started looking stuff up and found DDG and Apple's code. I decided to go with Apple's latest reachability code.
I imported that, and as suggested in Apple's sample, I came up with the f... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549870",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Using SQL to Aggregate and Calculate Stats I have shoot 'em game where users compete against each other over the course of a week to accumulate the most points. I want to write a query that aggregates statistical data from the shots table. The tables and relationships of concern here are:
*
*user has many competi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549871",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I fix an "ambiguous" function call? I'm working on a C++ program for class, and my compiler is complaining about an "ambiguous" function call. I suspect that this is because there are several functions defined with different parameters.
How can I tell the compiler which one I want? Aside from a case-specific... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549874",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "27"
} |
Q: Java - Read from socket? SO I just tried to read text from a socket, and I did the following:
import java.io.*;
import java.net.*;
public class apples{
public static void main(String args[]) throws IOException{
Socket client = null;
PrintWriter output = null;
BufferedReader in = null;
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549875",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to distribute directories? Let us say I have a list of directories:
archive_1
archive_2
archive_a
...
Is there a simple way to distribute these directories into a specified number of directories? For instance something like:
distribute -t10 archive_*
should produce 10 directories: sub_1, sub_2, ... sub_10 and... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549876",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Link error while building a C++ Unit test project in VS.NET 2010 I am trying to build a very simple C++ unit test project. The setup is just so happened to be exactly the same as what this blog described. I built a static library TestLib.lib and a C++ unit test project called TestProject. Both projects are using ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549878",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Thunderbird "Tags" in IMAP / PHP Thunderbird allows to flag messages with predefined (or own) Tags, e.g. "To Do", "Later". (Press "1" while reading a msg to see.)
These tags are replicated to the IMAP server (I verified that by using two TB clients: I saw the same tags on both clients).
How can I access the tag info... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549879",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Smoothing issue with Diamond-Square algorithm I am using the diamond-square algorithm to generate random terrain.
It works fine except I get these large cone shapes either sticking out of or into the terrain.
The problem seems to be that every now and then a point gets set either way too high or way too low.
Here is... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549883",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: try & catch blocks with implement & interface I tried this tutorial : http://about-android.blogspot.com/2010/02/create-custom-dialog.html
There is no "hello" debug message when doing try & catch blocks with implement & interface. Do you think that i can do the try catch block with implement & interface??
privat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549884",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: jQuery post inside another javascript function I have some code like:
function duplicatecheck(value, colname) {
var invoiceLineId = $('tr[editable="1"]').attr('id');
var invoiceLine = {
InvoiceLineId: invoiceLineId,
InvoiceId: invoiceId,
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549886",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Can't figure out how to overlap images in java So I decided to pick up programming as a hobby, and am now working on creating a slot machine with help from tutorials. However, I ran into problems with overlapping images. I used a photo editor to create a .png file of what I want to be the background with three trans... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549887",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: NSPredicate that calls test method to fetch results from Core Data I am not quite sure how to word this question without explaining what I am trying to do.
I have a managed object context filled with (essentially) circles that have an x,y coord for the center point and a radius.
I would like to construct a predicate... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549888",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Getting the actual type from reflection fieldInfo I'm writing a generic wrapper around a software's GUI API which has the ability to process quite a few of its own 'built-in' types but I can't figure out how to get it what it needs. For example, I'm doing this to handle strings:
("MakeTextField" and "MakeField" are ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549890",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: CGI PHP server any examples availble windows It not hard to write in C++ some support statements to PHP with a DLL as I need them.
Is it possible for me to view a copy of a web server with its own CGI scripts made from PHP, which I can use as an example from somewhere? I'm doing this for web site security reasons a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549896",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Django: Custom Model Manager queries in abstract classes I am working on a django project in which I create a set of three abstract models that I will use for a variety of apps later on all of which will contain this hierarchy of three models. E.g.:
class Book(models.Models):
name = models.CharField(...)
aut... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549898",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Using FormCollection to take and use each value for any one specific key I have a bunch of listboxes in the view, each listbox has a unique name/id. When submitted
the action method receives the data accordingly that is key = listbox name and value(s) = all selected values for that listbox.
How can I take all values... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549901",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: serve text/html file with fread() in HTTP response in c When building a HTTP response, I need to read the file I want to serve in memory.
For binary files, like jpeg, I use
//Setup and other headers omitted
stat(file, &fileStat);
int fileSize=fileState.st_size
sprintf(headerBuffer, "content-length: %u\r\n\r\n", file... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549914",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to take video stream from user's webcam, process it with c++ program and send back I want to take video stream from user's webcam in web browser, process it with c++ program and send back. Can you give me same advise, link or code example?
| {
"language": "en",
"url": "https://stackoverflow.com/questions/7549917",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Paged retrieval of a large ResultSet A database query returns a large ResultSet, and I would like to page the result, something like a cursor where I can choose how many results to retrieve and then in a next loop retrieve the remainders. What is the best way to do this?
Thanks
A: You may try javax.sql.rowset.Cache... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549919",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Show/Hide Div or Element I have visited a site and a feature entertained me a lot but I can't figure out how to replicate it! XD Can someone help me out?
I'd like to replicate the functionality of this site's copyright notification my sites to give credit towards me and my co-worker.
I will really appreciate it. T... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549923",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-2"
} |
Q: Should I use NoSQL instead of MySQL? I'm using PHP to develop web applications. I've used MySQL as my RDMS. For many things an RDMS works, and many problems can be solved by normalization, among other things. But some situations just don't work well with an RDMS, so other solutions such as NoSQL have been devised.
W... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549924",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Winamp Plugin - Can I detect a redirect in minibrowser? I am developing a Winamp plugin that requires a user a to authenticate on a website that I display in the minibrowser. After the user authenticates I would then like control to be given back to my plugin.
My question is: is there a way to detect when the user ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549925",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: how to save file app data folder Im working on a project and I need the program to store some of the property files and some text files.
How could I save a file in the appdata folder on windows in java also what would be the linux equivalent of appdat?
Thanks in advance
A: Save the file to System.getenv("APPDATA")
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549926",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to get touch event on CPTLayer? I'm using core plot to draw a bar chart, I was wondering is there a way I can have touch events on the bars? Thanks.
A: You use a delegate object to receive notification of touch events in Core Plot plots. For bar plots, implement the -barPlot:barWasSelectedAtRecordIndex: method.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549927",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What kind of algorithms are used to break down data? I have a table with a large amount of data and need to do lookups on each and break down each of the data. Here's a simplified numeric example. I have this table:
1 [1]
2 [1, 1]
4 [2, 2]
now I want to break down 4. I look up and see 2+2=4. so then I look up 2 ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549929",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: when to release object that is used throughout the class? I know that the basic rule of memory management in objective-C is that for every object you do an alloc, you need to release it somewhere.
Say I have the following:
@interface NewPollViewController : UIViewController
{
NSMutableArray * myArray;
}
@proper... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549931",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: MSBuild community task GacUtil silently failing for me I have an open source .NET project whose main artefact is a DLL that needs to be installed to the GAC for its primary use case. Therefore I want to install it during the AfterBuild task. I am using the GacUtil msbuild task from the MSBuild Community Extensions. ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549936",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Could someone explain these code snippets? In the following code, could someone explain to me how the following works?
/*
* sniffex.c
*
* Sniffer example of TCP/IP packet capture using libpcap.
*
* Version 0.1.1 (2005-07-05)
* Copyright (c) 2005 The Tcpdump Group
*
* This software is intended to be used as ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549940",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-3"
} |
Q: Get json value from a function that has an ajax call in it I'm trying to get json value from a function that has an ajax call in it.
This is my function:
function getVariables(){
$.ajax({
type: "post",
url: "db/functions.php",
data: "func=getvars,
dataType: "json",
success: functi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549945",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Is there a way to update secure URL's of apps created by our users? We are trying to beat the October 1 deadline. However, we need to update thousands of apps' Secure URL's for apps created by our users . In the past, we have used Admin.setAppProperties , but there is no way to update the Secure URL.
A: In a comme... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549946",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Detect IE Browser and Alert only once I just grabbed this code from various sites and came out with my own to accomplish the following.
I want to detect an IE Browser and would like to alert the members ONLY Once through out their session. How Do I Do this? Following is the code, which I'm using.
<SCRIPT language="J... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549952",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: WCF MessageContract formatting issue I have a problem of WCF definition of MessageContact and client calling function.
Scenario; Client called the service with a string type reference ID and server responds instance of type of AudioObject. AudioObject consists of Stream as MessageBodyMember and FormatObject as a Mes... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549953",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: .click() doesn't fire function? I have checkboxes that toggle on/off select option values. This part works fine.
Now I want to "check" the check box after page load by default.
I tried .click() that checks the checkbox but doesn't run the click code that is linked to it. Tested on firefox 6.0.2, Safari & Chrome. An... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549960",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Cocos2d Project Within UINavigationController I know there are a few questions on this already - but none pertain to my problem.
I'm trying to attach part of an old Cocos2d game to my app via a UINavigationController. (the main point of this is so I can pop back to my root view controller when I want to return to th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549961",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Does ADO.net return results after the specified stored procedure call only or does it wait until all triggers are executed? I am trying to record each words used in a nvarchar(max) field in my database and each word will become a data row and it takes a lot of time when I do it in one stored procedure. SO I have cre... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549974",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: What does "?:" do in regex? I wanted to match anything but a string using regex. I did some Googling and found this: ^(?:(?!test).)*
What do ?: and ?! do? Thanks.
A: (?:) is non-capturing. That means that a match occurs as usual, but the parentheses are only for grouping (in this case to attach a * operator to the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549976",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: elisp conditional based on hostname I have a shared .emacs file between different Linux systems. I would like to execute an expression based on the hostname of the system I'm running:
(color-theme-initialize) ;; required for Ubuntu 10.10 and above.
I suppose one way to avoid checking the hostname would be to fact... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549978",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "27"
} |
Q: How freeze the ScrollViewer in WPF? i have a Canvas (WPF) where i can Zoom and Pan but when i want zoom in/zoom out the Canvas holding the key Ctrl + the wheel of MiddleButtonMouse in the same time also the ScrollViewer move up or down creating an undesirable effect so i ask you if there is a way meantime i zoom in/... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549980",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Questions about glDrawRangeElements() I am trying to render some old level data using the glDrawRangeElements() command. My vertices are set up correctly, my indices are set up correctly, but I can't seem to get it to render. I finally checked online and came across the example found here: http://www.songho.ca/openg... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549991",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Can AJAX content be ready by entering the url? I have created a page using some AJAX to call the embed video streaming. By every click on the image it will show the embed of that channel I use <li><a href="#" onClick="showtv('30')">
Before I use php; So if I enter the website what I use to have is the echo which in ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549993",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do you call web service in android such that it will continue waiting for response even when activity is on background? What approach do I have to take if I need to connect to a web service and make sure it will continue downloading even after the screen has been rotated or a phone call suddenly pops up or the a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549996",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: how to produce multiple rows into 1 column value or sql statement with comma seperated in T-sql ColumnName IsOrdered Seq_ID
ABC 2 2
DEF 1 1
GHI 0 NULL
JKL 1 4
MNO 1 3
PQR 0 5
I have... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7549999",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to prevent floating content in two divs from overlapping? In a FAQ page I'm trying to make I have a page with this structure:
<section id="container">
<div id="faq_primary"></div>
<div id="faq_sidebar"></div>
</section>
<footer>
<div id="directory">
<div id="col_a"></div>
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550000",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: How to locate error after MalformedByteSequenceException thrown by XML parser I'm getting a MalformedByteSequenceException when parsing an XML file.
My app allows external customers to submit XML files. They can use any supported encoding but most specify ...encoding="UTF-8"... at the top of the file as per the exa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550001",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: jQuery delay error with Form Validator Plugin I have a pop-up box using the ZURB.org script (working perfectly fine). Within this reveal box I have a Form which the user can fill out certain information. This validates perfectly using the plugin - presenting the nice looking error messages aligned fine.
My problem i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550002",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Create a slideshow with ImageViewe - Android I need to know how to create a slideshow of images using a ImageView, the names of image files are loaded from an array. So far I have tried this:
for(i=0;i<bL.length;i++){
imgView.setImageBitmap(bitmap);
a = new TranslateAnimation(
Animation.RELA... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550004",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Facebook FQL bug SELECT eid, start_time, name FROM event WHERE (eid IN (SELECT eid FROM event_member WHERE (uid = me() AND start_time < 1317006752)))
This FQL query is supposed to return events that began before 1317006752
However, it returns valid events IN ADDITION to this one
{
"eid": 239526399426862,
"... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550006",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Does Objective-C have reflection? I'm doing research about Objective-C, and I'd like to know if it has the concept of reflection. None of the documents I've found so far describes reflection.
A: There are runtime functions described in Runtime Reference which allows not only querying for features of a class or an i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550012",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: Unlock System Preferences using GUI Applescript I am trying to unlock the System Preferences using applescript.
I have managed to get my script to click the "Click the lock to make changes" part, and I was trying to get the applescript to enter the user name, but I keep getting the error
error "System Events got an ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550016",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: asp.net open source solution to "Adding a row to a specific SQL table"? I'm doing a web interface using asp.net, where user can add a row to a table in a SQL database. It's the same as add a row directly in MS access. It seems I'm reinventing the wheels.
So is there any open source solutions or classes that can redu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550021",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: CodeIgniter: Accessing view variables from helper I am extending form_helper that will populate data from an array in view.
E.g:
//Controller - user_controller.php
User_Controller extends CI_Controller{
function edit(){
$data['record'] = array('username'=>'robert','email'=>'simplerobert@google.com');
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550024",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: New to PHP frameworks, how about this approach? I'm about to start a new PHP project of my own, let say is a CRM SaaS.
I'm no PHP expert, I've been developing very simple PHP/MySQL websites for several years. I know CSS, jQUERY, etc. enough to figure out how to do specifically what I need at that moment.
Few months ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550025",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to use projection to select where x.val1=1, x.val2=2, etc.? How can use projection to select with where clause specification?
Perhaps something like?:
List<string> Titles =
iEnumerableResultSet.Select(x => x.Title = "Whatever", x=> x.Id =5).ToList();
A: In my opinion, Select is poorly named. It is suppose... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550026",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: MySql insert binary data to db without errors I have a problem. When I do an insert like so in php:
sql = "INSERT INTO mytable (id, value)
VALUES ('sds83','".$EncryptedString."')";
When I run the following query it sometimes works and sometimes it doesn't. The problem is that sometimes the $EncryptedString contains... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550030",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Using LINQ to SQL to update database? When I execute the following code I don't get any error, but it doesn't update the changes on the database either. I have 5 entries in the table user, and after executing the following code there is no user with "Active" state in the database.
Am I supposed to write the update s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550032",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to efficiently utilize multiple vertex buffers? Ok, so I've had a lot of success in creating procedural planet terrain with vertex buffers. The only problem is, the planets I'm looking at are too big for the XNA HiDef profile's buffer limit. Granted, I haven't gotten into much culling yet, but I"m going to go ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550034",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Can we leverage browsers' "text-search" feature in an HTML5 app? We are working on a HTML5 app feature that does exactly like the 'text search' feature in a browser: highlighting the targeted texts.
We are wondering, since browsers already have this feature, can we just leverage its ability and call the feature dire... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550035",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Scoping Rails Routes to Specific Properties of a Model So I have a resource type Post, that can be associated with a resource of type Category. I have the following in my routes.rb file:
resources "code", :controller => :posts, :as => :code
resources "sports", :controller => :posts, :as => :sports
resources "gaming... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550040",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: css hide button until div hover We want to hide button until we hover over the div layer.
FIDDLE here > Click to view
Essentially, I would like to be able to apply this to other elements also, but this will do for now, any help appreciated
A: Simply use the :hover pseudo-class on the outer div:
.resultContainer .vi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550048",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Wrong body width in Linux Firefox I try to get body width in Linux Firefox.
document.body.scrollWidth is equal to width which I can see in firefox window.
So when I changed window size, document.body.scrollWidth is changed.
But in Google Chrome, It is equal to body width.
My Firefox version is 6.0.
How can I get bod... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7550051",
"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.