text
stringlengths
8
267k
meta
dict
Q: Access 2007 VBA - Rename report upon closing it? I have a report that is dynamically generated depending on the button pressed on my main form, in order to change the filter, the query used, etc. I have DoCmd.Rename working to rename the report to the current (dynamic) report title. However, it appears that I cannot...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to Center Text in UITableView.tableHeaderView? I am adding a UILabel to the tableHeaderView but for some reason it is left aligned. self.messageLabel = [[UILabel alloc] initWithFrame:CGRectZero]; [self.messageLabel setText:@"Nothing to display!"]; [self.tableView setTableHeaderView:self.messageLabel]; [self.t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to find the ajax status with jQuery 1.2.6 I'm using jQuery 1.2.6 (I know it's old, but I don't have a choice) I need to check the status of my ajax calls. I either want to use: statusCode, or I could even use error(jqXHR, textStatus, errorThrown), except that textStatus, errorThrown and statusCode, aren't in my ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Decimals to 2 places for money in Python 3 How do I get my decimals to stay at 2 places for representing money using the decimal module? I've setting the precision, and damn near everything else, and met with failure. A: When working with money you usually want to limit precision as late as possible so things like ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Understanding xyplot in R I'm an R newbie and I'm trying to understand the xyplot function in lattice. I have a dataframe: df <- data.frame(Mean=as.vector(abc), Cycle=seq_len(nrow(abc)), Sample=rep(colnames(abc), each=nrow(abc))) and I can plot it using xyplot(Mean ~ Cycle, group=Sample, df, type="b", pch=20, auto...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560457", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Opening a new window and waiting for it to close I have a Mac OS X app written in objetive-c Cocoa. You can see most of the code in this previous question. Essentially you click a button on the main window (the app delegate) and it opens another window where the user can enter information. In the following code (tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Convert Apache .htaccess to Nginx I got the following .htaccess code for a Magento plugin, could someone help me convert it to valid Nginx rewrites? I'm having a really tough time getting this down. It's for a plugin that rewrites and caches Magento URL's. The original editor of the module couldn't help me. I'm sure...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Jquery colon conflict HTML allows to use as a valid identifier (ID) a colon. For example: <div id="item:0">...</div> The problem is I have a Jquery snippet like this: $("#" + id).clone(true, true); When some ID uses a colon this call makes JQuery crash. What can I do to make it work? (Note: changing colon symbol f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Help needed with farbtastic color picker. Simple example html included I've included a very simple html example that almost works. It is a very plain implementation of this great color picker. But it doesn't quite work as advertised. I only get a single blue box and I can pick blue shades. But not the gradient ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Behaviour of RTF in browsers I am receiving text from a backend and displaying it on my web page. The text could be in one of three formats: plain text, HTML, and RTF. I am sure the first two will render without any problems, or loss of formatting. Will RTF be interpreted and rendered properly by web browsers? A: N...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to call function in main activity from service? I start a service from my main activity using startService(). The service checks for sockets on localhost. When it receives a socket, it reads data from it. I would like to hide the notification bar when it receives socket with specific data. I already coded a func...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Try-Catch Problem in c++ I am trying queue implementation in c++. During that I am having this problem. void Queue::view() { int i; try { if(Qstatus==EMPTY) { UnderFlowException ex = UnderFlowException("\nQUEUE IS EMPTY"); throw ex; } } i=front; cout<<"Queue contains...\n"; while(i <= rear) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I log in and display information from two tables (MySQL)? I'm new to MySQL and PHP so Im not sure how to approach this problem I'm having. I have two tables right now. CREATE TABLE `users` ( `userid` int(25) NOT NULL AUTO_INCREMENT, `username` varchar(65) NOT NULL DEFAULT '', `password` varchar(32) NO...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Updating the centre point & zoom of MKMapView (iPhone) I have been trying to centre the map view on the users location. This should also update as and when a change in location is registered. The issue I'm having is upon loading the app I can't get hold of the current latitude and longitude to apply the centring & z...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560474", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Android: Scaling image offsets between resolutions I have an app where, in landscape, I line up a bunch of lowercase alphabet ImageView pngs so that they are sitting on an imaginary line. The problem is that they are of different heights i.e. an 'h' is taller than an 'a'. Thus I've been setting the android:layout_ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how does google create the instant preview images? I was wondering how google is capturing all those websites that are featured in google's instant preview? I'm sure they are not using a thumbnail service (like www.thumbalizr.com, websnapr.com, snapcasa.com, thumbshots.com) but rather use their own software. BUT: gi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560480", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Dojo drop-down detaches when scrolling page containing FilteringSelect or ComboBox Since the ComboBox and FilteringSelect use a 'dijitPopup' whose DOM element gets inserted just before the closing body tag (presumably to help with ensuring it appears above everything else z-index-wise) this means that if the ComboBo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560481", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Assembly Language: Read (w/o echo) and write I am writing a program that will read and write characters, converting lowercase characters to uppercase. This is my first assembly program, so I am attempting to first get the program to read in a character and write it out. This is what I have coded so far: .model ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Django-- Retrieve specific object in templates I'm trying to have the URL have a variable (say userid='variable') and that variable would be passed as an argument to retrieve a specific object with 'variable' as its name in some specific application's database. How would I do this? A: Arie is right, the documentati...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Jasper Reports OutOfMemoryError on export I have written a web app for managing and running Jasper reports. Lately I've been working with some reports that generate extremely large (1500+ page) outputs, and attempting to resolve the resultant memory issues. I have discovered the JRFileVirtualizer, which has allowe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: PHP rename() Ignoring Permissions? Environment * *PHP -V output: PHP 5.3.5-1ubuntu7.2 with Suhosin-Patch (cli) (built: May 2 2011 23:00:17) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies *cat /etc/issue output: Ubuntu 11.04 *Apache2 -V ouput: Server version:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Inserting new tuples into a 1 to many relationship tables using c# DataSet I have a typed DataSet with two TableAdapters (1 to many relationship) that was created using visual studio 2010's Configuration Wizard. The child table's FK uses cascading. It is a small part of an application that keeps track of groups (par...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Return value from For loop I have a listView in my app. I loop through the items to check which one is currently selected and then return a value. As all paths have to return a value I have to return a value outside the loop which overwrites the for loop return, how do I keep this without overwriting it after the lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Java rmi, differentiating between multiple client Edit: To be clearer, I basically need to differentiate between the different clients doing remote method invocation in objects stored in the server remote object registry. How could I do that? And here is the situation: I am currently in the process of creating a cl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SecurityID doesn't match, possible CSRF attack I'm working on a site which was coded with Silverstripe, I've got a problem with importing images from the existing folders and wonder if someone can help me on this. Here is what I'm experiencing with SS admin (please see the image attached). 1) I click on File & Ima...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SQL Merge Query - Executing Additional Query I have written a working T-SQL MERGE statement. The premise is that Database A contains records about customer's support calls. If they are returning a product for repair, Database B is to be populated with certain data elements from Database A (e.g. customer name, addres...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: can we reject app after getting apple approval? i have uploaded new binary as a new version of my application and at the time of uploading binary, i select the option that "I Will Release this version" means i just put it in "Hold for Developer Release". Suppose my application is approved by apple and i dont want t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560514", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I inspect a Hadoop SequenceFile for which I lack full schema information? I have a compressed Hadoop SequenceFile from a customer which I'd like to inspect. I do not have full schema information at this time (which I'm working on separately). But in the interim (and in the hopes of a generic solution), what ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560515", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Controlling Windows in WPF when using MVVM pattern A little while ago, I wrote this SO post looking for a good way to handle UI and business layer interaction, and I liked the answer which was to use the MVVM pattern. So I did so quite successfully, but I'm a bit stuck with a problem using this pattern. Indeed, in s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560521", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: when are cookies sent from the user? I have a class that has a function, lets say class.php: class fun { public function get_cookie() { $old_cookie = $_COOKIE['mycookie']; } public function ssl() { //redirect from http to https } In another php file, lets say index.php: //include fun class $fun = new fun; $fun->ssl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560523", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to do something with selected values of an xforms:select every time they change? I have this problem with XForms I am running on Orbeon Forms. I am using a fr:box-select control as follows: <fr:box-select bind="box-select-bind" id="box-select-control"> <xforms:action ev:event="xforms-value-changed"> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Create themed/skinned WPF FileDialogs I would like to have my own FileDialogs like OpenFileDialog,SaveFileDialog,BrowseDialog etc... to skin them with the theme of my application to have a unique look/user experience. Well I know I cant skin the win32 dialogs but what about creating my own file dialogs with a windo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: what can i put in beforeUnload? I would like to have an animation effect which starts when people leave a page. I use this currently: window.onbeforeunload = function (){ alert("test"); console.log("test"); sliderIntervalId = setInterval('SlideDown()',1); } While the "test" is indeed logged to the cons...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Which CAS Server should I use? I don't know very much about CAS, except that I need Single Sign On for a few internal websites, and that this is probably my best option. What's a good CAS Server to use in an all Ruby on Rails environment? What's a good CAS Server to use in a mix of Ruby on Rails and Java environment...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560540", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I remove duplicates from one List that are found in another? This is for .NET 2.0, so I cannot use LINQ. I have a bit of an interesting problem. I am merging two lists of custom type "Article". The below code does the job nicely: List<Article> merge = new List<Article>(GetFeatureArticles()); merge.AddRange...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the most optimized/shortest JSON structure I can use to submit multiple records to SOLR Is this JSON legal to add documents to SOLR? { "add": [{"doc": {"id" : "TestDoc1", "title" : "test1"} }, {"doc": {"id" : "TestDoc2", "title" : "another test"} }, {"doc": {"id" : "TestDoc1", "title" : "t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I query mysql data with array I have 2 tables colorcode & users colorcode ID colorid colorname ------------------------ 1 1 yellow 2 2 black 3 3 red 4 4 white users ID userid colorid ------------------------ 1 1 1,2 2 2 3,4 3 3 1,3,4 4 4 1 Ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: OpenGL VBO shader I have a 2D VBO object that represent points in 2D space. What is the best way to draw an arbitrary shape at that point? Lets say I wanted to draw a red 'X' at each. Can I use a shader to do this? A: You don't neccessarily need a special shader for that, you might just use point sprites. This wou...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Templating ItemControl items without using ItemsSource I am trying to build a custom Silverlight ItemsControl. I want the users of this control to add items using XAML. The items will be other UI elements. I would like to add a margin around all added items and therefore I want to add an ItemTemplate. I am trying to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Form submit simulation - Javascript menu I'd like to get contents of a website using JavaScript menu. I need to simulate clicks (or typing javascript:gotoPage("p10"); into a browser) on menu links to be able to move from one page to another. The website uses a form activated by JS. It's probably not possible to go t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560565", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to detect type of Form Field in Template in Django Hi guys i have simple Django Form , but I need to get type of this field elements and I made some special operations according to this. Is there an easy way to get type of Form Field in Django Template? Any help will be appreciated. A: For your act...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Fuzzing the Linux Kernel: A student in peril. I am currently a student at a university studying a computing related degree and my current project is focusing on finding vulnerabilities in the Linux kernel. My aim is to both statically audit as well as 'fuzz' the kernel (targeting version 3.0) in an attempt to find a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: ParseException: Expected end of text I am trying to parse text using pyparsing. My function is shown below. Firstly, I construct a list containing all the terms in my dictionary (a dictionary of commonly used terms in my website). Then I set my grammar to be this list of commonly used words. Then I construct the Zer...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Newly created graphics object only showing after resize of frame This is a continuation from this post I have a set of random sized graphics adding and drawing onto a JPanel component. I have a button that is adding a new draw object to the same JPanel but is not displaying until i re-size the window. I have added t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Will my WCF service be scaleable using a singleton? My ASP .Net C# web application allows its users to send files from their account on my server to any remote server using FTP. I have implemented a WCF service to do this. The service instantiates a class for each user that spawns a worker thread which performs the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Supress grep output but capture it in a variable I'm trying to get the following line to work WERRORS=`echo $VALPG | grep -q -s -o -m 1 '\<[0-9]* Errors'` What I want is that the result of grep go into WERRORS variable but not echo in the terminal. So i use -q, but then WERRORS is empty A: If grep sends any error ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Finding previously deleted code in RTC later? Conventional wisdom says to delete code once you don't need it -- as opposed to leaving it in the codebase as a comment -- because you can always find it later in the repository. Let's say I need a line of code from the past which I remember to contain a very memorable s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560589", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Accessing Smartcards from a Web Site A number of Countries have implemented electronic id cards, that their citizens can use to securely access online facilities like banking. I am interested in learning how to support these cards, but tracking down documentation on how to do this from an IIS hosted website is a rea...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560596", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jquery mobile doesnt apply styles after ajax load My phonegap app makes a simple .load call when a button is clicked to put ajax imported info into the ajaxarea1 div. However, it is not being styled as a collapsible type object jquery mobile creates after it is loaded from ajax. simplified js here: $('#ajaxarea1').l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Are microframeworks intended for large code bases? I ask about the longevity of microframeworks like Flask, Bottle, and expressjs. Advantages: small, fast, manageable. Are they intended to be replaced as code complexity and user base grow? Also asked: should they be replaced with a full framework like Django or Pyr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Explode data / transform it to the PHP array My data variable is following: canv = 2,3,4,5:::canp = 2,3,4:::canpr = 2,3,4:::canpp = 2,3,4:::all = 2,3,4 I need it to transform to an array which should look following: $arr = array( "canv" => array("2", "3", "4", "5"), "canp" => array("2", "3", "4"), "canpr" => array...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560610", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: The correct way to dismiss a MFMailComposeViewController I'm at my wit's end. I need to dismiss an MFMailComposeViewController when my app transitions to the background and I can't do it. It ends up creating an awkward application state. Is there a way to handle this programmatically? Perhaps force the view contr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Actionscript Duck-typing I'm overriding a protected function in a subclass. Let's say I have two classes, Apple and Fruit. I have all variables in place, this is just a simplified version. class FruitBasket protected function getRandom():Fruit { // return random piece of fruit } class AppleBaske...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560619", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: matching container element width with that of child I want to have a setup like this: <div id="block"> <div class="btn">2</div> <div class="btn">1235e</div> <div class="btn">really long one</div> </div> jsfiddle: http://jsfiddle.net/cutcopypaste/3uu5Q/ Where the btns and block div get their width based on the conte...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Problem using SQL Server CE with Entity Framework code-first and ASP.NET MVC 3 and mvc miniprofiler I am attempting to create an ASP.NET MVC 3 application using C#, Entity Framework 4.0 code-first and SQL Server CE, and the automated scaffolding. Everything works fine until I try to actually use a page that connects...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Msdropdown opening only with a "slideDown" animation The MsDropDown located at: https://github.com/jgb146/ms-Dropdown/blob/master/msdropdown/js/jquery.dd.js only opening with a "slideDown" animation. How I can fix that to open with a slideUp animation? Anyone have a CSS or jQuery tricks? My example: <div> <html:s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Play can't read Heroku config vars when parsing application.conf I am deploying an app written with Play! Framework 1.2.3 to heroku (cedar stack) and I am setting some environment variables via heroku config:add DB_NAME="FOO" These are set OK (seen via heroku config --app appname). These are read from the code bot...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: CoffeeScript, Why do I need the explicit return on a conditional I was trying to learn CoffeeScript, and made this simple class as first try: class test fib: (x) -> x if x == 0 || x == 1 (this.fib x-1) + (this.fib x-2) t = new test alert(t.fib(6)); This code doesn't work because it gets compile...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PHP tricky problem I have the following class structure: class Parent { public function process($action) { // i.e. processCreateMyEntity $this->{'process' . $action}; } } class Child extends Parent { protected function processCreateMyEntity { echo 'kiss my indecisive ass'...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Rails 3 - AJAX request Rename it rename.js.erb alert('start'); $('div.popup').html('<%= escape_javascript(render('rename')) %>'); _rename.html.erb Some text in terminal window Processing by ArticlesController#rename as ... Rendered articles/_rename.html.erb (0.3ms) Rendered articles/rename.js.erb (2.3ms) This is m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560632", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Convert a java.text.DateFormat instance to a strftime string? I've got a DateFormat object that I would like to turn into a strftime string so I can get consistent date formatting across multiple languages. Is there something in the SDK that I'm missing? If not, is this a feature of some 3rd-party lib that I can gra...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560637", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Best way to re-create a dynamic table in css Curious to see what method other people are using to re-create fluid tables in CSS. Back in table days, if there wasn't a width set the table would just auto-adjust to make the columns fit. Let's say: We have a 2column "table" display a product. Image on the left, Name/De...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Django Admin Problem Coercing to Unicode Trying to create a Django app based off the tutorial but using a different model.(First time using Djanago) I'm at the part where you alter the Admin panel to add 3 items with a dependent foreign key. I know the problem originates from the class EventAdmin(admin.ModelAdmin):...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Creating SQL Server 2008 R2 DTSX from C# - Exception from HRESULT: 0xC0048021 I'm creating a dtsx from C# (.NET 4.0) but when I try add the OLEDB Source into the data flow and is time to execute the ProvideComponentProperties step, I recieve the following error in VS2010: Exception from HRESULT: 0xC0048021 This is p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: upgradable reader lock in c# I have a dictionary that is shared among number of threads. Every thread reads specific value from the dictionary according to a given key, but - if the key does not exist in the dictionary the thread need to add it to the dictionary. To solve the sync problem, I though to use ReaderWrit...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Dynamically refreshing an image using ajax within Grails I have a web page where I need periodically update image based on several conditions. For now I'm using this: <html> <head> <meta http-equiv="refresh" content="3"> </head> <body> <img src="${createLink(controller:'advertisment',action:'vi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Moving foreach loop before return statement I´m trying to place the result of a weather forecast function in a PHP return statement. To do this using concatenation I need to move a foreach loop up in the code and I just can´t get it to work. I´m trying to create a function like this: : function getWeatherForecast($...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560654", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET: can I force a download of a stored file and update a label in the same event handler? I've got a ListView datasourced to a database displaying a list of files to be downloaded along with a download count for each. In the ItemTemplate I use a Label to display the current count and a LinkButton with it's Text...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560656", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Flushing python GAE datastore when unit testing I am following the recommendations on the app engine site for unit testing coding with GAE. I have set the PseudoRandomHRConsistencyPolicy probability to 0% to force the code to account for cases where the data is not yet consistent. The problem is that in my test su...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560666", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: event.returnValue in IE6 The following code should not open a new window in IE and Firefox. Its not opening in Firefox, but it is opening in IE. Whats going wrong? var EventLib = { "preventDefault" : function(event){ if(event.preventDefault) { event.preventDefault(); }else{ ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560670", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Aggregate data in one column based on values in another column I know there is an easy way to do this...but, I can't figure it out. I have a dataframe in my R script that looks something like this: A B C 1.2 4 8 2.3 4 9 2.3 6 0 1.2 3 3 3.4 2 1 1.2 5 1 Note that A, B, and...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560671", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Rspec newbie question I was looking at some rspec sample code and came across this - lambda { @my_object.function }.should raise_error(ArgumentError, "Unknown tag type") Does this mean that rspec monkey patches the Proc object? Or otherwise how can I call the should method? A: I probably wouldn't call it monkey...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MySQL sub position counters in Query I need to get a record set where I fill the field level1 for every 60 records, means I need to fill level1 field this way: * *on pos=1 and pos=60 with level1 = 1 *on pos=61 and pos=120 with level1 = 2 *on pos=121 and pos=180 with level1 = 3 ... and then: if I have let's...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560679", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can I use one registered C2DM account for multiple apps I have a platform that is up to 14 branded applications now. I am implementing C2DM and am wondering if I need a registered C2DM account for each application. I just tried it out in the emulator and got a new registration token for the second app and sending m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: POST java object from .jsp to java I've got a page where the user inputs information into a form and then hits submit. When the submit button is clicked the user POST's data to a java file. I'm using out.print() to print Strings but how would I POST an object when the HTML form is submitted? A: <form action="/m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Trying to "Pulse" DateTime Updates in WPF App I apologize up front for the lengthy explication. I am working on a WPF desktop app (shown below): Basically there can be 0..n process status items in the list (the items themselves are ListBoxItems rendered using a DataTemplate). Recently, I decided I wanted to provide...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: XCode UIPickerView Delay Select I wish the UIPIckerView would allow you to scroll then select but since it doesn't, is there a way to delay the auto select? For example, if I scroll down and it stops on an item, it instantly automatically selects that item. Is there any way to make it so that if it lands on the it...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560704", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Null values in entity when entitydatasource Deleting Event raised I'm currently using the Entity Framework and I have a Gridview displaying a list of records from a database. I have a Remove button the uses the Delete command. Each record has a file on the server associated with it, so when the data source raises th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How should I account for subprocess.Popen() overhead when timing in python? more-intelligent-members-of-the-coding-community-than-I! I have a python question for you all... :) I am trying to optimize a python script that is (among other things) returning the wall-clock time a subprocess took execute and terminate. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to send parameter to action method from java script In controller (imagesController) I have 'crop' action get and post. I am trying to send string in it but not working. I am using replace to load view in iFrame but how to post some parameter to it? myIframe.location.replace('images/crop'); A: myIframe.locatio...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CSRF security risks if Validation token in header instead of POST body Most widely found solution on Searching for CSRF prevention techiniques is what MVCAntiForgeryToken (comes with MVC 3) implements, where client of the server has to post the validation token in POST body. On server side it will be validated again...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: When does the JVM load classes? Assume I have the following class: class Caller { public void createSomething() { new Something(); } } Would executing this line: static void main() { Class<?> clazz = Caller.class; } cause the JVM to load the class Something or is the class loading deferred until the met...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Dividing up 3d angles into equal quantities Say you have a 2d object, you could easily divide this into 15 degree rotations by simply rotating around the centre in 15 degree increments. If I want to calculate for a 3d object all the angles possible with equal spacing between each one how would I go about doing this...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560723", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# Lambda and LINQ tutorial for an experienced functional programmer I would like to learn the "functional" parts of C# (.NET 4). As a long time Haskell and Lisp programmer, I would prefer not to get distracted by explanations of basic concepts. Is there a book/tutorial that I should check out? A: Just look at the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What is the maximum amount of characters for an ASP.NET textbox with MultiLine TextMode enabled? I know that the MaxLength property doesn't apply to System.Web.UI.WebControls.Textbox control in MultiLine mode. But what is the maximum amount of characters I can type in the textbox? It seems to be 1000 characters, but...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560727", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Hosted PowerShell cannot see Cmdlets in the same Assembly I'm trying to run PowerShell scripts from my C# code, that will use custom Cmdlets from the assembly that runs them. Here is the code: using System; using System.Management.Automation; [Cmdlet(VerbsCommon.Get,"Hello")] public class GetHelloCommand:Cmdlet { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: C# and Flash integration I have integrated C# and Flash with "Sockwave Flash Object". I am trying to call a Flash method using a C# on-click event. How to do this? A: First, there is a SO question that can help with how to use Shockwave Flash Object: Displaying Flash content in a C# WinForms application Second, he...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560736", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Configuring tnsnames.ora, listener.ora anf sqlnet.ora to connect visual studio 2010 to oracle I have been trying to access an Oracle Database from Visual Studio 2010. I am confused about how to configure the tnsnames.ora, sqlnet.ora and listener.ora. I know they have to be moved into the Network/Admin folder of both...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Difference Between 2 DataTable I have 2 DataTable and I want to create a third DataTable that contais the difference between DataTable 1 and DataTable 2. For example, DataTable1 has the original data, and the DataTable 2 is just a copy, like a replication. But when you insert a new row in DataTable1, the DataTable2...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560742", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Dependency Injection in a WPF Application with Many Windows Is it "correct" to have many factories when using Dependency Injection with a "line of business" application? By, "line of business" application I mean an application like SalesForce.com or a CRM system with many functions and associated windows/forms. Ac...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: unmanaged dll, hangs / waiting / slow I've got an unmanaged dll working in asp.net running on IIS 7. Most of the time after a few request the application hangs for about a minute before continue or showing an error. Do I have to dispose, release or call the DLLdifferent? [DllImport("Fan.dll", CallingConvention = Ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560749", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Storing attribute/option data without EAV I am making a local cafe listing website and I wanted to get some feedback on my database structure. The cafes have a bunch of attributes that they can select one or many on any option. Here is how I am planing on storing their data. TABLE: 'cafes' CREATE TABLE `cafes` ( `...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560754", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Cosine Similarity Code (non-term vectors) I am trying to find the cosine similarity between 2 vectors (x,y Points) and I am making some silly error that I cannot nail down. Pardone me am a newbie and sorry if I am making a very simple error (which I very likely am). Thanks for your help public static double GetCos...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Returning a php element with a count with javascript I have a site where people search for music and the search is recorded with their id attached to it. I am trying to make a feed out of it and it has worked thus far. However, the feed includes a javascript function where it makes their search into a link which whe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Strategy for locating ViewModels when views are hierarchical and need to be swapped in and out Let's say I'm building a navigation system for a car: * *The main window would contain a screen, mode buttons, and a volume control. *Depending on the mode of the system, the screen would either show an audio, climate,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Add img on top of img html I have two img tags as shown below, but the img tag with the class portfolioImage1 always shows up underneath the img tag with the class portfolioItem1. How can I achieve having it the other way around so that portfolioImage1 is above portfolioItem1? <div class="portfolioContainer"> <i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560766", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to get all folders paths that contains music (mp3) in Cocoa? I'm new in Cocoa.I'm trying to scan computer for music folders,within my application. But I have some logic for it. What I need to start scaning from /Users , for example if I have /Users/music/anotherMusic and /Users/music/music2/music3 , I need to b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560769", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Scriptaculous Builder Not Setting Selected Value In FireFox I am trying to build a select options list and apply a default value to it. It seems to work in Chrome, but not in Firefox. My code is: var sel2 = Builder.node('select',{ name: 'type_' + tId, id: 'type_' + tId }); $A(templateTypes).each(function(t,idx...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Shared Header Causes Multiply Defined Symbol Error Consider the following header file example: shared_example.h #ifndef SHARED_EX #define SHARED_EX const int Shared_Int = 1; const char * Shared_CString = "This is a string"; #endif The shared_example.h file is included in multiple compilation units, which l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do I get the index in a TemplateCollectionView? So I followed the sproutcore "getting started" guide, and started wandering off the path to see if I could do what I meant easily. And here I am witht this templates, that represents a list of file inputs : {{#collection SC.TemplateCollectionView contentBinding=...
{ "language": "en", "url": "https://stackoverflow.com/questions/7560801", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }