text stringlengths 8 267k | meta dict |
|---|---|
Q: JS: Splitting a long string into strings with char limit while avoiding splitting words I am trying to take a large block of text and split it into multiple strings that are 148 characters each, while avoiding cutting off words.
I have this now, which is splitting words:
var length = shortData.new.length;
if (leng... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624713",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: C++ : how do I use type_traits to determine if a class is trivial? In C++0x, I would like to determine if a class is trivial/has standard layout so I can use memcpy(), memset(), etc...
How should I implement the code below, using type_traits, so I can confirm that a type is trivial?
template< typename T >
bool isT... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624714",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Shrink-wrap / Shrink-to-fit a div to reflowed floated divs in css http://jsfiddle.net/zEcn3/12/
I'm trying to get a div content that resizes to the number of divs that fit in a line. So the example works fine when the window is bigger than all the item divs combined so they're all in a row, but when the window is re... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624718",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: What's the best way to create "vertical rules" in CSS, and where can I read more about it? I have a main content region in the center of my page which is 660px wide. I want to separate it into two 330px-wide divs. What's the best way to go about this? Should I be using px? Do you have any place that I can read m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624719",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: colorWithPatternImage creates black grids in iphone 4 I have
UIView *topPart = [[UIView alloc] initWithFrame:CGRectMake(9, 0, 302, 318)];
topPart.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"pattern.png"]];
[someScroller addSubview:topPart];
[topPart release];
and I can see the pattern fi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624723",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Using AWS Elastic Beanstalk with a Java/BlazeDS/Spring application Is it possible to deploy my Spring/BlazeDS/Java application to elastic beanstalk? I'm using MyEclipse and built a Java Web Project with the required jar files etc. Do you need to specifically create an AWS Java Web Project - reason I ask is the optio... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624725",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I create an image filter in Symfony2 AvalancheImagineBundle? I'm using Symfony 2 and I just installed the AvalancheImagineBundle successfully. I created my own thumbnail filter as described in the README, and I created a 2nd filter called "profile" which (for the moment just to make sure it works) does the sa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624731",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Mongoid document persistence after find I having trouble persisting my documents in mongoid. I have the following code fragment in my controller:
params[:user][:residence_attributes][:locations_attributes].each do |num,location_attributes|
zipcode = Location.find(location_attributes[:id])
if !zipcode.update_at... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624732",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Unable to determine randomness vs code issue I'm unable to tell if there is something wrong with Random number generator in this case.
Random x = new Random();
do
{
a = x.Next(1, 200);
aa = x.Next(1, 200);
b = x.Next(a + 1, 200);
bb = x.Next(aa + 1, 200);
Console.WriteLine(a + " " + aa + " " ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624738",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Heroku database backup strategy? I'm just setting up my backup strategy for Heroku and i'm after more information on what i need to protect against.
Obviously I need to ensure I back up to protect data loss through my own mistakes or malicious attacks etc but do I also need to protect against Heroku screwing up and... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624739",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: port only a single method of class to C? I have a class with few methods and I'm happy with the performance of all of them except one method. We want to port that to C++. However we don't want to spend too much time porting the whole class to C++, just that single method. Is this possible? How should I do it? Should... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624740",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to set the logged in user ID on a session (CodeIgniter)? I am having trouble, getting the logged in user ID from the database...
This is my controller code :
function validation(){
$this->load->model('users_model');
$query = $this->users_model->validate();
if ($query){
$this->users_... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624742",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Why are objects still created when I omit importing classes in actionscript? I'm working through a tutorial to create an mp3 player in actionscript. When I delete my first 4 lines of code, the .swf still works great! I thought you needed to declare what classes you're importing for every object you create later on.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624752",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Accessing the current position of UIView during animation I am trying to find the current position of an iPhone ImageView that is animating across the screen.
I create and animate the imageView like so
-(IBAction)button:(UIButton *)sender{
UIImageView *myImageView =[[UIImageView alloc] initWithImage:
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624755",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "29"
} |
Q: Dynamic Reports using SSRS Let me declare... I am a newbie at this filling in the spot temporarily at the moment.
Problem: Develop a application summary report using SSRS 2008( the completed product should be a RDL file, which can be deployed to the SSRS Server) for the online application completed by the applicant... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624758",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: I need to figure out multiple UIActionsSheets? I am trying to create multiple UIActions sheets with my view. I have read a few questions on here and browsed the internet, but nothing seems to get me a valid answer.
I have tried the "switch and case" method that looks like this....
- (void)actionSheet:(UIActionSheet ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624762",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Disable Browser Input Field Effects? Okay, I'm trying to get rid of all these little things browsers do to input fields (like focus borders and what not).
input[type="text"] {
font:bold 10px/12px verdana,arial,serif;
padding: 20px;
border-radius: 15px;
}
input[type="text"]:focus {
outline: none!imp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624763",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Converting an OpenCV Image to Black and White How do you convert a grayscale OpenCV image to black and white? I see a similar question has already been asked, but I'm using OpenCV 2.3, and the proposed solution no longer seems to work.
I'm trying to convert a greyscale image to black and white, so that anything not ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624765",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "80"
} |
Q: Represent drop down menu of QPushButton with Qt Style Sheet? I'm wondering which is a proper way for representing the menu dropped down from a QPushButton ?
QPushButton::drop-down { blabla }
doesn't work
A: In QT Style Sheets, you can style widgets that are members of other widgets like so:
QPushButton QMenu
{
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624767",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Getting n smallest numbers in a sequence What would be the most efficient way to take n smallest numbers from a sequence,
[ [1 2 3] [9 2 1] [2 3 4] [5 6 7] ]
I would like to take 2 smallest from the sequence based on the first item,
[1 2 3] [2 3 4]
currently I am sorting the whole list then taking first n items bu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624768",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: 2 Dimentional array dereferencing ,how to evaluate through pointers a[2][3] = {{-3,14,5},{1,-10,8}}
*(a[j]+k)
*(a[j+k-2])
(*(a+j))[k])
(*(a+k-1))[j]
*((*(a+j))+k))
(**(a+j)+k)
*(&a[0][0]+j+k)
when i printf these i get
Output:
8
1
8
-10
8
3
1
respectively
Please if anyone can explain in detail how the valu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624773",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Haskell Map for Trees My tree is defined by
data Tree a = Leaf a | Node (Tree a) (Tree a)
deriving (Show)
I also declare a testing tree.
myTree = Node (Node (Leaf 1) (Leaf 2)) (Leaf 3)
What I want to do is create a function maptree f which will act on Leaf. To be more specifically, f x = x +1,
then maptre... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624774",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: how can I limit input to 5 lines in a UITextView on iPad? I have a UITextView in which the user enters lines of text. After the entry of the text I take a screen capture. Problem is, if you enter more than visible lines in textView, you can't screen capture all the text. I tried disabling scrolling, but that makes i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624775",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Returning multiple data items from a function in C or C++ I am confused on a couple homework questions I have...
Can you return multiple data items from a function by using return()? Can a function only return one value, unless it is a pointer to an array?
I believe that the answer is that a function can return mul... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624779",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Node.js Whiteboard App for Team / Educational Collaboration I'm looking to build/adapt a shared whiteboard app for team and educational collaboration. Draw on a board, write some text, save picture, clear board, etc. We've already got a simple chat system setup with node.js and socket.io so probably want to stay on ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624784",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Replacing list of li in a div with another list of li in the same div How do I replace a list of li in a div with another list of li in the same div? I tried this:
$("#divList").empty();
$('#divList').append('<li>' + textValue + '</li>');
I want to clear out all data that was originally in the div and replac... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624789",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-2"
} |
Q: What is the git equivalent of of hg outgoing (hg out) or hg incoming (hg in)?
Possible Duplicate:
How can I see incoming commits in git?
What is the git equivalent of of "hg outgoing" or "hg incoming"?
In Mercurial, hg outgoing lists the changesets that are newer than what's on the server and will be sent if I we... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624790",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "97"
} |
Q: MySQL Update only certain fields in a table I have some insurance information in a website, and I'd like to only edit certain fields the user wants to change like for example:
user, id, phone, address, city
and the user wants to change his city and phone...do i have to make a query for each specific case or is there... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624797",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Does having Rails logging enabled on a production environment a performance hit? I hope this question isn't too vague, but does logging in a production environment cause a hit in performance? In addition to the traditional production.log logging, we have a couple of additional things we record in begin/rescue type e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624814",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Adding Outlook Object Library to Excel 2011 for Mac I am trying to move a VBA macro code from Excel 2003 to Excel 2011.
The macro requires sending an Email from Outlook. However, when I went to Tool > References to add the Outlook Object Library, it does not show up in the List box.
How do I go about adding the refe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624817",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: route index for a resource What is the equivalent index path for resources :topics if I were to write it out manually?
When I run rake routes with the resources line in the routes.rb file it shows.
GET /topics(.:format) {:action=>"index", :controller=>"topics"}
I have tried a few things with no suc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624823",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Rails Formtastic: adding "data-" field to option tag I have:
form.input :duration, as: select, collection: {}
I need:
<option value="" data-price="XXX"></option>
Rails does not support HTML5 data attributes for the option tag. Formtastic suggests to create a helper method for this.
Formtastic readme describes how ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624824",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: Deploying Android Hello world on DELL XCD35 i have created a successfully hello world program with an image in it. and here is how it looks on windows 7
I have now connected to my DELL XCD to the computer, ensured that "USB Debugging" is ticked and also made sure that "Settings > Applications and enable Unknown sou... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624825",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: iOS App Portrait and Landscape Views I'm trying to make and iOS app with both portrait and landscape views, but if I open it and change the orientation to Landscape, some buttons got offscreen, after going to IB and reordering the buttons, in Portrait they go off screen.
After googling, I dont have ANY ideia how to ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624829",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Resizing images according to the Screen Size on Android I am making a graphic intensive application for Android.
The problem i am facing is that on my home screen there are 6 images that are placed on a FrameLayout. Since i own a HTC Desire, I placed the images such that they look great on 3.7in but when i test it o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624830",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: "call 0x80482f0 "? Just need clarification of one line of code in a 'hello world' program in x86 assembly "call 0x80482f0 <puts@plt>"? Just need help with one line of code in a 'hello world' program in x86 assembly.
NOTE: i'm running ubuntu linux while programming/debugging this, using gcc as the compiler and gdb... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624836",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: WP7 - How can I display a menu when holding down my finger on a ListBoxItem Almost everywhere in Windows Phone (for instance in the People hub), when you hold down your finger anywhere, a context-menu-ish menu pops up that says "Refresh".
How can I recreate this menu in my own application? I don't even know what to ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624839",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: python: is it possible to require that arguments to the functions are all keyword? To avoid the obvious bugs, I'd like to prevent the use of positional arguments with some functions. Is there any way to achieve that?
A: You could define a decorator that, using introspection, causes an error if the function that it ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624840",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: How to clear all data in MIMEBase (email module) so i have this code:
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.MIMEText import MIMEText
from email.Utils import COMMASPACE, formatdate
from email import Encoders
import os
def sendMail(to, subject, tex... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624841",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: quicksort implementation Following code for quicksort does not work and I can't understand what is reason.
#include <iostream>
using namespace std;
void exch(int a[],int i,int j){
int s=a[i];
a[i]=a[j];
a[j]=s;
}
int partition(int a[],int l,int h);
void quick(int a[],int l,int h){
if (h<=l) return ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624843",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Why is my Linq statement being executed twice? I am working on an internal message system. I have the mvc mini profiler hooked up, and it is showing me some statements are executed twice, and I can't figure out why,
My controller is as simple as you can get:
var db = MessagingDataContext.Get();
return db.Posts.Order... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624844",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: PHP parse error on database search result return I'm trying to get data out of a mysql db and I have the login info saved in another file. The username is getting sent from my form to the page with the code and i'm getting a
Parse error: syntax error, unexpected '[', expecting ',' or ';' in C:\xampp\htdocs\waladmi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624846",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-3"
} |
Q: javascript innerHTML is not overridden document.form1.field1.innerHTML="hi1"; works in onload() function.
but the same doesnt work if it is placed in some onclick() function/ some other function. If placed in onclick function, document.form1.field1.innerHTML="hi1"; is not overridden.
what we suppose to do in order t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624849",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: Binding Derived DataTable to SQL-made DataTable to Fill Datagrid I am at a loss and have searched everywhere to figure out how to do this in a way I understand but still no luck. I am trying to show the time the client has free and what is scheduled on a day-to-day basis. Their schedule is kept on a server and displ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624851",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: how to let child widget process QKeyEvent? I'm using a QTabWidget as centralWidget in a QMainWindow , however , keyPressEvent() won't trigger in any child widget of QTabWidget , if i try the following in that QMainWindow::keyPressEvent() , it will crash.
void Window::keyPressEvent(QKeyEvent *e) {
QApplication::s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624852",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Accessing Parameters from the Main Data Source from A Secondary Dataset I've got a chart that uses a secondary dataset. It allows for the use of the fields and parameters of the second dataset, however I'm not able to use the parameters set in the main report dataset. Does anyone have any clue how to access the valu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624864",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: regex special char? Is there a character that does the same thing as the asterix mark in unix (*).. that is, ignore everything after that letter ? (Including special characters)
For example, i want to match the following with just one regex expression
http://example.com/blah
http://example.com/blah/blah
http://examp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624867",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Why Grails war file gets corrupted sometimes We are using grails 1.3.4, we have 2 physical servers running separate load balanced tomcats. At times when I deploy war file on these tomcats one of the server starts giving strange errors, to fix I have to clean the ROOT context where war is exploded and restart tomcat ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624869",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Issue with refinerycms I18n Translation Default Frontend Locale Im working with RefineryCMS to upload a blog. Every works fine, but when i change the "I18n Translation Default Frontend Locale (Refinery) - en" to "es" (spanish) only somethings changes in the blog engine, but others desapear.
I want to know where and... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624874",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: ACTION_BATTERY_CHANGED firing like crazy Okay, so I'm working on an AppWidget that checks the battery level and displays it on a TextView. My code looks like this:
public class BattWidget extends AppWidgetProvider {
private RemoteViews views = new RemoteViews("com.nickavv.cleanwidgets", R.layout.battlayout);
@Over... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624882",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: B4ABridge not working for most of files I am trying several examples from the forum, most of the samples are not in my phone but are unable to be installed via the B4ABridge even it says it is connected. How can this be fixed?
this is what it says:
Installing file to device. 0.20
Installing with B4A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624883",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Why am I getting these errors? // Inventory.java part 1
// this program is to calculate the value of the inventory of the Electronics Department's cameras
import java.util.*;
import javax.swing.*;
import java.awt.event.*;
import java.io.*;
public class Inventory
{
public void main(String[] args)
{
// create Sca... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624892",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: how to use log4j with multiple classes? I'm currently writing a big project in java, with numerous classes, some classes are quiet small, that simply represent objects with only few methods.
I have a logger set in my main class, and it works fine.
I want to be able to use only one logger (with one console appender) ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624895",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "23"
} |
Q: Margin-top/Padding-top having no effect? I'm building a jQuery form-field validator, and at the moment I'm working on building in the pop-up notifications in CSS.
The problem is, I can't get .notification-point to align to the center of .notification-body, regardless of the application of margin-top/padding-top prop... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624897",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How can I use boto to stream a file out of Amazon S3 to Rackspace Cloudfiles? I'm copying a file from S3 to Cloudfiles, and I would like to avoid writing the file to disk. The Python-Cloudfiles library has an object.stream() call that looks to be what I need, but I can't find an equivalent call in boto. I'm hoping... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624900",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "49"
} |
Q: StringIndexOutOfBoundsException when switching page When I load a gridview (with adapter weekAdapter) from inside a fragment (weekFragment) for a viewpager, the first page loads fine. However, once I want to switch page, it gives a StringIndexOutOfBoundsException. I can't figure out what is wrong. In the LogCat noth... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624901",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: Access Two Controllers in same bean - Dispatcher Servlet I am new to spring framework and hibernate. I want to Access Two Controllers in same view. Here is my Dispatcher Servlet code.
<bean name="/EditTask.htm"
class="HumanResource.FindTaskController"
p:HResourceService-ref="hresourceService" />
<bean n... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624908",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Is it possible to force generation of assets with Rails Asset Pipeline? Is there a way to force regeneration of assets every request when using the Rails 3.1 Asset Pipeline?
I am having problems getting the system to pick up changes to files when using Less (less-rails) with a series of partials and mixin files. If ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624916",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "22"
} |
Q: Check if a user-defined type already exists in PostgreSQL Say I have created some user-defined types in the DB,
i.e. CREATE TYPE abc ...
Is it then possible to determine if the user-defined type exists or not? Perhaps, using any of the postgres information tables?
The main reason for this is since PostgreSQL does n... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624919",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "118"
} |
Q: Number.sign() in javascript Wonder if there are any nontrivial ways of finding number's sign (signum function)?
May be shorter / faster / more elegant solutions than the obvious one
var sign = number > 0 ? 1 : number < 0 ? -1 : 0;
Short answer!
Use this and you'll be safe and fast (source: moz)
if (!Math.sign) Mat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624920",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "107"
} |
Q: WCF Services for both Web Application and Ipad development I am in a situation where i have wcf services and which can be consumed by both web application and ipad application. So my question is, my client needs to be authenticated with user name and password, so what is the authentication method i have to follow. w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624934",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: How can I search a specific variable in vector in c++? I'm new to vector in C++, and I'm using pointer in it.
I'd like to search a variable if it already exists in the vector but I'm not sure how to do it.
B.cpp
vector<Animal*> vec_Animal;
vector<Animal*>::iterator ite_Animal;
What I'm trying to compare is Animal->... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624938",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to display status updates from followed users? (MVC) What would be a good approach to display on a dashboard, status updates from users that are being followed (e.g. twitter) on a MVC framework such as codeigniter.
I have a Table, just for the status update, where I record the ID,user_id & message.
Should I crea... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624941",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: SSL Certificate signature calculation
What I have understood is that a signature of a certificate would be hash of the certificate encrypted with private key of CA and then encrypted with the private key of server (which is the owner of certificate.)
SSL connection initiation/negotiation also allows for sending th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624943",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: COCOS2D best way to change level when score has been reached I have some difficulties making the level change only once when the player has reach a certain score during the game. It keeps changing every time the players gets a new score which is very annoying.
//Change the level
if(score >= 600){
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624948",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Creation date of a file How do I return a date of a file?
Something like this does not work and it is ugly too.
ls -l tz1.sql | awk '{print $7$6 $8}'
7Jun10:00
A: You can use stat to get the modification time, access time, or metadata change time of a file. Creation time is not recorded.
$ stat -c '%y' t.txt
2011-... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624950",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: JQueryUI Dialog not working in JS File I have JQuery code which makes Ajax call, In order to reuse same code, I have put my code in .JS File.
Here is the scenario.
1) I have hyperlink control and div control in my aspx page. div control is for displaying JQueryUI dialog message.
2) I have JS file which receives ref... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624955",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Using mysql triggers on 2 unrelated tables I need to create a user activity log which I then insert into the database. And for this, I'm thinking of using mysql triggers instead of placing a query that would do this on every successful query.
The 2 tables have no relationship at all.
Here's an example:
table_fruits
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624956",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Mysql Datasource is absent in datasource in data connections I installed MySQL server in my desktop, but MySQL is absent from the datasource list in dataconnections.
This is what I have:
This is what I need
A: You need to install MySql Connector API.
EDIT:
How to connect to a MySQL Data Source in Visual Studio
| {
"language": "en",
"url": "https://stackoverflow.com/questions/7624969",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to do processing for a range of dates which are within the upper and lower limit set by 2 date variables I have with me 2 dates in different date variables in a java desktop application. Now I want to create a loop that does some processing for each date within these 2 dates. (Excluding scenario where date= Uppe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624976",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Updated Value in SQL Server specially in SQL server 2005 How can detect an updated value in a Trigger specially in SQL Server 2005?
A: IF UPDATE (mycol1)
e.g.
CREATE TRIGGER reminder
ON Person.Address
AFTER UPDATE
AS
IF ( UPDATE (StateProvinceID) OR UPDATE (PostalCode) )
BEGIN
RAISERROR (50009, 16, 10)
END... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624979",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: fork and execlp When I use fork to create a new child process and then call execlp syscall to run a new program in the child. The process ids that I get in the child process after execlp and I get from waitpid syscall after the child terminates are different.
For example, getpid() returns 7103 in the child and waitp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624980",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Disabling MongoDB logging on Heroku/MongoHQ After getting the "logging negatively" warning, I guess ther's a way to disable on Heroku/MongoHQ too :
2011-10-02T05:35:38+00:00 heroku[web.1]: Starting process with command `thin -p 54227 -e production -R /home/heroku_rack/heroku.ru start`
2011-10-02T05:35:44+00:00 app[w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624984",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Audio switching in background mode AVFoundation - objective-c I have an array of Audio objects called LocalAudio. For playing audio I use AVAudioPlayer. I've implemented delegate method: audioPlayerDidFinishPlaying:,where i put code to switch next sound in my LocalAudio array.
-(void) audioPlayerDidFinishPlaying:(... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624986",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What's the difference between Uri.ToString() and Uri.AbsoluteUri? As a comment to an Azure question just now, @smarx noted
I think it's generally better to do blob.Uri.AbsoluteUri than
blob.Uri.ToString().
Is there a reason for this? The documentation for Uri.AbsoluteUri notes that it "Gets the absolute URI", Ur... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624987",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "112"
} |
Q: unique constraint in couchrest-model What is the best practice in Couchrest for implementing something like a unique constraint. I could do this with the _id , but what if I want to implemnet it on multiple fields, not necesarily as a composite, but even separately. Say for e.g. I want email ID and the username bot... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624996",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: django modelform showing an existing instance I have the following model:
ynChoice = ((None, 'Acknowledgement not required'),
(True, 'Acknowledgement and consent required'),
(False, 'Acknowledgement required but consent not required'))
class AbstractForm(models.Model):
"""base class for ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624997",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: write chars into DB with correct character-set I met a problem writing Chinese characters into an Oracle database. Here's some information for your reference.
*
*Environment: Oracle 8
select userenv('language') form dual;
returns
American.America.UTF8
*Developing:
.NET2/C#
*Client characterset:
gb2312
I ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625000",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: setcookie and redirect loads page from cache I have a page that sets a cookie and then redirects the user to the same page:
setcookie('name', $value, time() + $time, '/', '.domain.com');
header("Refresh: 0; url={$to}");
The problem is that after refresh the page gets loaded from cache and I can't use the cookie. I ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625007",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Django models.Model superclass I would like to create a models.Model class that doesn't became part of the database but just an interface to other models (I want to avoid repeating code).
Something like that:
class Interface(models.Model):
a = models.IntegerField()
b = models.TextField()
class Foo(Interface... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625010",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Fetching cursor location and highlighted text in textarea using JQuery Having a textarea in a form I am trying to do several things:
*
*fetch the current location of the cursor within the text area
*fetch the current selection within the textarea
*insert some text at the current cursor location
*replace the cu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625011",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: iOS:How to open camera with animation effect? I want to open camera with animation effect, so that it should appear that camera is opening in the parent screen only.
I am using camera overlay screen and on click event of button in parent screen,camera overlay screen is opening,in camera overlay screen there is a can... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625016",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: Using getLoginStatus to fire a Js redirect I'm trying to use Fb.getLoginStatus to implement a Js redirect to another page IF the user is logged in to Facebook upon coming to my website AND connected to my Fb app. It's not working and I don't know why! Is this possible? Any advice would be gratefully received.
Here's... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625018",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Distorted canvas shape when using dynamic dimensions I'm trying to create a guillotine-blade shaped trapezium using the canvas element, based on the current viewport dimensions full width, half height), but every time I do this the coordinates seem to be out of proportion (and sometimes the shape that I draw seems m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625020",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Adding an Access 2003 System DSN in Windows 7
Possible Duplicate:
Is there a Windows 7 ODBC driver for Access?
I'm migrating an Access 2003 app from Windows XP to Windows 7. In the ODBC Data Source Administrator - User or System DSN, when I click on "Add", the only selection is SQL Server. Where/how do I install ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625021",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Which is the fastest way to search a value within a set of many "range" objects in Python I have a list of many Python objects like this:
class RangeClass(object):
def __init__(self,address,size):
self.address=address
self.size=size
#other attributes and methods...
Then, I have a list (... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625024",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I properly go about building an Android App? Specifically, what kind of conventions in terms of Activities does one follow? If I'm building a program with many screens, do I create an Activity for each screen?
If I want to properly navigate between Activities, do I stick intents in every activity? I want to m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625025",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Which connectionstring to use in EF Code-first with an existing database The existing database was created in the project itself and resides on App_Data as prompted by visual studio while adding a new sql database item to the project.
So, should i use this string :
data source=.\SQLEXPRESS;Integrated Security=SSPI;... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625028",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Web application architecture with web services I want to build a web application + web service just to learn some new technologies, and I was thinking about the architecture of the projects in the application. I made an architectural diagram (never made one before), but I was wondering if this is a good one, if it's... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625030",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Is there any way to extend an object? In scala, we cannot extend object:
object X
object Y extends X
gives an error error: not found: type X
In my case someone has defined some functionality in an object and I need to extend it (basically add another method). What would be the easiest way to extend this object?
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625040",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "63"
} |
Q: Update and delete data in database mysql I use codeigniter. i have following values as json_encode in database row, i want delete value 3 in row 1 and values 14 & 5 in database table.
DELETE -> value 3 on row 1 & values 14, 5 on rows 2
UPDATE -> value 2 to 8 on row 1 & value 3 to 17 on rows 2.
How is query it for v... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625055",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-2"
} |
Q: what is your suggestion for a simple javascript editor with code completion? could you please let me know about good IDEs available for javascript programming?
I am looking for a no-frills, simple editor focussing primarily on the below functionalities -
a) syntax highlighting
b) auto-suggest for code completion
Not... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625057",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to Solve this "missing ) argument after list"? This looks like a trivial question, but I am not sure how to deal with it. I have a DIV tag generated from javascript that goes like this:
$('#results')
.append('<DIV id='
+ A.pid
+ ' onmouseover=function(){google.maps.event.trigger(marker, 'mouseover');};><H3>'
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625059",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to set textarea height with jQuery There is a table and many textareas in some cells.
The cells with textarea span multiple row (2, 3, 4, or more rows).
I want to make textareas occupy the whole cell areas.
I can do this with jQuery but it takes too long and the browser gives a warning.
$("textarea").each(functi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625064",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Getting exported part instance from MEF container How I can the existing instance of an exported part in MEF container . If I have class A which was composed in the container , I need in some places in my code to get the instance , if I call GetExortedValue() , then if class A signed with CreationPolicy.NonShared , ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625065",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Need to call three webflow states in parallel We are facing serious performance issues in our application. We need to send three different requests to our backend, when we are using webflow and we are sending them one by one and this is leading to considerable screen loading time.
Can we call three states of webflow... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625066",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Any solution to use non-guessable links in a program? I've been looking for a file hosting site to host my files and my friend offered me a premium account on Box.net.
The problem in this host site (and on many others) is that the links arent guessable, they cant be predicted. That means: If you upload 2 images call... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625068",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What interval should I use between each WiFi scan on Android? I need to perform Wifi scans at regular intervals. I am encountering a problem when the time interval is set to 1-2 seconds. It seems like I am not getting any ScanResult. Is there a minimum amount of time to set so that the WifiManager is able to perform... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625071",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: PHP APC 5.3.8 Hangs Page Request I had difficulty finding the newest version of php_apc.dll so I went ahead and compiled it myself. I had no issue getting it compiled using NTS v5.3.8. I had two separate files set up to test, one with a simple phpinfo() call on it and the other being the standard apc.php file that c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625073",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Download CSV directly into Python CSV parser I'm trying to download CSV content from morningstar and then parse its contents. If I inject the HTTP content directly into Python's CSV parser, the result is not formatted correctly. Yet, if I save the HTTP content to a file (/tmp/tmp.csv), and then import the file in th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7625079",
"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.