text
stringlengths
8
267k
meta
dict
Q: Extract key from array I just wonder if i can get the keys from below code $keys = array_keys($_POST); //this will return all key $key = array_key($_POS['username']) //i dont know this this is possible, im trying to get the 'username' is it possible? A: array_keys($_POST); for the single key: list($key) = array_ke...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to get rid of this code duplication while still maintaining elegant events? Ok so let's say I have two classes, class A and class B. They both need to perform a common operation but it wouldn't make sense to have them both derive from the same object so instead we go with composition. Basically, "has a" makes se...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575867", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: I've received my first Exception. Now what do I do? I'm new to all this crazy Android/Java programming stuff. I have an app that (somehow) I managed to figure out how to add in-app billing items to. I'm pretty sure the error is related to in-app billing, but I'm not able to reproduce the problem on any of my devices...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to count nodes in XML that have been read into a string I'm sure the solution is pretty trivial to the experienced, but it's not to me. I have read an XML file into a string, strSiteList. Here's a shortened sample of the XML: <siteList> <site code="s0000001"> <nameEn>Edmonton</nameEn> <provinceCode>AB<...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ActionScript 3 Trying to access a nested Moviclip and can't get it to work Im fairly new in Actionscript. That being said, I'm trying to access a nested Movieclip in a MovieClip. My code looks like this if (ground.hitTestPoint(char.getChildByName("charBox").x, char.getChildByName("charBox").y,true)) { f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575880", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting error while trying to alter table in an sql block I create a test.sql file and inside I put: begin alter table table1 enable row movement; alter table table1 shrink space; end; / Is this not allowed? Because I get error: Encountered the symbol "ALTER" when expecting one of the following: begin case decl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575887", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Android viewpager, control which views to re-render my viewpager currently only re-renders views that are two views away from what is visually seen. example (shown respectively) ViewA, ViewB, CurrentView, ViewD, ViewE not rendered, rendered, rendered, rendered, not rendered` how would I force it to reload a parti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575890", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: invalid conversion from 'char' to 'char*' using strcpy Ok so here are the parts of my code that I'm having trouble with: char * historyArray; historyArray = new char [20]; //get input cin.getline(readBuffer, 512); cout << readBuffer <<endl; //save to history for(int i = 20; i > 0; i--){ strcpy(historyA...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Rails, is it ok to look up objects in views? A controller points to a view. In that view is it acceptable to find objects <% @XXX = XXXX.where(..... %> or is that bad? Trying to work through performance issues which is why I ask. Thanks A: Putting query logic in the model has more to do with maintainability then it...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575892", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Apache Solr 4 most functional autosuggest component Which one of the Solr components is the best: TermsComponent works well for us now but with limitations, ie: - we can't print out the image for associated document in the same response SpellCheckComponent will have same limitations as TermsComponent SearchComponen...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to rotate a circular image button on its own axis in android app? I have the following animation code : <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <rotate android:fromDegrees="0" android:toDegrees="360" android:pivotX="50%" android:pivotY="50%" androi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PHP in_array Find Any Matches I am trying to figure out how to match any words within an array. For example, the code bellow works for finding "Test Name" within an array but does not find "Another Test Name" (due to the word "Another") within the array. Any ideas? if (in_array($html[$i], $eventsarray)) { $top...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Get authorId from Device - android I am using Android Market api. I use it to retrieve all the comments to my app: http://code.google.com/p/android-market-api/wiki/HowToGetAppComments My question is how can I know what is the authorId of the current user? I just need to know if that user already write a comment or...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Finding routing interface in Erlang I have a machine with multiple network interfaces each of which connects to a different network. I want to, from an Erlang application, find which interface will be used to connect to a given host. For example I have a machine with interfaces, eth0 and eth1. eth0 is on a 10.x.x.x ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575906", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Cannot find type parameter if it is an inner class of the subclass in Java Why does the following code have a compile error: Foo.java: public abstract class Foo<T> { public abstract T getInner(); } MyFoo.java: public class MyFoo extends Foo<MyFooInner> { public static class MyFooInner { } public MyF...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: bfcache causing issue with jQuery ajax request I have a document that, when ready ($(function (){ ... })), creates a request to load some data into a table. Users can then add items to this table. When items are added a request is sent to the server to save the item and then the row is added to the table client-side...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575910", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to merge server-side templating and AJAX to maximize reusability Consider the following general issue before I go to the specific problem: You use server-side templating (e.g. Smarty) to generate a page in a particular way depending on a particular state. However, you can also change the state and update that p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: testing a rails helper that uses cookies I have a method in app/helpers/application_helper.rb that calls cookies. Which is totally allowed; this method is working wonderfully in my dev environment and knows what I mean when I say cookies. I am testing this helper with TestUnit (in test/unit/helpers/application_helpe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: IllegalStateException: Can not perform this action after onSaveInstanceState with ViewPager I'm getting user reports from my app in the market, delivering the following exception: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState at android.app.FragmentManagerImpl.checkStateLoss(...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575921", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "560" }
Q: Is it possible to specialize a template definition based on the existence of a nested typedef of a template type parameter? I have a template, template <typename T> class wrapper, that I would like to specialize based on the existence of typename T::context_type. If typename T::context_type is declared, then the con...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575925", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Reproduce a part of a music clip (cocoa) I'm newbie working with music clips and Cocoa. I have a music clip long 10s and i want to reproduce only the first 4s. How can I do this thing ? If i want to reproduce an interval between start and end for example between second 4 and second 7. How can I do that ? Thanks in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Parsing generic tags in C# I need to parse text that uses various custom tags within it, for instance: <tag>example</tag> Everything I see on here dealing with parsing tagged stuff has some premade format (like HTML) so has a library dedicated explicitly to it. Does C# have anything that can deal with custom tags l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Pdf viewer in eclipse widget I need to embed in an eclipse widget a simple pdf viewer,nothing fancy, just to see the content of the pdf. Where do i start ? thank you A: Have you had a look at http://www.jpedal.org/support_siEclipse.php ?
{ "language": "en", "url": "https://stackoverflow.com/questions/7575939", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: EOF Error in Imaplib I am programming a python applet that watches the unread count of the email boxes for my workplace, and ran into an EOF error when I try to use any imaplib methods after the applet sits idle for about 10 minutes. Everything works fine until the applet has been alive for more than 10 minutes. Her...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575943", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Post photo to someone else's wall or album from mobile device Here's the functionality I want. I want users of my mobile apps (iOS, Android) to be able to post photos from their device to a facebook page of someone else. This facebook page is not owned by the user of my app, nor is the user a friend or fan. Also, th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best method to call c# code from within Excel or Excel VBA Can anyone tell me the best method for calling c# from within Excel. I saw a post somewhere that said the later .NET had good ways to do this - but nothing was specified. A: Not sure if @amit_g's link is what you mean, but the post may also have said that f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575950", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Serving AppEngine static files What is the best way to serve static image and javascript files using appengine? From what I can see there are two methods applicable, having the files stored in the war directory of the service you are uploading, at design time. The alternative being using the blobstore, with the file...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575957", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Azure and F# 3.0 Type Providers Do F# 3.0 Type Providers work with SQL Azure? I'm getting an error while trying. Wondering if there are any known issues with this. A: Nevermind I fixed it. I needed to use EntityTypeProvider instead of SqlServerProvider.
{ "language": "en", "url": "https://stackoverflow.com/questions/7575961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: flex4 with php, error referencing function I'm trying to connect to MySql database in flex4. I wrote a php class like this, public function getNames() { $stmt = mysqli_prepare($this->connection, "SELECT names.firstname, names.middlename, names.lastname FROM names"); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575964", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I prevent Apache CXF from sending a response message? In cases where a given SOAP header element has a given value (for example, if the value of the header tag "response" is "0"), I don't want Apache CXF to return a response at all. How can I do this? It appears that CXF makes the assumption that all calls ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575970", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I access the Advanced Security Options Tab from .net? I have a problem with regarding Active Directory programming.I need to access the Security Tab to assign “Permissions for SELF” with .net.How can I do that? A: This is fairly easy to do with the ActiveDirectorySecurity class - http://msdn.microsoft.com/e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575981", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: edit background layer in png I have an image here a guy http://andybriggs.com/img/streetguy.png. I'm not good at image editing so I don't know if I'm explaining this right. The image is a rectangle and is one layer when opened in gimp. I want to change the white background to gray so it will match the background col...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: php session variables problem in Firefox I set several php session variables in an initial php file. In all other ajax loaded php files the value of those session variables is updated only after refreshing the page. This happens only in Firefox. Does anyone know what may cause this to happen? In IE everything works ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Associate file extension to Android app and handle the file In my android app I want to associate my app with *.bin extension. Whenever a user click on a *.bin file, I want my app to be started and make a conversion. This link shows associating process, but when the app is onCreate, how can I get the file, its path,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Searching for app takes me to 4oh4 page I have a simular problem as in this post. When I search for iStatus+ and clicking on the app in the search results, I am redirected to http://www.facebook.com/4oh4.php. Sandbox mode is disabled. Here's a screenshot. A: Plug a URL into the Bookmark URL field: This is a bug lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Use PHP to upgrade an existing PHP script? I've currently developed an addon for a popular billing system which i plan to give out to many other people, I would like to make it very easy for them to upgrade the addon whenever i create any bug fixes or updates. The script uses PHP and MySQL db, i know how to update t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Speed up this JOIN, MySQL This is similar to another question I posted, but I was told to split them. I have a InnoDB MYSQL table that stores a multi select name ( or 'code' as the table calls it), a parent object's id (parent_id) and the name of the option selected in the multi select (name_id): CREATE TABLE IF N...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Trouble with MYSQL query BETWEEN two epoch timestamps? I have epoch timestamps in my mysql database, I am using a Jquery datepicker to choose BETWEEN two dates. It works great when I choose at minimum between 1 day, but if I choose Sunday - Sunday ( the same day ) it should bring back records that have fallen on tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7575997", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I 'require' CommonJS modules in the browser? What is the best way to load CommonJS modules as client-side JavaScript code in the browser? CommonJS modules put their functionality in the module.exports namespace and are usually included using require(pathToModule) in a server-side script. Loading them on the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576001", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "81" }
Q: f:param not passed in ajax request I'm having trouble with the following code: <h:inputHidden value="autoCompleteHidden" id="administradorAutocompleteType"> <f:param value="#{suggestionEntitiesDM.usuario}" name="type"></f:param> </h:inputHidden> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576003", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I rotate the output in 90 degrees? I have a code and from kladblok.txt there is a file with the following numbers: 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: Android WebView - catch link if has javascript embedded In my android app I have a WebView loading a webpage. This webpage was built by someone else and each html href does a javascript _dopostback() to get the URL to navigate to. For example: href="javascript:_dopostback(function(params))". My goal is to check to s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576012", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to set these complex types in ZEND SOAP AutoDiscovery? Hello I need to write a SOAP server, where I would be able to pass complex types, structuraly that would look like this: <ParcelDetails> <countryType></countryType> <addressType> <countryType></countryType> .... ..... .... .... <cont...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576016", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: NSTimeInterval to unix timestamp I'm getting CMDeviceMotion objects from CMMotionManager. One of the properties of the CMDeviceMotion is timestamp, which is expressed as a NSTimeInterval (double). This allows for "sub millisecond" timestamp precision, according to documentation. [motionManager startDeviceMotionUpda...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to download a file from server without user interaction in flex 4 or flex 4.5? The code flow is as follows: user clicks 'download details' button on the page -> on button click handler a call to a RPC method is made using s:CallResponder -> RPC method generates and returns a URL from where to download the file -...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: 80 byte wrapped format text file? I am having an issue with preparing a text file for one of our vendors. They are having problems reading the file; according to what I was told, the file must be in "80 byte wrapped format". I believe they are using a mainframe system so I'm sure it has something to do with that. Wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Android migration from Opengles 1.0 to Opengles 2.0, textures? I currently have an OpenGLES 1.0 engine with a very large code base, and I'm in the process of migrating to OpenGLES 2.0 Thanks to this I've been able to get past the lack-of-matrices obstacle, but before I continue changing thousands of lines of code I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: fgets not terminating at newline According to the manpages, fgets writes a stream of characters to an array until it hits a null or newline character. But when I use fgets with a popen() stream with various shell commands, and then print the resulting array with printf, the newlines are retained and the output looks...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Opacity Gradient Applied to CALayer? I basically want the opacity of every layer in my UITableView instance to "fade out" at the top 10 or so pixels. Is there any way to fade out a CALayer (or more generally, a UIView)'s opacity? It'd be similar in effect to adding a shadow with a CAGradientLayer but instead of cove...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576024", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to re-use multiple .xib as a template to another .xib? I want to re-use some .xib files as templates to the major views of my iOS app. Can someone tell me if it's possible, in iOS, to achieve a "template-like" system such as: Header, Logo, Footer, and load them as separate .xib views to fill some placeholders in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576026", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Doctrine DQL dynamic ORDER BY parameter Im trying to pass the ORDER BY column as a parameter in DQL, like below: $this->em->createQuery("SELECT t FROM Entities\Topic t ORDER BY :order") ->setParameters( array('order' => 't.name') )->getResult(); I guess it doesn't work because setParameter will escape :order, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: changing the color of the text using jquery $(document).ready(function () { $("#btnhighlight").click(function () { alert("yes"); var htext = $("#txthighlighttext").val(); $("#lstCodelist option").each(function () { var sp = $(this).text(...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: minimal number of d flip-flops required for first seven Fibonacci numbers I encountered a problem while preparing for a test. What is the minimal number of d flip-flops required (along) with combinational logic to design a counter circuit that outputs the first seven Fibonacci numbers and then wraps around? A) 3 B)...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: In Java, should each query be in a separate thread? If an application is blocking until a query returns a response, doesn't it make sense to execute queries on a thread pool? A: Only if you expect to perform work during that period, otherwise there's no sense doing it. A nice way to do it is to have your API return...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Ensure unique column value at application level One of the models in a Rails 3.1 application I'm working on has a "code" attribute that is generated automatically when the record is created and that must be unique. The application should check the database to see if the generated code exists and, if it does, it shou...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576045", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: MVC3/EF4: Editor For a field that an object, e.g., Employee.Supervisor My database has an Employee table, which has a column SupervisorId, which as you would expect is a foreign key into the Employee table. Currently, in my Create.cshtml view/form, for the supervisor field, I have a combo box with Employee.Name as t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576050", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MySQL subquery/complex query question, tracking state changes I have a table that tracks contact class state changes by date. The question that I am trying to answer is what is the current state of all contacts on a certain date. DROP TABLE IF EXISTS `contact_class_state`; CREATE TABLE `contact_class_state` ( `...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Hierarchical tree with multiple sub items I am trying to wrap my head around how to solve this problem in WPF using an MVVM pattern. I am converting a win32 tree control into WPF. The old tree control uses a Node class hierarchy along these lines (BaseNode being the base class and each following item inheriting fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Rails 3 - ActiveRecord Find When Album Name Equals I've got a photo gallery Rails 3.0 app where Photos belong to Album. There are multiple Albums. I'm struggling trying to figure out how to select my Photos from an Album where I have passed in the Album name as a parameter. What is the correct way to do this? A: Yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Profile Location module - output full Country Name Can anyone tell me how to output the full country and state names using the Profile Location module? (Drupal 6) Currently, it will just spit out WA, US for Washington, United States. The author says that he has added hook_profile_alter to display country and state ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: XMLHttpRequest status 0 on second load I am experiencing an interesting issue when I am trying to load some data in .txt format from the same domain using XMLHttpRequest. I am trying to load the data, parse it and then store it in localStorage var xmlhttp; // code for IE7+, Firefox, Chrome, Opera, Safari if (window....
{ "language": "en", "url": "https://stackoverflow.com/questions/7576064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: FileNotFound Exception in Java (i'm new in Java) ... I want to store some class fields values in a HashMap then write it to a file (the path is passed as an argument) and then restore HashMap and fetch needed info. In my constructor called Carte, i get an exception that file is not found , anyway it's in the right ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: AWTUtilities setWindowOpaque causing problems I have a modal JDialog that I set non-opaque with a call to the com.sun.awt.AWTUtilities method, setWindowOpaque(this, false). I encounter problems when I set the modal JDialog to be non-opaque. For example, when I click on a button a non-opaque dialog, it pop up correct...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: wxPython wx.EVT_LIST_ITEM_SELECTED Not Working When Same Item is Clicked Twice in a Row I have the below code for a wxPython panel in which I am trying show the user all the states, but I only want them to be able to select (or check) either Massachusetts or New York. This works when the user clicks once on that sta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Cant get background changing images centered I have been strugglign for the last few horus trying to make it so that the background class will be centered in the website, but i have absolute position and fixed in my css for the inside of it because i need it done for a changing fading background image. But my proble...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576069", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Zend form setAttribs with json_encode I have a zend form select element that calls a javascript function onchange. The following: $element->setAttribs(array( 'onchange' => 'toggleSelect(this.value, ' . json_encode($this->_testData) . ')')); The problem is, both the ZEND onchange and the json_encode use double quote...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576076", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET Roles not working in deployed ASP.NET MVC application I have published and deployed an ASP.NET MVC application that uses the Roles feature of ASP.NET authentication. On my development machine, Roles work fine - but on my server, to which I've transferred the build, the entire database (schema, data, and user...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Problem with foreign keys in sql database I have a school assignment that that is giving me and my friends headaches... So this is my queries that i have executed, one at a time ofc... CREATE DATABASE GamblingSociety; USE GamblingSociety; CREATE TABLE GamblingDen ( Name VARCHAR (20) PRIMARY KEY, Address VA...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: .NET Tcp Stream fails if idle more than three minutes I have a data collection system that passes data from the collecting computer(server) to the plotting computer (client) over a TCP connection. The code works fine the first time a collection is run. The code continues to work fine on subsequent runs if the system...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why don't machinist objects save inside nested blocks? This is my spec code that isn't working: require 'spec_helper' describe User do describe "blah" do it "should save itself" do user = User.make! u = User.find user.id user = User.make! u = User.find user.id end end end The sp...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576098", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Hiding footer in ListView When my Activity loads, I inflate a layout file that I use for a footer. I attach it to the ListView (addFooterView) and then set its visibility to View.GONE. I maintain a reference to it, and when I want the user to see it, I set the visibility to View.VISIBLE. For the most part, this wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Double check - does it ever make sense to have internal viewmodel class? I believe we cannot bind to internal viewmodel. Therefore I think all binding related implementations of IValueConverter, IMultiValueConverter, INotifyPropertyChanged, INotifyCollectionChanged should be always public in order to work with XAML....
{ "language": "en", "url": "https://stackoverflow.com/questions/7576102", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Error while trying to access Google translate with NSURL If I try this code: NSError *err = nil; NSString *resp = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"https://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=abdicate&langpair=en|es"] encoding:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Entity framework and transaction in asp.net mvc application I have question about managing transaction in asp.net application. For example i have application for planning vacations. Controller has form to approving vacations. One user - click save and approve vacation ---- employee which want vacation has - 1 day se...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Cyclic dependencies- always wrong? 1.I would like to know if the following structure is incorrect, what is the reason, and what is the solution for that: Assume I have implemented a client for net game The client has 2 main packages: A.GUI - hold all the swing Jpanels etc. B.LogicEngine In Logic engine I have a clas...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: HOWTO: Visual Studio 2010 MVC3 Project on Win7 x64 Using Oracle ODP.NET 11.2 I have a new development machine Windows 7 x64 and am writing an MVC3 application that targets an Oracle database. I have tried everything that I know of to get it running with no success. Previously, I was developing on a Win7 x32 box and...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576110", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I get an array of unique values in my controller that is NOT connected to a model? I have a table named Donations which has a column named season. Season contains the actual season the donation was made in... like 2011 or 2010, etc. I also have a controller named ReportController that would like to pass a un...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Substringing JSON keys I have a form with inputs using this naming convetion: <input class="xxlarge" name="note[url]" id="url" placeholder="URL"> So, I'm using this script (found on StackOverflow) that serializes form data into JSON. $.fn.serializeObject = function() { var o = {}; var a = this.serializeArray(); $...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Argument invalid with every build in Xcode? No matter what I try, I get an Argument is Invalid error in Xcode when I try to build to my iPhone. It works fine in the simulator. The problem is not specific to one project, it happens with any project, even when I create a new one. When I run the console it displays ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Rounded rectangle in Silverlight I'm trying to create a rectangle in Silverlight where the corners are rounded. However, I do not explicitly specify the width and the height of the rectangle, which means it adapts to the size of the Grid which contains it (the size of the grid depends on the screen resolution amongs...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can i use a Java SWT application as an Activex Host? I know this can be a bit of weird question, but let me explain the idea behind it first. I have a win32 app exposed a an Activex host, this gives me the the following useful features: * *Embed and call it from Internet Explorer as a simple to pass/return value...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576131", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How is the * CSS rule more specific than a class or ID style rule? I'm using a * selector to indicate that unless I specify otherwise, the color of the font on a website should be set to a certain value. *{ font-family:"Verdana"; color: #04468e; } So far so good. The problem is that that's the most general of rul...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576136", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to remove rows of a matrix by row name, rather than numerical index? I have matrix g: > g[1:5,1:5] rs7510853 rs10154488 rs12159982 rs2844887 rs2844888 NA06985 "CC" "CC" "CC" "CC" "CC" NA06991 "CC" "CC" "CC" "CC" "CC" NA06993 "CC" "CC" "CC" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: How to deal with Facebook login as page Facebook has recently allowed pages to be created without any facebook users associated with them. Facebook also lets these unowned pages sign into applications. How should an application detect and handle this situation? * *Sign out of facebook *Create new facebook page ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576139", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Python simplejson.dumps still returns string Input : {"id": null, "type": null, "order_for": null, "name": "Name"} code : input_map = simplejson.dumps(eval(line)) print type(input_map) returns <type 'str'> what is wrong in here? Thank you A: Perhaps you meant: print(input_map) Also, if you use null i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is it possible to get the .offset() of an an nth-child selector? For some reason I get a null error when I run $('.art:nth-child(2)').offset(); while $('.art:first').offset() and $('.art:last').offset() give values, no problem. Will offset() only return values for the first and last children? HTML: <div class="r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: tsql distinct having count I am using SSMS 2008 and am trying to select count of consumers who are part of two different events. Probably this is a simple query, but it is currently not returning expected count. Here is my T-SQL code which better explains what I tried: select [Program Quarter], event_name, consume...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576160", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Left Joins in LINQ with multiple Critieria? How do you do add additional criteria to your left joins? In LINQ you can have only one join clause "x.id equals y.id". On inner joins, this is no problem, just add them to the where clause. When you are doing a left join this creates issues in LINQ. Adding this additi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576168", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: iOS5 Push notifications, Are there any alternatives to the Notification Center? I have 2 related questions regarding the new push notification in iOS5: * *If my application is not running in the background - Can the notification arrive to my application silently? *Can I revert back to the old modal popup UI for...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576171", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why my panel class gets null public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); _panel = (Panel) findViewById(R.id.panel); _panel.setOnTouchListener(this); } main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:androi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can't access fields of a Javascript Object The following Javascript function returns a JS object: function getCookies() { var result = {}; var cookie = {}; var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { cookie = cookies[i].split('='); result[cooki...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576173", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Ruby on rails tag functions. Why does the case of radio_button_tag.id not match label.for? While registering for openstreetmap, on the terms page, I noticed that clicking the labels didn't check the radio buttons associated with them. Here is the html: <!-- legale is GB --> <form action="/user/terms" method="post">...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576174", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: tsql help with concatenting several fields i have address columns that i would like to concatenate even if only one field is not null. for example street,city,state,zip null,null,AL,36609 Currently, my sql statement is like this: select street + ',' + city + ',' + state + ',' + 'zip as address so the sample record...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576182", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Javascript: Detect colliding divs How do I detect if two divs are overlapping? Not taking into consideration the width of a div, it is basically a vertical line segment. The (top,left) point is point A while the bottom (top + height) is point B and so forth. I'd then compare each div to each to the other divs in the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Lag in Java Game I'm writing a game in Java. And, oh wonder, i have performance issues. I benchmarked the paint itself - 1000 cycles in 3 ms tops. The game logic is even below that. So far, so good. But i still encounter an annoying lag: When scrolling, when zooming, when clicking. The problems get worse when i zoom...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: call wcf service by form submit I have service [OperationContract] void AddData(str ingdata) implementation void AddData(string data) { NameValueCollection dataToAdd= HttpUtility.ParseQueryString(data); //do seomething with data } and html form <form action='service.com/Service.svc/AddData' method="post" target...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576186", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I use projections with in NHibernate? I'm using <dynamic-component> elements to provide end-users the capacity to extend the functionality of our product by adding fields to the database. A simplified version of our mapping is: <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="Caselle.Am0.DTO"...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Validation in HTML5. :invalid classe after submit I'm building a form and I want to use the :invalid selector to give the "required" input fields a red border if the user presses submit without filling them, but using this makes them appear highlighted right when the page loads. It seems unfriendly to give this kind...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Does Usage with Callback Interface with SessionMode is Mandatory? I have a service which calls back the client. the interface has this attribute : [ServiceContract(Namespace = "rf.services", CallbackContract = typeof (ISendBAck), SessionMode = SessionMode.Required)] Does the SessionMode field is mandatory ? why d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: perl hash declaration error I am new to perl and can't seem to find why this snippet is giving me a 500 error. #!/usr/bin/perl use strict; use warnings; use CGI::Carp qw( fatalsToBrowser ); my ($distance, $weight, $total_gas, $mph, $buffer, $pair, @pairs, $value, $form, $name); our %FORM = (); read(STDIN, $buffer,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7576196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }