text
stringlengths
8
267k
meta
dict
Q: SQl exception in VS I'm getting an SQLexception while debugging in VS. The error is: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 8 ("@Pris"): The supplied value is not a valid instance of data type float. Check the source data for invalid values. An ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/7555981", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Flot re-draw single series I am looking for a way to re-draw a single series in Flot, I know I can use plot.setData(newData) and plot.draw() to re-draw all the data series but I have one series with 100,000+ points so I dont really want to re-draw this one every time At a guess I could use the drawSeries hook but Im...
{ "language": "en", "url": "https://stackoverflow.com/questions/7555983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Getting numbers from a string in iPhone programming I have a string. It's always 3 letters long, and it can be counted on to only contain three integers. Say it looks like this: NSString * numberString = @"123"; Now, I want to extract those numbers from it. 1, 2 and 3. In any other language I'd just fetch the chara...
{ "language": "en", "url": "https://stackoverflow.com/questions/7555995", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Versioning assemblies built off source code stored in a DVCS What I'm up to is to have an ability to tell a changeset which was used to build an assembly. With Subversion it's all nice and simple: embed repository revision number straight into assembly version (like 1.0.5873 with 5873 being revision number). DVCSes,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556000", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Redirect request to CDN using nginx I have a couple of server addreses, like cdn1.website.com, cdn2.website.com, cdn3.website.com. Each of them holds simillar files. Request comes to my server and I want to redirect or rewrite it to a random cdn server. Is it possible ? A: You could try using the split clients mod...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556003", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Avoid transformation text to link ie contentEditable mode In contenteditable div, in IE text like "http://blablabla", "www.blablabla", "bla@blabla" and so on automatically transforms into hyperlinks http://blablabla, www.blablabla, bla@blabla. How can I avoid this? A: Unfortunately, there is no cross-version soluti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Aggregating Data using R I'm trying to plot the data using R by reading my CSV file which contains some values which were logged on per-second basis. I would like R to aggregate the data to per-minute basis so that I can plot the per-minute data using plot(TIME,VALUE.). My CSV file contains something like this; Stor...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556008", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Select where column not in an other one 2 times If I have table like this called "table" +--------------+ | id | c1 | c2 | +--------------+ | 1 | a | 0 | | 2 | b | 1 | | 3 | c | 1 | | 4 | d | 2 | | 5 | e | 2 | | 6 | f | 3 | | 7 | g | 4 | | 8 | h | 5 | +--------------+ I want to SELECT 'c1' F...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Perl regex matching problem I think I'm missing something simple here... $key = "deco-1-LB-700F:MAR:40"; if ($key =~ m/deco-(.*?)-(.*?)-(.*?):(.*?):(.*?)/) { print "1=$1 2=$2 3=$3 4=$4 5=$5"; } This results in the output: 1=1 2=LB 3=700F 4=MAR 5= Why isn't $5 returning the value 40 ? Cheers, Stu A: Becau...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using GAE/UserService to login to XMPP I am working on a problem solving game which will be hosted on GAE. I use the UserService API to validate the user before letting them play the game. During the game, I would like to update the users gtalk status to something like "User X is on step y of the game". Is this poss...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Split a string into multiple sections by index perl I have the output from a diskpart command: Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 0 D DVD-ROM 0 B No Media V...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556028", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Getting classname of a object in Perl I have an object reference and it could be a reference to an object of type 'FooInvalidResults' There is a file called FooInvalidResults.pm and there is a line 'package FooInvalidResults' in it. will the following work? my $class = blessed $result; if ($class eq 'FooInvalidResul...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Load or functional testing of GWT app using JMeter I am new to JMeter. I wanted to do some functional testing of my GWT application using JMeter. Does it support GWT testing? For example I would like to write a script that might check if the login module of my GWT application is doing good or not. Please let me kn...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Setup MonkeyRunner on Android I'd like to use MonkeyRunner. I've got a monkeyrunner.jar and import it into my project. How can I use it now? Could you tell me what should I do step-by-step. I've seen some code snippet on python, but I don't understand how can I use python in eclipse. A: Maybe this link can help you...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556037", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Having trouble with the Socket.IO Tutorial samples. Incomplete documentation or PEBCAK? Over the weekend, I was trying to figure out websockets (since I think it would probably be a really fun thing to know). I did a search around for socket.io tutorials and found this Good beginners tutorial to socket.io? which sug...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to map function address to function in *.so files backtrace function give set of backtrace how to map it with function name/file name/line number? for ex:- backtrace() returned 8 addresses ./libtst.so(myfunc5+0x2b) [0xb7767767] ./libtst.so(fun4+0x4a) [0xb7767831] ./libtst.so(fun3+0x48) [0xb776787f] ./libtst.so(f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556045", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: Does Haskell have an equivalent to Sage? Is there something like Sage for Haskell programmers? A: Unfortunately, the answer seems to be "NO". Possibly interesting to some readers is the following: Often, one programming language is not enough for a task. E.g. when I need to solve a problem which is remotely related...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: MySQL db design for products I am developing a web application that will allow people to keep track of products that they will move around. Example: I have 10 cups in my warehouse. I move 5 cups to ShopA and 5 cups to ShopB. I then move 3 cups from ShopA back to my warehouse. In terms of my db structure, i thought...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to perform a PDF conversion in Event Receiver? I am trying to convert the document a .docx file available in document library(conversion) to PDF format in same library whenever the file is updated. The code I am using is given below: public override void ItemUpdated(SPItemEventProperties properties) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using Split in Java and substring the result Possible Duplicate: string split in java I have this Key - Value , and I want to separate them from each other and get return like below: String a = "Key" String b = "Value" so whats the easiest way to do it ? A: String[] parts = str.split("\\s*-\\s*"); String a = pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556060", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: An asp.net page structure question In Default.aspx I have below code, <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> Place 1 <form id="form1" runat="server"> Place 2 <br /> <div> <asp:Button ID="Button1" runat="server" Text="Button" onclic...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556075", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Android - ImageView exact coordinates how can I get the exact coordinates of a point in imageview? Just think my image is a bitmap of map of a city and it's width is greater that screen and it is in a scrollview. I want to take the same x and y values for same place on image after scrolling? How can I calculate thes...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556078", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is operator ~ for? Possible Duplicate: javascript bitwise operator question Documentation says, that it is bitwise NOT. But I don't understand these examples: var a = ~1; a -2 var a = ~8; a -9 var a = ~-1; a 0
{ "language": "en", "url": "https://stackoverflow.com/questions/7556081", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# xattr file attributes I'm creating a cross-platform software and I want to know if there is any (easy) way to read/write Unix (Mac OSX/Linux) extended file attributes in C#. I've just read about xattr namespaces, but I haven't found any information about C# implementation or bindings of this feature. P.S. The onl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to set Facebook App Settings I have written an ASP.NET page for a customer which uses the C# Facebook API to post to Facebook. // Post to Facebook. // Build the Arguments. Dictionary postArgs = new Dictionary(); postArgs["message"] = "Hello World!"; // Post. var response = api.Post("/me/feed", postArgs); // Get ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a Java library to cache files? Is there are java library that will cache files to memory and disk? Basically, I would like the library to cache the file to memory. However, if the in memory cache gets larger than a certain threshhold, some of the files should be written to disk. Is there any Java library ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Tomcat 7.0.x Manager login problem I'm trying to access the manager app, but I can't login. I get the logon screen, but when I enter the username and password, the login screen keeps coming back. Any suggestions? This is what I've done: The manager app is deployed in $CATALINA_BASE/webapps/manager Part of the serve...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Where do I execute "rails generate scaffold" command in AptanaStudio? There used to be a UI for scaffolding a model in my previous version of AptanaStudio. Where did this functionality go? Must I use the command line exclusively? A: It seems you need to use the console provided in Aptana. reference: http://beans....
{ "language": "en", "url": "https://stackoverflow.com/questions/7556103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Graph API me/home posts disappear and appear I am using graph API 'me/home' to get the posts in news feed. Since last week posts disappear and then reappear in response received. The first call gives the response with post x. In the second request post x is missing. In the third request the response contains post x ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: does not display Is it normal for <fb:add-to-timeline show-faces="true"></fb:add-to-timeline> to display only for the app creator and not other users? I am trying to test my app with my girlfriends account and * *Permission Dialog/page is still the old one *No asking for permissions to "add activity" *add-to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Closure fail - even after reading all about it I have this countdown fiddle here I would LIKE to make the following work in an onload but I obviously have a problem with closures for (var o in myDates) { var myDate = myDates[o]; var iid = o; funcs[o] = function() { var dateFuture = new Date(); dateFutu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556113", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting new Migrations generated after 3.1 upgrade I have upgraded my app to rails 3.1 following Ryan Bates' instructions in Railscast Episode 282. Everything is working wonderfully except that new migrations generated are still following the old style of class MigrationName < ActiveRecord::Migration def up en...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556115", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I access server specific options in Capistrano? I'm trying to configure Capistrano to do the same task on two different servers, each of them having different credentials. I'd like to do something simmilar to: namespace :deploy do role :db, "192.168.1.1", :credentials => "db1.yml" role :db, "192.168.1....
{ "language": "en", "url": "https://stackoverflow.com/questions/7556116", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: GlassFish 3.1.1 - getting jdbc connection I'm trying to get OracleConnection from glassfish by this lines: EntityManager em = getEntityManager(); Connection c = em.unwrap(Connection.class); But, in debugger I see that the actual class for c is ConnectionHolder40 class. Where I can find a jar with ConnectionHolder40...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Google Chrome new content behaviour I know that Google Chrome has this effect for tabs where they light up when new content appears on the page and you are not viewing that tab currently.It usually shows up on sites like grooveshark.If you know what i am talking about i would like to simulate this effect if anyone k...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556119", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the RFC 2822 date format in PHP (without using date('r'))? Is date('D, j M Y H:i:s O') equivalent to date('r') (RFC 2822 date) in PHP? I'm asking because 'r' seems to be non-working with the format parameter of date_parse_from_format. A: You can use date(DateTime::RFC2822); if you want dates in the RFC 2822...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: BeansBinding in JTable and JTable's TableColumn One of my JTable is update with a bean property(util.List).It is ok. But I want a column in my JTable named "Action". This column should have JComboBox for each row to do some thing for that row's data. I read this and it has some tutorials how to set a Jcombobox into ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556121", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: intellij- where are the artifacts? I am building jars using build artifacts from the menu. In "Project structure" I have in the artifacts - output directory. When the build stops - it doesn't say anything is wrong and it doesn't put the jar file in the output directory. Are there readable logs for the artifact build...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556122", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Eclipse breakpoint events In my Eclipse plugin, I would like to be notified when a breakpoint is created, removed or disabled. Is there an event that I can subscribe to for this? Thanks, Alan A: I haven't used it, but from the docs it looks like you might be interested in IBreakpointManager. It looks like you shoul...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556130", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Allow a specific text string and a range of numbers to be used on PHP promo code script I have a simple promo code script to apply a discount to an amount before it is passed to Paypal, it works fine but I want to use a number of different codes so I can monitor their performance (all give the same discount). At the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556133", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Show a div as pop-up using Fancybox I need to show a div with application form as a pop-up using fancybox. Is it possible to .fancybox() anything but image because all the tutorials i came across on the internet use . Thanks in advance! I have the following code: <input type="button" value="Preview" id="btnPreview"...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Which operators and functions expect their string arguments as octets? Does somewhere exist a list with all Perl operators and functions which expect their string arguments as octets? For example the file test operators need octets ( Question about pathname encoding comment ). Now I found a code with symlink and I a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Retrieving Information associated with IAP Product Registered on iTunes Connect I've created an eBook player application which has books that need to be sold under In-App-Purchase. These books i've added as Non-Consumable Product's under my application in iTunes Connect. While registering the Product's i've uploaded...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556142", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Explicitly casting all string parameters to Unicode Is there a performance hit to prefixing all SP parameters with N' even when the parameter is not a unicode string? I'm generating calls to a database dynamically in my .net code. Without actually checking each time I generate the code, I don't know which parameters...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I Remove Special Formatting with PowerShell (Tabs, Cariage Enter, BackSpaces, Newlines, and more) I want to remove these carriage returns (or at least I think that's what they are) using PowerShell but I am having trouble doing so. I've used: -replace "`n","" -replace "`t","" -replace "`b","" -replace "`r"...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Informix can't connect via IBM.Data.Informix I'm trying to connect to Informix database using sample code from https://www.ibm.com/developerworks/data/library/techarticle/dm-0510durity/ I'm using IBM.Data.Informix.dll version 9.7.4.4 I get an error: "argument is not correct": This is my code: static void Main(string...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I initialize ActionDispatch::ParamsParser in Rails 3.1? My application defines a custom Mime type for its Rest interface. So I register it in the mime_types.rb initializer: Mime::Type.register "application/vnd.example.app-v1+xml", :xml_v1 and Rails correctly handles the respond_to blocks in the controllers. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Invalid return type for a mapped stored procedure Have a very large ASP.NET application I'm creating Automated UI test cases for, part of the final part of this test case is to remove the user it just created (so we keep the same details every single test run, and will expect the same results, no data will change.) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556152", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Localization in a databound ComboBox isn't working correctly I want to translate items of my combo box. So I use a personalized converter KeyToTranslationConverter which convert an Enum value to a translated string. [ValueConversion(typeof(object), typeof(string))] public class KeyToTranslationConverter : IValueConv...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Git: Set up a fetch-only remote? When I run git remote -v in one of my Git repositories that has a remote(s) configured, I see that each remote has both fetch and push specs: $ git remote -v <remote-name> ssh://host/path/to/repo (fetch) <remote-name> ssh://host/path/to/repo (push) For remotes that point to peer dev...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "172" }
Q: How to change Database in Enterprise Library 5.0 I created a db object as sqlDB = EnterpriseLibraryContainer.Current .GetInstance<Database>("ProdConn"); But later in code, i want to change the Database name. In previous enterprise version, we use conn.ChangeDatabase("ABCD"); to change the database but how we ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556159", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using Mock() in Python Can you give some clear examples of uses of the Mock() in Django unittests? I want to understand it more clearly. Update: I've figured out some things, so I share it below. A: Part 1: Basics from mock import Mock Mock object is an object that is a kind of a Dummy for the code that we want no...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to create a group for a string / filename? OK, I am a newbee to stackoverflow. Developing an ecommerce site, I have as many as 50 unique images on the home page that needs to be loaded. I am using the Amazon CDN for my images and all these files are in a bucket with a unique domain. I would like to have multipl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: setuptools entry_points. Installing executable to /usr/sbin I have a setup.py script, that has entry_points defined like this: entry_points = { 'console_scripts': [ 'gun = gun.sync:main' ] }, This installs the executable into /usr/bin. Is there any ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556168", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to get Number Of Lines without Reading File To End Is there a way to get Number of Lines within a Large Text file ,but without Reading the File content or reading file to end and Counting++. Maybe there are some File Attributes ,but cannot find it out at all . Because i might be in some cases where i should get ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556171", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Sencha Touch: List setActiveItem error: Cannot read property 'isComponent' of undefined? I have a normal list with 'onItemDisclosure' on this, now when an item is clicked the panel opens fine, but I would like to have this panel placed on an external page / js file rather than clog up the code workings page etc I h...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to force the character encoding of HTML e-mails in Rails 3? I'm using Rails 3.1 (3.1.1 RC1) and I have configured ActionMailer to use windows-1252 as default encoding. (External requirement) This works perfectly with plain text mails, but as soon as I send HTML mails the text is converted to UTF-8 again resultin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556173", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Where to download SunPKCS11Provider I'm trying to access smardCard folowing this article but I have no idea where to find jar with SunPKCS11Provider. In Oracle docs they say it is standard since 1.5. Here is my block where compiler is complaining it can't find SunPKCS11: String configName = "d:\\dev\\ws\\pkiTest\\pk...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556174", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Rubular versus javascript regexp capture groups Noticed a difference between what Rubular.com and Javascript regexes: 'catdogdogcatdog'.match(/cat(dog)/g); // JS returns ['catdog', 'catdog'] I expected to capture 'dog' twice but instead I get 'catdog' twice. Rubular captures 'dog' twice as expected: http://rubul...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Are there good tools for debugging, profiling, tracing in MySQL? If I want to debug queries on SQL Server, I'll use the profiler built into SQL Studio Management Studio. Do similar tools exist for MySQL? I'm aware of showing running queries, profiling CPU usage per query, and other techniques, but because I'm going ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is is possible to make a client to client connection with HTML5 I know that HTML5 has the new feature called WebSockets for making a connection between browser and server. But is it possible that the server helps clients make a connection between them? I want to transfer file from client A to client B A: No, WebSoc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Android Character insert to String How can I insert '\n' ( a new line) into a string, to be custom displayed on the device's screen ? The code : String s3=""; for(int i=0; i<timp.size(); i++) { s3 = s3 + sbt.get(i); } That's how I form the string . Now I would like to put '\n' on the s3.charAt(55) positi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Update table with condition I have the following problem: I have table: TEST_TABLE x_Id|y_Id --------- 2| 7 2| 8 3| 7 4| 7 5| 8 I want remove record if x_Id has y_Id(7) and y_Id(8). And update y_Id to 7 if y_Id = 8 and y_Id(7) is not exist in the unique x_Id. x_Id and y_Id is composite key....
{ "language": "en", "url": "https://stackoverflow.com/questions/7556191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why does this JavaScript cause a "Permission Denied" error in IE The following code throws a Permission Denied error in IE, citing jQuery (1.6.2) line 6244 Char:2: function addAgreement() { var url = window.location.toString(); var pieces = url.split('/'); var site_url = url.replace(pieces[pieces.length ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Get message from Facebook inbox I have some trouble in getting messages from inbox. I used Graph API with endpoint @"me/inbox" and then used fql query like this one : SELECT thread_id, author_id, body FROM message WHERE thread_id IN (SELECT thread_id FROM thread WHERE folder_id=0) But in both cases result was inco...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556195", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: having issues downloading xls file using procmail Any ideas why my xls attachment files aren't being downloaded? thanks This is a perl wrapper creating the procmailrc file for me. my $procmailrc =<<EOL; MAILDIR=$workDir VERBOSE=on LOGFILE=$workDir/procmail.log :0 B * ^Content-Type.*application.*name=.*\.(xls|rtf...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: New SQL Server Install Mixed Mode authentication not allowing Windows Authentication I have a new instance of SQL Server 2008 RS Standard Edition. I enabled Mixed-Mode Authentication but I can't get Windows Authentication to work. I get the Error: 18456, Login Failed for user 'MyDomain\jreddy'. I can log in with t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Understanding classes in ActionScript I have not used Flash in some time, let alone gotten round to using Classes in flash. I need to do some work on a client's site and I am trying to follow the previous developer's code which he/she did using classes in AS2. Am I correct in understanding that these lines of code.....
{ "language": "en", "url": "https://stackoverflow.com/questions/7556199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to add a vertical scrollview i ve got a view which contains buttons and textview .what i want is to scroll vertically...cud u guys help me out below is the code... - (id)initWithItem:(NSString *)theItem Title:(NSString *)title Description:(NSString *)detaildesc{ if (self = [super initWithNibName:@"Secondetailvie...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SVG / Raphael, how does one implement the DOT algorithm in javascript? (Graph organization) My fiddle: http://jsfiddle.net/G5mTx/10/ As you can see, the current way I'm organizing the nodes does no balancing, and there is some overlap when parent nodes have more than 1 child node. For those not familiar with the DOT...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556206", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: resize / drag usercontrol at runtime How can I resize / drag a usercontrol in silverlight 4 at runtime through a resizehandle in the bottomright corner for example? As a beginner I have no idea how I can do this. A: I've found exactly what I was looking for. I was using a childwindow but it blocked interaction with...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556209", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Perl style regular expression for C comments At work, I have a requirement to create a perl-style regular expression for C comments (/*) for comments left in our code. Our business analysts had new requirements, and these were all prefaced with "BA", and I'm supposed to somehow scan the comments to find these insta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: sessionStorage between parent and child pop-up I have an HTML5 page where I store some data with: window.sessionStorage.setItem('toStore', 'hello world'); Then, I open from this window a pop-up one with: window.open('mobile.html', 'myPopUp'); I have a set of Javascript functions associated to the two pages, wher...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Click an UIImage and open an UIImageView in Objective-c Suppose I have an UiImage called "thumbnail" on a view, I want to ask how to open an UiImageView when I click on the UiImage(thumbnail)? This effect is similar to an user click on a small image on a webpage, then popup a larger image. Thanks A: Add UITapGestur...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556215", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: mac magic mouse horizontal swipe/scroll issue in firefox 6 I have added overflow-x: hidden to my css html tag in order to hide the slides that are floated to the left, each slide fills the whole window. These slides are then accessed using a navigation, this works fine in all browsers hiding the horizontal scroll as...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there an open-source implementation of an XPathNavigator for POCOs? I would like to enable XPath navigation over my POCOs (i.e. "plain old CLR objects"). From a brief search, I have found several options: * *Use ObjectXPathNavigator .NET 1.0 implementation. However, since it was written against .NET 1.0, I h...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to turn GCStress on in Windows 7? I am debugging a GC heap corruption and came to the step where I want to try running the program under WinDbg + PageHeap + AppVerifier + GCStress. I found in the article Software crash: faulting module mscorwks.dll, version 1.1.4322.2379 that I can enable GCStress like this: reg...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556224", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: django fails to retrieve data using multiple databases Im trying to access one database table which is in several databases. I tried using MytableObject.get.using(databasename) first, but it threw error: django.db.utils.DatabaseError: relation "mytable" does not exist So i set out trying to figure out why. as long ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556226", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Do Struts2 Results annotations override or add to superclass defined values? The following example: I have a superclass and subclass for a struts action. The superclass defines @Results, and the subclass needs to define additional specific @Result entries. For example: @Results({ @Result(name=BaseAction.ERROR, l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556228", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Sudoku difficulty rating I want to build a sudoku game with a generator. I have figured out everything how to do it without the difficulty level: easy, medium, hard. My question is how many numbers should I hide depending of the difficulty level? Any ideas. A: I'm pretty sure that the difficulty rating for a sudoku...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556229", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Number of Spring Contexts created by ContextLoaderListener It is easily to know how many contexts have been created if we create ApplicationContext instances programmatically. However, how many context are created if we use ContextLoaderListener? For example Spring's reference as below: <context-param> <param-na...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556233", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Error in Query String.Whitespaces I am creating a hyperlink to a page The url is determined by the user input,thus by the querystring <a href='+abc+'&country='+country +'&state='+state+' ></a>; The problem is that the variable state consists of two or more words.. so when i try to click the hyperlink proving the in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to check admin rights C# How to check is my application starts with admin rights? I use this code now: public static bool IsUserAdministrator() { //bool value to hold our return value bool isAdmin; try { //get the currently logged in user ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556237", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Signing in on a website ? how does the server manage it? I am developing a site where access to certain pages might require the user to sign in. (he/she writes his username and password) if the user has successfully signed in he/she can then access this pages. How does the server know that this is the case ? Does it...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Templated list with radio buttons I have the following code: @using (Html.BeginForm()) { for (int i = 0; i < Model.Themes.Count; i++) { <div class="theme"> <img src="/Content/img/placeholder/@Model.Themes...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Do I need a Guice module for every class to write integration tests? Currently I have 1 Guice module in my project which defines all bindings. Now I want to write integration tests and I need to bind the dependencies of a specific class. If I use the existing module, Guice will bind all dependencies. But I think thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Android JSON Exception I have a little problem with parsing JSON data which I receive via server.I have a two JsonObjects which don't have data always,only in some cases but I need to check if they are null or not everytime.I'm using this code to do that : String jsonData = new String(contentBuffer,"UTF-8"); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CakePHP Select Query Is there a way to select all fields from a specific table in CakePHP? So something like: $this->Model1->find('first', array('fields' => 'Model2.*', 'conditions' => 'Model1.id = Model2.Model1_id'), 'contain' => array()); I'v...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556244", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JSF 2.0, malformedXML when using ajax on a commandlink I am trying to display a field in a form after an ajax request through a commandlink.However ,i get a malformedXML error when i click the link. The xhtml file looks like : <h:form> . . <tr> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Following: How to use FTS in SQLite with Monotouch for iOS I'm currently following this small tutorial about MonoTouch, SQLite and FTS3: How to use FTS in SQLite with Monotouch I've sucessfully done step 1 and 2. Unfurtunatelly I'm facing a problem on step 3, because when i try to compile the iPhone monotocuh proje...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C++ RAII Questions So as I understand it to implement RAII properly, if I where to call CreateFont, I'd wrap that in a class with CreateFont in the constructor and DeleteObject in the destructor, so it cleans it up when it goes out of scope. First question is, won't I end up with ALOT of classes doing that? Especial...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556248", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I get command arguments with D-trace on OSX I'm trying to preview run commands with the args with D-trace. I tried something like this: sudo dtrace -n 'syscall::execve:return {printf("%s\n", curpsinfo->pr_psargs);}' But on OSX this code returns only commands names not their args. I find this forum thread bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556249", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Asp Mvc 3 with NinjectHttpApplication and MEF I am using Ninject as my MVC controller factory, but I also load in certain routes and controllers via MEF, these controllers need to be able to register themselves with Ninject: Bind<SomePluginController>.ToSelf(); So the dynamically added routes can be picked up. So f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to free c++ memory vector * arr? I have a vector<int>* arr, which is actually a 2D array. arr = new vector<int> [size]; Is it ok that I just do delete arr; Will arr[i] be automatically be deleted, since it is a standard vector? A: Your code is broken. You should be using delete[] with new[]: delete[] arr; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Display datetime in actionscript with no timezone or daylight savings time changes? In actionscript I am trying to format datetime fields coming in from a webservice call which takes into account the timezone and daylight savings time. Basically we need to display times for events, here in our TZ at the time it wil...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556258", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: scss style sheets issue rails 3.1 my projects.css.scss file looks like the bellow one, // Place all the styles related to the Projects controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ $right-container-background: #3BBFCE; $right-conta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Passing Dynamic Loaded Type to SomeFunction I am trying to pass the type of a dynamically loaded dll (it uses an interface, but I need the conectrete implementation of this) to a function and am missing something. var data = LoadAssemblyFromParamenter(pathToDataDll); Type dataType = data.GetType().MakeGenericType(...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Program Executing Differently From CMD I have made a C# app that, when opened, reads a text file and outputs the lines into the list view. I have set this to run at startup with a reg key which does open it but the app just shows an empty list view. Same thing happens when I run it from cmd but everything works fine...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556266", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: building several targets using for loops in gnu make (only symbol definitions change) i need to build 4 targets from the same set of source files. The only thing that changes are a couple of symbol definitios at compile time (-D DEBUG_OUTPUT, -D TIME_OUTPUT) how can I accomplish that in a GNU makefile? I thought of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556271", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: rails 3.1 - auto compile SASS before browser refresh I used to run compass -watch to ensure my Sass files compiled as soon as they were modified. Now though, thanks to the asset pipeline, code auto-compiles (if changes are detected) when the view is refreshed in the browser. There's a time-cost associated with this...
{ "language": "en", "url": "https://stackoverflow.com/questions/7556272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }