text
stringlengths
8
267k
meta
dict
Q: MVC3 Display text using Model I am trying to display a text on the view from the database. <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<HUI.Models.Events>>" %> Tried to use the following but did not work <%:Model.First().Name.ToString();...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: document.getElementById onclick only working once per page load I have a link: <a id="lnk" href="${pageContext.request.contextPath}/path/path2.pdf?var0=sometext&var1=moretext" onclick="update();"target="_blank">click to export</a> and a JavaScript function in a separate file: function update() { var link = docu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: easy slider jquery for background image i am trying to slide background image with animate. as i want if my first background image. second will continues start here is my code $('.next').live('click',function() { $('.ac_bgimage').animate({ left:"-80em" },1500, function(...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578195", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Magento 1.5 CE Newsletter don't send The Newsletter is not sent in Magento CE v.15 I understand I need to set-up some sort of Cron to send newsletter. But isnt Cron (scheduled task) already built in under back end Systems>Congfiguration>Advance>System? (I have enabled MailChimp if that could be a problem?) Please ad...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Heroku ActiveRecord Error: PgSQL put null in id field I just deployed a simple Ruby on Rails (3.0.10) application to Heroku. There is a line of code create a new User object like this. User.create(:name => "[name here]", :email => "[email here]") It can run well in my local machine, which is using MySQL. After I de...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C++ - Testing Applications with QT in VS 2008 I have a scenario where I should test an application (exe) with QT Test library. I've read that it's not possible to test application (exe) because QT will hesitate in linking phase for unresolved symbols. The solution is to set configuration type to Static Library (.lib...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578200", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Need ideas on fixing RSS feed parsing http://www.ibm.com/developerworks/opensource/library/x-android/ I am using the code here, specifically the AndroidSaxParser. The problem is, is that I get all 4 parts of the Message objects the same as the title. I've combed it over and over, but I can't find anything wrong with...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578201", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: background url and file organisation I am changing background image dynamically, it works online but doesn't work as offline. This is how I open a web page http://localhost:8080/PROJECT/ web.xml <welcome-file-list> <welcome-file> myHTML/myHTML.html </welcome-file> </welcome-file-list> CSS #me { backgrou...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to hookup the LinkButton in a GridView with a ModalPopupExtender in ASP.Net C#? I really need some help here. I am trying to hookup a linkbutton in my GridView to a ModalPopupExtender, but with no luck. Basically I have a GridView which list all the users' info from a database, and I made the username as linkbut...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: php if statement - time/date/strtotime related I am using the following code to calculate the days remaining to make edits. They have 30 days to make edits, and days count down, this code works perfectly. <?php // Calculate days remains to edit or change details $today = time(); $cdate = strtotime($row_d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: jqgrid/mvc 3 - How to call grid in controller? I'm new to jqgrid. It's may be silly question, but please help me. I want to export data to excel file, and I watch demo on http://www.trirand.net/demoaspnetmvc.aspx , it's already support it. However I defined grid in Views, not in Model like the demo: $(document).r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578212", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java Generics: Question regarding type capture and generated inference using generic methods This is a follow-up to my previous question but since the previous thread was a long one, i decided to start another thread pertaining to the almost same topic. public class GenericMethodInference { static <T> void test1(...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578215", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to form strings in php I have an table, Now i want when after filling this table This is the table in ssl.php page <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="TitleBar">Generate CSR</td> </tr> </table> <table cellspacing="0" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Problem with using FusionCharts for Android I wanted to use FusionCharts with android 2.2 (may be on emulator). I tried using Javascript and the HTML but did not get the expected result. Any help?? My code is as follows : WebView web; /** Called when the activity is first created. */ @Override ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578220", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why datepicker does not show up in Rails 3 form I can't figure out why jQuery datepicker doesn't show up, even though I got jQuery running on my app. Here is what I did: I got a Rails form that includes <div id="born_in"> <%= f.text_field :born_in %><br /> </div> I included jQuery, jQuery-UI, CSS in head o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is hitting time of Brownian motion independent Suppose that $B_t$ is a standard Brownian Motion. And $T_a$ $T_b$ are the hitting time whereas $a<0$, $b>0$. Then are these two random variables independent? A: They are not independent: consider Tb conditional on Ta=T. This equivalent to the hitting time for a+b, whic...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578225", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Howto Persist a Map with JPA? I'm working on migrating some code that has two entities (Progress and PerformanceRating) that are related by a many-to-many relationship. Each PerformanceRating has multiple Progress and each Progress type can be assigned to several PerformanceRatings. Additionally, each PerformanceR...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to add to_sentence to a :collection I have the following code that generates a list of superlatives: <%= render :partial => 'superlative', :collection => @profile.superlatives %> The :partial code referenced above is as follows: <li class="superlative"><span title="<%= superlative.name %>"> <%= superlative.bo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578233", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to send hashmap value to another activity using an intent How to send HashMap value from one Intent to second Intent? Also, how to retrieve that HashMap value in the second Activity? A: I hope this must work too. in the sending activity Intent intent = new Intent(Banks.this, Cards.class); intent.putExtra("sele...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "88" }
Q: assert property of mocked object has been assigned correctly using Rhino.Mocks In a (web) application I've implemented the MVP pattern for seperation of core concerns. My presenters directly query the database using LINQ-to-NHibernate, or sometimes they use query objects when the query becomes complex (but I digress...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578237", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Playing audio file with Python I've seen most of the questions on this topic but almost all of them are outdated. (This is not a dupe) My requirement is a preferably light weight library for simply playing audio files such as mp3,etc from Python (2.7) These are the libraries that I've so far looked into and I'm list...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: ICS Email Attachment Not Working for Exchange Users I am sending a meeting invitation as an email with an ICS attachment from a Java web application. Everything works fine when I send it to Outlook users who are not using an Exchange server. They get the appropriate Accept/Reject buttons and can add the meeting to t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578239", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: "PropertyAccessException: Invalid Cast" when trying to retrieve an enum property stored as an AnsiString I need to store my enums in the database as varchar instead of nvarchar, so I am using the "AnsiString" mapping as follows: public class Document { public virtual int Id { get; set; } public virtual strin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Variables upon submitting Paypal form <form> <!--- paypal form ---> </form> How to send data thru paypal when submitting? For example: * *Upon submitting the form with an #ID value of "12345" and after paying successfully. *It will return back to my site ThankYou.php Question: how will I get the value 123...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578242", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can you nest collection calls? MongoDB Can you nest collection calls in MongoDB? db.collection 'one', (err, one) -> one.#do stuff db.collection 'two', (err, two) -> two.#do stuff A: Yes. This is (as far as I am aware) the simplest way of doing things in MongoDB and Node.js. In your example one will...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how do you get the specific style altered with a CSS class? Quick one, not sure if its possible. How can I get the specific style altered with a CSS class using jQuery/JS. Example: html looks like: <tab> <a class="anchor">a</a> </tab> CSS looks like: a{border:1px} .anchor{color:green} So if i do something l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C2DM registrationId handling -Best Practice? Here's the situation I'm struggling with. When a user installs my app and runs it for the first time, I register with C2DM and get the registrationID. I then send it to my server and notifications are sent to the app. If the user uninstalls the app, then installs it ag...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to add default Widget in customised Android Home Screen? I use Launcher2 home screen as the basis for customised the home screen. I wanted to customized Android Home Screen with default Widget. But when I use this example, I get this error: 09-28 12:03:13.052: ERROR/Launcher.LauncherProvider(9187): Problem alloc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Error: expected a declaration So far all I have in my DecisionTree.h file is namespace DecisionTree { public static double Entropy(int pos, int neg); } and Visual Studio is already highlighting the public and saying Error: expected a declaration. What am I missing? A: public is an access specifier. Access ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578265", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Simulation of Real Network with the help of User Mode Linux or Virtual Machines/Switch I am a beginner in User Mode Linux Area, and recently started working on it, by reading material available in Internet e.g; http://user-mode-linux.sourceforge.net/source.html. My Objective : Currently I am performing some tests, O...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Where did this Ruby parameter convention come from? There's a piece of Ruby middleware used by Rails and other frameworks to the parse the parameters you've sent to the server into a nested Hash object. If you send these parameters to the server: person[id] = 1 person[name] = Joe Blow person[email] = joe.blow@test.c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: render tiny mce from javascript using innerHTML I have a javascript code like this. after_add_content_for_popup = "<div><div><textarea name='notes' rows='10' cols='17' class='rich' id='parent_note_content'>"+notecontent+"</textarea></div><div style='float:right;margin-left:20px;padding-left:10px;'><input id='submitb...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578273", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to inject/resolve properties into an XML file with Guice to configure the persistence.xml file? I'm using guice-persist and I would like to know if there is any to inject or resolver properties from a Java property file into the persistence.xml file like I would do with Spring. For example: <?xml version="1.0" e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: iphone app: how to deactivate and activate ipod app my voip app is configured to kAudioSessionCategory_PlayAndRecord category and kAudioSessionProperty_OverrideCategoryMixWithOthers audio session property. During voip call, when voice playback and record is happening, ipod music is also mixing with voice. How to mak...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578275", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Retrieve 1 value that links to all values from database So I'm trying to display a list of all users in my database... each one with a link that will display their own information (in this case only displays user again and password), heres my code... <?php mysql_connect('localhost','user','password')or die ('Conne...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578278", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: iOS Cotains-based Predicate search only returns when exact match found I'm adding a search bar to a table view component of my iOS application that allows searching through an NSArray comprised of Dictionaries. The search bar does not work all the time, though - it successfully prints out a result if there is an ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578281", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is that possible to use SIP in LAN network? I don't know enough about SIP. As far as I know SIP can not be used in LAN. But it's features are very good. I want to use it for a LAN messenger (with video conference facilities). Is there any way of using SIP in LAN network ? A: The SIP protocol can be used over any r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I ignore irrelevant mergeinfo changes when scanning a log? Recently my scan for relevant changes has been including mergeinfo changes that are not relevant and I would like to ignore these revisions where the changes in the log item do not alter any items in the folder which I am iterating. I can iterate thr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578285", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the Scala syntax for summing a List of objects? For example case class Blah(security: String, price: Double) val myList = List(Blah("a", 2.0), Blah("b", 4.0)) val sum = myList.sum(_.price) // does not work What is the syntax for obtaining the sum? A: Try this: val sum = myList.map(_.price).sum Or alternat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578287", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Does any Framework Support User to draw "candle graph" on the iPhone? iPhone sdk :Does any Framework Support User to draw "candle graph" in iphone sdk? I have tried following framework: * *MIMChart-Library *CorePlot But it seems not example to show that how to draw Candle Graph...... Or user need to customiz...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Any value of separating a MySQL query into $query and $result? I always see MySQL queries structured like this, even with the simplest of queries: $query = "SELECT * FROM table_name WHERE id = '1'"; $result = mysql_query($query); Is there any value, time or otherwise in doing the above over a simple one line query ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Looking to pipe incoming mail with a script and grab contents and store them as variables Users will send a text message/email to text@domain.com in the form of #### killed #### and we need to take the first #### and store it as a variable, and then take the second #### and store it as another variable. I can't seem...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578307", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ruby on rails flash messages - :alert :error :notice and :success? In several of my controllers, I have redirects/flash messages redirect_to products_url, :notice => "message here", redirect_to states_url, :error => "oops!" etc... In my sessions controller, however, upon successful authentication, I have fla...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Automatically Appending Comments to Auto-Inserted Curly Braces in Netbeans I really appreciate how NetBeans automatically enters closing brackets to the code I'm working on. Would it happen to be possible for it to further streamline the development of code that looks like this?: public class Test { public stat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578311", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to select jquery tabs if errorLable display im up to apply jquery UI tabs to my application and im going to apply jquery validation class on that. my problem is if i got error in some div that div should selected and display the error to user when click on the save button . i tried $('#tabs > div').each(funct...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578312", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to save the prawn pdf on rails root without rendering Here my code rendering pdf is ok .But I don't want render directly save to the rails folder how? Help me please respond_to do |format| format.html # show.html.erb format.xml { render :xml => @claim } format.report { render_report } format.xls ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Implementing join function in a user level thread library I am trying to implement a user level thread library as part of a project. My focus is on the join function. Lets say that Thread1 calls join function on Thread2. What i need to do is get the return value/argument supplied to pthread_exit() from Thread2 and s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there any API from Bing like Google Places? Anyone knows whether Bing provides any API similar to Google Places? Thanks! A: You can use Bing API with Phonebook source type to retieve information about businesses: * *general information about the Phonebook source type API is available here *JSON-based impleme...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Cassandra Client - examining columns as Strings I am new to Cassandra & I am using the Hector Java Client for writing/reading from it. I've the following code to insert values - Mutator<String> mutator = HFactory.createMutator(keyspaceOperator, StringSerializer.get()); mutator.insert("jsmith", stdColumnDefinition, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Get all dates (not days) between two NSDates How can I get all the dates that come in between 2 dates? For example: Start date = 2011/01/25 End date = 2011/02/03 A: 1) Find the no of days between two dates. Then, for(i=0;i<noofdays;i++) { //Find the next date //add to the array } To find number of days To find nex...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Cocoa TDD and singletons I'm doing TDD with Cocoa and I wanted to ask - what is the correct way of testing a singleton class? I'm curious about the initialization and retrieval part. I'm thinking of doing something similar to this: MySingleton *singleton1 = [MySingleton sharedInstance]; MySingleton *singleton2 = [[M...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578325", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Where to #import on Objective-C My project has been increasing in size and I'm a little confused about where should I #import header files. There are 3 main locations where I can import headers: * *The .pch file (prefix) *The .h file (header) *the .m file (implementation) I don't care if the compiler take...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578330", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: element remove() not working in second remove I Have code like below : <tbody> <tr name="a02323232"> <tr name="j03543434"> </tbody> first i want to remove element with : $("tr[name='a02323232']").hide("slow"); second then i want to remove $("tr[name='j03543434']").hide("slow"); in first try , its successfull to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578341", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Unresponsive Fade-In Fade-Out in Jquery I am implementing a twitter-style follow/unfollow functionality with the following jquery. $(function() { $(".follow").click(function(){ var element = $(this); var I = element.attr("id"); var info = 'id=' + I; $("#loading").html('<img src="l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ordering records by frequency with Arel How do I retrieve a set of records, ordered by count in Arel? I have a model which tracks how many views a product get. I want to find the X most frequently viewed products over the last Y days. This problem has cropped up while migrating to PostgreSQL from MySQL, due to MySQL...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578345", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to encode for a dict I have the following dict: dict = {"es-ES": "Capítulo "}. However, when I try to use the dict, I get the following error: SyntaxError: Non-ASCII character '\xc3' in file.. I looked into the massive Python unicode docs ( http://docs.python.org/howto/unicode.html ), but haven't been able to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578347", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: fwrite not writing $fp = fopen('log.txt', 'w'); fwrite($fp, 'Missing gallery image for: ' . $row['toolbar_id'] . '\n'); The code above is not writing to the file. the $row['toolbar_id'] is a value from a for each loop. Any suggestions? There is no PHP error, as the file does open as I have debugged that part. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to create Search Box without using plug-ins? I'm new to this and doing some research on how to create a Search Box from scratch (without using plug-ins like Google, etc). The idea is to search within a particular website NOT all websites like Google does. Search results need to be displayed on that particular w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578351", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to increment the Identity column I am using identity columns as a primary key in my tables. In some situations I need to work with primary keys before inserting a new row. For example, in Oracle I use : select <sequence_name>.nextval into <variable> from dual and I was sure that no one will insert any row with t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578352", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can a character array be used as expression for switch statement? void main() { char name[20]; printf("\n enter Your Name: "); gets(name); switch(name) { default : printf( "Invalid" ); } getch(); } So my question: is a char array OR Simple array valid in expression for switch and, if it is vali...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Buggy Comments Code with Rails App So for some reason my code seems to have a mind of its own and will work at some points and then other times will throw an error saying undefined name method when trying to run this code in the view <%= div_for comment do %> <p> <big><%= h(comment.body) %> - <%= link_to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: google android market search result I submitted my first app to the android market about 3 months ago. Since then I've been getting on average about 10 to 20 downloads a day. A couple of weeks ago Google released their new market new look and since then my app hasn't been downloaded not even once and I didn't even k...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Error on driving IE using Watir-Webdriver : Unable to find element with xpath I'm new on Watir-webdriver. I have tried running watir-webdriver using Firefox on http://bit.ly/watir-example I tried on Internet Exploerer (IE ver 8), but it doesn't work. I also have set protected value on IE with the same value. My code...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578363", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASIHTTPRequest startSynchronous callback not showing/hiding MBProgressHUD before/after data is received I'm trying to simply create a MBProgressHUD, show it, start a synch or asynch request, push a new controller on UINavigationController, and remove said MBProgressHUD. However, the HUD does not appear until the dat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578367", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: XDT Config Transforms - ReplaceAll? I've got a custom section in my web.config file similar to this structure: <Messages> <Message id="1'> <Property Name="foo" value="bar" /> </Message> <Message id="2'> <Property Name="foo" value="bar2" /> </Message> </Messages> I want to apply a custom transforma...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Is it possible to show the dock icon when a new Window is called? I have an app that's shown as a Menu on the Status Bar, so I switched the "Application is agent (UIElement)" in plist to YES (because I dont want an icon on the dock just for a Menu on the Status Bar), but when I click an Item on the Menu a new window...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Managing state with scalatra I understand that Scalatra is a lightweight framework. However, I'm wondering if there are any tricks for managing small amounts of state. I have a form with a textarea and a few checkboxes. For example, suppose the textarea contains a math equation and the checkboxes some additional ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can i change layout when orientation is change I want to change my blackberry screen GUI When i go from portrait to landscape mode. protected void sublayout(int width, int height) { // TODO Auto-generated method stub if(Display.getOrientation()==Display.DIRECTION_PORTRAIT) { label.setText("P...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: SmartPhone(Iphone): Section not visible but visible in Desktop browser We have a ASP.Net application that we use for SmartPhone devices. One of the screens has a section that is visible in a desktop browser but not on a smartphone browser(Iphone Safari browser). I have marked the section and Would we know why?Any ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Get Current Google Map How do I get the current Google Map that is already initialized on the page with the Javascript V3 api, so I can reset a marker? A: declare the map object in javascript as global then you get the anywhere in javascript A: If you have a marker and you want to reference the map that it relates...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Problem in getting the Latitude and Longitude value using gps at different location I used the following code to find the longitude and latitude for my android application public double[] getlocation() { LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); List<String> provider...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Changing theme calls UserControl_Loaded event I am not getting why behavior of WPF user control and Windows forms user control is different . I added window loaded event which just shows message box as : private void Window_Loaded(object sender, RoutedEventArgs e) { MessageBox.Show("Main Window Loade...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to avoid overusing design patterns? I know that design patterns are time tested solution to a particular type of software problems. But how would I know that I am overusing a design pattern? How much is too much ? What things should I keep in mind while using design patterns to avoid overusing? A: The only poss...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Adding menu in wordpress but it should not be a page I have used add_menu_page() which adds a menu and also creates a submenu with that name. The syntax is: add_menu_page($pagetitle,$menutitle,$capability,$menu_slug,$function,$icon-url,$position); For example: add_menu_page('ABCD','ABCD','read','r121_abcd','callMe'...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: NSTimezone how to set CST to nsdateformater all I'm new to ios programming. I want to set CST in the method [dateFormatter setTimeZone:] I have created a sample project to get all known timezones Code is here: NSArray *timeZoneNames = [NSTimeZone knownTimeZoneNames]; for (NSTimeZone *timezon in timeZoneNames) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: rack-cache not found in any of the sources error I'm new to creating a rails application. I'm going through this tutorial, and running into the issue when launching rails server. When I execute the commands (rails server or bundle exec rails server) I get the following error: ←[31mCould not find rack-cache-1.0.3 in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do i remove multiple array elements in PHP? I have an array $rules = array( 'name' => array( 'isRequired' => array( 'message' => 'Name Required' ), 'isBetween' => array( 'value' => array(5,15), 'message' => 'Between 5 to 15 characters' ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Analysing C# source with Irony This is what my team and I chose to do for our school project. Well, actually we haven't decided on how to parse the C# source files yet. What we are aiming to achieve is, perform a full analysis on a C# source file, and produce up a report. In which the report is going to contain stu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JSTL continue, break inside foreach I want to insert "continue" inside foreach in JSTL. Please let me know if there is a way to achieve this. <c:forEach var="List" items="${requestScope.DetailList}" varStatus="counter" begin="0"> <c:if test="${List.someType == 'aaa' || 'AAA'}"> <<<continue>>> </c:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578420", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Move Minute hand in Android clock I am trying to write a simple proof of concept app that allows a user to rotate minute hand of a clock. I am having hard time coming up with the right logic for OnTouchEvent. So far I have the following code: public boolean onTouchEvent(MotionEvent e) { float x = e.getX...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Manage source and javadoc for Grails automatic dependencies in IntelliJ IDEA? How do I attach source and javadoc to libraries in IntelliJ IDEA that are linked automatically by Grails dependency resolution and are not explicitly listed in the IDEA project settings? For example in BuildConfig.groovy: grails.project.de...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Aligning sub-heading "just right" beneath the Heading I'm very confused about how things like this should be done. I am able to layout a whole site with html and css, but when it comes to things like this, I begin to doubt whether i'm doing it the right way or not. Can somebody please help me? I am trying to have a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578432", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to create mapping file dynamically in hibernate? I have situation where table is created dynamically,i don't know the table name it comes dynamically so i want to know that how can i am able to create mapping file(.cfg.xml) dynamically,it is possible or not? Thanks A: Yes, it's possible. I do something like...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578435", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Log-in control if username is not found the label text should answer username not found got a few question here. As you all know ive created a class wherein ill just instantiate it on my .aspx page.On my .aspx page ive got a logincontrol named login1. Now im getting error when user.UserName = Nothing and stop on thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578441", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: google maps multi marker info window not working I'm using Google Maps API on my web page. I'm try to add multiple markers to the page with info windows. The markers get added ok, but the info windows all have the info for the last marker. any ideas? <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceH...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Cannot find SenTestingKit when using Kiwi Xcode 4.0.2. New project, include Tests. Drag Kiwi folder in. Cannot find SenTestCase, cannot find #import Searched in the framework add list and didn't see it there, either. What am I missing? A: Had the targets set wrong. SenTesting is only available to the test target....
{ "language": "en", "url": "https://stackoverflow.com/questions/7578448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java RMI between 2 PCs I've successfully implemented the single server-client example here on two different physical machines. I would like to try out this scenario between 2 or more machines : * *Machine A sends parameters of operation to be performed on machine B to machine B. *Machine B executes it and return...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to overcome this problem with using more listviews in a layout I'm using 4 listviews in my layout and if i use scrollview , i cannot scroll into my listview. If i remove scrollview in my xml, then the last list is been hiddden. How to overcome this problem? My code goes below: <?xml version="1.0" encoding="utf-8...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Cannot connect to Oracle Database 10g using a C++ CGI with httpd 2.2 I am writing a CGI program in C++. It is supposed to run on version 2.2 of the Apache HTTP Server and it needs to connect to Oracle Database 10g. I tried to run this CGI program without httpd and it could connect to the Oracle database successfully...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Loading animation appears with delay Using following code to show loading animation (and hide whole page loading process with it) if js enabled <script> document.getElementsByTagName('body')[0].innerHTML = '<div id="loading"><img src="core/design/img/load/load.gif" /></div>'; </script> And fading out with following...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578452", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Subquery having clause error, what am I missing? Why am I getting this error? SELECT unitCode FROM Enrolment WHERE count(studentID) > (SELECT AVG(Students) AS avgstudents FROM (SELECT COUNT(*) AS Students FROM ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578454", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to call a function based on string value in C# I want to convert a string to specific type based on the value of other string Suppose I have two strings str1, str2. If str2 is double then I want to call convert.ToDouble(str1) and return the Double value. Is there any way to accomplish this? I tried using reflect...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Create a string array with Characters in C When I do this char *paths[10]; paths[0] = "123456"; printf(1,"%s\n",paths[0]); printf(1,"%c\n",paths[0][2]); Output: 123456 3 But when I you do this char *paths[10]; paths[0][0]='1'; paths[0][1]='2'; paths[0][2]='3'; paths[0][3]='4'; paths[0][4]='5'; paths[0][5]='6'; pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578458", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Exclude attribute in @BadgerFish in RESTEasy I am going to make one WebApplication which is RESTful. I am using RESTEasy API for that. I am using @BadgerFish annotation for mapping with POJO in POST request. But I have some attributes which should not allow to come in parameter. So my problem is how can i exclude t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: combining multiple msi installer into single installer In My application there are 4 msi installers.one which installs web project,other one installs web services and two installers for installing windows service. I want to combine all 4 into one.Is there a way to do that without using wix,installshield or any third...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578466", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: mvc advice needed on create/new view that is assigned to a model? I'm pretty new in setting up mvc, please be patient.. So I have these two models public class Promoter { public int Id {get; set;} public string Name {get;set;} public ICollection<Event> AllEvents {get;set;} } public class Event { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Optimizing unnecessary string copying in vector Presenting the minimal code to describe the problem: struct A { vector<string> v; // ... other data and methods }; A obj; ifstream file("some_file.txt"); char buffer[BIG_SIZE]; while( <big loop> ) { file.getline(buffer, BIG_SIZE-1); // process buffer; which may...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Are there any cross platform Java packages that can play, seek, and pitch shift MP3, WAV, OGG, MOD, S3M, IT, XM, and MIDI? Or if not all of those, at least MP3, WAV, OGG, and MIDI, and preferably noarch (works on 32 bit and 64 bit builds) I tried using Audiere's Java bindings, but they are 32 bit, and it would be a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578488", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ActionScript3 interface implementation without public accessor? In C#, it's possible implementing interface methods without making implementing method as public. For example, void ITest.SomeMethod() { // ... } Is there equivalent for ActionScript3? A: In ActionScript, there is no way to add access level qua...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to add underline of a text in HTML5 I am using HTML5, when I use <u></u> tag for underline, it says that it is unsupported by HTML5. What can I use in place of this for underlining? A: You are looking for the text-decoration directive in CSS. As underlined text is a matter of styling and not of layout, it is b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7578495", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }