text
stringlengths
8
267k
meta
dict
Q: How to "svn export" a remote branch on github? I do not need any history, I just want the files from the said branch to be downloaded locally . This is for a deploy script Usage: ./deploy.sh remote_branch_name the script checks out an arbitrary branch from a remote github repository and copies the files to a serv...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: use p6 web service in .net There are a lot of web services installed on Primavera P6. WSDL: ActivityCodeAssignment.wsdl Primary Key Field: A multi-part key comprised of the following elements: ActivityObjectId ActivityCodeTypeObjectId Target Namespace: http://xmlns.oracle.com/Primavera/P6/WS/ActivityCodeAssignment/...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Avoid login (JAAS) every time I change path (and it generates a new session) I've configured my Java EE app to use declarative security with JAAS (I've even implemented a custom LoginModule). The problem is that every time I change the url path (e.g. from http://mysite/restricted to http://mysite/restricted/configs)...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: EJB - external lib or inside JSF project? I'm packaging my app as WAR archive. What are pros/cons of these two approaches: * *Keep EJB (beans, entities etc) as separate project and include into WAR as lib (*.jar file - WEB-INF/lib) during build? *Keep everything (ejb-s, jsf beans etc) in one project, so after b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614394", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I tell Visual Studio/Microsoft's C compiler to allow variable declarations after the first statement? I have code that compiles on the GNUARM compiler, but Visual Studio 2010 issues errors. The issue involves declaring variables after the first statement in a C language file: main.c #include <stdio.h> #inclu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How to deal with System.Drawing.Color <--> System.Windows.Media.Color ambiguous reference I'm using System.Drawing to fill rectangles and draw lines and stuff. The System.Drawing.Color object only has a list of pre-defined colors, and I want to assign my own colors using RGB. So I've added the System.Windows.Media n...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Nested set INSERT operation for SQLite I am trying to implement the nested-set model for a sqlite database. So far I have implemented getting leaf nodes, finding subordinates etc. I am using this tutorial as a reference However, I am stuck at inserting a new node. Here's the code from the site LOCK TABLE nested_cate...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do i access camera video from phonegap? Phonegap's documentation suggests that there is a single method to access the camera, camera.getPicture(). Now I would like to access the video feed and draw something on top. Is this possible? A: I made a PhoneGap Plugin for iOS to capture video streaming into a canvas o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Hibernate updating a single column I am confused as to the stance Hibernate takes when it determines which column information to persist. Some places I read online says it will only update dirty fields, some people say that it is also database dependant (ie. Using hibernate with Oracle 9 will persist all fields of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: It's possible know when the HttpURLConnection was established? I'm using the HttpURLConnection to open connections to web pages. I call the connect() method to open the connection. I not found an isConnected() method. I need to know when the connection was established with the server. I need this because I tryinf to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: when and how should i call IDisposable Interface? asp.net MVC 3 i was just googling it and could find anything that give me a good example of how to implement and what are the best scenarios when i should call the IDisposable interface please if someone could post the example and the explain it that would be a great...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why is my output file empty in this simple program using std::fstream? I am trying to understand how to read information form an input file and write that data into an output file. I understand how to read from a file and dispaly its contents, but I DONT understand how to write to a file or display its contents. My ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Android Gallery - Replace Bitmap in ImageView after scrolling stopped I've programmed a zoomable gallery with several images. * *The images can be zoomed. *Zoomed images can be dragged. *If the image is not zoomed, the gallery can be scrolled. The layout consists of a LinearLayout with a TextView (the name of...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: ASP.NET MVC Routing - Keeping up with parameters through redirects I am working on my first real ASP.NET MVC project and I need a little advice. So, let's say that my app has an admin section where you can create companies, departments, and users within each department. Company -> Department -> User Right now my url...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how can i know when i reach end of a datareader? cmd.CommandText = "select name from Tbl_Shahr_No"; SqlDataReader reader = null; reader = cmd.ExecuteReader(); reader.Read(); while(reader.HasRows) { ddl.Items.add(reader["name"].tostring()); reader.read() } i wrote this code but problem is that while stateme...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: AJAX/jQuery/Javascript - Access a page in an external domain The question is quite simple, the answer may not be. :) How to make an AJAX request (preferably with 'jQuery'), to an external domain, ie a web address (for example) completely different from the server which is the site you requested this page. What I wan...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614420", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Chat Server with Java & Netty I want to implement a Chat Server with Java and Netty. My question is: should I make all the work in Netty's connection handler? For "all the work" I mean for example: to do the login ( so with mysql connection ), eventually to send message, to log informations.. A: I think a more rob...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Registry Editing: How to calculate DWord Hex Values I'm trying to make some registry edits and I'm not sure I understand how specific dword values are calculated. Here are two examples: [HKEY_CURRENT_USER\ControlPanel\Volume] "Volume"=dword:0xFFFFFFFF ; 0=off, 0xFFFFFFFF=maximum "Refresh"=dword:493E0 ; every 5 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Notification opens activity, back button pressed, main activity is opened? The best way I can describe my problem is like this: * *A notification is created at boot (with a BroadcastReceiver). *My app main activity is opened and the home button is pressed (the app is still running in the background until the sys...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614429", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Different column types on INNER JOIN So I got two tables that I'll reference with a INNER JOIN. In one side the column type is Number(3, 0) and in the other is Varchar(150). Seeing that I CAN'T change the data types, I have to Cast it on the join. But, on the table that the column is varchar the string always have 3...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I change the Android Manifest to launch an Application instead of an Activity? I would like my program to extend the Application class to and launch from it's Overridden onCreate() method, rather than from an Activity class. How do I change the manifest to launch an application? I only know how to launch acti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614447", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: can we declare a public variable in asp using vb I have a established connection to my database using adoCon.Open "Driver={SQL Server}; Server=" & host_name & "; Database=" & db_name & "; Uid=" & user_name & "; Pwd=" & password Now i want to use this connection on all the pages of my website. How to do that? Is the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Border-image not working for QWidget I have a class derived from QWidget. When I try to use the style-sheet to set the border-image, it appears to ignore it. I am using QT 4.4 and it looks like the QWidget should support border-image. Is there something I would need to do in the paint event to get it to display, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Confusion when comparing StartDate and EndDate in asp.net I am a bit confused when comparing StartDate and EndDate in my asp.net app. EndDate: 10/1/2011 StartDate: 9/30/2011 The if statement below returns true, based on the date values above. If strEndDate < strStartDate Then I would think the If statemen...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: EE layout logic We are a church with four different locations: let’s call them North, South, East and West. Now, each of these locations has ‘Ministries:’ Let’s call them Man, Boy, Woman, Girl. Here’s where the problem lies, not all of the locations have all of the same ‘Ministries.’ Basically, I’m setting the bac...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Animate only views that are on-screen So I want to have transition between my app's views that consist of a special animation. In a nutshell, said animation fades out every single subview of the page you are on, one after another, before continuing to the next. The obvious problem is, if I use an UIScrollView at som...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why doesn't a properies code block get hit when stepping though C# code? I'm trying to understand how Properties work. I've found that stepping though sample code can be very helpful. But When I step through a small program with a simple class and Property, the Property never gets hit. Which makes me wonder if its e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614473", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Passing array in function I have an array that is read like this: MyArray(0)='test' MyArray(1)='test2' MyArray(2)='test3' How do I pass this through a function? Function(MyArray(all_arrays)) What do I put for all_arrays? A: MyArray(0)='test' MyArray(1)='test2 MyArray(2)='test3' AcceptArray MyArray Private Func...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614476", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to scrape the 'More' portion of the Quora profile page? To determine the list of all topics on Quora, I decided to start from scraping the profile page with many topics followed, e.g. http://www.quora.com/Charlie-Cheever/topics. I scraped the topics from this page, but now I need to scrape the topics from the Aj...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614478", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Connecting remote Oracle Database server from a Perl script running on Unix, without Oracle client I have a Unix machine which I need to connect to a remote Oracle database server though Perl/Shell script. I have searched online but did not find a thorough information on whether it's possible to connect the Unix m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614481", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to place an android animation on top of the phonegap web view? I'm new to phonegap / java. Because CSS Animation/Javascript animation is slow in Android, I am trying to create a Phonegap plugin that will place a native android animation on 'top' of the webview Phonegap uses. Example: A clock backgro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Create vhost conf I want to configure a vhost for php so that my open base dir restriciton is overwritten but it does not use my vhost.conf. My php.ini always shows open_basedir /var/www/vhosts/domain/httpdocs/:/tmp/ |||| no value last value is global but local has a value. I want to overwrite this with the followi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Java / SSL Server Socket I am writing an application that will accept LDAP queries via port 636, do some non ldap stuff, and then hand back an ldap looking response. I'm a bit new to Java but have managed this much - I created a self signed cert, imported it into the keystore. When attempting to make a connection I...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Telerik RADGrid and sorting I'm using the RADGridView for WPF to display some data. It is pulled dynamically from DB so I don't know column names or the type of data contained in each cell. I want to let the user sort the data on each column when it double-clicks on a column header. For some reason the grid doesn't ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614488", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to make a android ListView with a ImageView and TextView in Each Line? Possible Duplicate: Can I have a List view and images icon with textview on the Android How to make a android ListView with a ImageView and TextView in Each Line? I am working on a Android app that is going to have a screen with a ListView...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614489", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Order numbers with Lua I'm trying to make something to find the median, mode, mean, and range of a set of data. Mean is easy to find using the programming; but median, mode, and range require the numbers to be in order (from least to greatest). Also, I'm trying to assemble it so it returns the data I would need to m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614490", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: MGSplitViewController with all github patches? I am interested in using MGSplitViewController but it seems that is has current bugs, especially when used in a tabbarController. I see that there are quite a few submitted patches on github for this. Is there a way to pull the files with all those patches? Or does s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Get only from second TR to last from table i have a variable $response and in it i have object of a table the table has ID i'm trying to have the variable only with the TR (no TABLE tag or /Table tag) and the TD content i have tried: $response = $response.find('#gGridView1'); $response = $response.find('tr').slice(1...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Powershell regex for connectionStrings? For some reason I'm having a brutal time parsing the connection string in the web.config file. I've already gotten connectionString but I'm trying to get all the values such as the * *Data Source *Initial Catalog *Username *etc... The connection string looks like: Dat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Adding an array to a Class (rails) I'd like to make one of the attributes of my class an array. The class is "Course" and the attribute is Course.evals. I tried using "serialize," ala http://duanesbrain.blogspot.com/2007/04/ruby-on-rails-persist-array-to-database.html, but for some reason it's not working. Here's m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ruby XML Replacing I have an XML file, and I need to replace the text between two tags with a new string the tags are <<ConnectionString>ConnectionString>THE OLD TEXT<<ConnectionString>/ConnectionString> I need to change this to <<ConnectionString>ConnectionString>MY NEW TEXT<<ConnectionString>/ConnectionString> I c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to find all the descendants with SQL? Each entity can have one parent. I need to find all the descendants of a given entity. Is it possible with just SQL? I can only think in terms of a script, and it won't be as fast as sql alone. I'm using PHP and MS SQL Server 2005, and doctrine 2 DBAL A: For SQL Server 2005...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JSF 2: Change rendered atribute of a component on phase listener Hy guys, In JSF 2 How can I change the rendered atribute of a h:InputText component using a PhaseListener. Before the jsf page be rendered I have to verify all id of the h:inputtexts, and after that I will change the atribute to be rendered or not. Am...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can we delete the "getContext" property of HTML5 Canvas tag through script? There is a HTML5 conformance test suite with a test for prototype for HTMLCanvasElement. This test fails for Safari, Firefox but passes for Opera on Windows 7. The test has a script which tries to delete the getContext property of the HTMLCa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Cross platform build system with IDE? I've been searching since around a year for a combination of C++ build system and IDE which brings the following features: * *Cross plattform build system that builds atleast on Windows, Linux and Mac OS. *Some sort of inteligent code completion (IntelliSense of Visual Studi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Tails recursive method to calculate standard deviation public class StampaInversa { private static class NumberWithCounterAndAverage{ private int number=0; private int counter=1; private int average=0; public int getNumber(){ return number; } public int getCounter(){ return c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Strange bug in usage of abs() I encountered recently I have C++/C mixed code which I build on a) Visual C++ 2010 Express(Free version) on Win-7 x32. b) Cygwin/Gcc environment installed on a Windows-7 Home premium edition x32. The gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) c) Ubuntu 10.04 Linux- G...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614520", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Changing values of multi dimentional arrays I have the results of a mysql query in a multi dimentional array as follows: Array ( [0] => stdClass Object ( [name] => john doe [id] => john@doe.com [userlevel] => 1 ) [1] => stdClass Object ( [name] => mary jane [id] => mary@jane.com [userlevel] => 5 ) [2] => stdClass...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Serial Port reading causes application freezing for a while - Do I need threading? I got some code in c# for reading results of AT command compatible modem. In case I start COM port reading whole apps freezes until data received. I suppose I should use threading but I've no idea how ? if (!serialPort1.IsOpe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: can't get json.NET to deserialize and show my values in c# Please help I can't get the values out after user json.NET Here is the string that I get back from my jquery ajax call: "[{\"roleInfo\":{\"roleIndex\":0,\"roleID\":\"c1_r0_23\",\"roleName\":\"Chief Executive\"}}, {\"roleInfo\":{\"roleIndex\":1,\"roleID\":...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614540", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to programmatically log user in with Spring Security 3.1 What's the proper way to programmatically log a web visitor in under a particular username in Spring and Spring Security 3.1? It seems the way I was doing it under 2.5 has changed a little. I'm sure there's a much better way of doing this now. Basically,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614541", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Facebook Canvas application using Javascript SDK Hope someone can help me out. I have a facebook canvas application. I'm using this code to authenticate window.fbAsyncInit = function() { FB.init({ appId: '123842974364777', status: true, cookie: true, xfbml: true, oauth: true}); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Vim CursorLine color change in insert mode There is good snippet for changing cursor color: if &term =~ "xterm\\|rxvt" " use an orange cursor in insert mode let &t_SI = "\<Esc>]12;orange\x7" " use a red cursor otherwise let &t_EI = "\<Esc>]12;red\x7" silent !echo -ne "\033]12;red\007" " reset cursor when...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Find value in array for Wordpress template condition I am using MagicFields in Wordpress with a custom group for Ingredients which is duplicated. The ingredient type field is selected with a radio button. I am trying to write a conditional statement to only show certain ingredient types (Base, Sauce, etc) so they ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614554", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Cannot run cshtml configured within an Area I have an Area defined in the MVC project named Account and under views in this Area I have Logon.cshtml. In web.config, I got following <authentication mode="Forms"> <forms loginUrl="~/Areas/Account/LogOn" timeout="600" /> </authentication> I am using Authorize at...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I repeat steps in a Specflow Scenario Outline In a nutshell, what I need is to create a Scenario Outline with a step that is repeatable without having to type it in using multiple AND's as I am currently doing below: Scenario Outline: outline Given I am a user When I enter <x> as an amount And...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I check if Json matches a specific C# type? My Asp.Net MVC application action is returning JSON by serializing one of several C# objects, depending on the circumstances (if an error occurred, one data type if one type of data was retrieved, etc...). When I try to consume the JSON in a C# windows service, I a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Dollar sign before self declaring anonymous function in JavaScript? What is the difference between these two: $(function () { // do stuff }); AND (function () { // do stuff })(); A: The first uses jQuery to bind a function to the document.ready event. The second declares and immediately executes a functi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: Postgres is not taking System Resources I am restoring my database to my new database in postgresql in linux 2.6.18 kernel. My problem is restoring does not happen quickly, And even system has 90 % free resources. It does not consume all the resource not doing the things as fastest. what can be issue ? How can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java getMethod throws method not found exception? I am using the getMethod(String name) function to load a method but it always throws MethodNotFoundException. If I run class.getMethods() the method I am looking for is in that result with the exact name I am using to pass to getMethod(). The method I am trying to lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Modifying the SBJson framwork for my app I am using the SBJson framework found at github(brilliant stuff) https://github.com/stig/json-framework/ with example : http://blog.zachwaugh.com/post/309924609/how-to-use-json-in-cocoaobjective-c This twitter example works great now. So I change my url and for (NSDictionar...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: iOS - flip animation, small to large I am trying to simulate the flip animation seen in the iTunes iPad app. On the main Featured page, if you tap on one of the small posters in the New Releases list, it will flip open to show all the details of the movie. When the poster is tapped I do this: //...create newView [s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I merge/join then sort with mongodb I have an entries collection and a domain collection like the following entries: { { entry_id:1, title:"Title 1", domain_id:1 }, { entry_id:2, title:"Title 2", domain_id:1 }, { entry_id:3, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614596", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Facebook meta tags scraped with locale not working My website is multi-language and I have a FB like button. I'd like to have the like posts in different languages. According to Facebook documentation, if I use the meta tag og:locale and og:locale:alternate, the scraper would get my site info passing the parameter "...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614603", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: PostgreSQL: order by sum of computed values I have a table tips that is defined as follows: CREATE TABLE tips ( tip_id bigserial NOT NULL, tip text NOT NULL, author text NOT NULL, post_date bigint NOT NULL, likers character varying(16)[], dislikers character varying(16)[], likes integer NOT NULL, dis...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Solving hid.lib "unresolved external symbol" linker errors in VC++ As the title suggests, I am having the following linker error: error LNK2019: unresolved external symbol "unsigned char __stdcall HidD_GetAttributes(void *,struct _HIDD_ATTRIBUTES *)" (?HidD_GetAttributes@@YGEPAXPAU_HIDD_ATTRIBUTES@@@Z) when ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: how OS know encoding of files For example I have a file on my disk: a.txt I opened it in Hex mode and see no other signal character in it but plain text in UTF-8. I am wondering how OS know it is UTF-8?? Thanks, A: The OS doesn't know. The hex editor is probably auto-detecting it. That's possible by looking out for...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: improving my python script I have an interesting python script (not sure if it has been done before) It uses import os os.system("say %s" % say) #and I have added; os.system("say -v whisper %s" % say) but now there are new voices in lion and i want to know how to get those voices and if there is a centralized li...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614610", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to integrate CSS pre-processing within Eclipse? I would like to edit SCSS files in Eclipse, preferably with syntax highlighting for .scss files. I found these resources valuable: * *http://sass-lang.com/editors.html - has no editor for .scss files only .sass *http://colorer.sourceforge.net/eclipsecolorer - h...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "113" }
Q: Joomla form to fill and send email (the message is a composition of the fields values) I work with Joomla 1.7 I want to make a form with different text input. Like : name, adress, age.... And with this form, i will compose a message and this message is send by email to someone. I try my best but i can't make it. I n...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614613", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Linux equivalent of I_PUSH This question is related to pty terminal packet mode TIOCPKT What the linux way of enabling packet mode? I could not find I_PUSH working when passed in ioctl function. A: TIOCPKT is exactly what you want, according to the tty_ioctl(4) man page: the argument is a pointer to an integer whic...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can spork work with rake tasks? Rake tasks suffer from the same problem as running tests: the Rails bootup process takes a long time before the task is even running. Is there a way to integrate spork and rake together? A: You can use the irake gem which makes it possible to execute rake tasks from the console. Add ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: c++ how to inherit operator that returns specific type I have a class 'A' that overrides the + operator, and a subclass 'B'. I want to inherit 'A's + operator but instead of returning type A I want to return type B. How can I go about doing this? I tried calling the parent's operator from B and casting the result to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to send data to a cross-server php file? While developing a native Android app using Dreamweaver's "build" functionality, I found out that I had to use Jquery's JSONP functionality to access dynamic data. The dynamic data, pulled from a mySQL database and populated into a php file, is considered "cross-server," ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: After writing to a stringstream, why does extracting into a string cause that string to become bogus? I'm encountering a puzzling bug involving stringstream. I've got a object whose properties I want to dump to a file using dumpState(). This object has a number of member objects, each of which has had operator<< def...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614632", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to make a function template the least priority during ADL? I have a problem where I'd like to provide a generic version of a function foo which may only be applied when there is absolutely no other match for an invocation. How can I modify the following code such that last_resort::foo is a worse match for derive...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614633", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: in python, how to match Strings based on Regular Expression and get the non-matching parts as a list? For example: I have a string "abcde2011-09-30.log", I want to check if this string matchs "(\d){4}-(\d){2}-(\d){2}" ( dont think it has correct syntax, but you get the idea). And I need to split the string into 3 pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614634", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: h264 mp4 index to front command line Is there any command line tools to move an h264/mp4 index to the beginning so that flash will start playing the file quicker over the net? I am aware of the tool QTIndexSwapper however it is not command line. Alternatively is there an ffmpeg command to place the index at the f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614635", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Modify ViewModel property value through Javascript in MVC3 Is it possible to change a property value from a ViewModel using javascript? For example: <script type="text/javascript"> @Model.PageNumber = 2; </script> A: No, JavaScript is on the client-side(unless you are using Node.js), and MVC3 Views are ren...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614639", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: My CustomRoleProvider doesn't seem to be used for controlling access to the application I've set up my application to use a custom role provider by adding some lines to the Web.config file, like so: <roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider"> <providers> <!-- <clear/>--> <...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is an efficient method to determine the size of a type given as a binary string? First off, lets assume I have endian sorted out and know the size of the types a priori. Here's what I am doing: I have a function bs2i(char *bitStr) that takes in a character array representing the binary of a signed char/short/in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there a function in Matlab to read your computer's audio in and store data in near real time? Would anyone know if there is a way in MATLAB to read from your computer's audio in and store the data into a pre-allocated array? If so, what is the function or the path to do so? Thank you. A: it's very simple. check ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When to Use Gated Check-In? I am using TFS 2010. Currently I use Gated Check-in build on the trunk (MAIN) branch only. And, I use CI on DEV and RELEASE branches. * *Why not use Gated Check-in build on all the branches? *In what scenarios, you shouldn't use Gated Check-in build on DEV and RELEASE branches? *...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Intent resolution and difference between ACTION_CHOOSER and ACTION_PICK_ACTIVITY I have a question about intent resolution and the difference between Intent.ACTION_PICK_ACTIVITY and Intent.ACTION_CHOOSER (including it's convenience function version, Intent.createChooser()). I'm writing a "package manager" app. In i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Opera won't recognize iframe.load I have a file that's being upload via iframe work around. I have it working in all browsers except Opera now. To first submit the form, I have $(document).ajaxComplete(function() { $('.aboutContentImageForm').each(function() { var $this = $(this); $this.find('[t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to use sendkeys to copy text from outside application I have a specific application (someprogram.exe) i wish to use the sendkeys command to perform CTRL + C from the application i'm bulding in vb.net. I don't need to bring the data into my app, just copy it to the windows clipboard. Thanks in advance! A: i wou...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Loading multi-level collections without duplicates in NHibernate My question is very similar to this one (that wasn't really answered): Nhibernate: distinct results in second level Collection I have this object model: class EntityA { ... IList<EntityB> BList { get; protected set; } ... ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Multithreading: how to specify responsibility of newly created thread I'm very new to multithreading and I'm getting kind of confused! Ok, so suppose I create another thread besides the main thread in my program. That thread should be responsible of updating the UI while the main thread does calculations and other s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to hide a MatrixRow in SSRS 2005 based on an expression? I was wondering if someone can tell me how I can hide a row in a matrix on an SSRS 2005 report. I have tried hiding the specific TextBoxes, but when I do that, I still get whitespace where the TextBoxes would appear, which is pretty worthless. According t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614669", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Can a C function have multiple signatures? Possible Duplicate: function overloading in C Apologies if this is a dup but if it is, I can't find it. In C, can you define multiple functions with the same function name, but with different parameters? I come from a C# background. In C#, the following code is complet...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Marshal structure with integer references to C# Hi I'm trying to create and marshal the following structure from C# into C++ and maintain the linked reference. I'm unsure how this structure should be defined in C#? In C++ the structure must look like below, with the const reference maintained. // C++ struct { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: error accessing elements of array of std::pair I have defined an array of pairs as following: std::pair<int,int> delta[4]; delta[0] = std::make_pair(0,1); delta[1] = std::make_pair(1,1); delta[2] = std::make_pair(1,0); delta[3] = std::make_pair(1,-1); but when I try to access the elements like: delta[2].first I ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Flex Timer issue The Timer in my class does not seem to fire any TIMER events at all when the interval is more than 5 seconds or after it has measured 5 seconds. I need to measure 30 seconds. Here's my code //class ctor public function myClass() { tmr=new Timer(5000, 6); tmr.addEventListener(TimerEvent.TIMER...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614685", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ImageMagick leaving behind temp files - is this by design or should they be automatically deleted? I've installed ImageMagick on OS X using macports (I don't think these makes any difference but just in case) I use the following: $im = new imagick($src . '[0]'); $im->setImageFormat('png'); header("Content-Type: i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614687", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to use the "-Property" parameter for PowerShell's "Measure-Object" cmdlet? Why does $a = GPS AcroRd32 | Measure $a.Count work, when GPS AcroRd32 | Measure -Property Count doesn't? The first example returns a value of 2, which is what I want, an integer. The second example returns this: Measure-Object : Propert...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: htaccess rewrite hide .php and also flatten query string on one particular url I have checked various topics and nothing caught my eyes. This is what am trying to do .. It's a small site and with only few pages all in my root /mobile folder. So I decided to modify h*p://example.com/mobile/academics.php to h*p://exam...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why wont this event receiver code work? We are trying to create an ItemAdded event receiver that will update Created By (Author) field in a custom SharePoint list. In this custom list we have enabled Item-Lever Permissions so that userA will only be able to see what they create. Issue is when another User (UserB) cr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SetWindowPos() not moving or resizing window I have a GUI application that is using GStreamer to capture video from capture cards, and then play the video. The audio and video streams are sent to GStreamer, and GStreamer automatically opens its own window to play the video. Once the video window is open, I need to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: perl - setting up conditions to find correct key in a hash Problem: Seeing exists argument is not a HASH or ARRAY element Need help setting up several conditions to grab the right key. Code: (I'm not sure also if my conditions are set up correctly. Need advice troubleshooting) my $xml = qx(@cmdargs); my $data = XMLi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614709", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to create table-valued *methods* in a SQL CLR user-defined type? I have a CLR UDT that would benefit greatly from table-valued methods, ala xml.nodes(): -- nodes() example, for reference: declare @xml xml = '<id>1</id><id>2</id><id>5</id><id>10</id>' select c.value('.','int') as id from @xml.nodes('/i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7614712", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }