instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
Anybody found yet a good web site architecture using linq to sql? Any help will be very helpful!
| stackexchange/codereview |
A friend of mine brought up this questiont he other day, he's recently bought a garmin heart rate moniter device which keeps track of his heart rate and allows him to upload his heart rate stats for a day to his computer.
The only problem is there are no linux drivers for the garmin USB device, he's managed to interpre... | stackexchange/codereview |
From PyPubSub:
Pypubsub provides a simple way for
your Python application to decouple
its components: parts of your
application can publish messages (with
or without data) and other parts can
subscribe/receive them. This allows
message "senders" and message
"listeners" to be unaware of each
other:
one... | stackexchange/codereview |
Referenced here and here...Why would I use two's complement over an epsilon method? It seems like the epsilon method would be good enough for most cases.
Update: I'm purely looking for a theoretical reason why you'd use one over the other. I've always used the epsilon method.
Has anyone used the 2's complement comp... | stackexchange/codereview |
I'd like a dead simple explanation of policy injection for less-informed co-workers. Where is a good resource for this? I learned about policy injection from the entlib help files, which I'm sure aren't the best option.
| stackexchange/codereview |
I'm trying to use maven2 to build an axis2 project. My project is configured as a parent project with AAR, WAR, and EAR modules. When I run the parent project's package goal, the console shows a successful build and all of the files are created. However the AAR file generated by AAR project is not included in the ge... | stackexchange/codereview |
I create a web application (WAR) and deploy it on Tomcat. In the webapp there is a page with a form where an administrator can enter some configuration data. I don't want to store this data in an DBMS, but just in an XML file on the file system. Where to put it?
I would like to put the file somewhere in the directory t... | stackexchange/codereview |
Adding an element to the head of an alist (Associative list) is simple enough:
> (cons '(ding . 53) '((foo . 42) (bar . 27)))
((ding . 53) (foo . 42) (bar . 27))
Appending to the tail of an alist is a bit trickier though. After some experimenting, I produced this:
> (define (alist-append alist pair) `(,@alist ,pair))
... | stackexchange/codereview |
My project has both client and server components in the same solution file. I usually have the debugger set to start them together when debugging, but it's often the case where I start the server up outside of the debugger so I can start and stop the client as needed when working on client-side only stuff. (this is mu... | stackexchange/codereview |
Since the Google App Engine Datastore is based on Bigtable and we know that's not a relational database, how do you design a database schema/data model for applications that use this type of database system?
| stackexchange/codereview |
I've inherited a network spread out over a warehouse/front office consisting of approximately 50 desktop PCs, various servers, network printers, and routers/switches.
The "intelligent" routers live in the server room. As the company has grown, we've annexed additional space and not very elegantly run various lengths of... | stackexchange/codereview |
In a stored procedure, I need to get the count of the results of another stored procedure. Specifically, I need to know if it returns any results, or an empty set.
I could create a temp table/table variable, exec the stored procedure into it, and then run a select count on that data. But I really don't care about the ... | stackexchange/codereview |
I have two code bases of an application. I need to copy all the files in all the directories with .java from the newer code base, to the older (so I can commit it to svn).
How can I write a batch files to do this?
| stackexchange/codereview |
I am programming a game on the iPhone. I am currently using NSTimer to trigger my game update/render. The problem with this is that (after profiling) I appear to lose a lot of time between updates/renders and this seems to be mostly to do with the time interval that I plug into NSTimer.
So my question is what is th... | stackexchange/codereview |
A .container can contain many .components, and .components themselves can contain .containers (which in turn can contain .components etc. etc.)
Given code like this:
$(".container .component").each(function(){
$(".container", this).css('border', '1px solid #f00');
});
What do I need to add to the line within the bra... | stackexchange/codereview |
I'm trying to hijack an asterisk with the form's KeyUp event. I can get the SHIFT key and the D8 key on the KeyUp event, but I can't get the * out of it. I can find it easily in the KeyPress event (e.KeyChar = "*"c), but company standards say that we have to use the KeyUp event for all such occasions. Thanks!
| stackexchange/codereview |
If I've got a time_t value from gettimeofday() or compatible in a Unix environment (e.g., Linux, BSD), is there a compact algorithm available that would be able to tell me the corresponding week number within the month?
Ideally the return value would work in similar to the way %W behaves in strftime() , except giving t... | stackexchange/codereview |
How do I intercept a paste event in an editbox, possibly before the value is transferred to the object?
| stackexchange/codereview |
I am using the WebBrowser control to add a WebInterface to C# app. My desire is to verify that only such app is able to connect to our Web server using SSL client certificates.
My idea was to embed the client certificate in the app and just use when connecting via my app. Anybody have a sugestion on how to do this? Or ... | stackexchange/codereview |
On larger and/or long running projects, I tend to reference many assemblies and namespaces, and often I end up removing some functionality later on or moving it into a different project.
I just wonder, is there a way to check every project (heck, every .cs file) in my whole Visual Studio solution and get a list of all ... | stackexchange/codereview |
We make infrastructure services (data retrieval and storage) and small smart client applications (fancy reporting mostly) for a commercial bank. Our team is large, 40 odd contractual employees that are C# .NET programmers. We support 50 odd applications and systems that we have developed.
A few members of the team beg... | stackexchange/codereview |
Under what circumstances - if any - does adding programmers to a team actually speed development of an already late project?
| stackexchange/codereview |
I'm fresh out of college and have been working in C++ for some time now. I understand all the basics of C++ and use them, but I'm having a hard time grasping more advanced topics like pointers and classes. I've read some books and tutorials and I understand the examples in them, but then when I look at some advanced ... | stackexchange/codereview |
General
Follow the same standards for all tests.
Be clear about what each test state is.
Be specific about the expected behavior.
Examples
1) MethodName_StateUnderTest_ExpectedBehavior
Public void Sum_NegativeNumberAs1stParam_ExceptionThrown()
Public void Sum_NegativeNumberAs2ndParam_ExceptionThrown ()
Public voi... | stackexchange/codereview |
I'm using Windows and I'm trying to get ANT to work.
When I do an ant build from the command line, I get:
C:\dev\Projects\springapp\${%ANT_HOME%}\lib not found.
I look into the build.xml file and I find:
appserver.home=${user.home}/apache-tomcat-6.0.14 (which I just copied and pasted straight from a tutorial)
I changed... | stackexchange/codereview |
Has anyone else experienced (and possibly solved) unintentional pitch changes using MS SAPI TTS voices?
I'm using the SpVoice automation interface with SAPI 5.1.
Right now, my application (VB6 app) can get into a state where the TTS (Microsoft Anna) starts to sound like a chipmunk (proper rate, but high pitch) and eve... | stackexchange/codereview |
When I'm initializing a dialog, I'd like to select one of the radio buttons on the form. I don't see a way to associate a Control variable using the Class Wizard, like you would typically do with CButtons, CComboBoxes, etc...
Further, it doesn't like a CRadioButton class even exists.
How can I select one of the severa... | stackexchange/codereview |
I have a SharePoint virtual machine in one active directory domain (for example domain1) and I want to transfer all the sites it has to another active directory domain (domain2).
I don’t know which could be the best procedure to do this, if I detach and attach my virtual machine from domain1 to domain2 it probably didn... | stackexchange/codereview |
I'd like to implement a way to display a list of stored addresses sorted by proximity to a given address.
Addresses in the list will be stored in a database table. Separate parts have separate fields (we have fields for postal code, city name, etc.) so it is not just a giant varchar. These are user-entered and due to... | stackexchange/codereview |
I've got a couple large checkouts where the .svn folder has become damaged so I'm getting and error, "Cleanup failed to process the following path.." And I can no longer commit or update files in that directory.
I'd just delete and do the checkout again but the whole directory is over a gig.
Is there a tool that will r... | stackexchange/codereview |
Given an instance of System.Reflection.Assembly.
| stackexchange/codereview |
Is that possible to switch an Open Source Project license from GPL to LGPL v3 ?
I am the project originator and the only contributor.
| stackexchange/codereview |
I am having a bit of a problem.
I get a RAW char* buffer from a camera and I need to add this tags before I can save it to disk. Writing the file to disk and reading it back again is not an option, as this will happen thousands of times.
The buffer data I receive from the camera does not contain any EXIF information, a... | stackexchange/codereview |
I am looking for a PHP blog engine which needs to be easy to redesign (CSS, HTML). It also needs to be free and have simple user interface so that the client doesn't struggle to add posts. Any suggestions?
| stackexchange/codereview |
I seem to always have problems with converting data to and from XML in C#. It always wants you to create a full XMLDocument object even when you think you shouldn't have to. In this case I have a SQLXML column in a MS SQL 2005 server that I am trying to pull out and push into a function that requires an XMLNode as a pa... | stackexchange/codereview |
I'd like to create a utility in C# to allow someone to easily create a Certificate Authority (CA) in Windows. Any ideas/suggestions?
I know I can use OpenSSL to do this. In the end, I'll want this utility to do more than just generate a CA. I'd also like to avoid requiring the installation of OpenSSL in order to run ... | stackexchange/codereview |
I need to manipulate 100,000 - 200,000 records.
I am thinking of using LINQ (to SQL) to do this.
I know from experience that filtering dataviews is very slow.
So how quick is LINQ?
Can you please tell me your experiences and if it is worth using, or would I be better off using SQL stored procedures (heavy going and le... | stackexchange/codereview |
I need to attach a file with mailx but at the moment I am not having success.
Here's my code:
subject="Something happened"
to="somebody@somewhere.com"
body="Attachment Test"
attachment=/path/to/somefile.csv
uuencode $attachment | mailx -s "$subject" "$to" << EOF
The message is ready to be sent with the following file... | stackexchange/codereview |
I just wonder if anyone knows or made a wrapper around Active Directory to be able to easily query it in .net? Kind of like "LINQ-to-ActiveDirectory" or some SQL Dialect, i.e. to be able to do "SELECT DISTINCT(DEPARTMENT) FROM /Users/SomeOU/AnotherOU" or "SELECT user FROM domain" or whatever.
As far as I know, it is po... | stackexchange/codereview |
What is your best practical user-friendly user-interface design or principle?
Please submit those practices that you find actually makes things really useful - no matter what - if it works for your users, share it!
Summary/Collation
Principles
KISS.
Be clear and specific in what an option will achieve: for example,... | stackexchange/codereview |
Being stuck with a legacy database schema that no longer reflects your data model is every developer's nightmare. Yet with all the talk of refactoring code for maintainability I have not heard much of refactoring outdated database schemas.
What are some tips on how to transition to a better schema without breaking a... | stackexchange/codereview |
In Visual Basic 6, when I attempt to access Project > References, it throws an error:
Error accessing system registry
I am:
Logged in as the local computer administrator
running Windows XP Professional and
I can execute regedt32.exe and access all the registry keys just fine.
VB6 was installed as the local admi... | stackexchange/codereview |
In IntelliJ when editing Java files CTRL+LEFTCLICK on an identifier takes me to where that identifier is defined. For some reason it doesn't work when editing Ruby code. Any ideas?
| stackexchange/codereview |
I'm trying to put together a blog, and have gone with SubText and I've just installed SyntaxHighlighter but it doesn't seem to work properly. SubText or FCKEditor seems to tamper with the HTMl, inlineing everything in the pre tags and placing line-breaks at the end of each line.
Bad times!
Anyone know how to stop this... | stackexchange/codereview |
We're seeing a crash when instantiating an instance of the System.Xml.Serialization.XmlSerializer class in a C# library. The crash occurs in the constructor, when it tries to add a duplicate key to a dictionary. I've included a stack trace below.
This crash is only occurring on one machine, and repairing our installa... | stackexchange/codereview |
I have a wrapper around a C++ function call which I call from C# code. How do I attach a debugger in Visual Studio to step into the native C++ code?
This is the wrapper that I have which calls GetData() defined in a C++ file:
[DllImport("Unmanaged.dll", CallingConvention=CallingConvention.Cdecl,
Ent... | stackexchange/codereview |
Is it possible to use BackGroundWorker thread in ASP.NET 2.0 for the following scenario, so that the user at the browser's end does not have to wait for long time?
Scenario
The browser requests a page, say SendEmails.aspx
SendEmails.aspx page creates a BackgroundWorker thread, and supplies the thread with enough conte... | stackexchange/codereview |
There doesn't seem to be a way to change the padding (or row height) for all rows in a .NET ListView. Does anybody have an elegant hack-around?
| stackexchange/codereview |
I want to grab the value of a hidden input field in HTML.
<input type="hidden" name="fooId" value="12-3456789-1111111111" />
I want to write a regular expression in Python that will return the value of fooId, given that I know the line in the HTML follows the format
<input type="hidden" name="fooId" value="**[id is he... | stackexchange/codereview |
I am interested to know whether anyone has written an application that takes advantage of a GPGPU by using, for example, nVidia CUDA. If so, what issues did you find and what performance gains did you achieve compared with a standard CPU?
| stackexchange/codereview |
I was recently working on an application that sent and received messages over Ethernet and Serial. I was then tasked to add the monitoring of DIO discretes. I throught,
"No reason to interrupt the main
thread which is involved in message
processing, I'll just create
another thread that monitors DIO."
This d... | stackexchange/codereview |
If you have binary strings (literally String objects that contain only 1's and 0's), how would you output them as bits into a file?
This is for a text compressor I was working on; it's still bugging me, and it'd be nice to finally get it working. Thanks!
| stackexchange/codereview |
What would be better practice when giving a function the original variable to work with:
unsigned long x = 4;
void func1(unsigned long& val) {
val = 5;
}
func1(x);
or:
void func2(unsigned long* val) {
*val = 5;
}
func2(&x);
IOW: Is there any reason to pick one over another?
| stackexchange/codereview |
I have created a web project which references a class library project. When deployed to the local machine the web/classes all work fine but deployed on a ‘shared’ IIS site, the class DLLs exist in the /bin directory, but the web page generates the following error:
can’t find file “Documents and settings/….”
when tryi... | stackexchange/codereview |
I have a .z80 memory dump. How do I reverse engineer it? What do I need to know? How can I minimize manual labour?
| stackexchange/codereview |
How can I close a browser window without receiving the Do you want to close this window prompt?
The prompt occurs when I use the window.close(); function.
| stackexchange/codereview |
I'm troubleshooting a problem with creating Vista shortcuts.
I want to make sure that our Installer is reading the Programs folder from the right registry key.
It's reading it from:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Programs
And it's showing this directory for Programs:... | stackexchange/codereview |
The ReSharper reformat code feature is very handy and flexible, particularly with the new code layout templating flexibility JetBrains have added in version 3.0.
Is there a standard set of code style settings for ReSharper which match the rules enforced by Microsoft StyleCop, so that StyleCop compliance can be as easy ... | stackexchange/codereview |
We have a suite of interlinked .Net 3.5 applications. Some are web sites, some are web services, and some are windows applications. Each app currently has its own configuration file (app.config or web.config), and currently there are some duplicate keys across the config files (which at the moment are kept in sync manu... | stackexchange/codereview |
I'm looking to have text display vertically, first letter at the bottom, last letter at the top, within a JLabel. Is this possible?
| stackexchange/codereview |
I have a user control which is loaded in the page dynamically using the following code in Init of the Page.
Dim oCtl As Object
oCtl = LoadControl("~/Controls/UserControl1.ascx")
oCtl.Id = "UserControl11"
PlaceHolder1.Controls.Clear()
PlaceHolder1.Controls.Add(oCtl)
The user control also contains a button and I am una... | stackexchange/codereview |
I'm not sure about what's the difference between opening a JS script with
<SCRIPT language='JavaScript'>
or with:
<SCRIPT type="text/JavaScript">
Should JavaScript always be quoted (either with " " or with ' ') or that's not really important?
Thank you for any clarification on this topic!
| stackexchange/codereview |
Convert mysql timestamp to epoch time in python - is there an easy way to do this?
| stackexchange/codereview |
I'd like to know how to grab the Window title of the current active window (i.e. the one that has focus) using C#.
| stackexchange/codereview |
We have a 12-year-old Ms Access app that we use for our core inventory warehousing and invoicing system. It IS already running on an SQL Server backend, but all the "logic", forms and reports are in Access. After experiencing the massive amounts of maintenance sludge it took to turn inventory transactions from non-temp... | stackexchange/codereview |
How to add child rows in datagrid c#.net windows forms?
| stackexchange/codereview |
Preferably free tools if possible.
Also, the option of searching for multiple regular expressions and each replacing with different strings would be a bonus.
| stackexchange/codereview |
I have learned quite a bit browsing through Hidden Features
of C# and was surprised when I couldn't find something
similar for VB.NET.
So what are some of its hidden or lesser known features?
| stackexchange/codereview |
This seems to be intended behaviour as stated here, but I can't believe the only method of getting the BCCs is to parse Outlook Web Access' HTML code.
Has anybody encountered the same limitation and found a workaround? I'd also be fine with getting the BCCs from somewhere via WebDAV and adding the header fields myself.... | stackexchange/codereview |
I have a Bash shell script in which I would like to pause execution until the user presses a key. In DOS, this is easily accomplished with the pause command. Is there a Linux equivalent I can use in my script?
| stackexchange/codereview |
With the plethora of communication methods available to co-workers, how do you manage to keep distractions at bay for a large enough block of time to accomplish some focused programming?
Do you quit or close all communications, have you informed people that an away message really means you are a way, or something else?... | stackexchange/codereview |
How can i check (and additionally create) PDF-A 1b compliant PDF documents using open source tools? Does anybody know an open source tool?
Thanks in advance...
| stackexchange/codereview |
Running into a problem where on certain servers we get an error that the directory name is invalid when using Path.GetTempFileName. Further investigation shows that it is trying to write a file to c:\Documents and Setting\computername\aspnet\local settings\temp (found by using Path.GetTempPath). This folder exists so... | stackexchange/codereview |
If you are relying on an implementation of Python that has a Global Interpreter Lock (i.e. CPython) and writing multithreaded code, do you really need locks at all?
If the GIL doesn't allow multiple instructions to be executed in parallel, wouldn't shared data be unnecessary to protect?
sorry if this is a dumb question... | stackexchange/codereview |
What is the difference between display:block and display:inline
| stackexchange/codereview |
Our organization has a lot of its essential data in a mainframe Adabas database. We have ODBC access to this data and from C# have queried/updated it successfully using ODBC/Natural "stored procedures".
What we'd like to be able to do now is to query a mainframe table from within SQL Server 2005 stored procs, dump the... | stackexchange/codereview |
Suppose you have a full path to an accessible file or folder on the system. How can I get some kind of unique identifier for the physical device that the file (or folder) actually resides on?
My first attempt was to use System.IO.DriveInfo which depends on having a drive letter. But UNC paths and multiple network dri... | stackexchange/codereview |
I know it's possible to place a PyCairo surface inside a Gtk Drawing Area. But I think Qt is a lot better to work with, so I've been wondering if there's anyway to place a PyCairo surface inside some Qt component?
| stackexchange/codereview |
Does anyone know a keyboard shortcut to close all tabs except for the current one in Visual Studio? And while we're at it, the shortcut for closing all tabs? Is there a Resharper option for this? I've looked in the past and have never been able to find it.
| stackexchange/codereview |
For example if the user is currently running VS2008 then I want the value VS2008.
| stackexchange/codereview |
I need to reverse engineer a Microsoft SQL Server 2008 in order to create a Microsoft Visio 2007 Database Model Diagram. So I choose "Reverse Engineer" from the Database menu to connect to the DB.
I configured the Microsoft SQL Server Visio driver so that is uses SQL Server Native Client 10.0 as the ODBC driver. Afterw... | stackexchange/codereview |
I currently have an existing database and I am using the LINQtoSQL generator tool to create the classes for me. The tool is working fine for this database and there are no errors with that tool.
When I run a LINQ to SQL query against the data, there is a row that has some invalid data somehow within the table and it is... | stackexchange/codereview |
I need some info on how to use margins and how exactly padding works.
For example: Should I put a line to occupy the whole width of the page (no matter what resolution is used to display the web page) letting just a small border on each side, how could I achieve this?
| stackexchange/codereview |
ASP.NET MVC seems to be making a pretty big entrance. Can anyone summarize how its MVC implementation stacks up against popular MVC frameworks for other languages? (I'm thinking specifically of Rails and Zend Framework, though there are obviously lots.) Observations on learning curve, common terminology, ease of use ... | stackexchange/codereview |
Do you actively manage technical debt debt on your software development projects and if so, how do you do it?
| stackexchange/codereview |
Our web services are distributed across different servers for various reasons (such as decreasing latency to the client), and they're not always all up-to-date. Rather than throwing an exception when a method doesn't exist because the particular web service is too old, it would be nicer if we could have the client chec... | stackexchange/codereview |
Consider an indexed MySQL table with 7 columns, being constantly queried and written to. What is the advisable number of rows that this table should be allowed to contain before the performance would be improved by splitting the data off into other tables?
| stackexchange/codereview |
Does anyone know how to change the Bordercolor for a Datagridviewcell in c#?
Here's a picture of what I mean:
Datagridviewstyle http://www.zivillian.de/datagridview.png
Picture
Backgroundcolor, Textcolor and Images are no Problem, but I don't know how to realise the Borders.
EDIT: I want to realise this with winforms.... | stackexchange/codereview |
class A : IFoo
{
}
...
A[] arrayOfA = new A[10];
if(arrayOfA is IFoo[])
{
// this is not called
}
Q1: Why is arrayOfA not an array of IFoos?
Q2: Why can't I cast arrayOfA to IFoo[]?
| stackexchange/codereview |
Simply setting the SVN_EDITOR variable to "mate" does not get the job done. It opens TextMate when appropriate, but then when I save the message and exit, I'm prompted to continue, abort or try again. It seems like the buffer isn't returned to the svn command for use.
| stackexchange/codereview |
This question is the other side of the question asking, "How do I calculate relative time?".
Given some human input for a relative time, how can you parse it? By default you would offset from DateTime.Now(), but could optionally offset from another DateTime.
(Prefer answers in C#)
Example input:
"in 20 minutes"
"5 ho... | stackexchange/codereview |
I haven't done a lot of .NET programming, but I've examined a few of the application blocks published by Microsoft's Patterns and Practices group. I was wondering how these are typically used:
Linked directly into applications
Source added into applications and built with them, perhaps with some customization's
Sample... | stackexchange/codereview |
I've a class which is a wrapper class(serves as a common interface) around another class implementing the functionality required. So my code looks like this.
template<typename ImplemenationClass> class WrapperClass {
// the code goes here
}
Now, how do I make sure that ImplementationClass can be derived from a set of ... | stackexchange/codereview |
A product that I am working on collects several thousand readings a day and stores them as 64k binary files on a NTFS partition (Windows XP). After a year in production there is over 300000 files in a single directory and the number keeps growing. This has made accessing the parent/ancestor directories from windows e... | stackexchange/codereview |
Is there a tool to automatically search through my site and test all the links? I hate running across bad urls.
| stackexchange/codereview |
I have recently inherited a brownfield application that is currently live. Through response, or a response with a link, how and what is the best method to make changes to a site and deploy them to a live ASP .NET website.
| stackexchange/codereview |
I have an announcements list on one site. I want to add it as a web part to the top of each subsite. How can I do this in MOSS?
| stackexchange/codereview |
I am using CodeDom to generate dynamic code based on user values. One of those values controls what the name of the class I'm generating is. I know I could sterilize the name based on language rules about valid class names using regular expressions, but I'd like to know if there is a specific method built into the fram... | stackexchange/codereview |
I'm implementing a comment control that uses an ASP.Repeater to display each comment. The comment itself is currently displayed using a table to divide up some images to display the comment in a bubble.
I know that tables are supposed to be the epitome of evil for design layout, and really expensive to display for the... | stackexchange/codereview |
I'm creating a plugin, and am looking to use RSpec so I can build it using BDD.
Is there a recommended method of doing this?
| stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.