text
stringlengths
8
267k
meta
dict
Q: Converting decision problems to optimization problems? (evolutionary algorithms) Decision problems are not suited for use in evolutionary algorithms since a simple right/wrong fitness measure cannot be optimized/evolved. So, what are some methods/techniques for converting decision problems to optimization problems? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: JSF2 search box I develop a little app in javaee6 and jsf2. I want a search field with no button (just type and hit enter and give the result). I have a search method in a bean: public Book searchByTitle(String title) { this.book = bookFacade.searchByTitle(title); return book; } I want to call this method ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Benchmarking comet applications I'm currenctly working on my master's thesis. It's about real-time webapplications. Now I'd like to compare Node.js with for example long polling. I know some benchmarking tools such as ab, autobench etc., but these don't really test the application. Once they've made a request to the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544338", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jQuery Cycle with Cufon Pager So, I am using jQuery with Cufon and jQuery Cycle. What I want, is the pager of Cycle to have Cufon fonts. Below is my JS var pagerclass; $(document).ready(function() { $("#slider").cycle({ fx: "scrollHorz", timeout: 7000, pager: "#pager ul", pager...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544340", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Embedding videos while hiding the source - is that possible at all? Here is the code that I use to embed video from "YouTube" to my blog: <object type="application/x-shockwave-flash" width="460" height="390" data="http://www.youtube.com/v/Hg8Fa_EUQqY&amp;feature&amp;rel=0"><param name="movie" value="http://www.youtu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544346", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C packing Integer into a buffer RFC 4506 I'm trying to implement this RFC 4.1. Integer An XDR signed integer is a 32-bit datum that encodes an integer in the range [-2147483648,2147483647]. The integer is represented in two's complement notation. The most and least significant bytes are 0 and 3, respectively. In...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: monte carlo integration on a R^5 hypercube in MATLAB I need to write MATLAB code that will integrate over a R^5 hypercube using Monte Carlo. I have a basic algorithm that works when I have a generic function. But the function I need to integrate is: ∫dA A is an element of R^5. If I had ∫f(x)dA then I think my algo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Confusion on Glassfish V3, Jboss, SOA supporting, WSO2(embeded Tomcat) I'm so confused for developing SOA applications in Java EE: * *Can "Glassfish V3 Open Source Edition" support ESB(SOA)? I must add external module on it? if yes, is it open source too or not? ---or--- if I want to use Glassfish I should buy...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Replacement for DWR DWR is mainly used for handling AJAX responses from server.. So i wanted to know other similar technologies, which would make AJAX handling easy like calling a Java method from within Javascript and pasting the response in html code. I know jQuery has AJAX methods, but so not think it can call an...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are these options in qgit? I have installed git in Ubuntu and downloaded the Hadoop repository using the below command. git pull git://git.apache.org/hadoop-common.git Then I installed qgit (GUI for GIT), when I open the above repository in qgit the following screen comes up. Can someone explain the meaning o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Drupal 7, Creating widget with ImageField and a Textarea Can anyone help me figure out how can i create a widget(Field API) which will contain an image(i want to to be an ImageField) and a textarea in Drupal 7? Unfortunately i cannot find any tutorial how to do this on google. Thanks! A: There's no tutorial as suc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Debugging multiple forked processes in *nix Are there any easy ways to debug forked child processes in *nix, without having to sleep them and create new gdb instances, using ps to get the child's pid? Are there any debuggers that do this? A: You can already do this using gdb. Here is how: (gdb) set detach-on-fork o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Hive: dynamic partition adding to external table I am running hive 071, processing existing data which is has the following directory layout: -TableName - d= (e.g. 2011-08-01) - d=2011-08-02 - d=2011-08-03 ... etc under each date I have the date files. now to load the data I'm using CREATE EXTERNAL TABLE table_...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: eclipse 3.7.1 update error I'm currently using the Eclipse Indigo 3.7 IDE for Java Developers.So today I tried to update it to the latest 3.7.1 but during the update process a error downloading0 with Comparison method violates its general contract! pops out and the whole update process stucks at that process. Can so...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: AppleScript cURL and parse URL I am working on a Automator workflow, I am passing list of URLs to the "Run Applescript" and I need to fetch the contents of on each page, concatenate and pass it to a BBedit (or any other text editor). on run {input, parameters} tell application "BBEdit" activate ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Reversing a string in C using pointers? Language: C I am trying to program a C function which uses the header char *strrev2(const char *string) as part of interview preparation, the closest (working) solution is below, however I would like an implementation which does not include malloc... Is this possible? As it r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: "sys.getrefcount()" return value Why does sys.getrefcount() return 3 for every large number or simple string?Does that mean that 3 objects reside somewhere in the Program?Also,why doesn't setting x=(very large number) increase that object's ref count?Do those 3 ref counts result from my call to getrefcount? Thank ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544395", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Android Different Ways To Add LayoutParams I noticed there are two ways to add LayoutParams programmatically to any view and am curious to ask do they have different meanings as well. Example 1 In this example, setting LayoutParams directly to the button. LinearLayout parent = new LinearLayout(this); Button btnNew ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What OO structure should I use to describe animal's behaviors? I have a Java assignment in which my professor requires me to use a LeJOS NXT to make a robot that simulates a certain animal's behaviors. I chose to develop a dragon. All the possible behaviors that I've come up so far is: * *Turning around if it's t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: About NSException from "NSKeyedUnarchiver unarchiveObjectWithFile :" NSArray *t_annos; @try { NSLog(@" --- pointer before = %ld --- ", (long) t_annos); t_annos = [NSKeyedUnarchiver unarchiveObjectWithFile : d_path]; NSLog(@" --- pointer after = %ld --- ", (long) t_annos); } @catch (NSException *e)...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Regular expression to select from X to Y I have the folowing HTML: <Some Html above....../> <!--Template Start --> <div> <p>Some text</p> ... <div> <!--Template End --> <Some Html below/> Now how can I write regular expression to match all text from Template Start to Template End here it says that notepad++ use S...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544407", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Selecting the most recent results, in ascending order I am currently using the mysql query: SELECT COUNT(*), time FROM visit GROUP BY time ORDER BY time DESC LIMIT 14 to get the 14 most recent "COUNT(*)"s from a mysql database. Unfortunately, they are in backwards order. If I replace DESC with ASC they are in the ri...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C++: Are left/right bitshifts for negative and large values defined? My question is, within C++, is the following code defined? Some of it? And if it is, what's it supposed to do in these four scenarios? word << 100; word >> 100; word << -100; word >> -100; word is a uint32_t (This is for a bottleneck in a 3d l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: IFrames load Asyncronously? If not why does this error occur? EDIT: From tests it appears iframes do load asyncronously(though not fully sure). I fixed it by calling the function after a period of 700 milliseconds & that works. So it makes me think that they are asyncronous. I do this: insertHTMLIntoIFrame( HTML ); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: pySerial not working on Python3.2.2 I installed the 32 bit version of Python 3.2.2 and want to get the pySerial package to work. I most definitely have the pyWin32 package install but still when I try to import serial it gives me this error >>> import serial Traceback (most recent call last): File "<interactive in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544424", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Initialize a static const array member of class in main(...) and not globally? Suppose class Myclass { private: static const int myarray[2]; } If I wanted to initialize myarray I should put the following statement in global scope: const int Myclass::myarray[2] = {1,1}; What should I do If I want to initialize my ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it good practice to end coldfusion self-closing tags with "/>"? In HTML, I was always taught to close self-closing with a "/>". For example "<br />", "<input type='button' value='myButton' />", etc. In Coldfusion, though, it seems to be standard to just never close these tags. I'm constantly seeing code like: <cf...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544429", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Android VideoView will not play MKV files My VideoViewer will not play any MKV files. I've tested on .3gp video files and they work fine but MKV files won't work. The video never shows up, no buffering or anything. The screen will show up fine but as I said, the video player is either invisible or isn't there, I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Strange performance behavior I'm using Visual Studio 2010 SP1, Target framework is 2.0, Platform target: Any CPU, testing under Windows 7 x64 SP1. I'm experiencing strange performance behavior. Without an app.config, or with the following app.config, it makes my program run slowly (Stopwatch shows ~0.11 s) <?xml ver...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: non-ascii char as arguments printargv.js: console.log(Buffer.byteLength(process.argv[2])); In cmd.exe (with chcp=65001,font='Lucida Console'), I ran: node printargv.js Ā (Note: unicode code point of Ā is U+0100.) The script outputted: 1 I expected the script to print a number greater than 1 but it doesn't. Does a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544441", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using jackson to map an unnamed array Hitting the twitter friends/ids API endpoint without a cursor specified will return this JSON response: ["243439460","13334762", "14654522"] however when specifying a cursor you get the documented format: {"next_cursor":0,"previous_cursor":0,"ids":["243439460","13334762","146545...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544447", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Index was outside the bounds of the array in c# I want to insert MySqlDataReader read value into an array.but I get the exception "Index was outside the bounds of the array". Here is my code, string[] a = new string[1000]; string myconstring = "SERVER=localhost;" + "DATABASE=alicosms;" + "UID=root;"...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can we use multiple forms in a web page? So far, all the web pages I met contain at most one <form> tag. Why not multiple ones? I can not think of reasons why multiple forms can't coexist within the same web page. Also, to be specific to ASP.NET - why are all the server controls are placed within the <form> tag? Why...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544454", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: using webcam & taking high res (2Mpix) pictures in a web application I need a web based application where the user needs to fill in 3 fields and taking a high resolution image (2mpix) with a webcam. Once these are ready I need to post them to the server so they are saved in a database. 1) What is the best way/tools...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: @Functions inheritance from parent Razor layout Is it possible to declare a function or helper in a Razor layout view and have a child Razor view use that function? My structure is : _layout.cshtml -> index.cshtml Where index.cshtml uses _layout.cshtml as its layout. This is the default structure. I want to be able ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is inline code allowed in Jinja templates? I'm using Jinja on my site and I like it. I've come across a simple need. How to display today's date? Is there a way to inline some Python code in a Jinja template? import datetime now = datetime.datetime.utcnow() print now.strftime("%Y-%m-%d %H:%M") This article says n...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Automation Error 80004005 I've been beating myself over the head with this for a few days now, searched up and down the internet. I know there is a lot I don't quite get about Com Interop but I've had success building and using simpler DLL's with Excel. Anyways to the point. I get the above mentioned Error -21474672...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: URL Encode problem with chine language I have such text in chines: "回家" - seems it is "house" in english. I go to google.com, post "回家" in search and get such url: http://www.google.ru/ ... q=%E5%9B%9E%E5%AE%B6 => q = %E5%9B%9E%E5%AE%B6 Then i go to taobao.com post "回家" to search and get url like this: http://search...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Data at the root level is invalid. Line 1, position 1 -why do I get this error while loading an xml file? Data at the root level is invalid. Line 1, position 1 -why I get this error while load xml file this my code: XmlDocument xmlDoc=new XmlDocument(); xmlDoc.LoadXml("file.xml"); A: The LoadXml method is for load...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Activity does not scroll when rotating screen when I turn the phone and the screen is rotating I cannot see the whole screen anymore. This is ok but I cannot scroll! Do I have to set some flag or property for scrolling? This is part of my xml... <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="htt...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: query in a cursor I have a table 1 to many: name _id ## name ## 1 tony and points _marksid## date ## point 1 13 55 1 23 55 1 24 69 1 31 77 and i have cursor: Cursor cursorMarks = database.query(points, new String[] {...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Rails, Paperclip, DelayedJob and cleaning temporary files In a Ruby on Rails application, I'm using Paperclip to handle attached files. The download (from a URL) and attachment is done in a background job (with DelayedJob). Each job might deal with many files to download, and it results to a dozens of temporary file...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544490", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Transport security in WCF I have 2 console applications in my solution. This is my WCF service: using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.Text; namespace TransportSecTaulty { [ServiceContract] public interfa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Error: 'Unable to add mapping for keyPath news, one already exists...' I am using RestKit to get data from a Restful Web Service. With a flat file it works great. My problem starts if I want to get the response to a nested JSON. My JSON looks like: [{"homename":"Alien","created_at":"2011-09-15T12:46:37Z", "updated_a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How would I go about expanding my PHP code library with Python code? I have a rather large API written in PHP that I've worked on for years. Some of the functionality needs to be upgraded to the extent where I should really just rewrite the classes. Since I need to scrap the old code anyway, I was thinking perhaps I...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Iterating through an Object array I have created an object array with the following code: $data = (object)array(); and populated it with data. it's results should look something like this when i'm done: Data-> accounts-> 54-> today-> sales checkout_fees trans_fees ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Saving a model in local storage I'm using Jerome's localStorage adapter with Backbone and it works great for collections. But, now I have a single model that I need to save. So in my model I set: localStorage: new Store("msg") I then do my saves and fetch. My problem is that everytime I do a refresh and initialize...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: problem with 3 button layout in android I have an activity with three buttons in the layout. All the buttons are at the bottom. I wanted the button to be extreme left,centre and extreme right. The extreme right and the extreme left buttons are fine. However, the centre button is taking up all the space in between th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to use created connection string of Web.Config in my C# asp.net 4.0 project? Actually I am new in this topic so required some help. I have added connection string in Web.Config <connectionStrings> <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilen...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Thinking Sphinx Application Wide Search and Dealing with Results The use case is this: I'd like to let my user search from a single text box, then on the search results page organize the results by class, essentially. So for example, say I have the following models configured for Thinking Sphinx: Post, Comment and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544515", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to pass a variable from jQuery to a variable in View of MVC3? Possible Duplicate: How to pass variable from jquery to code in c# In my View I have a variable named as shown below x: @{ int x;} I want to set a value to x from within my jQuery code. How can I do it ? A: by this: @{var x = 5;} <script type="t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: I would like to read an example of ArrayList with Objects.(Java) I have created two classes and I am trying to invoke a constructor(with argument) and a method. I find it easy if I just use an object. My Goal : * *To invoke the same method by using 3 objects. *Use ArrayList to invoke the method 3 times. My Hom...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Images display in chrome but not in ie When browsing a url link to an image in ie it shows that the image doesnt exist(box with red cross in it). Its the same if I browse the image using safari on my iphone but displays a black box instead. However if you browse exactly the same url in chrome it does show the imag...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to create dynamic form? How to make this dynamic form? Hello How to make this dynamic form? "Possible answer" must have: name='1', name='2', name='3' to name='6'. A: You need a plugin like * *AWESOME FORMS *JQWIZARD *SMART WIZARD http://plugins.jquery.com/plugin-tags/wizard to convert a form into a mu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544523", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Like Box plugin for my URL (not for Facebook Page URL) I want to have a likebox plugin for my own URL (not a Facebook Page URL) E.g. http://www.example.com/product1.html http://www.example.com/product2.html I already have opengraph meta data, and user are able to like it, but I want to have likebox kind of plugin ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Diagnostics.StopWatch time lag in XP but not Win7 ETA: Using Environment.TickCount does not present the same problem. ETA2: I should add that I don't actually use the Forms.Timer in my app - as this would negate the use of a high frequency timer. I've used it here to simplify the code. ETA3: I've published a workar...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Spring @ModelAttribute doesn't care about commandName JSP: <form:form commandName="editWeather" method="post" action="../edit"> <!-- Input fields --> <input type="submit" value="Submit"> </form:form> And this is how I get the model in Spring: @ModelAttribute("DONTGIVEADAMN") Weather weather And I can still...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Arbitrary characters for forward-word/backward-word in Emacs How to add an arbitrary character (hyphen, for example) to forward/backward-word functionality, so Emacs would handle words like "k-vector" as a single word. The same question about double-click on the word. A: Syntax tables define which character is cons...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Removing duplicates from string array I'm new to C#, have looked at numerous posts but am still confused. I have a array list: List<Array> moves = new List<Array>(); I'm adding moves to it using the following: string[] newmove = { piece, axis.ToString(), direction.ToString() }; moves.Add(newmove); And now I wish t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Database efficiency - table per user vs. table of users For a website having users. Each user having the ability to create any amount of, we'll call it "posts": Efficiency-wise - is it better to create one table for all of the posts, saving the user-id of the user which created the post, for each post - OR creating ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544544", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: django imagefield save NoneType Object error How can I upload images with imagefield? The following is giving me a 'NoneType' object has no attribute 'chunks'. I believe I am doing this wrong, can someone show me the correct way of doing this? This is what I have so far for saving the uploaded image. def add_employe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544548", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Javascript: REGEX to change all relative Urls to Absolute I'm currently creating a Node.js webscraper/proxy, but I'm having trouble parsing relative Urls found in the scripting part of the source, I figured REGEX would do the trick. Although it is unknown how I would achieve this. Is there anyway I can go about th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: testing socket communication offline as a simulation Whenever having to test my app which basically is some kind of communication via sockets with external devices, the device itself has to be available and connected. I would like to ask,if there is a way to do the testing offline in some kind of simulation mode? Fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Efficiently color cycling an image in Java I'm writing a Mandelbrot fractal viewer, and I would like to implement color cycling in a smart way. Given an image, I would like to modify its IndexColorModel. As far as I can tell, there's no way to modify an IndexColorModel, and there's no way to give an image a new Inde...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544559", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How to configure SQLite in Kohana 3? I'm struggling to find any information on how to configure SQLite in Kohana 3.2. I mainly need to know: * *What should I set hostname, database, username and password to (with default user and no password)? *Also, how can I set the path to the SQLite database file? *What sho...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544568", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Why non-displaying HTML tags interfere with Displaying tags I often face a problem when I need to encapsulate some far apart fields in one form, and the fields in between them in other forms. Or encapsulating first two rows of a table in form and other two in other forms and so on. But of-course this is not allowed ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Split variable-value in a regex I'm using Javascript regex functions to split expressions like: var1=32 var2<var4 var1!=var3 I'm using this regex: /^(.*)([=|!=|<|>])(.*)$/ig It works pretty well except with the != (different) operator. What's the problem? A: The problem is you are using a character class instead ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: overriding object parameters using UNITY I've started a project usinjg MS Unity as my IOC container and have two questions regarding overriding parameters. public interface ITab { bool AllowVisible {get;set;} } class Tab : ITab { IViewModel vm; public Tab(IViewModel vm) { this.vm = vm; } public ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544581", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why is the information for pywintypes.com_error unreadable? Under Python 2.7.2 with pywin32-216.win32-py2.7 installed, when I use win32com module to process Excel on windows as follows: >>> import win32com.client >>> xlsApp = win32com.client.Dispatch('Excel.Application') >>> xlsApp.Workbooks.Open(r'D:/test.xls') I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to handle multiple jLists with one ListSelectionEvent I have three jLists in my class frmMain. I have created a class called ListActions. The code below is working for one jList. It returns the value clicked for one jList. How do I distinguish between the three other jList? Or do I need to create a seperat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Extract directory from jar file I have searched for this for a while now, but cant seem to figure it out. I want to extract a directory from a jar/zip file, and save it recursively to a path on the filesystem in java. Anyone know how I might do this? A: An answer from this thread might give a good feeling how/where...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544600", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to store photos in Cassandra? Can anybody tell me how to store photos (jpg, png etc) files in cassandra ? Any small example would give me quick start. A: "Manually split files into chunks of whatever size you are comfortable with". (from CassandraLimitations) Eg. use the file name as the row key and have the ch...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to create events in Obj-c via code? I have one UIButton and i need to create event Touch up inside how i can to create this event no using IB in implementation file .m? A: Something like this would do the trick.... [myButton addTarget:self action:@selector(clickMethod:) forControlEvents:UIControlEventTouchUpIns...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: Sending an object via sockets java How can I send objects of a class via sockets? As of now I'm only able to send the class members one by one via sockets and I want to send the object as a whole. Explaining with a simple example would be great. Thanks. A: You must use the java.io.Serializable interface for the obj...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can I get a textfield in Monotouch to appear as a lined notepad - the same appearance as the 'Notes' application I am experimenting with monotouch for the first time. I have essentially finished my first application, however, I am re-visiting the application to make it more appealing visually and was wondering if I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: sharepoint 2010, customized sp ribbon javascript file is not loading properly in chrome....any inputs???? We have customized ribbon(js scripts) that loads properly in IE and firefox but in google chrome(which is a requirement to use it due to its high response time) it does not load the ribbon at the first instance....
{ "language": "en", "url": "https://stackoverflow.com/questions/7544608", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP echo category names in mysql table I have a table in my mysql database that looks like the following: id | category | title 1 | blue | title1 2 | green | title2 3 | red | title3 4 | purple | title4...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to get a table automatically updated when another table is updated Using C# How to get a table automatically updated when another table is updated Using C# Hi all, I have 4 (four) tables using MySql database, ie: tb_item ( id_item, (varchar) --> PK item_name, (varchar) price, (double) ) tb_order ( id_order, (va...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: running C# web app with schedular in microsoft server I have a web application developed in C# that retrieves data from a database and writes the retrieved to a file. What i need to do is to be able to run this web app regularly on my server(Microsoft server), say once a day to update the data. I think using a sched...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why don't I get a recursive infinite loop when throwing an error in the onError function? In my coldfusion Application.cfc file, I define an onError function. In certain situations, I explicitly throw an exception using a cfthrow tag - e.g. <cfthrow object="#myException#">. My question is, why doesn't this create an...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: HTML- pass data to perl script I want to pass data from an html form to a Perl script, execute the script and display result on HTML page again. A: You can't pass data from HTML to a program directly, you would normally submit a form to a URI and configure the webserver to pass the submitted data to a program and t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: Deployement exception on jboss 5.0.1 . GA Hi I am getting following exception when I deploy my war in Jboss 5.0.1.GA Project uses maven. I think it is to do something with jar's Because earlier it was working in my old machine.But in new it is not I had to do changes in pom to successfully build the project. Please ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: OpenGL: glTexEnvi, glBlendFunc and On Screen Text Messages I'm developing a movie player and I'm using OpenGL to draw frames and On Screen Messages. To draw the frame I use: glBegin(GL_QUADS); // Draw the quads glTexCoord2f(0.0f, 0.0f); glVertex2f (_movieRect.origin.x,_movieRect.origin.y + _movieRect.size.height); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544634", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Django-nonrel exception invoking a URL in a Appengine/Django-nonrel app I have been stumped by this problem for the last one day or so. I have a small personal project (called, say, 'myapp') which I have implemented in python/django-nonrel/appengine. I added some new features under the /Element1 sub-url, and made t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: UnknownHostException (webservice http-get) I have this simple code, that makes a get to a webservice. For some reason it cant connect and gives the error in the log unknownHostException This is the code: String URL = "http://services.sapo.pt/EPG/GetChannelList"; String result = ""; final String tag = "Data received:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544654", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using jlayer/javazoom, or vlcj to playback audio (MPEG4, RAW AMR, or THREE GPP) Can jlayer/javazoom, or vlcj playback MPEG4, RAW AMR, or THREE GPP? I have searched, and I cannot find how to correctly use the players, or whether they even support playback of these file formats. Are there any other players that can pl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Testing Mongoose Node.JS app I'm trying to write unit tests for parts of my Node app. I'm using Mongoose for my ORM. I've searched a bunch for how to do testing with Mongoose and Node but not come with anything. The solutions/frameworks all seem to be full-stack or make no mention of mocking stuff. Is there a way I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How to Change page Title of Magento Module? I have successfully install magento, but site title remain magento, I try many times but did not change that title?and did not change thing under the widget? so what is the procedures? A: you can do it via layout files: <reference name="head"> <action method="setTit...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: C# get caller class type (Not in Static) How do I get the caller class type in the base? this is the parent, here I want to print the child type without sending it public abstract class Parent: ISomeInterface { public void printChildType() { Type typeOfMyChild = ?????; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to export triggers from a database? I would like to generate a script/extract all of the triggers I have in database, so that I can use them in another one. How can I do this? A: You can get the list of triggers from sys.all_objects (sysobjects on 2000) and then the code from sp_helptext procedure. Example: htt...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544668", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to call javascript from Android? How do we call javascript from Android? I have this javascript library which I would like to use, I want to call the javascript function and pass the result value to the android java code. Haven't found the answer from now. i managed to call android code from javascript, but I wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544671", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: I'm not exactly sure what this x86 Add instruction is doing I'm not exactly sure what this add instruction is doing: add 0x0(%rbp,%rbx,4),%eax If it were: add %rbx,%eax I know it would add the contents of rbx and the contents in eax and store them back into eax. However, the 0x0(%rbp,%rbx,4) is throwing me off. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Consume a wcf Service with a Java Client I try to consume a wcf service hosted on an iis with a simple java client. my service is a basicHttpService. now my Question. What do i need in java to access the service methods? i build a little example: using System; using System.Collections.Generic; using System.Linq; usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544685", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Filter language in solr I indexed German and English docs with solr and i want to some ability to search just inside German docs or English docs,How to configure this? thanks A: Have a field indicating the language, and search on that. A: Some of the options as mentioned @ http://lucidworks.lucidimagination.com/...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544690", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best way to initialize a HashMap I usually do e.g. HashMap<String,String> dictionary = new HashMap<String,String>(); I started to think about it, and as far as I know a HashMap is implemented under the hood via a hash table. The objects are stored in the table using a hash to find where they should be stored in t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: System for automating admin creation for any database For example I have a database, and want to have good automaticly generated admin for it. Is there software for this? A: Not sure what your question is. What kind of admin tasks are you trying to automate? The SQL Server Agent service can handle a lot of the sche...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544694", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to pass image entry in atom rss feed. in rails 3.1 every time people give tutorials on how to make atom rss templates, but my question here is how can i pass in and image in the rss format. for instance i have this code sample in rss atom_feed :language => 'en-US' do |feed| feed.title @title feed.updated @up...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Error on eclipse start up I am desperate.... no idea whats wrong. Yesterday it worked today it doesn't. Here is the stacktrace from the logs, and it is generated before choosing the workspace: !SESSION 2011-09-25 11:31:39.687 ----------------------------------------------- eclipse.buildId=I20090611-1540 java.version...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544707", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: php PUSH-server can't send multiply push-messages I have a php-script that fetches a couple of uuid's from a mysql database and then sends a message to all the users. But it doesn't work when there are a lot of users. The script can be found here: http://pastebin.com/VATM1eaC On line 19, I have a commented $sql quer...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544713", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to use javascript to simulate click on link where href is php I am writing a Google Chrome Extension. I need to use javascript to simulate a click on this link: <a href="/logout.php /a> so I can log out. How can I get this done? No JQuery please, I haven't learned it yet. A: Main function will create any e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7544716", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }