text stringlengths 8 267k | meta dict |
|---|---|
Q: Python method arguments with spaces I would like to create a simple file format/DSL which would allow my users to input data. My system is in python and using python's parser is appealing.
Syntax like this for defining a data element seems quite convenient.
Allocation(Param1 = Val1, Param2 = Val2 )
However, it do... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351760",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Problem connecting to a remote database using hibernate I'm trying to connect to a remote database (hosted on Netfirms www.netfirms.ca if anyone is curious) using hibernate. My mapping file is as follows:
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351769",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: NHibernate FK is a CHAR(6), and various queries fail due to the child table PK being CHAR(6) I have a legacy Oracle database that has multiple 1:n lookup tables that are based on CHAR(6) primary keys in the child tables. Unfortunately, I'm not the only one who has problems with how NHibernate deals with char fields ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351779",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I replace a set of words in a file with another set in Perl? My requirement is to replace a set of words in a given text file with a second set of words, which might be given from the command line or another file. Wanting to use Perl to do this, as the rest of my code is also in Perl.
So, if I have the follow... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351784",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Is Firebug always correct at how it lists downloads with the Net tab? Is it possible Firebug may be incorrectly adding downloads to the Net tab when things may be loaded from the cache?
I have some code in a Javascript gallery which is meant to lazily download an image when the thumbnail is clicked and then display ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351791",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Parsing a User's Query So here's what I'm looking to achieve. I would like to give my users a single google-like textbox where they can type their queries. And I would like them to be able to express semi-natural language such as
"view all between 1/1/2008 and 1/2/2008"
it's ok if the syntax has to be fairly stru... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351793",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Should I be unit testing this class? I know this maybe a very basic question but I'm having a bit of a mind blank at the moment. Should I be unit testing this class.
public class MapinfoWindowHandle : IWin32Window
{
IntPtr handle;
public MapinfoWindowHandle(IntPtr mapinfoHandle)
{
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351797",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do you do inline delegates in vb.net like c#? Is it possible to create an inline delegate in vb.net like you can in c#?
For example, I would like to be able to do something inline like this:
myObjects.RemoveAll(delegate (MyObject m) { return m.X >= 10; });
only in VB and without having to do something like this... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351800",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: Rails + MySQL Unicode I'm trying to get Unicode working properly in rails using MySQL. Now, Rails displays the text correctly, but it shows up as ??? in MySQL. Additionally, I am not able to filter the text.
My MySQL database has been configured with the utf8 character set. My client character is also UTF8. Like... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351801",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: jquery script not working after postback even with pageLoad I've got some trouble with jQuery script on my Asp.net page. During first load it works well, after postback it does not. Initially I thought that it is because script is not load again, but alert told me that script runs as I use function pageLoad() instea... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351804",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Where is the Don't Fragment Bit of the IP Flags used? I am curious to know where the "Don't Fragment" [DF] Bit of the IP Flags is used. As fragmentation is invisible to higher layers and they don't care too.
I am also looking for an example.
Thanks a lot in advance.
A: Do note that there is no standard way to set ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351806",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Problem with Recaptcha I have a problem with the form I'm using in my webpage.
It allows the recaptcha but It also sends the email without validating the fields in the recaptcha box. This form is using Ajax and PHP.
I've pasted the code next:
<br> <br> <div id="fields">
<form action="javascript:alert('success!');"... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351810",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: destroying a Toplevel tk window in python I was trying to write code that would auto-close a Toplevel Tk window in Python.
I ended up getting it to work, but ran into a little problem along the way that I wasn't able to figure out.
The second two buttons work, but the first one doesn't and I don't understand why...
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351821",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: ANSI C: Assigning arrays and pointers to arrays The following is a simplified version of what I'm trying to do, because I'm sure you don't want to wade through an entire set of structs and function prototypes for a particle system.
float const materials[24][4][4] = {{{...}}};
typedef struct EmitterStruct { float *m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351823",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Session management for a load balanced website We are currently using database to maintain state information (in a separate table) for the user. We fetch that information from the database every time user access the application (sends request) and update it in the database back after processing the request.
This has... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351835",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Any frameworks on Authentication & Authorization for Windows Form Application? I'm a C# developer. I develop both Windows & Web Applications. I would like to build an Winforms application that has a role-based system. All users must in role/group(s). Then we assign permissions like "View, Add, Update,.." to role/gro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351837",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: How do you do an IN or CONTAINS in LINQ using LAMBDA expressions? I have the following Transact-Sql that I am trying to convert to LINQ ... and struggling.
SELECT * FROM Project
WHERE Project.ProjectId IN (SELECT ProjectId FROM ProjectMember Where MemberId = 'a45bd16d-9be0-421b-b5bf-143d334c8155')
Any help would ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351840",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Finding the type of an object in C++ I have a class A and another class that inherits from it, B. I am overriding a function that accepts an object of type A as a parameter, so I have to accept an A. However, I later call functions that only B has, so I want to return false and not proceed if the object passed is no... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351845",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "181"
} |
Q: WPF - Searching an XML doc for values using XMLTextReader Ok another WPF question, well I guess this is just general .NET. I have an xml document retreived from a URL.
I want to get multiple values out of the document (weather data, location, some other strings).
When I use the XmlTextReader I can call my method to ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351848",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Porting C++ lib/app on android I want to port few C/C++ libraries to Android, how feasible it would be
e.g. OpenSSL can it be ported
or suppose an application which depends on OpenSSL, what is the best way to port it to Android when Android I think itself has libssl.so
what are the tools available e.g. Scratchbox, a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351864",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Passing credentials between sites I am running two different sites on two different servers with two different domains. One site is running Joomla, the other Moodle. I have configured the Moodle server to base its authentication on the users table on the Joomla site, so we have an authoritative source of user inform... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351873",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Individual Character Padding in XAML Is there a way in XAML to add padding around individual characters? Preferably before and after the character.
I have a textbox that I would like the input to be spaced out a bit more (so it aligns with a background image). It would be ideal to be able to do something like:
A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351878",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: From where the DirectoryEntry class of c# fetches data? Where does the DirectoryEntry class fetches data from?
A: Arun I think you are very new to this area. Use google and msdn. You can also use articles or books related with active directory and c#
A: A very unclear question; the short answer is AD - have you lo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351885",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: Accessing ASP.Net WebService using XMLHttpRequest and SOAP I have a webService hosted at http://recpushdata.cyndigo.com/jobs.asmx. I would like to call this webservice using XMLHttpRequest and SOAP. The thing why I would like to do this is that I have hosted a client application which is accessing the webservice per... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351898",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Setting GridView header text to wrap as directed I have a GridView that has columns such as:
| A | B C | D E / F |
I want these to be wrapped in a particular way - that is, I do not want to leave it up to the browser to work out whether to wrap or not depending on the column width. So in the above ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351903",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Weird intellisense behavior with private constructor Example:
public class Name {
public string FirstName { get; private set; }
public string LastName { get; private set; }
private Name() { }
public Name(string firstName, string lastName) {
FirstName = firstName;
LastName = lastNa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351911",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Custom Linq Extension Syntax I have written a function that gets a given number of random records from a list. Currently I can do something like:
IEnumerable<City> cities = db.Cites.GetRandom(5);
(where db is my DataContext connecting to a SQL Server DB)
Currently, I have a function like this in every entity I nee... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351915",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to programmatically highlight a UIButton? I've had a lot of users complain that the little "i" info button is difficult to touch on the iPhone. Ok, simple enough -- I just stuck a big-fat invisible button behind it that you can't miss even with the sloppiest of finger touches and, when you touch it, it does the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351919",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Python imaplib Gmail authenticate failure I just ran into an issue with Python's imaplib and Gmail's authentication mechanism:
>>> import imaplib
>>> imap = imaplib.IMAP4_SSL('imap.gmail.com', 993)
>>> imap.authenticate('bobdole@gmail.com', 'Bob Dole likes your style!')
Traceback (most recent call last):
...
imapl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351927",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: MouseUp and NSArrayController How do you associate a -mouseUp: event with the -add: method of a NSArrayController? The -mouseUp: event lives in a different object but is #import'ed and instantiated in the object that holds the array being controlled.
Usually, with an NSButton you command-drag from the button to the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351932",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: In ASP.NET MVC how can I use the Razor @Url.Content() helper from C# code? I'm trying to write a html helper extension that outputs an image tag.
I need to access (within C# code) something like Razor's @Url.Content() helper to get the proper URL for the current context.
How does one do this?
A: Use the following t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351937",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "52"
} |
Q: load test / stress test web services Does anyone know of a good tool to test load and stress on webservices? I've been looking at Watir and Selenium, but there more web page centered.
A: You should definitly take a look a SoapUI.
A: I actually like Pylot
It's free, open source, and I've been able to use it for a n... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351938",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "23"
} |
Q: Accessing iPhone WiFi Information via SDK Is there a way using the iPhone SDK to get WiFi information? Things like Signal Strength, WiFi Channel and SSID are the main things I'm looking for.
Only interested in Wifi info, not cellular.
A: According to this it's actually possible since iOS 4.1.
The function is called... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351954",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "25"
} |
Q: Is there any good MVC/MVP frameworks or other application frameworks for .NET Winforms? I'm not sure why finding any frameworks or good example projects for developing windows application is so difficult. I'm sure that for web application framework, we have Castle Project or ASP.NET MVC that are very great stuffs an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351959",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: using mono-service to wrap a windows service on linux Hi I'm trying to use mono-service2 to run a stock Windows Service Project from visual studio. I'm running this on debian with mono 2.0 and compiling with.
gmcs *.cs -pkg:dotnet
I try and start with this (I've tried with -d set to the dir with the app and -n,-m s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351971",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: How do you test visual components? I think I understand unit testing. But I was wondering: is there a way to automate something visual, like making sure anti-aliasing works or that the rounded corners on a web site look how they are supposed to? I have a feeling that it just isn't practical, but I have little expe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351975",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Are scenario tests groups of sequential unit tests? I read the Wikipedia article on scenario testing, but I am sad to say it is very short. I am left wondering: are scenario tests a collection of sequential unit tests? Or, perhaps, like a single multi-step unit test? Do many frameworks support scenario tests, or ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351983",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Call to a member function xpath() on a non-object? I'm trying to grab an image from a web site using simpleXML and am getting a PHP error saying that I'm trying to call to a member function xpath() on a non-object.
Below are the lines I'm trying to use to get the image's source tag:
$xpath = '/html/body/div/div/div... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351987",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: OpenID: Acceptance in non geek community for registration If we are going to develop a community website for non geeks, is it ok if we implement openid registration. How much openid is acceptable in non geek community. Anybody having any idea about this.
A: Do both - provide OpenID for those that want to use it an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/351989",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Really strange IE 8 Beta 2 behaviour PLEASE DON'T CLOSE -- IT'S PROGRAMMING-RELATED (BUT NO CODE INCLUDED)
I develop MOSS sites, and I need to make sure my sites are compatible with IE 7,8 and FireFox.
I have an external testing site (Windows 2003, IIS 6) and when I browse to this MOSS site, I can authenticate with... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352001",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: Server did not recognize the value of HTTP Header SOAP Here you can find the WSDL for my Jobs.asmx webService. http://recpushdata.cyndigo.com/jobs.asmx
The Thing is I have created a HTML page at http://bugmusic.cyndigo.com/CallWebService.html
and its returning an Error Server did not recognize the value of HTTP Head... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352004",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: ASP.NET Web Setup I have 3 web projects in a Visual studio solution.I want to create a single web setup project which should install all 3 web projects in their virtual directories.So how to create a single web setup project which supports multiple web application installation?
A: You can do this by creating a Web ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352010",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: IVRS Models IVR Systems are so expensive and proprietary.
The vendor systems I've used are all pretty weak... What is a good alternative to Genesys, Intervoice, etc.?
A: Asterisk is open source and it includes the capability of defining and running IVR interactions.
They have proprietary hardware for interaction... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352025",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What are all the way that you try to make your code functional like? so that you can make your program concurrent easily in the future.
A: I focus on making items Immutable. Immutable objects allow you to reason about multi-threaded code a lot easier than "thread safe" objects. The object has one visible state th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352029",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Skipping a column in FileHelper Using the FileHelper library for .Net, can I somehow skip a number of columns from the source file?
According to docs and samples, I have to add fields for all columns. Alas, I have an excel sheet with 216 columns to import, from which as few as 13 are necessary.
A: You must add the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352030",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Help! Where has Math.PI gone in F# CTP? I'm just trying to do simple scripting with F#, and Math.PI seems to have 'disappeared'. I've referenced FSharp.PowerPack.dll, but still can't find it.
A: The constant pi is System.Math.PI, if you want to use, Math.PI just open System, in your fsharp file:
open System
Math.PI... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352032",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Sites which support crossdomain.xml to allow Flash and Silverlight access Please list one site which allows Flash/Silverlight access via crossdomain.xml file. Vote for your favorite sites.
The goal is to build an up to date list of sites which can be directly accessed via Flash/Silverlight without a server-side prox... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352039",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Using getopts within user-defined-function in bourne shell Is it possible to pass command line arguments into a function from within a bourne script, in order to allow getopts to process them.
The rest of my script is nicely packed into functions, but it's starting to look like I'll have to move the argument process... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352044",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: PHP simplexml: why does xpath stop working? A strange thing happened after a supplier changed the XML header a bit. I used to be able to read stuff using xpath, but now I can't even get a reply with
$xml->xpath('/');
They changed it from this...
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE NewsML SYSTEM "h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352052",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Best algorithm to strip leading and trailing spaces in C What is the best approach in stripping leading and trailing spaces in C?
A: This question looks as if it might be a homework question, so I'll answer obliquely: look up the man pages for isspace(3) and strlen(3) and use pointer arithmetic. Also depending on ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352055",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: How to best match two strings? do you know any good algorithms that match two strings and then return a percentage in how many percent those two strings match?
And are there some, that work with databases too?
A: The Levenstein distance is such a measure. It basically tells you how many characters need to be edited... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352059",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Finding the type of an unknown object in C++ There are many ways to check programs for memory leaks. You end up with that list of pointers to leaked memory blocks, but is there a good way to find out more information for each block? For example: if I know that the object was a string, the actual string value could m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352066",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Most pythonic form for mapping a series of statements? This is something that has bugged me for some time. I learnt Haskell before I learnt Python, so I've always been fond of thinking of many computations as a mapping onto a list. This is beautifully expressed by a list comprehension (I'm giving the pythonic versio... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352076",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to adding middleware to Appengine's webapp framework? I'm using the appengine webapp framework (link). Is it possible to add Django middleware? I can't find any examples. I'm currently trying to get the FirePython middleware to work (link).
A: It's easy: You create the WSGI application as per normal, then wra... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352079",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Why can't I define a bit in c#? Why isn't there a bit structure in C#?
A: If you have a collection of bit flags, then using enums (with falgs attribute) and integers work a long way.
A: For what's worth, here is a full-fledged bit structure, complete with int and bool casting and arithmetic operations. Probably no... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352089",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: How can I pretty-print JSON in a shell script? Is there a (Unix) shell script to format JSON in human-readable form?
Basically, I want it to transform the following:
{ "foo": "lorem", "bar": "ipsum" }
... into something like this:
{
"foo": "lorem",
"bar": "ipsum"
}
A: If you use npm and Node.js, you can d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352098",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3546"
} |
Q: Is it true that the smallest memory allocation in .net is a byte? Is it true that the smallest amount of memory that I can allocate in managed code is a byte?
Do I understand correctly that a Boolean variable takes up much more than a bit of memory?
Is there a way for me to allocate memory, in .net, in chunks smal... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352100",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Background image in "ul" centered... but I'd like it at the top On this page (http://www.bonniesphere.com/blog/elsewhere/) the "li" items have an image instead of a bullet. But the image is centered vertically, and in multi-line entries it doesn't look good. Can anyone tell me if there is something in the CSS that s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352103",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How does Java's serialization work and when it should be used instead of some other persistence technique? I've been lately trying to learn more and generally test Java's serialization for both work and personal projects and I must say that the more I know about it, the less I like it. This may be caused by misinfor... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352117",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "43"
} |
Q: asp.net mvc - Namespace in view I place using namespace in a view code behind but i can't call any class of this name space in aspx.
In codebehind:
using MVCTest.Controller;
A: try to use in your aspx / ascx file
<%@ import namespace='your namespace' %>
you could also try to import your namespace in the web.confi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352118",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: SQL Reporting Services - Restrict Export Formats Is it possible to limit export formats only PDF and Excel ?
A: Comment out or remove the formats you want to exclude in the Render section of rsreportserver.config in
..\Program Files\Microsoft SQL Server\MSSQL.<n>\Reporting Services\ReportServer
| {
"language": "en",
"url": "https://stackoverflow.com/questions/352130",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Accessing calendar entries on the iPhone/iPod touch is it possible to access calendar entries on the iPhone/iPod touch, i.e. reading, creating, changing, deleting appointments?
I searched the iPhone SDK documentation but didn't find anything. Perhaps I missed something.
A: Currently this functionality is not suppor... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352140",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Is there a dereference_iterator in the STL? I was wondering if there is an iterator in the STL that dereferences the object pointed before returning it. This could be very useful when manipulating containers aggregating pointers. Here's an example of what I would like to be able to do:
#include <vector>
#include <it... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352152",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: Using jQuery in WinForms desktop app? We have a WinForms desktop application that uses the .NET 2.0 framework WebBrowser control quite extensively for displaying HTML. The HTML may be simple, or quite complicated. It may reside on disk, or it may be written directly to the document property at runtime.
I was wonder... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352159",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Can a session be falsified? I need to check all of my asp code to prevent SQL injection.
Should I check the session object, too?
How might a session be hijacked?
Thank you!!
A: To avoid SQL injection, use parameterized queries instead of building the SQL queries by concatenating strings. Session hijacking is a comp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352172",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Server did not recognize the value of HTTP Header SOAPAction [SoapRpcMethod(Action = "http://cyberindigo/TempWebService/InsertXML",
RequestNamespace = "http://cyberindigo/TempWebService/Request",
RequestElementName = "InsertXMLRequest",
ResponseNamespace = "http://cyberindigo/TempWebService/Response",... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352174",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "50"
} |
Q: SQLServer: How to sort table names ordered by their foreign key dependency The following SQL separates tables according to their relationship. The problem is with the tables that sort under the 3000 series. Tables that are part of foreign keys and that use foreign keys. Anyone got some clever recursive CTE preferabl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352176",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: Are enums only named integers, types or neither of both? Fun with enums in C#. Take one generic list that is created to store some Enum that you had defined previously and add few items in it. Iterate with foreach or GetEnumerator<T>() but specify some other enum then the original and see what happens. I was expecti... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352177",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Django dynamic OR queries I have a MultipleChoiceField on a form holding car makes. I want to filter my database of cars to the makes that were checked but this causes a problem. How do I get all the Q(make=...) statements in dynamically?
How I start: ['value1', 'value2', ...]
How I want to end: Q(col='value1') | Q(... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352178",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: GroovyScriptEngine locating resources in a web container I am looking at using groovy scripts in an existing web application and am busy setting up and configuring the GroovyScriptEngine.
What are the "best practices" for managing the scripts in the container ?
*
*Should I store them in a database
and then serve ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352183",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Generating permutations lazily I'm looking for an algorithm to generate permutations of a set in such a way that I could make a lazy list of them in Clojure. i.e. I'd like to iterate over a list of permutations where each permutation is not calculated until I request it, and all of the permutations don't have to be... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352203",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "88"
} |
Q: Compact Framework - OpenNetCf.Net FTP Samples? I am trying to get the OpenNetCF.Net FTP Components working with my PDA application. I am struggling to get it doing any more than connecting to the server and wondered if anyone knew of any sample code I could use to learn how to use it with?
I need to be able to downl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352214",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How do I create a IE Add-On in .NET? If somebody may knows a blog posting with a basic example, that would help a lot.
Google search gives me mostly links to add-in-express.com.
tia
A: You can check this url:
http://www.codeproject.com/KB/shell/dotnetbandobjects.aspx
it deals with making an extension for Windows Ex... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352217",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Enterprise Library Logging: TraceListeners Question Is it possible to log certain events to -> event log for example, while others to -> file trace listener, while others still to -> SQL database.
I want to be able to configure this somewhere so errors go to text, verbose information goes to SQL, and warnings go to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352218",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: ASP.NET event order during postback or initial request Could I get some confirmations from the community that I'm not going mad, and that the life cycle of a page during post back is in deed in a different order to when the page is initally requested.
If this is the case pointers towards references/articles outlinin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352222",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: check whether an array is multidimensional as I am implementing the ICollection-Interface in my class I want to implement the CopyTo-Method and I have to throw an Argument-exception if the array is multidimensional.
What is meant by this? The head of my method is this
public void CopyTo(MyClass[] array, int arrayIn... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352232",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Reading from a text field in another application's window Is there a way for a Windows application to access another applications data, more specifically a text input field in the GUI, and grab the text there for processing in our own application?
If it is possible, is there a way to "shield" your application to pre... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352236",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: How to redirect WebBrowser control of another Application I have Application, and I can't modify it. This Application contain IEControl (WebBrowser control), which display some URLs and open some txt files. How can I get IWebBrowser2 and redirect this control to specified URL? For example, I need redirect this contr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352245",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Tools for testing web services I want to perform integration testing of my webservices before shipping them out and am wondering if anyone can point out some tools for performing these tests automatically?
I have both ASMX webservices as well as a few WCF ones.
I want to be able to add this as a task to my build scr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352254",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Using ADO connection dialog in MS Access/VBA I want to use the standard ADO connection string dialog box in MS Access.
How can I do that?
A: If not already selected, check the following references in the References dialog:
Microsoft OLE DB Service Component 1.0 Type Library
Microsoft ActiveX Data Objects 2.7 Librar... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352259",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Internet and Intellisense bad for your memory? Having programmed for a while now I have noticed that I am becoming more and more reliant on the internet and IntelliSense to do my job. But I was wondering how much that has affected my knowledge over the past year or so. But does this matter?
For example I am more lik... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352266",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: How do I access the data passed back from a workflow association form? How do I access the data passed back from a workflow association form?
Scenario: When an admin associates a workflow with a sharepoint list I want to display a infopath form that allows variables to be set that apply to all instances on that list... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352268",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to cancel the 'system key down' state in Windows In Windows, when you press Alt, and release it again, the menu bar gets activated. However, when you press Alt, then click, then release, the menu bar does not get activated because presumably you wanted to Alt+click, not activate the menu bar.
I want to support A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352270",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: AXIS 1.4 adds elements to custom fault type Maybe someone found a workaround for the following problem:
It seems as if AXIS 1.4 adds an <exceptionName> and a <hostname> element to each custom fault element. In the WSDL the fault is defined to only consist of a custom fault message systemMessage.
This is the answer r... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352275",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: MS SQL Server COLUMNS_UPDATED() Function I have been researching audit triggers for some of my sql tables. I came across this article on simple-talk.
Now I know that the COLUMNS_UPDATED() function used here is only supposed to be available on SQL Server 2005 and later but it appears to work under 2000 as well. Is th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352287",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How should I structure a simple ASP.NET MVC app? I've been reading a few things about ASP.NET MVC, SOLID and so on, and I am trying to figure out a simple "recipe" for small-to-medium ASP.NET MVC apps that would put these concepts together; the issue that I am most concerned with is ending up with controllers that a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352295",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Numeric "date" in database - How to interact with that using "normal" dates? I'm using this database where the date colomn is a numeric value instead of a Date value.
Yes, I know I can change that with a mouseclick, but all the applications using that database were made by one of my predecessors (and everyone after... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352311",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Record Application Execution I am testing the application in the debug mode under several conditions. Now I'm doing it by writing some of the states and executed functions on the piece of paper and then comparing the scenarios.
Does anyone know if there is any built-in functionality in VS2008 or any additional tool ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352321",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: System.IO.FileLoadException I have got this error when using Enterprise Library 3.1 May 2007 version. We are developing a product and have a common lib directory beneath the Subversion Trunk directory
<>\Trunk\Lib\ into which we put all the third party DLLs. Inside this we have Microsoft\EnterpriseLibrary\v3.1 in w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352332",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How can I debug the source of this error in XML::GDOME? I'm using GDOME.pm and in my script I have this line:
my $doc = XML::GDOME->createDocument("","","");
I can't for the life of me figure out why it's coming out with this error:
NAMESPACE_ERR at /usr/lib/perl5/site_perl/5.6.1/i586-linux/XML/GDOME.pm line 103.
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352334",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do you 'mark as read' using Pop3? I am using an open source client to programmatically process incoming emails (on Windows 2003). The only way to prevent receiving previously read emails is to delete them from the server. This is less than ideal. As far as I know, there is no command in Pop3 to set emails as bei... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352335",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Return file from python module Edit: How to return/serve a file from a python controller (back end) over a web server, with the file_name? as suggested by @JV
A: You can either pass back a reference to the file itself i.e. the full path to the file. Then you can open the file or otherwise manipulate it.
Or, the mor... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352340",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Multiple Integer-type classes in C++ I often find myself using Integers to represent values in different "spaces". For example...
int arrayIndex;
int usersAge;
int daysToChristmas;
Ideally, I'd like to have separate classes for each of these types "Index","Years" and "Days", which should prevent me accidentally mix... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352341",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Is there a way to change the browser's address bar without refreshing the page? I'm developing a web app. In it I have a section called categories that every time a user clicks one of the categories an update panel loads the appropriate content.
After the user clicked the category I want to change the browser's add... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352343",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "93"
} |
Q: Static classes in c# In answering this question (https://stackoverflow.com/questions/352317/c-coding-question#352327), it got me wondering...
Is there any danger in regarding a static class as being equivalent to a non-static class instatiation that implements the singleton pattern?
A: In many ways, a static class ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352348",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: How to Create a Managed Path through SharePoint Object Model This is a question for a WSS/SharePoint guru.
Consider this scenario: I have an ASP.Net web service which links our corporate CRM system and WSS-based intranet together. What I am trying to do is provision a new WSS site collection whenever a new client i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352350",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Using Lookahead to match a string using a regular expression I need to match a string holiding html using a regex to pull out all the nested spans, I assume I assume there is a way to do this using a regex but have had no success all morning.
So for a sample input string of
<DIV id=c445c9c2-a02e-4cec-b254-c134adfa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352354",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Code Re-entrancy vs. Thread Safety What is the difference between the concepts of "Code Re-entrancy" and "Thread Safety"? As per the link mentioned below, a piece of code can be either of them, both of them or neither of them.
Reentrant and Thread safe code
I was not able to understand the explaination clearly. Hel... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352365",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "26"
} |
Q: filter out deviating record with sql We have this set of data that we need to get the average of a column. a select avg(x) from y does the trick. However we need a more accurate figure.
I figured that there must be a way of filtering records that has either too high or too low values(spikes) so that we can exclude t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352389",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What is a decent Mono Editor? I had been steering away from C# for a while, because it was "just a Windows thing", and it fell out of my current needs. However It's been gaining popularity and now with Mono catching up, it's becoming more attractive but I was wondering what IDE are people using to Code C#(with Mono)... | {
"language": "en",
"url": "https://stackoverflow.com/questions/352392",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.