text
stringlengths
8
267k
meta
dict
Q: Ruby: sort array of hashes, even though key may not exist In a rails application, I have an array of hashes which I can sort easily with just array_of_hashes.sort_by { |hash| hash[:key_to_sort] } But what if not every array member has a key :key_to_sort? Then the sort will fail "comparison of String with nil faile...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How does Java derive the the Initialization vector from SecretKeySpec for AES? I'm trying to encrypt some text using AES on .net and have it read on Java. The sample code I got for the encryption looks like this: byte[] key = ... SecretKeySpec keySpec = new SecretKeySpec(key, "AES"); How does Java get the key and t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570265", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Check that a PostgreSQL database is new Is there a "simple way" to check that the database is new and doesn't have any modifications? When I'm referring to a new database I mean a recently created database (e.g. create database newdb) Perhaps using psql to execute some SQL statement to check information in pg_catal...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570267", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PHP regex question for use in DB I am new to this and had a question. I have 2 input boxes with times. The values that i get back are 3h 20m 31s. How do i take this and turn this into 3:20:31 so i can use it in my database ? A: No need to use regexes. If you have fixed format you can just do $input = "3h 20m 31s"; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I ignore some unit-tests without lowering the code-coverage percentage? I have one class which talks to DataBase. I have my integration-tests which talks to Db and asserts relevant changes. But I want those tests to be ignored when I commit my code because I do not want them to be called automatically later ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570270", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Compiling Ruby 1.9.2 under Linux (Ubuntu) and Rubygems I already installed Ruby 1.9.2 with Rubygems successfully on my main machine. Now on my server I'm again in this job. Last time I had a problem, which came up right now as well: gem install rails ERROR: Loading command: install (LoadError) no such file to l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Problem with append in $.each I have 3 output in following jQuery.each(), i want echo(append) each a of they in one tag li. Like: This is output $.each(): how & hello & hi I want this: <ol> <li> <a href="">how</a> </li> <li> <a href="">hello</a> </li> <li> <a href="">hi</a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570273", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JavaScript indexOf() - how to get specific index Let's say I have a URL: http://something.com/somethingheretoo and I want to get what's after the 3rd instance of /? something like the equivalent of indexOf() which lets me input which instance of the backslash I want. A: If you know it starts with http:// or https:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: kernel crash with kmalloc I am trying to assign memory using kmalloc in kernel code in fact in a queueing discipline. I want to assign memory to q->agg_queue_hdr of which q is a queueing discipline and agg_queue_hdr is a struct, so if assign memory like this: q->agg_queue_hdr=kmalloc(sizeof(struct agg_queue), GFP_A...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Code snippet over a black background in Emacs Muse I have the following Emacs Muse snippet: <src lang="cc"> int a = 1; </src> This "htmlizes" the code within the angle brackets (adding color to keywords, etc.). The problem is that my font faces are optimized for a black Emacs background. Does anyone kno...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I navigate to an internal link and execute jquery function? I´m a very new to jquery. I´m using this jquery code fragment and it´s working fine. But I would like to navigate from anywhere on the website and still have the function work: function showselectedbox(theselectedbox) { $(".pageboxes").ea...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Data Binding in if statements In an aspx page i have: <asp:HyperLink ID="HyperLink" runat="server" style="cursor:pointer; text-decoration:none;" NavigateUrl='<%#String.Format("~/storefront.aspx?CatalogID={0}",Eval("CatalogID"))%>'> <asp:Label id="lblCustItem" Runat="server" Text='<%# DataBinder.Eval(Container.DataIt...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570287", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to split string using Substring I have a string like '/Test1/Test2', and i need to take Test2 separated from the same. How can i do that in c# ? A: Try this: string toSplit= "/Test1/Test2"; toSplit.Split('/'); or toSplit.Split(new [] {'/'}, System.StringSplitOptions.RemoveEmptyEntries); to split, the latter...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can we modify close buttons to alert view UILocalnotification dialog I have a task to develop the application with UILocalnotification and modify button of alert dialog box. How can we modify close button with user custom name to UILocalnotification alertview dialog? A: You can modify only view button title, pressi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: why I have two different result when I execute this javascript closure code my code : var n; function f(){ var v = "kevin"; n = function(){ return v; } } execute in FireBug: n(); the result is "kevin" execute in Chrome & IE9: document.writeln(n); ======>show "undefine" document.writeln(n()); ======...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Using the Lists web service in SharePoint 2007, how can I update the Author value programatically? I have a process that uploads a file to a SharePoint form list and would like the Author (Created By) column to be the user who created the file and not the process user. I have been trying the UpdateListItems method o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Getting a value of an array index using variable variable I have a recursive array depth of which is variable, and I want to be able to take a string with a separator and convert that string to an index in that array, For example $path = 'level1.level2.level3'; will be converted to get the value 'my data' from the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570307", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Error with Entity Framework 4 and MVC 3 I have a database with 3 tables: * *Subjects *Members *Topics Then I added the connection string to web.config and created an EF with the following classes: namespace MySite.Models { public class MySiteDBModel : DbContext { public DbSet<Topic> Topics { g...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Zxing change the action intent I added the Zxing library to my android app but there is a problem. When you already have a bar code scanner installed it presents you with a popup. I don't want this to happen and changed the the action intent. This is working, but when I open my app for the first time and select the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I use part of a larger image as a marker in OpenLayers? Is it possible to use part of a larger image as a marker with OpenLayers? Like this (in google maps): var icon = new google.maps.MarkerImage( "img/marker_sprite.png", new google.maps.Size(26, 44), new google.maps.Point(0, 44) ); A: The basic recipe ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570313", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Open physical drive from Linux I'd like to open SD card as physical drive on Linux. Somethink like: CreateFile("PHYSICALDRIVE0",...) On MS Windows. How can I do it? A: All devices are represented as files under the /dev directory. These files can be opened exactly like regular files, e.g. open(/dev/sdb, ...). Disk-...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: The right way to plot multiple y values as separate lines with ggplot2 I often run into an issue where I have a data frame that has a single x variable, one or more facet variables, and multiple different other variables. Sometimes I would like to simultaneously plot different y variables as separate lines. But it...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Remove pattern from database I have a MySQL table with over 3 million rows that includes peoples names and the state they are from e.g. "Smith (SC)" I would like to remove the state info and have "Smith". Since there are many difference last names and states used I was wondering if there was any trick to make this...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Generate PDF from Plone content types I need to create PDFs from content types (made with dexerity if that matters) so that the user creates a new document and after filling the form a PDF is generated and ready to be downloaded. So basically after creating/modifying the document a PDF should be created and stored i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: JBoss RESTeasy JAX-RS JAXB schema validation with Decorator I am trying to validate all incoming XML files that come over my (contract first) REST interface in an application running inside JBoss AS 7. I have written a @Decorator for Pretty-Printing (as by the example in the JBoss RESTeasy documentation) and an anal...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to post in Google+ wall I want to share some information in Google+ wall from my application. For that I go through the Google+ API. In that API they are mentioning how to get access token of a particular user, but they do not mention how to post in users wall using the access token. A: If you use wordpress the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "92" }
Q: Re-throw exception in task (TPL) loses stack trace I've code that rethrows an exception. When I later read the exception from task.Exception, its stacktrace points to the location where I re-threw the exception (line n and not line m, as I expected). Why is this so? bug in TPL or more likely something I have overlo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Logo only showing in Safari I've been scratching my head for the last 40 minutes trying to figure out why the logo on the below site is only working in Safari. http://www.jaygeorge.co.uk/catalyst-jrshairdressing/ The logo should be in the top left. The site is a WordPress site and the code I've used to drag in the l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570330", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Retrieving the interface–to–IP address mapping table I know the index of network interface returned by WinAPI's GetBestInterface. How do I get interface properties (IPv4 address) based on interface's index? Here is the working C++ code, but I need it in C#. PMIB_IPADDRTABLE pAddrTable; PMIB_IPADDRROW pAddrRo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to use a custom type from RIA services with lightswitch? I have a service class that is passed to lightswitch using RIA services. The service class uses a custom type instead of native lightswitch or SQL types. public class MyService : DomainService { [Query(IsDefault = true)] public IQueryable<MyRecord>...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Difficulty posting Actions to Timeline I've tried building the basis of our next app following Facebook's Open Graph Tutorial but for some reason I'm getting errors thrown at me regardless of how I try POSTing an action. I'll go as in-depth as I can here as I hope it'll be very useful for all developers getting to g...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Testing WinForms MVP and Event mechanism with moq I've been using MVP pattern in my application. But I have problems with testing my method which are called after button is clicked. Here is the code: public interface IControl { bool Enabled { get; set; } string Text { get; set; } } public in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why do I get "Too many open files" errors? I find myself having to explicitly call System.gc() in my Groovy scripts to prevent errors like the one below. Why doesn't the garbage collector do this for me? Is there something I can do to cause it to garbage collect to prevent these errors (maybe JAVA_OPTS)? Caught: jav...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to open PDF file in android emulator I would like to know how to open a PDF file? What all changes do we need to make in the manifest file. Can I open it in a browser? What all permissions would be required for it? A: If there is an application installed that handles the application/pdf mime type then you can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using multipe update statements from CSV vs using intermediate table I want to update about 10,000 records. The update information is in multiple CSV files. One way to update my table is * *Create intermediate table and update my primary table from this table (more work) *Use CSV to SQL utility which creates mul...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why doesn't my knockoutjs observableArray data update trigger anything? The idea of this page is, I have a text field which, when you enter three or more characters, fires an ajax query to search the list of users. That part works fine, and the console.log() call demonstrates I'm getting good data back and assigning...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570361", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Get android:versionName with shell command I want to get the versionName from the AndroidManist.xml file with a shell command. I've been trying to use grep and with: grep versionName ./AndroidManifest.xml I'm getting this line: android:versionName="1.0"> Is it possible to narrow it down to 1.0 somehow? Thanks in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570363", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: when exactly does the wcf autocomplete execute? I would like to know if I have a WCF service that has a TransactionScopeRequired but I don't use a transactional binding... Is possible to return a message first and later the transaction could make a rollback? In other workds... which executes first? the returning of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Removing/undefining a class method that's included by another module I'd like to remove a class method that gets added to my class via the include function. For example: class Foo include HTTParty class << self remove_method :get end end This doesn't work, it says "get" isn't a method on Foo. Bas...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570366", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Define an xsd enumeration once to be used in multiple places? I want to use the following enumaration in multiple places, but as you can see now, it is tied to one complex type, how do I extract it out so I can define it once and use it in multiple places. <xs:complexType name="MessageType"> <xs:sequence> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Java hibernate Detached criteria, count / having, query can someone help me out with a query ? Here´s the deal: I have two tables 1- Group of users 2- Users One group has a lot of users, but the thing is, the table groups holds the number of users it has on table users. But it happens that sometimes this number is i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Keyword local completion doesn't work with loaded buffers in Vim When I want to autocomplete with CTRL-N from other buffers, vim doesnt find any matches. I have no idea how to find out what's the problem. My complete settings are the default: complete=.,w,b,u,t,i. It only works for the active buffer. I even tried to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Creating SHA1 Hash from NSString How can I create a SHA1 from a NSString. Let's say the NSString is set up as: NSString *message = @"Message"; I can use PHP to create a SHA1 hash with sha($message). But unfortunately it doesn't work like that within Objective-C. A: I have this in a category on NSString (available ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: Help getting my route working for jQuery UI Tabs with AJAX I have my jQuery UI Tabs working right now but need help implementing the Ajax side. What I need help with is getting #tab-2 to show information (@user.messages) from the MessagesController in a layout that's in profile_messages.erb in the messages view. My ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Avoiding map.get(key) method I have the following code but i saw that retrieving values from a Map while iterating over the Map keys with keySet() is a mistake even with findBugs i get the warning WMI_WRONG_MAP_ITERATOR for(String elementId : mapElements.keySet()){ element = mapElements.get(elementId); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570381", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Getting Mockito and Powermock to throw error correctly I have the following code @PrepareForTest({Mongo.class, XYMongo.class, DB.class}) public class XYMongoTest extends UnitTest{ String host = Play.configuration.getProperty("mongo.host"); int port = Integer.parseInt(Play.configuration.getProperty("mongo.port")); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What could cause Java to keep running after return I have this problem when I do some special GUI interaction. Here is my situation: I use one dialog. I don't call System.exit() but leave the application later with a return. Normally the JVM then exists when it sees that no more non-deaemon threads are running. B...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JQuery UI Tabs - Clicking a tab will enable/disable buttons - looking to temporarily disable tab click I have five tabs right now: New Reports, Old Reports, Judges, Users, and Other Settings. When Judges or Users is clicked, there's a list of users or judges as well as a button that allows you to "Add New User" or "...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Nexys2 VGA pattern I am running Nexys2-1200 board (with a spartan3).It comes with a preloaded configuration that displays a VGA test pattern, that works fine. I'd be curious to have the complete VHDL code of this pattern. I can't find it on Digilent website... Anyone ? A: Looking really quick at the site for the n...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: SQL Server query to consolidate dates I am trying to create a key based on an id plus a code plus a start date which spans a range of dates and consolidates id + code until another id + code comes along. Here is the data: ID CODE EFFECTIVE TERM 9950 H0504402 07/01/2007 08/31/2007 9950 H0...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to check if the page is loading inside facebook canvas and change the layout accordingly I'm working on creating flash games site and want to make the facebook application version of it. As the site width is bigger than canvas default width I'm trying to find the way to check if the site is loading inside facebo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to Extract current date, parse it and add 7 days I'd like to do this : * *Extract the current date; *Parse it as DD/MM/YYYY; *Add to it 7 days; How can I do it on C#? I hope there are specific methods for do it (without extraxt, split, arrange arrays, join, ecc...). SOLUTION TAKEN DateTime dt = DateTime....
{ "language": "en", "url": "https://stackoverflow.com/questions/7570409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: SSIS 2008 - Getting the identity field I have to read in a text file that has a header row and some details with SSIS. I have two tables (one for the header and one for the details) that I need to get the data into. I need to insert the header and get the identity for that row, so I can insert that value into the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570424", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to show results while a php script is still running so I have tried Show results while script is still executing but for some reason it doesnt work, so here is what I have so far : ob_start(); include "../../common.php"; set_time_limit (0); $start = (string) $_GET['start']; $end = (string) $_GET['end']; for(...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Table Zebra, styling TR and COL in IE9 I wrote what I thought was very elegant css and table that does zebra formatting with very little bandwidth and no javascript, but it doesn't work in IE9. How it should look: How it looks in IE9: Source Code: <!DOCTYPE html> <html> <head> <title>SQLFlight HD Status</title...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570435", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: height of a div to match the height of the viewport I have a div like this. <div> ... </div> I want its height to be the height of the view port (not of the page) is it possible to do this via CSS or do I have to write some javascript ? A: Yes, it's possible. CSS percentage height will work as long as the parent e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: android dev: item in listview can not get focus correctly I face a listview focus problem. There is a button above the listview(not listview header). And I set listview.setItemsCanFocus to true. When I scroll using trackball, the items in listview can not get focused correctly. I post the layout file and code, ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570441", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Ms Excel VBA: Set a sorting combo box I am new to VBA although I have some experience in Visual Basic. I have a Microsoft Excel 2010 worksheet. Row 29 has the headers of a table and the data is from row 30 and so on. This table has like 20 columns. I'm trying to insert a combo in this Worksheet with three options, s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570443", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the best way to sort lines in jQuery? I have a TR's ( or divs with class - it doesnt matter ) like that I want to sort the lines by SCORE. Name | Age |Score ----------------------------------- John 26 90 paul 25 75 ringo 25 77 I k...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: jQuery mobile collapsible div not styling correctly Using this: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Page Title</title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b3/jquery.mobile-1.0b3....
{ "language": "en", "url": "https://stackoverflow.com/questions/7570448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java media control ala Youtube I'm looking to write a Java control that acts like the media control on youtube. It should have a download progress, current playback state and let the user scrub around on the video. Has anyone done this in Java or will I need to roll this myself? A: You can try JavaFx. Take a look h...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570452", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Split Paragraphs Java: i want first 50 words in one variable from string I have String explanation = "The image-search feature will start rolling out in the next few days, said Johanna Wright, a Google search director. "Every picture has a story, and we want to help you discover that story she said."; there are tot...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Print the IPMI commands coming from IPMC IPMI -> Intelligent Platform Management Interface, IPMC -> Intelligent Platform Management Controller IPMC is connected to the Processor through a serial cable. The ipmi_serial driver in the kernel communicates with the IPMC to send messages in both directions. There are 2 t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to force layoutSubviews of UIView? I have a custom UIView which has a dedicated, manually set frame for portrait and landscape orientation because autoresizingMasks just don't work in my case. I set this frame in: - (void)viewWillAppear:(BOOL)animated And it works as expected. My problem is now, that my UIView...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "61" }
Q: Updating existing classes with new EDMX model I am working with an existing EDMX model where I had to add a new column to DB. I have updated the model from DB and now I can see the new column in the model. However, I have to update the Classes with the newly added column and add get; set; methods etc,. Is there an a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to extract data between a particular tag from a string in Perl? For example, from the following string <?xml version="1.0"?><root><point><message>hello world 1</message></point><point><data><message>hello world 2</message></data></point></root> if I want to extract message, the result should be hello world 1 he...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Facebook Style Dynamic Dropdown menu on Windows Forms I would like to have a Facebook style dynamic drop down menu on windows forms using csharp. Any idea how to implement it? TextChanged event of text box can be used but I don't know how to visualize it. For the ones who doesn't use facebook here is the description...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: opening images with Python PIL I am using a sample NEF and expecting a 4288×2848 image, but get 160x120 with the code below. Is this as expected in that PIL doesn't support NEF? from PIL import Image image="./blah.nef" im=Image.open(image) im.size A: You're getting the JPEG thumbnail embedded in the NEF. It's pre...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570474", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Not Working in Other Pc's Hi i have the following code which works fine in my machine but when i give my install set in other machines application is been crashed and giving me error . And the functionality i am trying to achive is I am backing schema and data for few tables into an output folder and if the user ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Benchmark C++ vs Java, Unrealistic results I did a simple test, I know C++ is faster but the results of my test is unrealistic. C++ code is: #include <stdio.h> #include <windows.h> unsigned long long s(unsigned long long n) { unsigned long long s = 0; for (unsigned long long i = 0; i < n; i++) s +=...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can you factor out branching from tight loop? My question is: How can I add features to my processing loop without the overhead of checking the true/falseness of the user settings to navigate the branches? The settings are the same for all iterations on the loop. Do modern processors with branch prediction make ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Trying to connect two tables but unable I've done more complex queries and I am stumped. table: STEPS (id, rank, description) ELEMENTS (element, element_id, year_code) The tables relate by STEPS.id = ELEMENTS.element_id where ELEMENTS.year_code = 2010 I want to retrieve a step, by its rank, but it needs to check ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570488", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Handler pattern in Project Silk I am looking at the source for the Project Silk project and there is a "handler" pattern that I have not seen before. First - this link from 2009 alludes to it but leaves me hanging What the sample shows is a one method class where each class represents one method for each method in a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to get OnUtteranceCompleted to be called? I have been surfing the web (read google/ android developer document, read stackoverflow's similar questions, read book) and very closely followed the examples. The Text-to-Speech "speak" works great. But I just can't get OnUtteranceCompleted to be called. It must be so ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting the document object of an iframe I'm trying to get the document object of an iframe, but none of the examples I've googled seem to help. My code looks like this: <html> <head> <script> function myFunc(){ alert("I'm getting this far"); var doc=document....
{ "language": "en", "url": "https://stackoverflow.com/questions/7570496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Being both Serializable and IsSerializable in GWT I've got some DTOs in a project separate from my GWT project, and am trying to use them as DTOs inside the GWT project. They implement Serializable for use with another service. Currently, because I do not wish to reference them all in the GWT RPC service interface m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Set NavController title independently of TabBar title I'm working through the fairly typical process of building view controllers and their associated navigation controllers programmatically, and then adding the navigation controllers to a tabBarController. self.tabBarController = [[[UITabBarController alloc] init] ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: FQL for getting online friends list- Objective c I am creating an iPhone app using Facebook api. I have created the app and now I'm getting friends name, uid, sex and profile picture.I have followed the steps in the https://developers.facebook.com And I need to get the online friends list from my account. I think I...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I hide my Oracle table? Here's the scenario (simplified example): I have an Oracle user/schema called ABC. ABC owns a table called TRN. Client side code connects to the database as ABC and selects from ABC.TRN. So far so good. However, I don't want the client code to specify the Oracle schema name. Now I thin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: JSF 2.0 Navigation Not Working I am using Netbeans 7.0, Glassfish 3.1, JSF 2.0 I am trying to navigate from one view to another in a step-wise user registration process (with three steps). Each step corresponds to a view and these views are in different folders but all have the same name, i.e register.xhtml. i have...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PowerShell Parameter only in Get-Help When I run get-help get-process -detailed I get the full help. What would I run if I just wanted to know what the get-process -id parameter does? Is there a way to drill down like that? A: yes, use the -Parameter flag > Get-Help Get-Process -Parameter id The parameter flag c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570514", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to copy rows in PowerPoint 2003 with VBA? I need to copy rows in PowerPoint 2003 (just to re-use their formatting). Tried to do: Dim oPPTRow As PowerPoint.Row Set oPPTRow = oPPTFile.Slides(SlideNum).Shapes(1).Table.Rows(2) oPPTFile.Slides(SlideNum).Shapes(1).Table.Rows.Add (-1) oPPTFile.Slides(SlideNum).Shapes(...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C# - How to proccess data from Process.StandardOutput when the data is around 400 MB I am trying to retrieve list of files from a server with the windows command - "DIR /S/B" The output is huge (around 400 MB). Now when I tried retrieve it with below approach, its taking hours to process. Is there any faster way to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Warning while loading XML feed from other site $xmlDoc = new DOMDocument(); $url = 'http://domain.com/london/rss'; $key='item'; if($xmlDoc->load($url)) { $items = $xmlDoc->getElementsByTagName($key); if($items) { for($i=0; $i<$items->length; $i++) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570523", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: yahoo finance api problems converting money symbols From years we use http://download.yahoo.com/d/quotes.csv?s=USDARS=X&f=l1 to retrieve conversions between money symbols. Since 9/25/2011 retrieve always 0.00. Any Ideas? Thanks a lot! A: You forgot the .finance in the URL. http://download.finance.yahoo.com/d/quotes...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ios singleton class crashes my app I have a problem with an singleton pattern. I have read the following tutorials about singleton classes and have created my own. http://www.galloway.me.uk/utorials/singleton-classes/ http://www.johnwordsworth.com/2010/04/iphone-code-snippet-the-singleton-pattern/ The first time i ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: curl succeeds but wget gives 502 error for a request on custom port $ curl http://localhost:7810/test hello world! $ $ $ wget http://localhost:7810/test --2011-09-27 07:04:06-- http://localhost:7810/test Resolving <snipped> Connecting to <snipped> connected. Proxy request sent, awaiting response... 502 Bad Gatewa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Dcu in Delphi XE2 Is the *.dcu files in delphi xe2 for firemonkey application are independent from platforms. here. for both 32bit and 64 bit and other operating systems. If so how is the dcu files are designed. is it something similar to the previous(delphi 1-delphi xe) or something like an intermediate language(li...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jQuery getJSON callback can't be a variable I'm trying to create a function which uses the jQuery function getJSON but I'm running in to a problem. The first part of the callback can't be variable, jQuery always interprets it as a string. My code: $(document).ready(function () { function getName(callbackName, callb...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: why try...catch requires EXACT type thrown I can do this, no problem: long lngval = 3L; int i = lngval; but if I try this: try { throw 3L; } catch(int i) { cout << "caught " << i << endl; } I get an unhandled exception. This seems inconsistent. what is the reason for no type conversion in this case? A: In t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: List properties of a DependencyObject? I got a collection of custom DependencyObjects that I created. But I think that it doesn't matter wherever the DependencyObject comes from. The thing is that I'd like the list its properties but when I'm looking at the C#doc for DependencyObject I can't find anything related to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Have a webpage size grow with an expanding HTML textarea I've seen it on several websites and was wondering if it something that is build in to HTML/DOM or that would have to use JavaScript. I have a re sizable textarea, but I want the webpage to grow as the user grows the text area. Right now, if they expand horiz...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570549", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Data Validation in MVVM light What is the best way to do data validation. Is it a good practice to do validation in view models or should the validation be done in models? and also, what is the best way to implement numeric(decimal) text-box in WPF with MVVM. I am using MVVM Light toolkit. A: To be able to provide...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Why Aren't Deletes Cascading With This NHibernate Configuration File? I have the below NHibernate file, however I am not allowed to delete a Question because of a foreign key constraint on either of the two Answer tables. The desired behavior is to delete Answers once corresponding Questions are deleted and cascade ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to create a fallback URL using .htaccess and integrate it with other rules I have a directory structure like this... .../htdocs/domain/example/ <==> http://example.com/home/ .../htdocs/domain/example1/ <==> http://example1.com/home/ .../htdocs/domain/example2/ <==> http://example2.com/home/ And I also...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570565", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: set text(number) to Edit Field through its setchangelistener Hi I want to accept number in edit field up to two decimal.So I am setting listener to it Then I am checking whether number is two decimal or more and if it is more than two decimal then i am truncating the number and again trying to set the truncated nu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: XMLHttpRequest cannot load I am trying to access resourced from multiple servers using AJAX, and I am running into this problem: XMLHttpRequest cannot load http://first.mydomain.com. Origin http://second.mydomain.com is not allowed by Access-Control-Allow-Origin. With the following code for ( i in domains ) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570571", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Policy File Check closes socket I have created a flex app that uses sockets. I published the flex app in a web application that runs on glassfish server. Now from that flex app i create a socket connection to a C# server and start sending/receiving data. The problem is that after i create the socket connection to C...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Oracle SQL loader Error while loading really huge log files I have a python script which loops through log files in a directory and uses oracle sqlloader to load the log files to the oracle database. the script works properly and even the sqlloader.. But after loading around some 200k records,the loading fails with...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: onClick inside fragment called on Activity i am encapsulating stuff into a fragment at the moment and run into a problem that is hard to google. Inside my fragment are some buttons with onClick attributes but they are called on the Activity rather the fragment from the android system - this makes encapsulating a bi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7570575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }