text stringlengths 8 267k | meta dict |
|---|---|
Q: Custom Registrations Controller for Devise not Overriding Create Action I have been fighting with this for days now. I have created my own Registrations Controller to allow for an amdin to create and delete users. I have left the :registerable module in my devise configuration, as I also want to users to be able to ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624385",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: zombie.js browser.fire not working with Backbone.Events The browser.fire method does not seem to trigger event handlers attached through Backbone.Events. (it works fine for other cases such as clicking anchor tags/buttons)
See this gist for a test case on documentClouds site:
https://gist.github.com/1256944
If the f... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624386",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: why a "char*" can point to a "const char*"? the following code can be compiled correctly on both VC or gcc:
char *str = "I am a const!";
str[2] = 'n';
however, obviously there is a run-time-error. Since "I am a const!" is a const char*, why the compiler doesn't give an error or even a warning ??
Besides, if I defi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624387",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Where is parseRoutesNoCheck in Yesod I started to learn Haskell language and Yesod web framework.
When I tried to use "parseRoutesNoCheck" for mkYesod, however, the compiler could not match the return type (Resource) of parseRoutesNoCheck.
$ ghc simple_yesod.hs
[1 of 1] Compiling Main ( simple_yesod.hs, ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624392",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Grammars - RegEx I am trying to construct a regular expression that the total number of a's is divisible by 3 no matter how they are distributed. aabaabbaba. This is What i came up with:
b*ab*ab*
Now, someone told me i could do it this way
(b*ab*ab*)*
Why would i need to enclose it and why is the outside kleene s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624393",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Rails, dynamic emails sent do different email address on staging server So for static email in the system, I have a staging environment config setup which works well.
With dynamic emails, I have this code in my mailer.rb file.
if RAILS_ENV == 'staging'
recipients STAGING_TEST_EMAIL
else
recipients reque... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624398",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to find the date format of a string Is there a way (an elegant way that is) to extract a date format from a string containing a date so that it may be converted into an NSDate via NSDateFormatter?
i.e
string = @"2011-1-10";
format = [extractor extractFormat:string];// format would = yyyy-dd-mm
[formatter setDate... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624405",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Masking signal when global variables are being updated I am aware that i can mask a signal from being raised when handler is executing (by using sa_mask). However, i would like to know how to mask a signal when i am updating some global variables.
Also, i would like to know how to mask a signal when a particular us... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624406",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: ExpandableListAdapter add/delete group I need to be able to create and delete groups in my expandableListAdapter dynamically. I have looked through all that I can find and am stuck. I do not need specific code, but just to be pointed in the right direction.
A: First, we need some data structures (keep a referen... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624407",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Thottle PHP script from json Facebook api feed I have a script that runs in the background over facebook api using json_decode however it is bogging down my server to the point where i cannot connect. I am having it loop over all the tags in side my own personal photo album. Is there a way i can limit the connection... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624412",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to get an ID from database into the ListView I learn work with Android. I started to create a project with Contacts.
I insert contacts into the SQLite database and then I put them from the database and show them in ListView. Thats OK. But I would like to click on an item in the List and then to edit the item. Th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624413",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Trying to debug error: *** Assertion failure in -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] I have a simple UITableviewController that used to work fine and now something has broken it..
It presents a simple form that allows me to add a simple 3-field record to a core-data managed object.
When I a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624415",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: How can I implement a publish/subscribe system (server-push) with AKKA in Java? As I'm getting familiar with http://akka.io/, I can't figure out how to do server-push.
After a client connects to a server, how can the server push messages to the client? For example, if a client subscribed to receive stock quotes from... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624420",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: make a frame with components visible only when needed in android Well what i wanted to do was create an initial layout which will have a toggle button and on clicking the toggle but it should make a frame visible which will have a few buttons or textviews.
Does anybody know how to do this in Android 2.2??
A: If you... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624421",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: what is the fastest CSS display Property for Animating DOM element it seem that
display: block
cause less reflow then
display: table
also is there any css property that could be set to make sur that changing one dom element won't affect the layout of some other element and thus causing extra repaint or reflow.
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624426",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Wix Boolean Property Values Don't Work I have the following property:
<Property Id="UPDATEDB">1</Property>
A checkbox in the UI bound to that property:
<Control Id="updateDatabase" Type="CheckBox" CheckBoxValue="1" Height="15" Width="95" X="20" Y="74" Text="Update Database" Property="UPDATEDB" />
And a Custom Acti... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624428",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Process a directory of images in XCode Is there a way to read in and process a large directory of images in such a way that I can process one image at a time, and then once one is done, it will retrieve the next image from the directory, until it's gone through the whole directory?
I have a large folder of jpeg file... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624429",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How To Remove "Ctrl + Backspace" Special Character? I have a server written in C++, and when receiving a chat string, I'd like to remove weird special characters like the one created by Ctrl + Backspace (though not other symbols like :)]>_ etc.)
I'm using Boost, too.
edit: Why'd this get -1'd? It's a legit question.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624433",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: how to run .py file in browser using python webserver i have running a python webserver by using this simple script -
from http.server import SimpleHTTPRequestHandler as RH
from socketserver import TCPServer
ServerName='localhost'
OnPort=8000
print ("Server is running at Port 8000")
TCPServe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624435",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to connect Cakephp 1.3 with MS SQLServer 2008? I can't connect to MSSQL Server. I've been researching for 2 days, yet I can't find any useful resources. This is the error I'm getting:
URL rewriting is not properly configured on your server.
Help me configure my database. I don't / can't use URL rewriting:
You... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624436",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What's a safe way to declare a variable so I can call it from another script? I've built an array of image URLs on a Wordpress template page like this:
<?php $attachments = get_posts(array(
'order' => 'ASC',
'post_type' => 'attachment',
'post_parent' => $post->ID,
'po... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624438",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Can I convert my python script to a .app? Is it possible to convert my .py script to a .app that works through a text box or something?
Thanks
A: Try py2app.
py2app is a Python setuptools command which will allow you to make
standalone application bundles and plugins from Python scripts. py2app
is similar in p... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624443",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How to fix LayoutParam's for imageview ClassCaseException? This is the error i get each time i try and set the LayoutParam's for a image view.
10-02 03:27:53.081: ERROR/AndroidRuntime(1272): FATAL EXCEPTION: main
10-02 03:27:53.081: ERROR/AndroidRuntime(1272): java.lang.ClassCastException: android.widget.Gallery$Lay... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624445",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to remove Axis2 web service Is there a way to remove an already deployed axis2 web service ?
I tried deactivating, but that does not remove the web service, it merely disables it till the system is restarted.
Thanks. Any help is appreciated.
A: remove the artifact from the services folder. you may have to set h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624446",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Reading filecontent pairs of chars into array In C++, how can I read the contents of a file into an array of strings? I need this for a file that consists of pairs of chars separated by spaces as follows:
cc cc cc cc cc cc
cc cc cc cc cc cc
cc cc cc cc cc cc
cc cc cc cc cc cc
c can be any char, including space! Att... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624448",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Can't show the tabbar icon, even with size 30*30 I prepared some PNG icons, size 30*30, but with colors, not only black/white. The icons are OK when I want to display them on buttons.
It can't be shown in the tabbar.
I am wondering if the iphone only supports some simple icons (the black/white icons with lines).
Do ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624455",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to prevent page from unloading when app is active I have a few tabs in my app. I am currently facing an issue whereby my pages gets unloaded whenever the memory gets low (especially if I bring up the camera in my app).
Is there anyway to mitigate this and prevent unloading from happening? Or is there any way to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624456",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: RailRoad is not working. Giving me issues ie /railroad-0.5.0/lib/railroad/app_diagram.rb:54:in `disable_stdout': uninitialized constant Here is various outputs
railroad -M | dot -Tsvg > models.svg
/Users/me/.rvm/gems/ruby-1.9.2-p290/gems/railroad-0.5.0/lib/railroad/app_diagram.rb:54:in `disable_stdout': uninitializ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624457",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Most efficient way to modify xml I'm writing an app that needs to modify xml documents. More precisely it need to add attributes and add/delete nodes. These documents are relatively small, 30-50K at most. From what I'm reading the best way to read XML is use the SAX parser, but does that apply to modifying XML as... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624459",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: XML time stamp "Thu, 30 Jun 2011 07:34:33 +0000" to Unixtime? I have "Thu, 30 Jun 2011 07:34:33 +0000" as a time stamp from Twitter RSS feed. My server is in Eastern time. I need to some how convert this over to unixtime. I have no clue where to start. I guess Twitter would be in pacific time unless its like 24 hour... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624466",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Visual Basic 2d array from .dat file So I'm trying to pull some data from two text files. The first loads and populates the listboxes perfectly. The second text file is where I'm having trouble. I can't seem to get it to load correctly. I'm trying to put it into a 2D array, MileageAr. The messagebox is to troublesho... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624467",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Changing values in nested lists with python Ok, with the same program previously I've now hit a problem I should have anticipated; the grid (of variable width and height) is constructed based on a code to alternate the symbols which creates a list, those lists are then stored in the grid as nested lists. below is a ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624468",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: pass data using jquery $.get() I try to implement the following code:
html
<span id = "myset">school</span>
Javascript
var myset =$("#myset").val();
var ID=$("#data li:last").attr("id");
$.get('page.php', 'id='+ID+'&set='+myset, function(newdata){
$('#data').append(newdata);
});
I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624481",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Initialize a UIViewController before an item in a search bar is selected I have a UITabBarController and a SearchBar on the home page. The SearchBar searches items in the database and when an item is selected, jumps to that item in tab 2. I changed my view hierarchy to use a UINavigationController in that tab. In... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624485",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Overloading multiple operators Concisely, my goal is to have foo[bar] return type1, and foo[bar]= return type2.
I am writing an object in C++, and it's coming along quite nicely, however there's just one tiny little thing that I wish to do, yet it seems impossible.
My object is a storage class, so I am using an arra... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624489",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: How to Combine TemplateFields in ASP.Net GridView? Everyone.
I have a question when combining cells in GridView. I konw how to combine BoundField cells, but I do not know how to combine TemplateField cells in asp.net GridView.
EDIT:
Perhaps I did not make my question clearly and I am sorry about that. My question is... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624497",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: error while trying to display view in asp.net mvc 3 app? I am trying to display a list in a View, how to fix this error?
The model item passed into the dictionary is of type
'System.Data.Objects.ObjectQuery1[System.Linq.IGrouping2[System.Int32,mvc3Post.Models.Contact]]',
but this dictionary requires a model ite... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624498",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Shared Preferences in WebView I want to limit how many songs a user can download in my FREE app. The download is executed everytime a user clicks on a link that ends with /download/. I can't seem to wrap my head around how to get this to work with shared preferences. When testing I was able to download a file at lea... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624501",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: "Can't find model for source store" occurring during iphone "Automatic Lightweight Migration"? I'm really stuck here with upgrade testing from v1 to v2 of an iPhone application. I have IPA releases that I'm testing via ad hoc distribution via iTunes to my iPhone device, one for v1 of the app and one for v2. Note ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624502",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: Can display dialogue with function, but cannot set variable with function I want to take the return value of the function getProjectTag().
tell application "TaskPaper"
tell front document
repeat with the_entry in entries
-- For each entry, get the data from TaskPaper
tell the_ent... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624504",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Instantiate plugins efficiently with observer pattern (php) I'm implementing the observer pattern to all plugins to interact with my web app. Now, I want to make installing plugins painless (i.e just putting files into a plugin folder) like most web apps do.
For example:
A plugin with the name "Awesome Stuff" that e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624520",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I autoscroll down using javascript, stop the function, and then scroll to the top onClick? There is also an image (a down arrow), that I want to animate to face upwards when the page reaches a certain point. I have a function to scroll to the bottom, but I can't figure out how to end the function. I am very n... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624523",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: SQL Injection: is this secure? I have this site with the following parameters:
http://www.example.com.com/pagination.php?page=4&order=comment_time&sc=desc
I use the values of each of the parameters as a value in a SQL query.
I am trying to test my application and ultimately hack my own application for learning purpo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624528",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Python C API doesn't load module I'm trying to load a python module that contains a math and numpy import in C, using the C API. I can load and run the module but, if I import the math module it doesn't work.
I'm using Arch Linux, Python 2.7.2 and gcc.
Here the codes:
#include <stdio.h>
#include <stdlib.h>
#include ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624529",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Loading twitter data using JSONP in Chrome I am trying to get some data from twitter using jsonp. Here is the jsfiddle for the code. So, there is nothing too complicated about the code. It even works fine inside jsFiddle window, but as soon as I put it in javascript file inside an on ready function, nothing happens... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624532",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: No View Based Application Template XCode I've just installed the new iOS SDK and the View Based Application template has disappeared. Any ideas as to how to get it back?
A: Now it's called "Single View Application". Take this template and it should work :-)
| {
"language": "en",
"url": "https://stackoverflow.com/questions/7624538",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Modify build-in Object prototype String.prototype = new Number();
console.log(String.prototype.__proto__ === Number.prototype);//return false
why i cant change the prototype chain of bulid-in Object.
A: This is because the prototype property of built-in constructors1 is non-writable (also non-configurable and non-... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624539",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Add current value of EditText to a set value public void onClick(View v)
{
s.setText(s.getText().toString() + .5);
}
I want to have the value that is currently in s (EditText) to be .5 higher than it was before I clicked the button, I am a completely new to java and am unsure how to make this work. Any help is g... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624544",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Tiny Encryption Algorithm in game engine After being warned that my simple rotation encryption wouldn't be enough for my game, I decided to look around for some good, simple alternatives. I found a simple looking TEA example here I plugged it into my game engine.
void encipher(unsigned long *const v,unsigned lo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624545",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Alternative to absolute positioning of shapes' points I was wondering if there was a way in WPF to create a shape (ex.: polygon, line, ...) but instead of using absolute positioning for the points of the shape, we could use something like percentage.
For example, instead of having a line with absolute positioning l... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624547",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Htaccess Re-write rules problems with chrome displaying web pages Website displays correctly on IE. Chrome will not dislpay correctly or follow links. Any ideas or suggestions would be appreciated. If I remove the htaccess file, google displays correctly and links work.
Options +FollowSymLinks
Options -Indexes
Rewri... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624549",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Python: Is there a python module for ssh that supports lots of tunnels? I am writing a program that creates reverse tunnels with ssh.
I am using Popen currently, but I am receiving an error because I have too many arguments.
So my question is:
Is there any python module that supports a lot of tunnels? (Preferably 10... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624551",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Sparrow or Cocos2D for iPhone 2D game? I want to develop a game for iPhone. For 2D game development in iPhone which one of these would be better in the long run....Sparrow or Cocos2D? I've seen that there is a scarce documentation for Sparrow framework but Sparrow forum says it is easier to develop games in Sparrow ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624553",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: What's a good way of caching information in an Android App? If I have a lot of images that I would like to cache, what would be the ideal way?
I was thinking SQLite, but I'm not sure
A: There are a few different ways of persisting data with Android as delineated here http://developer.android.com/guide/topics/data/... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624555",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Scala: Can I reproduce anonymous class creation with a factory method? As far as I understand it, Scala creates an anonymous class if I create a class using the new keyword and follow the class name with a constructor:
class MyClass {
def doStuff() {
// ...
}
}
val mc = new MyClass {
doStuff()
}
The ni... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624557",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to pass C# array to C++ and return it back to C# with additional items? I have a C# project which is using a C++ dll. (in visual studio 2010)
I have to pass a array of int from C# code to C++ function and C++ function will add few elements in array, when control comes back to C# code, C# code will also add elem... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624561",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Get a word's definition using PHP? I have something where it randomly generates words using PHP...
I have a iFrame currently linking to dictionary.com...
I don't like this because it's old and ugly.
I want to get the definition of a word and display it how I want!
Is this possible by using PHP?
A: If you want to us... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624562",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-3"
} |
Q: media query debug I trying create a responsive site and need see where is page break in my current layout then i think about something that tell me it putting te current window size in each window resize.
I see someone telling about responsive layout in this post. A link about the function here.
I found this code ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624564",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: About Customized SurfaceView I inflate layer on the main frame and there is a ScrollView.
I want to draw a large image that can move left, right, top, and down on the screen.
So, I described this with a SurfaceView that I customized and addView to ScrollView,
but the Image that I want doesn't show. How can I solve t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624566",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: CakePHP: How can i stop inserting/adding html tag during commenting of a post? This is the form for comment:
echo $this->Form->create('Comment',array('url'=>array('controller' => 'comments', 'action' =>'add', $listposts['Post']['id']) ) );
echo $this->Form->input('post_id',array('type'=>'hidden','style'=>'width:30... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624571",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Why side-by-side installation of Visual Studio editions conflicting with Entity Framework? I have Visual Studio 2008 and 2010 (both Professional editions) installed. I installed Entity Framework 4.1 but after that neither VS-2008 nor VS-2010 is showing ADO.NET Entity Data Model in the choices when I select Add New I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624579",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to handle situation where page unloads due to low memory //In App Delegate
UserProfileTableViewController *uptvc = [[UserProfileTableViewController alloc]init];
UITabBarItem *tempTabBarItem4 = [[UITabBarItem alloc]initWithTitle:@"Fans" image:nil tag:FANSTAB_INDEX];
//I am setting the user id information here di... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624580",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Using multiple conditions in a do...while loop So I'm making a program that asks a user if they want to do something. The answer is as simple as Y/N. I would like the program to be able to accept both capital and lowercase "Y". Problem is, when I type while (answer == 'Y', answer == 'y') only the lowercase "Y" is ac... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624590",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Mix transactional replication and log shipping? I've replicated a large database (close to 1TB) to three remote servers using pushing transactional replication. The subscribers are read-only. A lot of data is inserted and updated (from other sources) in one day every month. It always fail the replication after the d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624591",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Bing Search API: Narrow by date In it's current version, is it possible to use Bing's "Narrow By Date" feature when accessing it's API?
I cannot find any information about how to narrow the results such that it only shows results from the "past 24 hours" or "past week" (and so on).
The website/documentation isn't ex... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624596",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Rotating CALayer of NSImageView 90 degrees I am trying to rotate the CALayer of an NSImageView. My problem is that the anchorPoint appears to be (0.0, 0.0) by default but I want it to be the center of the image (Apple's documentation indicates the default should be the center (0.5, 0.5), but it's not on my system O... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624599",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Pygame group update takes no arguments I've read up on similar problems elsewhere, but it says just to add 'self' to the function definition. When I check the file it's self, it actually already has the self keyword first! Here's the traceback:
Traceback (most recent call last):
File "C:\Users\Brenda\Documents\Th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624601",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Android animation - frame-by-frame? So, I'm new to programming with android and one of the first thing I'm trying to do is create a basic animation that starts on its own. Nothing complicated, just a looping animation. I am trying to stick with frame-by-frame because it seems the most basic and easiest to understand... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624602",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Make a single if-statement wait before executing in Java? I am trying to make Java wait for 1 second before evaluating an if statement to see if it should change a boolean.
I have it set up where if Rectangle r intersects Rectangle y, a boolean "Intersect" becomes true and r moves backwards. 1 second later, I want a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624604",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Play! Framework app on EC2 I want to deploy and run my Play! Framework app on EC2.
I have installed the Play! Framework on one instance, now I don't want to copy my source code over but instead I want to "build" my app into libraries/jar/wars and copy the binary over and have play run against the binaries. Does Pla... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624606",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Compile Boost Program I'm having trouble understanding the basics of compiling a boost program. I'm working with Fedora 15, with boost installed through yum in /usr/include/boost. I have boost build installed as well.
I'd really like to know how to link with the boost library and compile the following example under ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624610",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Dictionary containing objects with Timers. Need to find out which object's timer is calling the elapsed event i have this poll class
class Poll
{
public string question { get; set; }
public Timer pollTimer { get; set; }
public List<string> userVoted { get; set; }
public Dictionary<string, int> choic... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624611",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Small code, value isn't carried I've got this problem, I have a java file that obtains 2 variables from another file and is supposed to add them together and return the summed value. So far it works on obtaining the values aFirst and aSecond but I'm not sure why value one and two is lost (is back at 0) when it gets ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624617",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Optimize - Select whether record/condition exists in another table -TSQL CREATE TABLE IntegrationLog (
IntegrationLogID INT IDENTITY(1,1) NOT NULL,
RecordID INT NOT NULL,
SyncDate DATETIME NOT NULL,
Success BIT NOT NULL,
ErrorMessage VARCHAR(MAX) NULL,
PreviousError BIT NOT NULL --last sync attempt for record faile... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624619",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Including Smarty templates from sub-folders using relative paths I have created a folder structure for smarty templates
f
.f1
..template1.tpl
..test.tpl
template1.tpl
the template_dir path is pointed to folder 'f/'
in test.tpl is the code below
{include file="template1.tpl"}
{include file="../template1.tp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624626",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Difference between foreach and iterate in smarty What is difference between {iterate} and {foreach} in smarty tpl files?
are they different in using 'from' phrase?
A: As far as I know, there is no command called "iterate" in Smarty. There is, however, a command called {section} that is often confused with {foreach... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624628",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: google app engine python uploading application first time i'm trying to upload my app engine project for the very first time and i have no clue why it is not working. the error from my terminal is:
[me][~/Desktop]$ appcfg.py update ProjectDir/
Application: tacticalagentz; version: 1
Host: appengine.google.com
Start... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624629",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: excel vba - check if radio button is selected?
I'm trying to check the value of these simple radio button groups but my syntax is off, does anyone know what to change?
Note: they are Excel Option Buttons not ActiveX ones and they are not on a userform.
If Worksheets("Input").Shapes("Option Button 3").Select.Value ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624631",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Inserting Hebrew text into MySQL using PHP (garbage text) I'm facing a weird problem with inserting hebrew text into mysql.
Basically the problem is :
I have a php script which picks up hebrew text from a csv file then send it to mysql database. The charset of both database and all fields of tables are set to UTF8 ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624632",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to interprete gprof output I just profiled my program with gprof and got this:
100.01 0.01 0.01 23118 0.43 0.43 std::vector<int, std::allocator<int> >::operator=(std::vector<int, std::allocator<int> > const&)
Which confuses me, as it says that it is using 100.01% of the time using the = ope... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624634",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to embed strings inside code of executable? I have a string literal that's used in a number of different places around my executable.
Let's say something like:
const char *formatString = "Something I don't want to make obvious: %d";
int format1(char *buf) { sprintf(buf, formatString, 1); }
int format2(char *buf... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624635",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Data Encryption algorithm I want to know if our data is encrypted with one encryption algorithm(AES, DES, etc.) and then we transfer our data in open network, can anyone get real data or do some thing if the encryption algorithm is known even though the hacker doesn't know about the private keys, public key or PV?
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624636",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Is it possible for a class to conform to more than one protocol in objective-c? Is it possible for a class to conform to more than one protocol in objective-c? If so,
what is the syntax for declaring a class that conforms to more than one protocol?
A: @interface MyClass : NSObject <Protocol1, Protocol2, Protocol3>
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624639",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: HTML and CSS is not working? I am really new when it comes to web programming, specially when it comes to HTML and CSS, I was reading the Head first book by O reily and there was this example that is not working when I run it to my web browser, I am using Google chrome and I was using a notepad++ for this code of m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624645",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: "Application validation was skipped" because "the bundle “ITunesSoftwareService” couldn’t be loaded" Trying to build an iOS app, I get the warning "Application validation was skipped," and the Application Loader rejects my binary because the code signing step has failed. I never had any problems building and submitt... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624646",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to make an intelligent decision about which standard exception to throw? We know that the exception class has two derived classes: logic_error and runtime_error.
logic_error has four derived classes: domain_error, invalid_argument, length_error and out_of_range.
runtime_error has three derived classes: range_err... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624652",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "24"
} |
Q: No syntax highlight for *.qss file in Qt Creator? It's wired that Qt Creator didn't have a syntax highlight for its own style file format , or did i missed some packages ?
VER: Qt Creator 2.1.0
A: Go to
Tools > Options > Environment > Mime types
Find text/css and add *.qss to patterns.
A: I could not find any ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624656",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Why are XVisuals repeated in xdpyinfo Looking into my output of xdpyinfo, I see a lot of Visuals of the exact same characteristics repeated. Why are they repeated?
For example,
visual:
visual id: 0x6e
class: TrueColor
depth: 32 planes
available colormap entries: 256 per subfield
red, green, blue masks: ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624657",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Rake "already initialized constant WFKV_" warning Trying to run rake cucumber:ok and am getting this error:
/Users/dev/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_
Then:
Command failed with status (1): [/Users/dev/... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624661",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "33"
} |
Q: Best way to create the behavior of an extendable Enum in java I want to create something that resembles an extendable Enum (understanding extending Enums isn't possible in Java 6).
Here is what im trying to do:
I have many "Model" classes and each of these classes have a set of Fields that are to be associated with ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624679",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Get body of HTTP response in Clojure I'm trying to get the body of a HTTP response with Clojure, with a handler. However the http-agent function hangs without returning.
This will print the response, and then hang without returning:
(use '[clojure.contrib.http.agent])
(def text (result (http-agent "http://jsonip.co... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624686",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What's the difference between these two JavaScript patterns I am trying to organize my JavaScript better. My goal is to have modular architecture that I can break into separate files (sitename.js, sitename.utils.js etc).
I'd like to know what are advantages and disadvantages of these two patterns and which one is m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624693",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Summing XML data that is in two arrays I am very new to XSL and XML and have, I hope, an easy question. I have an XML file that has two arrays of numbers in them that I need to sum. Here is part of the XML file
<?xml version="1.0" encoding="UTF-8"?>
<out_xml>
<Root>
<ItemCollection>
<Item name="BaseLin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624694",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: How to use RCM theming Library for C# Winform Application I have Downloaded the RCM Library from http://www.codeproject.com/KB/cs/RCM.aspx but i don't know how to add the controls that it provides to c# toolbox or how to use the custom form it provides.Guys Plz Help me Out.
A: One of the solutions can be derive eve... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624695",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to solve "Device 0 (vif) could not be connected. Hotplug scripts not working."? When starting a virtual machine, xm shows:
Device 0 (vif) could not be connected. Hotplug scripts not working.
Why does xm show this? How to solve it?
A: From the Xen wiki:
Error: Device 0 (vif) could not be connected. Hotplug scr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624696",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: In VBA, how to insert text before and after style? I have been trying to work out how to insert text before and after a given style in Word using VBA.
At present I run through the document from top to bottom, find the style, and make the insertions. It is time-consuing and inelegant (to say the least).
It should be... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624697",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to make all src strings global in PHP? I am writing a web browser in PHP, for devices (such as the Kindle) which do not support multi-tab browsing. Currently I am reading the page source with file_get_contents(), and then echoing it into the page. My problem is that many pages use local references (such as < img... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624698",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Inapp Purchase is succeeded but content is not unlock in iPhone app.. Why? In My iphone app i have used In App purchase. All the things are working and the contents are in Resource folder. After successful transaction i have used a Sql Query to insert data in Sqlite database. I have Uploaded this app in App Store an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624700",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Dynamically Button Text? Top rows of three buttons shows the top three values of the database but from the next rows again top three values were shown in the three buttons ?
public class ButtonTest extends Activity {
/** Called when the activity is first created. */
NoteHelper helper = null;
Cursor ourCursor = null... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624703",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Getting parse error but I can't see anythting wrong in the line Here is my code:
if($_POST['format'] == "csv")
{
Line 174 -> $objWriter = new PHPExcel_IOFactory::createWriter($objPHPExcel, 'CSV');
$objWriter->save($FNAME);
} else {
$objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel);
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7624706",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.