text
stringlengths
8
267k
meta
dict
Q: Longest common subsequence (Haskell) I've been struggling with this for a while. I'm solving the longest common subsequence problem in Haskell as a learning exercise. I have a function f1 that is passed two Ints i and j, and a function f2. f1 builds a two dimensional list so that the (i,j) location in the list is eq...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Does rich:extendedDataTable work in JSF 2 I've found that the client-side dynamics for rich:extendedDataTable do not work for me in JSF 2 with either RF 3.3.3 or RF 4. Moving a column just causes the table to hand and the drop down for sorting doesn't drop down. Looking at the RF demo page of RF 4 I noticed that the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I use the Boolean values returned by a Java method? I have a method that sends a bunch of characters to another method that will return true or false if certain character are present. Once this method evaluates all the character and returns true or false for each of them how do I use those true or false vale...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Set an entity kind name different from a class name Is there any way how to set a kind name different from a class name used in my Google App Engine? I am using Java and JDO to access a datastore. There a question about the similar issue in Python. It seems answered. Set a kind name independently of the model name ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616158", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Apache Ant Less Than How on earth do you check a number property is less than in Apache Ant? <property name="small" value="15"/> <property name="big" value="156"/> <fail message="small is less than big!"> <condition> <lessthan val1="${small}" val2="${big}"/> </condition> </fail> From what I've seen (I'm new...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616159", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: SQLite Trigger issue - "No such column" I have a sqlite database with a table named Achievements, it stores whether certain achievements have been met in a simple quiz I am building (iphone project to learn objective-c). The table structure is: ID Name Completed ============================= 1 Fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Tricky php class method default parameter syntax I am having difficulty understanding the proper syntax for the second default value in the following method declaration statement. Any suggestions would be greatly appreciated. Thanks! protected function load($columName = self::_tableIdName, $columnValue = self::_data...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to put() values into Guava's Cache class? I'm a little confused by CacheBuilder and Cache introduced in Guava 10. The documentation hints that it's possible to overwrite values but as far as I can tell, Cache does not contain any methods for doing so. Any ideas? I'm trying to construct a Map that expires a key 1...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Standalone module for nodejs? I would like to create a module for nodejs that can be used standalone. The module source is literally just JavaScript files that are executed using nodejs. I am not sure exactly how this would work, but essentially: npm install mymodule node mymodule inputfile or better mymodule inp...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616175", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Convert to a Type on the fly in C#.NET Alternative Title: Dynamically convert to a type at runtime. I want to to convert an Object to a type that will be assigned at runtime. For example, assume that I have a function that assigns a string value(from a TextBox or Dropdownlist) to an Object.Property. How would I conv...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616177", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: 404 error with Apache rewrite and userdirs On my computer I have an Apache server with rewrite and userdir modules enabled. The website is located in /home/pedro/Dropbox/www/cocina/ and the webserver root is /home/pedro/Dropbox/www/ If go to http://localhost/~pedro/cocina/index.php the website shows ok. In my .htacc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Check out files from Starteam (5.1) but ignore the specified working folder This question is specific to Starteam version 5.1. How do I export the most recent version of every file in a Starteam project so that the files end up in a directory structure that matches the folder structure in Starteam? Here’s the catc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Python Error Codes are upshifted Consider a python script error.py import sys sys.exit(3) Invoking python error.py; echo $? yields the expected "3". However, consider runner.py import os result = os.system("python error.py") print result yields 768. It seems that somehow the result of python code has been leftshi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Render to Texture OpenGL ES 2.0 I am trying to use a hardware optimized 2D library to zoom (non-interpolated scaling) in and out of an image. Right now I am * *Loading the original image *Making a copy of the original image *Using the 2D library to "zoom" into the copy *Generating textures using glTexImage2D f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616193", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the opposite of attr_accessible in Rails? What is the opposite of attr_accessible in Rails? Instead of writting every single attribute I want to write just the ones I want to block. A: attr_protected Mass-assignment to these attributes will simply be ignored, to assign to them you can use direct writer met...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: MSMQ Peek Permissions Only (i.e. without Receive Permissions)? Summary (tl;dr): We're trying to set up a queue with Peek access but not Receive access for testing purposes (so a Receive request will fail but a Peek will succeed), but it seems MSFT has made that more difficult than anticipated. Background: We have a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616195", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP Object constant runtime Maximum function nesting level I'm reaching the maximum function nesting level (full list at the end of question). I realize that the solution to this is xdebug.max_nesting_level, but what are the detriments to that? Also, how can I better implement my code. I'm writing an irc client that...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why is new String("Hello") invalid in C#? What is the logic/reason behind making String s= new String("Hello World"); Illegal in C#? The error is The best overloaded method match for `string.String(char*)' has some invalid arguments I'm not interested in the API docs, I am interested in why this is illegal. Is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616197", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Relative URLs with .htaccess I have a custom PHP framework in which everything after the domain is sent to PHP as a $_GET variable, like so: RewriteRule ^(.*)$ index.php?page_request=$1 [QSA,L] All routing is done by a router file. For example, http://domain.tld/page gets sent to http://domain.tld?page_request=home....
{ "language": "en", "url": "https://stackoverflow.com/questions/7616201", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Maximum number of JMS Queues We have an application that has 1) a custom server (conventional ServerSocket) that responds to 2) Java SWING applications/applets running on client desktops. We have more than 140 such custom servers (dedicated to each group of swing clients). We have built an administration applicat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Fastest possible Apple Style Flip Counter in native code on iOS I'd like to mimic an Apple style flip counter on iOS. Specifically, this thing is going to be FLYING FAST. It's not going to be an alarm clock, think player high-score where you are racking up points chunks at a time. The counter may jump from 0 to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Running a process remotely using Python Is it possible to run a System process remotely , i.e. in the background using python? For e.g. I ave Scilab installed on my system, now I do something like this xx= os.system('scilab-adv-cli') in the python console. But this fires up an actual scilab comman...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616215", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: iPhone - launching an UIImagePickerController from a UIWindow How may I launch a UIImagePickerController from the main UIWindow (no view defined) from - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions, on a project for which the main window does not have a b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616217", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Like Box Div Code - How to I put it on my website using Dreamweaver....currently does nothing Here is the code that the facebook developer page gave me for my site. I've tried putting it in by itself in the body of my code and with and iframe but cant get it to work. any help is appreciated. thanks <div id="fb-root"...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616224", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Django1.3 , Python2.7 django-admin.py is not working on windows I installed Django1.3 on Windows 7 , i made sure i have Python2.7 , Python2.7/Lib and Python2.7/lib/site-scripts/django/bin in my system PATH ... but, when i try to make django-admin.py creates a new project : django-admin.py startproject exampleproject...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how do I debug the height of a div/span? I have html like this: <div> <span style="display: inline-block;height:20px">20</span> <span style="display: inline-block;"><img src="img/ex.png"/></span> </div> The image I am importing in the second span is 15x15 pixels I can check with chrome and I can see that the fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616233", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using Java to organize array input into a table? I have a program that receives an array. I want to have it organize the results into ranges (like 60-69). It also needs to know how many of the numbers it received fit into which ranges so it can put them in accordingly. The way I've seen to create tabs in a table is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there any way to construct System.Web.Services.Protocols.InvokeCompletedEventArgs? This is possibly a dumb question since I'm new to all the technologies I'm using here (C#, .NET and SOAP). There just may not be anyway to do what I want to do here. I've got an asynchronous SOAP call (code generated from WSDL) th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616244", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to set jquery cookie for a URL with Fragment? I am using the jquery cookie plug-in https://github.com/carhartl/jquery-cookie. I saw this reference on how to build a URL with Fragment: AJAX Applications Crawlable The final url rule looks like this: localhost/site/search#!key__searchword&page=1 localhost/site/sear...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Build an IDT (INTERRUPT DESCRIPTOR TABLE) assembly AT&T intel 32 bits I try to build an IDT, after sti execution, the code crashes !! I have an error message : SingleStep CPU[1] Error : Processor Running Remark: I use micro Atom with eclipse Helios, the assembly is AT&T /** *********** New code *********/ New code...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MVC3 validation attribute breaks model I'm working with MVC3. I have a model object that I created with fluidNhibernate. It contains some value types, and some reference types of other objects also created through fluid. Lazy loading is enabled. In order for the reference types to show up as dropdown boxes on my...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616248", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: File Handling : unusual error reading file The output of the program is this : Although correct contents (for now only when trying to decrypt producing wrong result) but why this error ?? udit@udit-Dabba /opt/lampp/htdocs $ ./a.out Error reading password from BIO Error getting password Salted__�Yq\��v��u�&2�t���-�...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616249", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jQuery datatables as a replacement for JSF component library offerings About a year ago, the jQuery protagonist and author Bear Bibeault made a comment on coderanch to the effect that perhaps JSF component libraries weren't all they're made out to be and that you can do a lot with javascript & jQuery. I thought I'd ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: (view-based) NSTableView's reloadDataForRowIndexes:columnIndexes: not removing row view? Trying to use reloadDataForRowIndexes:columnIndexes: for my view based NSTableView in 10.7. Having redraw problems though. If I edit the object and call reloadDataForRowIndexes:columnIndexes: and later delete the object, I end u...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616256", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: For Loop on Lua My assignment is how to do a for loop. I have figured it out in terms of numbers but cannot figure it out in terms of names. I would like to create a for loop that runs down a list of names. Following is what I have so far: names = {'John', 'Joe', 'Steve'} for names = 1, 3 do print (names) end I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "103" }
Q: Using DateTime.ParseExact to get only the time (without the day) I get unexpected results when I use DateTime.ParseExact. Here's my test code: Dim MinVal As DateTime = #12:00:01 AM# Dim MaxVal As DateTime = #11:59:59 PM# Dim TooBig1, Equal1 As Boolean Dim TooBig2, Equal2 As Boolean Dim dt1 As DateTime = #12:00:01 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616261", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: QDateTime::fromString not accepting my QString? I have a .txt file which is filled with lines like this below: * *2011-03-03 03.33.13.222 4 2000 Information BUSINESS ...etc blabla *2011-03-03 03.33.13.333 4 2000 Information BUSINESS ...etc blabla *2011-03-03 03.33.13.444 4 2000 Information BUSINE...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Session injection? How should I host the id of the user on the session? just to insert the id? I mean (for example): $_SESSION['id'] = 1; There isn't a way to change it by the user himself (as cookie..)? Because if so, he can change to any id. One more question about it - how can I check if user is logged in (with ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616265", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Phone Gap: Writing to Files - Can't Get Example To Work I'm trying to follow the phonegap example file writing code and running into issues. I have tried running this both on a 2.2 emulator instance and on a phone: here is my code which is basically a near verbatim paste of the write file code from API docs + jscons...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How To: Custom Edit Column name and Value in a Telerik Grid I am kind of a newbie to MVC and Telerik and working on a project that involves both of them, the problem am facing currently is: Am using teleirk Grids extension with Grid Method (DataTable) bound to a DataTable: <% var table = ViewData["NewDesigns"] as Da...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Change paste contents in Textbox How can I dynamically change the contents of what will be pasted in the TextBox. Here is how I subscribe to the event: DataObject.AddPastingHandler (uiTextBox, TextBoxPaste); Here is how I define the event handler: private void TextBoxPaste (object sender, DataObjectPastingEventArgs...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Can't print jQuery's Tablesorter with lines. lines are missing when I print When I print Tablesorter from an HTML page, the lines don't show up. Can anyone explain to me a possible fix? A: If you only want the lines and don't care about the colored background, then add this to your print stylesheet: @media print {...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616278", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Linker error while implementing pimpl idiom Edited to provider a little more clarity. Apologies for confusing everyone. This is under Windows. I have a static library that implements a class using the pimpl idiom. The pimpl header is not only used by the consuming code but it also links against the static library. Y...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616281", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Concat items in linq I have the following code: class Person { public String Name { get; set; } public String LastName { get; set; } public String City { get; set; } public Person(String name, String lastName, String city) { Name = name; LastName = lastName; City = city; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Source list groups hidden by default In Lion, source list group items now have a Hide/Show button that appears when the mouse rolls over the item. My problem is that all my groups are initially hidden, and I have to click "Show" to see their contents. How do I make them shown by default? (I'm using a view-based outl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to specify a "Like" on an integer column? This one has me stumped and thought I would pose it to the SO community for help. A user wants to select all orders that start with a certain ID, example: 123 would return 123, 12345, 1238790, etc. ID is an int column however. I'm using nHibernate and my line currently ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616288", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Make sum of an array php I'm having a 2 dimensional array what is passed by a function what's looks as it follows function crash_reporter($evaluation){ foreach ($evaluation as $agent){ unset($agent['time']); print_r($agent); } than I'm getting the following array and I'm struggling to get the sum o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616290", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Node.js send static files such as HTML files I'm using the following script to show an html file in my browser: var sys = require("sys"), http = require("http"), url = require("url"), path = require("path"), fs = require("fs"); http.createServer(function(request, response) { var uri = ur...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Location and heading not working I downloaded the source code of this tutorial and played a bit with it. All working fine. Now I wanted to create my own project to implement location and heading. But after writing all, it does not work. I don't even see a GPS indication on the top. When I run the other app, its al f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: force vim background to black Is there any way, in my vimrc, to override the background setting of my colorscheme and force it to black? I'm looking for something like set colorscheme=wombat256 override_background(black) so that whatever scheme I select, the background gets forced to black. A: This is what worked ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616294", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How can you get ManagedService configuration immediately? I'm using the Felix Configuration Admin library to read and apply configuration files for OSGi services. Many of the services I'm configuring are third-party (e.g. org.ops4j.pax.web.pax-web-jetty and org.ops4j.pax.url.mvn) and use a simple BundleActivator rat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Running 64-bit executable in System32 from 32-bit code I am trying to run an executable from a 32-bit C# app (on a 64-bit OS), but I’m getting “The system cannot find the file specified” probably because wsqmcons.exe does not exist in C:\Windows\SySWOW64. The file does exist in System32. What is the best way to run ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Ruby on Rails: how do I find out where a method is called? I am getting up to speed with an existing Rails project and am wondering where a particular attribute (field) in the model (ActiveRecord) is modified. In Java I would either use the Eclipse "find reference" feature on the setter, or set a breakpoint there. W...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: A WYSIWYG Where it's possible to limit the text/height Ok, so I tried out tinyMCE. After no luck and a lot of research on how to limit the editors content, I'm looking for other alternatives. These are the needs for the WYSIWYG: * *Able to have these function/buttons: bold,italic,underline,bull list, table contro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How scale fontsize for change size of UILabel My width and height scaling relative interfaceOrientation, but i can't scale fontSize of my UILabel. my_label.adjustsFontSizeToFitWidth = YES; won't work for me. A: Make sure your my_label.minimumFontSize is less than the my_label.font.pointSize. You could try somethin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616325", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: asp.net mvc 2 project does not render data annotation attributes what can a problem that data annotation attributes are not rendered? web.config <appSettings> <add key="ClientValidationEnabled" value="true" /> <add key="UnobtrusiveJavaScriptEnabled" value="true" /> </appSettings> C# public class SearchCrit...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Android, how to determine if a reboot occurred? How would I programmatically determine when an android device has rebooted (whether on its own, or user initiated) ? A: This snippet starts an Application automatically after the android-os booted up. in AndroidManifest.xml (application-part): // You must hold the REC...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to make app resources accessible to sbt console initialCommands? I'm using sbt 0.11 and Scala 2.9.1 (which appears to evaluate REPL lines in the same thread). In my build.sbt I have: initialCommands in console := """ println(Thread.currentThread) println(Thread.currentThread.getContextClassLoader) ru.circumflex...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Session State is erased after calling RedirectToAction() in ASP.NET MVC 3 I use a simple sequences: * *Set a Session State in [HttpGet] method. *Redirect to another action using RedirectToAction() in [HttpPost] method. *Want to get the value of that Session State, in the destination. Problem: If user hits "s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616340", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Android Preferences how to go In one of my activity's onCreate I am using the following to get the list view. The xml layout being applied is from xml file "country_row". Now I want to use shared preferences to change some of the layout of my listview for eg font color, background color which should be preserved. As...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616351", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: iOS UIView transition not smooth? I used the following code to show animation during transition: CATransition *animation = [CATransition animation]; [animation setDuration:0.4]; [animation setType:kCATransitionPush]; [animation setSubtype:kCATransitionFromTop]; [animation setTimingFunction:[CAMediaTimingFunction fun...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616352", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Android download progress notification layout not found? I need to display the download progress in the notification area (like the Market does). I found several examples, all of them using the XML layout android.R.layout.download_progress. All the examples look great and simple to implement. The issue is, android.R...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: CSS overflow issue with featured slider On this website http://rwl.rwlwater.com/ I have a small issue... I added overflow: hidden to the featured slider div, the pictures were showing up stacked if the javascript was enabled or the user had a slow internet connection.. But now I have another problem.. The descriptio...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Oracle: Change Schema based on role There is this post that describes setting up a trigger to change the schema on login. Is there a way to check the role of the user to see if it matches a specific role instead of the username itself? I tried to do a subquery to user_role_privs in the when clause, but it doesn't al...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616366", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: PHP creating a new object or use existing one if isset? Many times i find this redundant: $found = $repo->findOneByCode($code); $zone = isset($found) ? $found : new Zone(); Can anyone suggest a better way, similar to (not working): $zone = $repo->findOneByCode($code) || new Zone(); EDIT: i can't modify Zone and fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: how to "usb to tty"? I'm new to the C++ world but have strong knowledge in several languages (so i'm not THAT lost). I just received an usb missile launcher as a gift and wanted to control it via different platforms, including web. To do so, i was planning to use a "serial to socket" proxy i wrote in python (and the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Android SQLite column int to float possible? I have an app out on the Android market that user data is stored in SQLite. I created a database table with a column of ints. I would like to store floats there now. How can I do this? When I try to insert a float, my app seems to throw an exception. A: As SQlite doesn'...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What uses of eval() (or the indirect eval/execScrtipt()) are legitimate? I have never encountered a situation where I needed eval(). Often times, people say that the [] property accessor makes eval() redundant. Actually, isn't the execution of a pain statement exactly the same thing as pushing it as an argument into...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What am I missing in making this simple jquery video player work? I have 2 videos that I'm displaying on a page. Onload, both videos are hidden and simply a poster is shown. On clicking one of the buttons, a video is played. Which video is determined by some nested (hidden) data in the button. I'm holding my videos ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Proper way to create superclass from subclass I have an client-server application. The client has a class: Item.java public class Item public string name; public string size; and the server has a class PersistableItem.java which lets me store it using JPA public class PersistableItem extends Item @Id ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What uses should I make of Entity Framework Entity Partial Classes? I'm working with EF 4.1 Database first. I was wondering what sort of things I may use Entity Partial Classes for. What would some examples of possible functionality I might want to add to partial classes. I'm just trying to understand if I should ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Rails Models: Legacy Schema: Table Inheritance I have a legacy SQL schema which looks something like this: CREATE TABLE `User` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `userType` varchar(255) DEFAULT NULL, `seqNo` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616390", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: About animating frame by frame with sprite files I used to animate my CCSprites by iterating through 30 image files (rather big ones) and on each file I changed the CCSprite's texture to that image file. Someone told me that was not efficient and I should use spritesheets instead. But, can I ask why is this not effi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616392", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Developing a client-server iphone app If i want to develop an iPhone app with a client-server design (iPhone devices as the clients and a c# server),two questions: * *Is it possible to use my own laptop to run the server on? and if not what are my options? *Do i have to develop my own protocol for transferri...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: WordPress custom permalinks using page children I am creating a wordpress theme and I would like to have a custom permalink structure. Users will add pages that have custom themes and the pages will be nested. So for example, a user might add a page called "Media" and then add a page called "tutorials" that has the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616402", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Merging two web cameras streaming into a single live streaming - Programmatically I have two web cameras and I want to merge their streams into a single live streaming preview and display it to the screen. I am skilled in C#/Java programming, could you please help me to find a framework that helps me to achieve this...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I call Coffeescript templates in a Javascript ERB template in a jquery_ujs response? I am using Coffeescript template in my Rails 3.1 app, so in my app/assets/javascripts/post.js.coffee file, I have something like: $('#post').html JST['templates/posts/show'] post: post where post is a JSON object. The templa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Issues with String to NSDate My dateFromString is not working and i'm not sure why NSString *purchase = @"2011-09-30 17:47:57"; NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat:@"yyyy-MM-dd hh:mm:ss"]; NSDate *date = [dateFormat dateFromString:purchase]; date is 'invalid CFStr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Please explain this difference in cross browser string.length I run this code in Firefox v6.0.2 and IE7. In Firefox, I select the radio button. Then click test. I get a string length of 10. In IE7, I get a string length of 9. <script type="text/javascript"> function TestMethod() { var name; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is exactly a measure in star schema in data warehouse design? Star schema consists of dimension and fact tables. Fact tables contain foreign keys for each dimension and in addition to that, it contains "measures". What exactly comprises of this measure ? Is it some aggregate function's answer that is stored ? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616420", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Integrating N2CMS with existing ASP.Net Website We need to select a CMS for our company's website which will allow the designers to make changes to the pages, add pages, view and publish them. We r using Visual Studio 2010 for web development and includes Global.asax, Masterpages, User-/Custom-Controls, Security (Fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Recurrence Relations in Data Structures In my Data Structures Class, we're looking at recurrence relations like T(n) and big O problems O(n). I'd appreciate any resources for learning these, my textbook doesn't cover T(n), and the professor skips over lots of steps. I haven't seen a good, step-by-step method for sol...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I display clickable wordpress blog post titles in an UITableView for iOS? I am working on a iOS application in which I would like users to be able to access a table view list of blog post titles. The blog is self-hosted and runs on the Wordpress platform. The blog is linked to a twitter account so that each t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to resolve "minTime in Android 2.3.4 not working" error Comic... I've tested in an android 1.6 and 2.3.3 a very simple gps location... with basically this: LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); Location myLocation = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER)...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Xvfb + firefox: how to know firefox finishes rendering? I'm trying to grab web thumbnails by using X server to run Firefox in headless (Xvfb) X11. I am looking for a way to know when Firefox FINISHED rendering and then I can use image programs to grab the windows. Problem: I can NOT determine when Firefox finishes ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I timeout Regex operations to prevent hanging in .NET 4.5? There are times when being able to limit the pattern matching duration of regex operations could be useful. In particular, when working with user supplied patterns to match data, the pattern might exhibit poor performance due to nested quantifiers and...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616435", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: ImageSpan in a widget? Are there any limitations to adding an ImageSpan to a widget? This identical code works fine in a standard TextView. SpannableStringBuilder buf = new SpannableStringBuilder(""); if(!TextUtils.isEmpty(message.getMessageBody())) { SmileyParser parser = SmileyParser.getInstance(); buf.app...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how do I compile with mono targetting C# / .net 4 I have an installation of mono 2.10.4 on linux and have been attempting to compile a .NET C# 4 dependent codebase. I have been able to compile in MonoDevelop, but need to be able to do from the command line / build tool. executing: gmcs -langversion:4 -target:libr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Page width in Mobile/iOs I have read the related posts; 'Mobile CSS Page Width - etc' but haven't found a solution. I've developed a mobile version of a website, and the width fills fine in Android, and Blackberry - but, for some reason in iPhone there remains extra space on the sides of the content, making the site...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616441", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Clean up algorithm I've made an C# application which connects to my webcam and reads the images at the speed the webcam delivers them. I'm parsing the stream, in a way that I have a few jpeg's per seconds. I don't want to write all the webcam data to the disk, I want to store images in memory. Also the application w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: const string inside a function A snippet from Mricrosoft XNA Education Catalog: /// <summary> /// Draws the control, using SpriteBatch and SpriteFont. /// </summary> protected override void Draw() { const string message = "Hello, World!\n" + "\n" + ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Facebook API for Java application (for example, using the Swing library) I have to write an application which will use some Facebook API to connect with a user account, check the user's message box, and maybe checks the user's wall. Among others, I saw http://code.google.com/p/facebook-java-api, but getting the sta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: get the max count per load# and only top 20 In using the following code: SELECT SUM(LD_NUM) AS Expr1, LD_NUM FROM Bale GROUP BY LD_NUM returns Expr1 = 74987 and LD_NUM = 4411 returns Expr1 = 61768 and LD_NUM = 4412 returns Expr1 = 75021 and LD_NUM = 4413 etc.. if I 74987/4411 = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616452", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: iPhone - set MKPolylineView lineDashPattern to be animated I have been trying to work on a application using the MapKit and MKPolyline. I have gotten the annotations and paths drawn on the map, however I am trying to change the lineDashPattern to be a set of animated dashes in the direction of the course. I know tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Generate a Hash from string in Javascript I need to convert strings to some form of hash. Is this possible in JavaScript? I'm not utilizing a server-side language so I can't do it that way. A: Based on accepted answer in ES6. Smaller, maintainable and works in modern browsers. function hashCode(str) { return ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "884" }
Q: How to attach click event at runtime when i have all ids in an array that gets populated when document is ready? I have the following code, <script type="text/javascript"> $(document).ready(function () { var dataAnalysisDataFileTableIDs = $("#dataAnalysisDataFileTable tr[id]").map(function ()...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Container Class Sequence c++ I am new to programming in c++ so can you please help me out? My code doesn't compile and I can't figure out the errors. This is the implementation file I wrote : # include <algorithm> #include <cassert> #include "sequence1.h" // See below using namespace std; namespace main_savitch_3{ ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Combining NSArrays Through Intersection and Union I have two NSArrays A and B that share some common elements, e.g. A: 1,2,3,4,5 B: 4,5,6,7 I would like to create a new NSArray consisting of the contents common between the two NSArrays joined with the contents of the second NSArray while maintaining the order of t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Can Google Mock a method with a smart pointer return type? I have a factory that returns a smart pointer. Regardless of what smart pointer I use, I can't get Google Mock to mock the factory method. The mock object is the implementation of a pure abstract interface where all methods are virtual. I have a prototype: M...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: MySQL query error...it does not display the exact data values I want to ask if what is wrong (and probably ask for suggestions on how to better do it) with my MySQL query? I'm trying to generate a daily report within a range of 5days... the problem is it does not display the exact datas, It fills up days that does n...
{ "language": "en", "url": "https://stackoverflow.com/questions/7616476", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }