text
stringlengths
8
267k
meta
dict
Q: Haskell Graphics Programming in Linux/Unix I am interested in making a game in Haskell and I am looking for a graphics library. I found one called the HUGS Graphics Library but much to my dismay it only runs on Win32. I was wondering if there was a graphics library for Linux/Unix Haskell programming or am I out of l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why Am I Getting NaN (and not an answer)? I have this equation: val2 = ((((((((((Math.Pow(((previous_val) + (val5*100)), 1.001)) / 24) / 60) / 60) * 100) / 3600)*h)/m)*s)); previous_val and val5 are local variables that equal other values. The variables h, m, and s represent hours, minutes, and seconds. My problem:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: ManyToManyField widget in a django admin change list? In the change list of the django admin, I want to use list_editable to display a django-autocomplete widget for a ManyToManyField. I found something similar here: list_editable and widgets Normally including a ManyToManyField in list_display raises an ImproperlyC...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Msg 547, Level 16, State 0, Line 1 The INSERT statement conflicted with the FOREIGN KEY constraint Hey everyone I have been having a problem with my SQL database, specifically the foreign key. Here is the table I am trying to enter into. CREATE TABLE Employee ( EmployeeID int NOT NULL Primary Key, LastName v...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Need to combine values from multiselect option to form a url with javascript I am using an application that allows real estate searching on my site. The app came with a very limited search functionality form, so I've taken it and tried to enhance it by way of URL parameters that the IDX solution provider provides. O...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to serialize/deserialize an assembly object to and from a byte array Let's say a create an (executable) assembly in memory by compiling a code string. Then I want to serialize this assembly object into a byte array and then store it in a database. Then later on I want to retrieve the byte array from the databa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Forgot SA password and user in Administrators account can't change it? I have a local install of SQLExpress that I haven't touched in months. Now I need to use it, and I've forgotten the SA password. That would be fine, except that my local user which IS a member of the local Administrators Group apparently doesn't...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: showing text when text get mousefocus I need to show a couple of names when a especific text get focus. the code I have is: $forum=mysql_query("SELECT * FROM forum ORDER BY cod_forum DESC") or die (mysql_error()); while($de=mysql_fetch_array($forum)){ $nomesfoto=mysql_fetch_array(mysql_query("SELECT nome,f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629811", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Is there Windows analog to supervisord? I need to run python script and be sure that it will restart after it terminates. I know that there is UNIX solution called supervisord. But unfortunately server where my script has to be run is on Windows. Do you know what tool can be useful? Thanks A: If you want a supervis...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629813", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: gcc: error: request for member ‘rlen’ in something not a structure or union I have a unsigned char pointer which contains a structure.Now I want to do the following unsigned char *buffer ; //code to fill the buffer with the relavent information. int len = ntohs((record_t*)buffer->len); where record_t structure co...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: radio button to enable form fields I have a form containing two radio buttons, I want to enable corresponding fields when a radio button is checked. My code just isn't working, here it is: <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(func...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Style TreeView but keep it Virtualized The Virtualization on my TreeView works when I have only styled the TreeViewItem with this bit of xaml in the style: <Style.Triggers> <Trigger Property="VirtualizingStackPanel.IsVirtualizing" Value="true"> <Setter Property="ItemsPanel"> <Setter.Value> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it possible to make Git aware of an existing .gitmodules file? I added a submodule: git submodule add git://github.com/chneukirchen/rack.git rack A file .gitmodules was created like: [submodule "rack"] path = rack url = git://github.com/chneukirchen/rack.git And of course Git knows about it: git submodule statu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629822", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Why is CRM 2011 Entity Relationship null in this plugin code? this is a working example of a plugin that I have written for CRM 2011. I have created a 'Create' step in the plugin registration tool for this plugin. This executes fine. I also have an 'Update' step registered for the plugin. This fails to execute b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Setting up mvc application on IIS7? I've created a MVC website using Visual Studio 2010 and would like to deploy it to my newly installed local IIS7. The website works perfectly running from Visual Studio on the development server that it comes with. Here are the steps I've done: 1) Opened IIS7 Manager. 2) Under Si...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Android, Proguard 'Unknown option 'and' in argument number 9' I'm getting the following error every time I try to export my application from Eclipse. Proguard returned with error code 1. See console proguard.ParseException: Unknown option 'and' in argument number 9 at proguard.ConfigurationParser.parse(C...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: IOS - how to write file to network share? i'm trying to create and write a file to a network share (smb). i have some data stored in an NSData object and need to write the content to a network share at \\media\file.xml any help or advise would be greatly appreciated! thanks! A: Search your favorite search engine on...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can i get geocoding information from Google Geocoding API passing only the city? I just need to fetch some geo data for a given city, i'm not interested (and i don't know) the address. Sending a request like this: http://maps.googleapis.com/maps/api/geocode/xml?address=fake,%20USA&sensor=false will match a street w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I properly queue and execute tasks with variable start times in c#? I'm still new to C#. Currently using .NET 3.5. I'm writing an online game, and my game engine needs to handle player requested unit movement. The units will move at different speeds and can have different destinations, so the actual time t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to support different languages with dynamic web data on Android? I have an application that pulls information from a web server and displays it. I know that Android has some nice language features where you can put multiple strings.xml files inside the project for specific languages. Is there a way to convert th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Back bar doesn't show up in navigation controller Here is the code: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { DrinkDetailViewController *detailViewController = [[DrinkDetailViewController alloc] initWithNibName:@"DrinkDetailViewController" bundle:nil]; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629854", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Transloadit: Sending 0 byte file while request.body.read is not empty I'm using transloadit and sending files with xhr using valumns file uploader. Files are sent to the server without errors (i checked size and content of request.body.read) but once I do: response = assembly.submit! (request.body) An empty file is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to make a collection of type objects in Scala Basically, I want to have a Map indexed by type objects. In this case, I'm trying to use Class as the "type type". the following code: class SuperClass {} val typemap = new HashMap[Class[_ <: SuperClass], SuperClass] def insertItem1[T <: SuperClass] (item : T) = typ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Which Android device has all possible orientation sensors Looking for a device that give maximum possible combination of: Accelerometer Gyroscope Rotation matrix Linear acceleration Magnetic field Rotation vector Or any other sensor which gives any data about 3D orientation. OR: Are there devices that embed InvenSen...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629865", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to setup prepared statements for mysql queries in C? I'm trying to set up a prepared statement based on this example I found on the web. I just want to protect against sql injections in the grade= and username=, but the statement isn't executing. MYSQL_STMT *stmt; MYSQL_BIND bind[2]; char* usrname = &uname[0]; /...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Network communication options in Java (Client/Server) There is RMI, which I understand to be relatively fragile, direct Socket connections, which is rather low level, and Strings, which while about as solid as it gets seems to be the metaphorical PHP. What less basic options do I have for internet based Client/Serve...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Windows Azure - Persistence of OS Settings when using WebRoles I've been watching some videos from the build conference re: Inside Windows Azure etc. My take away from one of them was that unless I loaded in a preconfigured VHD into a virtual machine role, I would lose any system settings that I might have made shou...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629871", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: NLTK "generate" function: How to get back returned text? I'm a Python noob, so bear with me. I'm trying to work with the NLTK library, and in particular the 'generate' function. It looks like from the documentation this function simply prints its result (http://nltk.googlecode.com/svn/trunk/doc/api/nltk.text-pysrc.h...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629872", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I mix audio files using python? I would like to do basic audio mixing in python. To give an example: I would like to take two mp3 files and add them together and return one mp3 file. Another example: I would like to take the first ten seconds of one mp3 file and add it to the beginning of another mp3 file. W...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629873", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Proper syntax for executing a function only if another function is successful I have the following code that is part of my email class that I use in my programs. Currently I am running the quit function whether or not a connection to the SMTP server was made in the connect function. I know I could put the quit fun...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Filling out an inherited mongoid document using nested attributes Given the following models: class Company include Mongoid::Document has_many :workers, autosave: true accepts_nested_attributes_for :workers attr_accessible :workers_attributes end class Worker include Mongoid::Document field :hours at...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629884", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you configure Jenkins to use git archive instead of git clone with Gerrit? We have an automated build system configured using Jenkins, integrate with Gerrit. One of the bottlenecks today is that it takes ~3.5 minutes for Jenkins to complete a "git clone" for each build, due to repository size. The same check-...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I pipe stdin from a file to the executable in Xcode 4+? I have an mpi program and managed to compile and link it via Xcode 4. Now I want to debug it using Xcode 4. How can I pipe the standard input to the program from a file? In terminal I would type mpirun -np 2 program < input.txt I am able to run the pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Difficulty Saving Image To MemoryStream I'm having some difficulty saving a stream of bytes from an image (in this case, a jpg) to a System.IO.MemoryStream object. The goal is to save the System.Drawing.Image to a MemoryStream, and then use the MemoryStream to write the image to an array of bytes (I ultimately need...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629887", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Functions that return a function I'm stuck with this concept of 'Functions that return functions'. I'm referring the book 'Object Oriented Javascript' by Stoyan Stefanov. Snippet One: function a() { alert("A!"); function b() { alert("B!"); } return b(); } var s = a(); alert("break"); s(); Output: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "147" }
Q: C#/XNA pseudo-Random number creation The c#/XNA process for creating random numbers is pretty quick and easy, however, it is quite possibly the worst distributing random number generator I have ever seen. Is there a better method that is easy to implement for c#/XNA? rand.Next() just doesn't suit my needs. from: sta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to calculate days since moving average crossover? I'm trying to determine the number of days that have passed since the beginning of a trend, e.g. when price has moved above the 200 day moving average (SMA). For example: require(quantmod) ticker <- "QQQ" x <-getSymbols(ticker, auto.assign = FALSE) sma <- SMA(Ad...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Returning Resources Based on a Key Based on my previous question, it looks like emedded resources are not going to work in my project. So plan #2 is to use regular resources via a resx file. The core of my question is: is it possible to write a function that will take a string key, and return that resource? I tried ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why is mergesort better for linked lists? Why is mergesort considered "the way to go" when sorting lists and not quicksort? I heard this in a lecture that I watched online, and saw it in a couple of websites. A: One of the main sources of efficiency in quicksort is locality of reference, where the computer hardwar...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629904", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Can't get HTML page from other site with jQuery ($.get, $.ajax) Possible Duplicate: load content from external page into another page using ajax/query May be I just don't get something. I want to get html page from other site, let it be http://www.server.com/somepage/param In my js code: var url = "http://www.s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Do selectively dequeued messages stay in FIFO order (MQ)? Using JMS & WebSphere MQ, if I use a message selector to selectively dequeue, and there are several messages with the same selection criteria, am I guaranteed to dequeue the first message that matches? e.g. given a queue with messages * *{color: pink, name...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Populate dropdown in ATK4 function init(){ parent::init(); $f = $this->add('Form'); $f->addField('dropdown', 'Label:')->setModel('User'); } So this code will output a dropdown list populated by the values in the table asosiated with the model User, but the values will be does of the name field in the mo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Javadoc text for variables within main method I was wondering if it is possible to generate Javadoc text for important variables within the main method of a class. public static void main(String[] args) { /** * Writes statistical information to results file */ BufferedWriter report_stream = null;...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Storing Facebook Info in ASP.NET: Session, Cookies or Identity? So, simple question: After the user authorizes my app (OAuth 2.0), i do a call to the Facebook Graph API to fetch their details. So at this point in time, i have their Facebook ID, an access token for API calls, their email, and some other basic info. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629922", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Binding to a specific ip address when using the PHP mysql_connect function I have a Cent OS setup running a pretty standard LAMP stack and I have two publicly available IP addresses (eth0 and eth0:1). I want to use the second IP address (eth0:1) when connecting out to a remotely hosted MySQL database. How can I g...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629923", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Table isn't showing up as a FK dependency (dotted line assoc) when added to .edmx? I have a TableA that includes a TableBId dependency. When I try to delete and re-include TableB my .edmx is still not showing an association between TableA and TableB. My db is FK relationthip in the db looks fine. Any ideas? When...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629925", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I use ActiveRecord to set up an FTS virtual table in SQLite3? I'm using AR with Rails 3.0.9 and SQLite 3.6.22 (Ubuntu Lucid Lynx). I've added an FTS3 virtual table to a database that did not previously use FTS. I don't know how to use AR calls (e.g. create_table) to create the virtual table I want. So I crea...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: visifire X Axis Direction Issue: I have a visifire customization question. How do I force the direction of X Axis labels? How do I make the x axis labels on the graph on the right look more like the ones on the left? [] As you can see, there is not enough room to display the graph properly A: You can try setting An...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Adding a Filter I have this code that is grabbing files in a certain directory. I would like to filter these files by time. I want the file types to be filtered by 20 seconds or less. How can I add this filter to my code? Thank you. using namespace std; typedef vector<WIN32_FIND_DATA> tFoundFilesVector; std::wstr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: gcc failed with exit status 1 when installing libmemcached While trying to follow the python-libmemcached instructions at http://code.google.com/p/python-libmemcached/ I run into trouble at step 3 ("python setup.py install") (gigmash_venv)m:python-libmemcached matthewparrilla$ python setup.py build running b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629937", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: program falling apart at the "if" statement and forcing a category "B" ok so this program keep falling apart at the first "if" statement and keep bringing me to caragory B any tips?where is it failing? what code needs to be added or taken out? using System; class Program { enum Numbers { standard = 1, express =...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629939", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: for clojure vector via parameter (def andre {:owner "Andre" :type "car" :cur-speed "100" :license-plate "ABC"}) (def blastoise {:owner "Blastoise" :type "truck" :cur-speed "120" :license-plate "XYZ"}) (def car-tax[andre blastoise]) (defn calculate-car-tax [v] (for [v] (println (v))) ) (calculate-car-tax(car-tax...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Looping multiple arrays simultaneously Doing a homework assignment and I'm not sure I can wrap my mind around how to go about this problem. I have two arrays with the same amount of values: $monthsShort = array("Jan", "Feb", ..., "Nov", "Dec"); $monthsLong = array("January", "February", ..., "November", "December")...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629946", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's the best way to generate a single feed from different models? In my site, I have three models, organized in two apps, All this models have a timestamp field, which defines the order of appearance in the site's feed. Instead of creating a feed for every model and making single queries ordered by the timestamp ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629948", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Track key presses in C or C++ I'm looking for a simple way to run something on a unix machine and track when a specific key is pressed. So when someone hits a key on their keyboard, it fires some sort of event. I am not a c/c++ dev so if someone could point me in the right direction. Running OSX A: Any GUI toolkit ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629949", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: In what order do events fire when added to buttons, in Flash? If I do this: myButton.addEventListener(MouseEvent.CLICK, doThingA); myButton.addEventListener(MouseEvent.CLICK, doThingB); Is there any guarantee that when the user clicks the button the events will be fired in some sequence, and if so, what's t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629952", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: 'updateTimer' undeclared (first use in this function) I get this error ''updateTimer' undeclared (first use in this function)' This is the code: #import <UIKit/UIKit.h> @interface SleepAppFinalViewController : UIViewController { //IBOutlet UILabel *myLabel; IBOutlet UILabel *_label; NSTimer *timer; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629964", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Run SUID C scripts under Apache i have a cgi script in c the same as this: #include <stdio.h> #include <stdlib.h> #include <string> int main(void) { printf("Content-type: text/html\n\n"); printf("RUID : %d<br />\n", getuid()); printf("EUID : %d<br />\n", geteuid()); char ch; char getLine[256]...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Offline db app to online syncing, cross-platform, use HTML5? For a school project for a real-world client we are being asked to create an app that can work in offline mode to store information into some sort of db, that will then sync that info with an online db when the system has an internet connection (needs to s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629971", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: content provider in android sdk in eclipse I want to create a database for my android application. I have written the code for a database in my project; whenever I run it shows "force close" on the emulator. I have tried different ways ,but nothing works. Where did I go wrong? // EventContentProvider.java ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629974", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: inroads into sql database encryption I followed article http://msdn.microsoft.com/en-us/library/ms179331.aspx with success, but can't translate this into security value added. I have too little context to completely understand the article -- if someone gains access to the mdf files, why not assume they have access t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why am I getting "Thread was being aborted" in ASP.NET? I am not sure why this happens and I never explicitly abort threads, so it's a bit of a surprise. But I log Exceptions and I am seeing: System.Threading.ThreadAbortException - Thread was being aborted. It appears to happen in a call to System.Threading.WaitHa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "85" }
Q: NSURL from File -> Editing text of data then turn back into URL = NULL I have an html file that I want to dynamically edit before displaying to change some of the values. I get the file fine, then replace the text I want, still fine. But when I convert it back to a NSURL it shows NULL and WebKitErrorDomain error 101...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Error with "this" in IE with jQuery plugin I'm coding a plugin for jQuery which now works fine on every browser but IE. This is part of the code: (function( $ ){ $.fn.myPlugin = function(options) { var methods = { getFirstList: function(el){ return $("ul:first", el); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to retrieve images from a remote server in Android The code below is what I use to retrieve images from a remote server, but the problem is the image doesn't show always. The image will only appear 5/7. Is there anything I am doing wrong? And also I am using LazyList (Lazy load of images in ListView) created by ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629998", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: play an mp3 with MediaPlayer class on Android issues What is wrong with my code? I have a toggle button and i would like to play/stop an mp3. I guess that the code should be as follows: package com.android.iFocus; import android.app.Activity; import android.media.MediaPlayer; import android.os.Bundle; import andro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7629999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Get CSS properties/rules out of String jQuery So I am looking for a jQuery Plugin or a method using javascript in general where I can obtain CSS properties from a string without using a lot of If else statements I have to write. The string comes from a user input like a Text area. Example: var string = "#hello{borde...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630001", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP require file from top directory I have several subdomains contained in their own directory above my root site, and an assets folder in my root directory. For example: / /assets/ /forums/ /blog/ I'm trying to require() files on php pages in both the root directory, and the subdirectories, for example, assets/inc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: CLLocationManager delegate not called I am using CLLocationManager on device and the delegate methods aren't getting called. Here's my code (I can see that the class isn't getting deallocated either): #import <Foundation/Foundation.h> #import <CoreLocation/CoreLocation.h> @interface CurrentLocation : NSObject <CLL...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630003", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: jquery dropdown, content in neighbour Usually, when you enter the menu, you are allowed to browse menu items. In this code it is not working: http://jsfiddle.net/petrm/xwtS5/ Is it because the items are not inside menu element? If so, could it be solved in jQuery, instead of moving the code? Thanks. A: works well w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Chrome not loading Stylesheet Seems like Google Chrome is not displaying my site according to the stylesheet. When the page first load, it loads fine...but then it changes to raw html format towards the end of the page load. It ends up looking like this (you can see web address at the top bar): [click for full size]...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Difficulty throwing NoSuchElementException in Java this is my first attempt to a code doubly linked program in java: This is my implementation of getting an iterator to getall items in the doubly linkedlist public Object next() { if(list.getSize()==0){ throw new NoSuchElementException(); }else{ ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630014", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: c++ no suitable user-defined conversion from "myClass1" to "myClass1" exists I'm very new to c++ and was really confused when this syntax error was highlighted by visual studio 2010. Definitions class myClass1 { public: myClass1(); } class myClass2 { public: myClass2(); void doSomet...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630015", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you get browsers to recognize a password change? As I'm sure you are aware, a feature on most browsers is that they save passwords. Now, I have a site where a user can change their password on one of the pages. Is there a way to get the browser to recognize the change? In other words, the I want the browser...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I know a DataInput size? public void readFields(DataInput in) throws IOException{ //How can I set up the byteArray size here? //DataInput does not have available() or length() method. byte[] videoByteArray = new byte[size]; in.readFully(videoByteArray); } How can I know the DataInput size? B...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Type was not found or was not a compile-time constant 1046 I want to pulish SWF file from .fla file. I have some scripts there, but when I pulished them - they don't work. I get error from compiler: 1046: Type was not found or was not a compile-time constant **Warning** The linkage identifier 'scrollableContent' wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to convert IplImage(OpenCV) to ALLEGRO_BITMAP (A5) fast? Is there a fastest way to convert a IplImage type from OpenCV to ALLEGRO_BITMAP type from Allegro 5.0.x than just putting every pixel from one to another? Like 2 for loops like this: void iplImageToBitmap(IplImage *source, ALLEGRO_BITMAP* dest) { if(s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630024", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Implementation differences between MVP Passive View and Supervising Controller for collections I've started to wrap my head around the whole MVP pattern and despite I'm doing fine with single objects it starts getting difficult when it comes to collections. So let's say we're architecting a simple WinForms applicati...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630028", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: how to set user defaults with folder name I hope to set the user defaults to ~/Library/Preference under the folder name 'MyFolder', plist name is com.mycompany.myapp.plist Do I need to create the plist file and the folder by myself or the system create automatically? Is there any tutorial? A: You need to use t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Mongoid Associations not working In my problem I need posts to each belong to Category but I also want every post to be in a second category. Such that one post could be in "News" and another in "Sports" but they would both be in "Everything". Currently my associations are like this: class Article include Mongoid:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630036", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I save scores in my game using cookies? I am currently making an Jeopardy game on the topic of HTML using jQuery. Right now it works well, but I want to add a recent saved scores tag using cookies. I don't know how to achieve this. I know cookies but I don't know how I will get the name and score and then sav...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630041", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Tab index not work on image, panel and Group tags in flash I am writing code to order the tab on multiple tags like "img","Panel","LinkButton",... and pie charts. when I run my flash program, the tab indexing does not work at all. it just works on pie chart and "link button" tags, not on "img","Panel","Group" tags. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Remove white spaces in character strings I have a data frame imported from a text file : dateTime contract bidPrice askPrice bidSize askSize 1 Tue Dec 14 05:12:20 PST 2010 CLF1 0 0 0 0 2 Tue Dec 14 05:12:20 PST 2010 CLG1 0 0 0 0 3 Tue ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630048", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Root certificate automatically removed from the "Trusted Root Certification Authorities" I've a development environment with a test public key infrastructure. This infrastructure has one root CA, one intermediate CA and multiple end-entities (clients and servers). On the dev. machines, the root CA is installed into ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630050", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: class design improvement - tweet - decoupling super global variables? Question: Should I decouple the SESSION variables, i.e. move them outside of the class...this was a suggestion from another POST. I would like to extend this library to more general cases than just for my purposes..and I believe this is the next ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to override default styles in GWT 2.3? This question has been asked before, but for older versions of GWT. I'm using the "clean" theme that's provided, but I'd like to override some styles (fonts and such). Linking a stylesheet in the HTML file with link tags is deprecated, as is using a stylesheet tag in the gw...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: jquery title selector error in ie why is it giving error in ie, when i try to change the title. $('title').text('new title'); or $('title').html('new title'); works fine in other browsers. btw i just want to mention, when i try to get the value of title using following code, it works fine. alert($('title')); anyon...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: switching images using jquery i can't get the following code to work: $('#clicked_package').css({"background-image" : "url(img/head_2.png)"}).fadeOut("slow"); $('#clicked_package').css({"background-image" : "url(img/head_2_normal.png)"}).fadeIn("slow"); Regardless of what image I put in the first line, It always se...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: I am able to compile the java program but not able to run a java program When I run the java program it gives following error: Exception in thread "main" java.lang.NoClassDefFoundError: check Caused by: java.lang.ClassNotFoundException: check at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630069", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why does previously saved data not appear in opened document of Core Data app? I have created the Core Data app that is outlined in this tutorial by Apple using XCode 4. All works fine however when I save the document and reopen it the document window is empty and no data is shown. When I check the data file, I can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630071", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why isnt Rectangle2D.createUnion() working for me? im trying to implement a getBounds() method, but i cant get union to work; i must not understand how union works. my code is the following: public Rectangle2D getBounds2D() { Rectangle2D rec= new Rectangle2D.Double(); Rectangle2D temp; for(int i=0; i<sha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the best practices in Android, create new string object (static final) or only use the string.xml file (and call many getters)? In Android there is an conflict about how to get the best performance (like less Garbage Collector). First, In Android best practices it recommends avoid getters and setters and al...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630077", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: DOM exception 11 I'm running this code via the console on http://TheScoutApp.com on line 3 I'm getting a DOM exception 11!!! var xhr2 = new XMLHttpRequest(); xhr2.onreadystatechange = function() { console.error(xhr2.statusText); //DOM exception 11!!! if (xhr2.readyState === 4 && xhr2.status === 200) { consol...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Need guidance with template class and understanding line errors and I am trying to now do a Breadth First Order for files but, when I implement this template class to use a Queue I get this errors?, any idea where this might be?, also I do not understand the way the line number where the error is, is specified (i.e ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630083", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to stop a background thread in Sinatra once the connection is closed I'm trying to consume the twitter streaming API with Sinatra and give users real-time updates when they search for a keyword. require 'sinatra' require 'eventmachine' require 'em-http' require 'json' STREAMING_URL = 'https://stream.twitter.com...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: exec family with a file input Hey guys I am trying to write a shell with C++ and I am having trouble with the function of using input file with the exec commands. For example, the bc shell in Linux is able to do “bc < text.txt” which calculate the lines in the text in a batch like fashion. I am trying to do likewi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Boolean vs. Enum vs. Flag I am working on a website that allows users to login. All users have 1 account, an account can have many orders. A user may be a client, worker, or manager. A client is never a worker nor a manager. a manager is also a worker. I would like to present additional sections of pages/ navigation...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Converting unique string to a unique integer I'm wanting to change our c# asp.net mvc application to work with windows authentication as well as forms authentication (as is currently implemented). Currently we have a number of tables referencing a user id integer in the user table used by the forms authentication. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630088", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: make-node in zipper library I am trying to create a zipper from a map of my own. According to zipper definition, Usage: (zipper branch? children make-node root) the parameters branch? and children are clear and i am able to define it. But the make-node function is confusing. I gave an implementation to it which i ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a property/method for determining if a TcpListener is currently listening? Currently I'm doing something like this: public void StartListening() { if (!isListening) { Task.Factory.StartNew(ListenForClients); isListening = true; } } public void StopListening() { if (isListen...
{ "language": "en", "url": "https://stackoverflow.com/questions/7630094", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }