instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I've written an event receiver that programmatically kicks off a workflow, but it needs the id (guid) of the workflow to start. How do I go about obtaining the id of the workflow(s) I just created in Sharepoint Designer?
stackexchange/codereview
New school datastore paradigms like Google BigTable and Amazon SimpleDB are specifically designed for scalability, among other things. Basically, disallowing joins and denormalization are the ways this is being accomplished. In this topic, however, the consensus seems to be that joins on large tables don't necessarilly...
stackexchange/codereview
It currently is 700MB but it's conceivable that it'll grow beyond the 1GB. Normally I just copy this file to another location (for the curious, it's the database of a Zope instance, a ZODB file). This file changes little from day to day, but I understand Bacula can't do inside-the-file subdivision for incremental backu...
stackexchange/codereview
I am getting a DC for a window handle of an object in another program using win32gui.GetDC which returns an int/long. I need to blit this DC into a memory DC in python. The only thing I can't figure out how to do is get a wxDC derived object from the int/long that win32gui returns. None of the wxDC objects allow me ...
stackexchange/codereview
I don't understand it. The ids of html elements in the master page are changed by the same id but with a prefix and it's breaking the css design. In the master page I have: <div id="container" runat="server"> <asp:ContentPlaceHolder ... ... The above code is rendered <div id="ctl00_ctloo_container"> ... ...
stackexchange/codereview
I've got a web system where users log in, and it stores a cookie of their session. When they log in as someone else or log out I want to remove that original cookie that I stored. What's the best way to do that? I'm using Python and Apache, though I suppose the answer will remain the same for most languages.
stackexchange/codereview
I want to start logging some custom messages into the ULS from my custom SharePoint code. My code is running inside list item receivers attached to some lists. I'd like to configure this logging mechanism within the application start event handler in global.asax. What's the best-practices way to deploy a SharePoint ...
stackexchange/codereview
I have an MSDE2000 database which appears to be approaching it's 2Gb limit. What tools can I use to determine where all the space is being used? Ideally think TreesizePro for SQL Databases
stackexchange/codereview
I'm trying to understand how hibernate query cache really works. What I see now is that Hibernate does not update its second-level cache automatically when I insert new entities into the database (although I'm using only Hibernate calls). The only way I have found to make it work was to manually clean the cache after ...
stackexchange/codereview
Does anyone know of a way, in Java, to convert an earth surface position from lat, lon to UTM (say in WGS84)? I'm currently looking at Geotools but unfortunately the solution is not obvious.
stackexchange/codereview
I have this in some WSDL: <element name="startDate" type="xsd:dateTime"/> <element name="endDate" type="xsd:dateTime"/> Which results in the following text in the SOAP envelope: <startDate>2008-10-29T12:01:05</startDate> <endDate>2008-10-29T12:38:59.65625-04:00</endDate> Only some times have the milliseconds and zone...
stackexchange/codereview
How does one setup DUnit Testing in a Midas/DataSnap project in Delphi 2006 Edit How does one set up a Dunit Test into a TRemoteDataModule The project wizard in Delphi 2006 does not work with TRemoteDataModule
stackexchange/codereview
How do I make sure the correct encoding (UTF-8) is used by Grails?
stackexchange/codereview
Anyone know how to convert a JPEG image to MPEG still frame format? I'd love to do it in java but a linux command line process would be ok. (I saw something on code project that does this for c sharp).
stackexchange/codereview
I would like to display a Drupal view without the page template that normally surrounds it - I want just the plain HTML content of the view's nodes. This view would be included in another, non-Drupal site. I expect to have to do this with a number of views, so a solution that lets me set these up rapidly and easily wou...
stackexchange/codereview
I was watching Rob Connerys webcasts on the MVCStoreFront App, and I noticed he was unit testing even the most mundane things, things like: public Decimal DiscountPrice { get { return this.Price - this.Discount; } } Would have a test like: [TestMethod] public void Test_DiscountPrice { Product p = n...
stackexchange/codereview
I'm working with a combobox in a Swing-based application, and I'm having a hard time figuring out what to do to differentiate between an ItemEvent that is generated from a user event vs one caused by the application. For instance, Lets say I have a combobox, 'combo' and I'm listening for itemStateChanged events with m...
stackexchange/codereview
Is it possible to create an STL-like container, or even just an STL-style iterator, for an existing array of POD-type elements? For example, suppose I have an array of ints. It would be convenient to be able to call some of the STL functions, such as find_if, count_if, or sort directly on this array. Non-solution: cop...
stackexchange/codereview
In most modern IDEs, you can have Debug and Release build configurations, and you can quickly switch between them. In Delphi 7, this does not seem to be possible. I have to go to Project Settings and toggle optimization and all the debug information stuff manually. It would be great if there was a plugin or some such t...
stackexchange/codereview
I`m parsing SQL query with C# Regex. I need also to make my pattern to understand "=", for example: string pattern = @"...something...(where)\s\w*\s*(order by)*...something else..."; the following query should match my pattern: select fieldslist from mytable where fieldvalue=someint order by specialfield how can I chan...
stackexchange/codereview
I have run in to a bit of a problem and I have done a bit of digging, but struggling to come up with a conclusive answer/fix. Basically, I have some javascript (created by a 3rd party) that does some whizzbang stuff to page elements to make them look pretty. The code works great on single pages (i.e. no master), howeve...
stackexchange/codereview
I have to write a reliable, totally-ordered multicast system from scratch in Python. I can't use any external libraries. I'm allowed to use a central sequencer. There seems to be two immediate approaches: write an efficient system, attaching a unique id to each multicasted message, having the sequencer multicast sequ...
stackexchange/codereview
I want something like this: <msxsl:script language="C#"> ??? getNodes() { ... return ... } </msxsl:script> <xsl:for-each select="user:getNodes()"> ... </xsl:for-each> What return type should i use for getNodes() and what should i put in it's body?
stackexchange/codereview
XAMPP makes configuring a local LAMP stack for windows a breeze. So it's quite disappointing that enabling .htaccess files is such a nightmare. My problem: I've got a PHP application that requires apache/php to search for an /includes/ directory contained within the application. To do this, .htaccess files must be allo...
stackexchange/codereview
Have done fft (see earlier posting if you are interested!) and got a result, which helps me. Would like to analyse the noisiness / spikiness of an array (actually a vb.nre collection of single). Um, how to explain ... When signal is good, fft power results is 512 data points (frequency buckets) with low values in all b...
stackexchange/codereview
I've been working for years with VS's debugger, but every now and then I come across a feature I have never noticed before, and think "Damn! How could I have missed that? It's so useful!" [Disclaimer: These tips work in VS 2005 on a C# project, no guarantees for older incarnations of VS or other languages] Keep track o...
stackexchange/codereview
Hey everyone, I am researching a project where we would need to keep a value encrypted from the client all the way to a black box system without decrypting it at any point in between. We are using SSL between the browser and web server, but the values are automatically decrypted at the web server, which is what we nee...
stackexchange/codereview
This should a quick question for some easy rep. I'm doing some PHP Website development, decided to check out and play around with jQuery as well. I don't want to install and manage a local PHP server/service, but I would like a quick one click method for automatically uploading the PHP file I'm working on to my hosting...
stackexchange/codereview
pre tags are super-useful for code blocks in HTML and for debugging output while writing scripts, but how do I make the text word-wrap instead of printing out one long line?
stackexchange/codereview
We have always had languages that were preferable to be used in a particular scenario. For a quick prototype development, VB6 was an obvious choice. VB6 was chosen in projects that had a simple desktop user interface and standard and un-complicated database interaction requirements. If you wanted to develop a device dr...
stackexchange/codereview
We have set up a system where notifications get sent to a user with the following From address format: user-{0}@aol.com (replace {0} with an ID) This way we can track what user we sent the message to originally. This format is not likely to change for various reasons. The issue we are running into is this: every em...
stackexchange/codereview
I have a GIF image that has an alpha set, and when my site loads in Firefox 3.0, it acts transparently on the parts of the image that should. However, when I try to load the GIF image in IE7, it comes back as a solid block. Actually, it is like the color from the image bled into the transparent area. Do anyone have a...
stackexchange/codereview
So basically, I have two tabs which contain regular and special e-mails. In order to get e-mails, you have to click on a calendar date and AJAX will then query the database for the regular e-mails and special e-mails. There is a next and previous button to navigate through the results gotten for the selected date. The ...
stackexchange/codereview
I am looking at starting a hosted CMS-like service for customers. As it would, it would require the customer to input text which would be served up to anyone that comes to visit their site. I am planning on using Markdown, possibly in combination with WMD (the live markdown preview that SO uses) for the big blocks of t...
stackexchange/codereview
Why is the following displayed different in Linux vs Windows? System.out.println(new String("¿".getBytes("UTF-8"), "UTF-8")); in Windows: ¿ in Linux: ¿
stackexchange/codereview
I am not really familiar with Maven program but I've been using Eclipse for quite a while for Unit testing, code coverage, javadoc generation, code style checking, etc. Probably, the only main thing that I didn't really like about Eclipse is the "compilation errors" that it generates when you are running Eclipse and An...
stackexchange/codereview
Imagine the following type: public struct Account { public int Id; public double Amount; } What is the best algorithm to synchronize two IList<Account> in C# 2.0 ? (No linq) ? The first list (L1) is the reference list, the second (L2) is the one to synchronize according to the first: All accounts in L2 that a...
stackexchange/codereview
I have two users Bob and Alice in Oracle, both created by running the following commands as sysdba from sqlplus: create user $blah identified by $password; grant resource, connect, create view to $blah; I want Bob to have complete access to Alice's schema (that is, all tables), but I'm not sure what grant to ru...
stackexchange/codereview
I'm using Farpoint Spreadsheet for WinForms with C#. How can I disable the "context menu" displayed when right-clicking over a cell that is being edited?
stackexchange/codereview
What is the correct way to setup a named pipe in C# across a network? Currently I have two machines, 'client' and 'server'. Server sets up its pipe in the following manner: NamedPipeServerStream pipeServer = new NamedPipeServerStream( "pipe", PipeDirection.InOut, 10, PipeTransmissionMode.Byte, PipeO...
stackexchange/codereview
I've been creating some applications with SQLExpress and find myself, scripting the database creation, tables and other entities etc. after application installation. Is this the normal way? Thanks
stackexchange/codereview
I have a number of panels in a single window in C# application and I created 2 scrollbars, one for horizontal and one vertical. This is what I currently have: picture with 2 scroolbars http://www.simnet.is/elinnils52/scrollbar.jpg I have 1 variable and that is the total height all the items take & need. Here is my code...
stackexchange/codereview
For the computer game I'm making, I obviously want to play sound. So far, I've been using AudioClip to play WAV files. While this approach works fine, the WAV files tend to be gigantic. A few seconds of sound end up being hundreds of kB. I'm faced with having a game download that's 95% audio! The obvious option here wo...
stackexchange/codereview
I want to write a web application using Google App Engine (so the reference language would be Python). My application needs a simple search engine, so the users would be able to find data specifying keywords. For example, if I have one table with those rows: 1 Office space 2 2001: A space odyssey 3 Brazil and the u...
stackexchange/codereview
I've been fooling around with the Google App Engine for a few days and I have a little hobby application that I want to write and deploy. However I'd like to set it up so that users are not directly accessing the app via appspot.com. Is hosting it through Google Apps and then pointing it at my own domain the only way t...
stackexchange/codereview
I am currently using Rails 2.1.0 and want to upgrade to Rails 2.1.1. After issuing the following command gem update rails I suppose that I need to change this line RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION in environment.rb What other actions should I take to ensure that my application is using ...
stackexchange/codereview
I am trying to build a homebrew web brower to get more proficient at Cocoa. I need a good way to validate whether the user has entered a valid URL. I have tried some regular expressions but NSString has some interesting quirks and doesn't like some of the back-quoting that most regular expressions I've seen use.
stackexchange/codereview
What's the fastest way to get a framebuffer and render to in software on the iPhone? Basically getting into a mode 13h style thing going so I can make some effects? :)
stackexchange/codereview
I need to find a good Lua to JavaScript converter; lua2js on luaforge.org is out of date (3 or so years old and looks like it doesn't work on Lua 5.1) and I haven't yet found anything on Google. Does anyone have any experience with any other converters out there? It should work on Lua 5.1 and preferably be .NET based, ...
stackexchange/codereview
Is it possible to suppress warnings in Eclipse for JDK1.4 project? EDIT: Longer version. There is a project which requires JDK1.4 (no annotations). Only way of suppressing warnings I know is using annotation @SuppressWarnings - no can do in JDK1.4. Is there any way to remove some warning notifications in some specific ...
stackexchange/codereview
Hi I'm trying to get some practice with Linked Lists. I Defined an Object class called Student: public class Student { protected string Student_Name; protected int Student_ID; protected int Student_Mark; protected char Student_Grade; public Student() // default Constructor { ...
stackexchange/codereview
I'm trying to change the background color of single cell be based on a string value and wanted to see this expression code. I was reading a similar question here, but this is not the exact same issue I'm trying to solve.
stackexchange/codereview
I've seen some developers put instance variable declarations at the end of classes though I mostly see them placed at the top. The only reasons I can think of for doing this are stylistic preference or maybe it somehow makes them easier to work with in an IDE. Is there a more legitimate reason for choosing this style...
stackexchange/codereview
I get the warning "childNodes is null or not an object' with different line numbers, depending on which version of the library I reference (I've tried about three different versions of 1.2.6). Consequently, I get jack for jQuery intellisense. I can hack this to get it to work, but I'd rather not as I don't understand ...
stackexchange/codereview
I need to do some memory profiling of a .NET Framework application. Should I use a debug or a release build?
stackexchange/codereview
What is everyone's favorite way to sanitize user data? I've been using Javascript, but have recently required something more secure (people can turn it off, after all), so I was looking at Flex, but thought I'd ask the community what they thought.
stackexchange/codereview
How can you you insert a newline from your batch file output? I want to do something like: echo hello\nworld Which would output: hello world
stackexchange/codereview
Is it possible at all to query (WMI?) the virus defnintions date of definitions installed on remote computers? I'd like to start specificially with Symantec Endpoint Protection, and then branch out to other antivirus products. This is a WinForms, .NET project.
stackexchange/codereview
We are using Hibernate Spring MVC with OpenSessionInView filter. Here is a problem we are running into (pseudo code) transaction 1 load object foo transaction 1 end update foo's properties (not calling session.save or session.update but only foo's setters) validate foo (using hibernate validator) if validation fails...
stackexchange/codereview
In Kohana/CodeIgniter, I can have a URL in this form: http://www.name.tld/controller_name/method_name/parameter_1/parameter_2/parameter_3 ... And then read the parameters in my controller as follows: class MyController { public function method_name($param_A, $param_B, $param_C ...) { // ... code }...
stackexchange/codereview
I have a JApplet which I contains various Swing components. It also starts a couple of extra threads in the init() and generally does other pretty standard applet-y things. If I close the browser window containing the Applet, the JRE doesn't die (the icon remains in the system tray) until all the browser's windows hav...
stackexchange/codereview
What's the best way to implement a URL interpreter / dispatcher, such as found in Django and RoR, in PHP? It should be able to interpret a query string as follows: /users/show/4 maps to area = Users action = show Id = 4 /contents/list/20/10 maps to area = Contents action = list Start = 20 Count = 10 /toggle/pro...
stackexchange/codereview
What is the difference between a URL, a URI, and a URN?
stackexchange/codereview
My current position is this: if I thoroughly test my ASP.NET applications using web tests (in my case via the VS.NET'08 test tools and WatiN, maybe) with code coverage and a broad spectrum of data, I should have no need to write individual unit tests, because my code will be tested in conjunction with the UI through al...
stackexchange/codereview
I'm trying to run a shell command using the backtick operators, but the fact that the child process inherits php's open file descriptors is problematic. Is there a way to keep this from happening? I'm running PHP 5.1.2
stackexchange/codereview
I'm currently working on a server-side product which is a bit complex to deploy on a new server, which makes it an ideal candidate for testing out in a VM. We are already using Hudson as our CI system, and I would really like to be able to deploy a virtual machine image with the latest and greatest software as a build...
stackexchange/codereview
Right now, I have SELECT gp_id FROM gp.keywords WHERE keyword_id = 15 AND (SELECT practice_link FROM gp.practices WHERE practice_link IS NOT NULL AND id = gp_id) This does not provide a syntax error, however for values where it should return row(s), it just returns 0 rows. What I'm trying to do is get t...
stackexchange/codereview
Here's the quick and skinny of my issue: $("a").toggle(function() { /*function A*/ }, function() { /*function B*/ }); Inside function A a form is displayed. If the user successfully completes the form, the form is hidden again (returning to it's original state). Inside function B the same form is hidden. The theory be...
stackexchange/codereview
Our web client needs a way to browse the local network and select location for file storage. This will then be returned to the webpage as a UNC name. On a native client this easily accomplished by using Shell32 functions. I've looked at ASP FileUpload, but that returns the file vs. a specific directory. EDIT: Another...
stackexchange/codereview
In Windows Server 2003, how I can check if my program is running in local console ("on the screen of the server machine") instead of remote session? I'm using Delphi Win32, so any Windows API based method should work..
stackexchange/codereview
I know how to lighten the colors for certain commands, however I'd like to lighten the standard ansi colors across all commands.
stackexchange/codereview
What is the most efficient way to check if an array is a flat array of primitive values or if it is a multidimensional array? Is there any way to do this without actually looping through an array and running is_array() on each of its elements?
stackexchange/codereview
I created a report model using SSRS (2005) and published to the local server. But when I tried to run the report for the model I published using report builder I get the following error. Report execution error:The permissions granted to user are insufficient for performing this operation. (rsAccessDenied)
stackexchange/codereview
Oracle is giving me an error (ORA-00907: missing right parenthesis) when I run this query: select * from reason_for_appointment where reason_for_appointment_id in ( select reason_for_appointment_id from appointment_reason where appointment_id = 11 order by appointment_reason_id ) However, when I ...
stackexchange/codereview
I'm looking for a method (or function) to strip out the example.ext part of any URL that's fed into the function. The domain extension can be anything (.com, .co.uk, .nl, .whatever), and the URL that's fed into it can be anything from http://www.example.com to www.example.com/path/script.php?=whatever What's the best w...
stackexchange/codereview
I'm checking for existing of a row in in_fmd, and the ISBN I look up can be the ISBN parameter, or another ISBN in a cross-number table that may or may not have a row. select count(*) from in_fmd i where (description='GN') and ( i.isbn in ( select bwi_isbn from bw_isbn where orig_isbn = ? union ...
stackexchange/codereview
I was playing a bit with Windows Vista (still using XP) and I liked how the standard Control Panel worked. Do you think this design is good also for normal applications? I like the idea of showing main topics with large fonts + icons. Details within each main topic are displayed using a small font and are immediatelly ...
stackexchange/codereview
I've read all the marketing speak about how mvc and webforms are complementary etc... However it seems that all the blogs talk about is mvc and the only news coming out is about mvc. Is Microsoft going to continue to IMPROVE webforms as a first class citizen or will it just be a supported technology as they move all ...
stackexchange/codereview
i've never created a shopping cart, or forum in php. aside from viewing and analyzing another persons project or viewing tutorials that display how to make such a project or how to being such a project. how would a person know how to design the database structure to create such a thing? im guessing its probbably throug...
stackexchange/codereview
I used Visual Studio's Application Wizard to create a skeleton MFC program with a multi-document interface. When I start this program, it automatically creates a child frame, which I don't want it to do - I need the main frame's client area to be empty until the user chooses to open a file. The debugger tells me that ...
stackexchange/codereview
The only method provided by the DNN framework to get a module by ID also required a tab ID. What can I do if I don't have a tab ID?
stackexchange/codereview
I have a reference to a type, for which I would like to retrieve the version number of the Assembly in which it is located. What is the best way to do this?
stackexchange/codereview
Evil or not evil? public static void Raise(this EventHandler handler, object sender, EventArgs args) { if (handler != null) { handler(sender, args); } } // Usage: MyButtonClicked.Raise(this, EventArgs.Empty); // This works too! Evil? EventHandler handler = null; handler.Raise(this, EVentArgs.Empty); N...
stackexchange/codereview
I want to create visuals along the lines of CNN's "red-state, blue-state" shadings of the states in the U.S. for my project. I'm planning to do something fancier than just shading the state's shape in a color. Are there open source libraries of state shapes/polygons (or - if not open source - others) that I can import ...
stackexchange/codereview
I have 3 versions of the same assembly in the GAC (Global Assembly Cache), but i physically need a specific version, when going into the framework folder i.e. c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\ the assembly located in the folder is the latest version. Can i physically retrieve the first version that was ad...
stackexchange/codereview
I've got two collections (generic Lists), let's call them ListA and ListB. In ListA I've got a few items of type A. In ListB I've got some items of type B that have the SAME ID (but not same type) as the items in ListA, plus many more. I want to remove all the items from ListB that have the same ID as the ones in ListA...
stackexchange/codereview
I've tried these, and they did not work (Access opens, but it does not wait: start "C:\program files\Microsoft Office\Office\MSACCESS.EXE" filename.mdb start /WAIT "C:\program files\Microsoft Office\Office\MSACCESS.EXE" filename.mdb start /W "C:\program files\Microsoft Office\Office\MSACCESS.EXE" filename.mdb start ...
stackexchange/codereview
Is there a programatic way from java to force a file deletion on windows even if the file is locked by some process? I cannot kill the process that locks the file.
stackexchange/codereview
What is the most efficient way to read the last row with SQL Server? The table is indexed on a unique key -- the "bottom" key values represent the last row.
stackexchange/codereview
I've been experimenting with Adobe Flex recently. Being a long-time server-side web app developer, I'm faced with difficulties that I last experienced when I dabbled in Java Swing development a long time ago. It mainly revolves around the flow of control between my code and the framework's code. Most things are asynchr...
stackexchange/codereview
I love data visualisation and to spread that love I thought we could share our favourite examples of data visualisation: Chess moves http://turbulence.org/spotlight/thinking/chess.html Chris Harrison's Visualisations http://www.chrisharrison.net/projects/visualization.html I especially like the bible and Wikipedia visu...
stackexchange/codereview
So I need to track changes that happen on a Mysql table. I was thinking of using triggers to log all the changes made to it and then save these changes in another table. Then I will have a cron script get all these changes and propagate the changes into the Mssql database. I really dont expect a lot of information to b...
stackexchange/codereview
How do you get a image from the scanner using .NET (C#) on Vista? Preferably to have the possibility to set the DPI. There are a few controls on the market that do this, but they don't seem to work very well.
stackexchange/codereview
New to xml. Looking for XPath to search a xml file with python ElementTree format <root> <child>One</child> <child>Two</child> <child>Three</child> </root> to do search for child with "Two" and return true/false if it was started off like from elementtree import ElementTree root = ElementTree.parse(open(PathFile)).g...
stackexchange/codereview
I have two assemblies with the same name in the Global Assembly cache, but with different version numbers. How do I tell my program which version to reference? For the record, this is a VB.Net page in an ASP.Net web site.
stackexchange/codereview
I would like to make the update of the web application as automated as possible. I'm looking for a tool that can compare two instances of a database and generate an update script for me. As part of the build process create a instance of the last version of the database (ie currently in production) and compare that to w...
stackexchange/codereview
Is there a way to get the SearchPath API to not search in c:\windows when using the default search path (passing NULL as the first param)? I can't modify the caller to send in a specific path. I have a system with an application ini file in c:\windows (which I don't want it to use, but for legacy reasons has to remain ...
stackexchange/codereview
It seems MySQL does not support the flag "NO_ WRITE_ TO_ BINLOG" for TRUNCATE. So I have to wait until delay is 0, then stop the replication, make the TRUNCATE of the table/s, reset the master, and then start replication again. Really painful. Any other suggestion?
stackexchange/codereview
Can somebody point me at a good tutorial for py2exe? I've read over the official tutorial but it is rather light on details, compared to all the options one can use when building an executable out of a python script. For the record, my python script uses Python 2.5.2, wxPython/wxWidgets 2.8 and MySQLdb 1.2.2; so if y...
stackexchange/codereview
Imagine I have these python lists: keys = ['name', 'age'] values = ['Monty', 42, 'Matt', 28, 'Frank', 33] Is there a direct or at least a simple way to produce the following list of dictionaries ? [ {'name': 'Monty', 'age': 42}, {'name': 'Matt', 'age': 28}, {'name': 'Frank', 'age': 33} ]
stackexchange/codereview