instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
Currently, I've got images (max. 6MB) stored as BLOB in a InnoDB table.
As the size of the data is growing, the nightly backup is growing slower and slower hindering normal performance.
So, the binary data needs to go to the file system. (pointers to the files will be kept in the DB.)
The data has a tree like relation:... | stackexchange/codereview |
I have an app that has impersonation used throughout. But when a user is logged in as an admin, a few operation require them to write to the server itself. Now if these users do not have rights on the actual server (some don't) it will not let them write.
What I want to do is turn off impersonation for just a couple... | stackexchange/codereview |
Anyone know the formula used to control the movement of a simple tank-like vehicle?
To 'steer' it, you need to alter the force applied the left and right "wheels". Eg. 1 unit of force on both wheels makes it go forward. -1 units of force on both wheels makes it go backwards. Apply more force to one wheel than the o... | stackexchange/codereview |
Are there any libraries for Java that can generate unit tests or unit test skeletons for existing code? I'm looking for something similar to pythoscope. Ideally it would generate code that follows JUnit4 or TestNG conventions.
It looks like Agitar does something like this, but I'm looking for something free.
| stackexchange/codereview |
Say I have the following string:
"I am the most foo h4ck3r ever!!"
I'm trying to write a makeSpecial(foo) function where the foo substring would be wrapped in a new span element, resulting in:
"I am the most <span class="special">foo></span> h4ck3r ever!!"
BeautifulSoup seemed like the way to go, but I haven't been a... | stackexchange/codereview |
Do you know of well designed open source applications that are instructive to analyse?
Specifically, I'm interested in practical applications object-relational mapping in C++ based programs, where there is a good separation between a domain model and persistence/serialization functionality.
| stackexchange/codereview |
I'm a programmer dammit, I should be allowed to ask these kinds of IT questions! :)
Anyway the problem is as follows. I'm writing an automatic build script to deploy code to a live windows 2003 server. To get access to the server I enabled the VPN role, and I can connect to it remotely from my dev machine using a usern... | stackexchange/codereview |
I have many items inside a list control. I want each item to have a different item template depending on the type of the item. So the first item in the list is a ObjectA type and so I want it to be rendered with ItemTemplateA. Second item is a ObjectB type and so I want it to have ItemTemplateB for rendering. At the mo... | stackexchange/codereview |
I noticed the following today: Mono at the PDC 2008?
My talk will cover new technologies that we have created as part of Mono. Some of them are reusable on .NET (we try to make our code cross platform) and some other are features that specific to Mono's implementation of the CLI.
Posted by Miguel de Icaza on 01 Oct ... | stackexchange/codereview |
Say I have a third party Application that does background work, but prints out all errors and messages to the console. This means, that currently, we have to keep a user logged on to the server, and restart the application (double-click) every time we reboot.
Not so very cool.
I was kind of sure, that there was an easy... | stackexchange/codereview |
From everything I've read, it seemed that adding paging to a ListView control should be dead simple, but it's not working for me. After adding the ListView and DataPager controls to the form and wiring them together, I'm getting very odd behavior. The DataPager correctly limits the ListView's page size, but clicking th... | stackexchange/codereview |
I don´t know why, but my form isn´t calling Form_Load event when it loads.
Any ideas why this might be happening?
| stackexchange/codereview |
I want to write a C# application where it connects to a telnet server and communicates to the server. I was wondering how a telnet server sends information to the client. I have looked (skimmed) over the Telnet RFC and looked at the incoming packets coming in from the server and still a bit confused. Can somebody give ... | stackexchange/codereview |
I have to create a site definition for a client that must contain pre-defined web part pages. I can create the web part pages but am at a loss when it comes to attaching them to the site on creation.
I know web part pages created through SharePoint are stored in a Document Library. Do I need to pre-populate a "Web Part... | stackexchange/codereview |
For our software we use hardware dongles to protect the software. No protection is perfect but this commercial solution is affordable and keeps honest people honest (as mentioned in another thread). The advantage is the 128 bit key that is stored 'unreadable' on the hardware dongle.
We want to remove this hardware don... | stackexchange/codereview |
I’m building a system that generates “work items” that are queued up for back-end processing. I recently completed a system that had the same requirements and came up with an architecture that I don’t feel is optimal and was hoping for some advice for this new system.
Work items are queued up centrally and need to be ... | stackexchange/codereview |
What tweaks / addins / themes do you have rigged up to make your IDE awesome? For example, in Visual Studio I color themes, CodeRush draws lines between braces, I always install and use the Consolas font and I have it setup to sync my settings across computers for when I change hotkeys and whatnot with the help of Fol... | stackexchange/codereview |
Any gotchas I should be aware of? Can I store it in a text field, or do I need to use a blob?
(I'm not overly familiar with either pickle or sqlite, so I wanted to make sure I'm barking up the right tree with some of my high-level design ideas.)
| stackexchange/codereview |
I have a site that is using x509 client certificates (2 way SSL) to authenticate users and an LDAP directory that contains authorization information. I would like to use one of the certificate attributes to query the directory ( SSL_CLIENT_S_DN_CN to be exact ). I see how to use mod_ssl to use the user's client certif... | stackexchange/codereview |
i sync a database via wcf service to sql ce databases on my clients.
however, i don't want the schema generated on the client side to be the
same, as the one on the server.
is there a way to customize the schema returned to the client syncproviders?
| stackexchange/codereview |
I'm looking for a good template on server-side installation of software for a project I'm working on.
The client-side is pretty straight-forward. The server-side installation is a little trickier. It is made up of several pieces (services, database connections, dependencies, ports that need to be unblocked, etc.). Duri... | stackexchange/codereview |
Is there drop-in replacement for ActiveRecord that uses some sort of Object Store?
I am thinking something like Erlang's MNesia would be ideal.
Update
I've been investigating CouchDB and I think this is the option I am going to go with. It's a toss-up between using CouchRest and ActiveCouch. CouchRest is pretty mature... | stackexchange/codereview |
How do I get a method's execution time?
Is there a Timer utility class for things like timing how long a task takes, etc?
Most of the searches on Google return results for timers that schedule threads and tasks, which is not what I want.
| stackexchange/codereview |
I'm embedding a JRE in an existing C application using the invocation API, and
I'd like to be able to use JDBC to work with the database in that code. This
application is a transaction processing application, and the database
transaction is managed by code in the C portion of the application, and the
java code must ru... | stackexchange/codereview |
Do you know of well designed open source applications that are instructive to analyse?
Of course this question is strictly related to this other post, but I am specifically interested in applications written in Python.
| stackexchange/codereview |
Suppose I've got the following program:
namespace ReflectionTest
{
public class Example
{
private string field;
public void MethodOne() { }
public void MethodTwo() { }
public string Property
{
get { return field; }
set { this.field = value; }
... | stackexchange/codereview |
I need to substitute the value of a string into my regular expression in Ruby. Is there an easy way to do this? For example:
foo = "0.0.0.0"
goo = "here is some other stuff 0.0.0.0"
if goo =~ /value of foo here dynamically/
puts "success!"
end
| stackexchange/codereview |
We have developed a website that uses MVC, C#, and jQuery. In one of my controller classes we are validating inputs from the user and if it fails we throw an exception that the Ajax error parameter(aka option) handles. (We use Block UI to display the error message. BlockUI is a jQuery plugIn that blocks the screen and... | stackexchange/codereview |
I want to expose the functionality of an SAP program (transaction) as a BAPI.
I need to call a report and supply range filters such that the GUI is bypassed.
Does anyone have a working example of the SUBMIT ... WITH ... ABAP construct, or other suggestions on how to accomplish what I need to do?
| stackexchange/codereview |
Not really a c/c++ person so I was hoping someone could direct me to the files that contain the main calculations of the game?
I am specifically interested in how things are calculated when deciding if the person 'wins' or 'loses' (generally speaking) during events like running/standing/etc.
In other words, winning/los... | stackexchange/codereview |
I have a master page, with a help link in the top menu. This link should contain the a dynamic bookmark from the current page, so that the user scrolls to the help for the page he is currently seeing.
<a href="help.aspx#[NameOfCurentPage]">Help</a>
How would you implement this?
| stackexchange/codereview |
I am displaying a texture that I want to manipulate without out affecting the image data. I want to be able to clamp the texel values so that anything below the lower value becomes 0, anything above the upper value becomes 0, and anything between is linearly mapped from 0 to 1.
Originally, to display my image I was us... | stackexchange/codereview |
I have a rails app that has picked up a bit of traction, but I have a serious headache to deal with. It's a basic sort of asset manager application - users upload their photos, .pdfs, videos, etc., and the system allows them to manage how that asset is presented.
I started with a fairly standard rails view - just what... | stackexchange/codereview |
I'm trying to bind a List<T> to a DataGridView control, and I'm not having any luck creating custom bindings.
I have tried:
gvProgramCode.DataBindings.Add(new Binding("Opcode",code,"Opcode"));
It throws an exception, saying that nothing was found by that property name.
The name of the column in question is "Opcode". T... | stackexchange/codereview |
What is the most efficient way to convert a MySQL query to CSV in PHP please?
It would be best to avoid temp files as this reduces portability (dir paths and setting file-system permissions required).
The CSV should also include one top line of field names.
| stackexchange/codereview |
I have this .NET regex:
^(?<prefix>("[^"]*"))\s(?<attrgroup>(\([^\)]*\)))\s(?<suffix>("[^"]*"))$
It properly matches the following strings:
"some prefix" ("attribute 1" "value 1") "some suffix"
"some prefix" ("attribute 1" "value 1" "attribute 2" "value 2") "some suffix"
It fails on...
"some prefix" ("attribute 1" "v... | stackexchange/codereview |
I am application developer and don't know much about virtual machine(VM).
however, our application is resided on a VM. frequent patch need be apply to fix/update this application. For diaster recovery, It was suggest to backup every thing on the server. so, once server is restored, no application need be re-installed ... | stackexchange/codereview |
I am looking for the advantages of using RTSP to support streaming video to multiple devices. I have:
Benefits of TCP.
Commonly used protocol on web so supported by lots of infrastructure.
Commonly used on web so lots of tools and stacks.
Can use SSL.
Wide device support (not sure on this one)
Any other ideas?
| stackexchange/codereview |
Is exposing CRUD operations through SOAP web services a bad idea? My instinct tells me that it is not least of which because the overhead of doing database calls overhead could be huge. I'm struggling to find documentation for/against this (anti)pattern so I was wondering if anyone could point me to some documentation ... | stackexchange/codereview |
I started playing around with Linq today and ran into a problem I couldn't find an answer to. I was querying a simple SQL Server database that had some employee records. One of the fields is the full name (cn). I thought it would be interesting to group by the first name by splitting the full name at the first space. I... | stackexchange/codereview |
I have been tinkering with BSP trees for a while now and am also playing with threads. When adding a triangle to a BSP tree, an opportunity arises to create a new thread for the purposes of processing data in parallel.
insert(triangle, bspnode)
{
....
else if(triangle spans bspnode)
{
(frontpiece, backpiece... | stackexchange/codereview |
I have a need to display many numerical values in columns. These values need to be easily editable so I cannot just display them in a table. I am using textboxes to display them. Is there a way for me to right-justify the text displayed in a textbox? It would also be nice if when the user is entering data for it to sta... | stackexchange/codereview |
If I create classes, that are used at the moment only in a single thread, should I make them thread-safe, even if I don't need that at the moment? It could be happen, that I later use this class in multiple threads, and at that time I could get race conditions and may have a hard time to find them if I didn't made the ... | stackexchange/codereview |
Is it possible to prevent the Windows Installer from running every time Access 2003 and Access 2007 are started, when they are both installed on the same machine at the same time..?
Like many developers I need to run more than 1 version of MS Access. I have just installed Access 2007. If I open Access 2003 and then o... | stackexchange/codereview |
At a previous place where I worked a colleague figured out how to configure MediaWiki so that, for example, a string like #12345 in the wiki markup could be expanded into a hypertext link to ticket 12345 in the ticket system.
I would like to do something similar in TWiki. I have not yet figured out how, though. So, i... | stackexchange/codereview |
What's the easiest way of me converting the simpler regex format that most users are used to into the correct re python regex string?
As an example, I need to convert this:
string = "*abc+de?"
to this:
string = ".*abc.+de.?"
Of course I could loop through the string and build up another string character by character,... | stackexchange/codereview |
Is there any good way to use a windows application written in C# to display/control a powerpoint slideshow? Ultimately I would like to show thumbnails in a form and clicking these thumbnails would advance the slides shown on a second monitor (similar to using Powerpoint itself to show a slideshow on a second monitor).
... | stackexchange/codereview |
I'm new to Windows programming and after reading the Petzold book I wonder: is it still good practice to use the TCHAR type and the _T() function to declare strings or should I just use the wchar_t and L"" strings in new code?
I will target only modern Windows (as of this writing versions 10 and 11) and my code will be... | stackexchange/codereview |
As a software developer, I have done many web page applications and been doing blog for my programming experiences. I would like to use pictures in many cases. Pictures worth thousand words and they are universal language!
You could create your own clip art images or download graphics(actually many are open clip art/im... | stackexchange/codereview |
What is the difference between Obfuscation, Hashing, and Encryption?
Here is my understanding:
Hashing is a one-way algorithm; cannot be reversed
Obfuscation is similar to encryption but doesn't require any "secret" to understand (ROT13 is one example)
Encryption is reversible but a "secret" is required to do so... | stackexchange/codereview |
I was looking at how some site implemented rounded corners, and the CSS had these odd tags that I've never really seen before.
-moz-border-radius-topright: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-bottomright: 5px;
-webkit-border-bottom-right-radius: 5px;
I googled it, and they seem to be Firefox... | stackexchange/codereview |
How do you pass options to an executable? Is there an easier way than making the options boolean arguments?
EDIT: The last two answers have suggested using arguments. I know I can code a workable solution like that, but I'd rather have them be options.
EDIT2: Per requests for clarification, I'll use this simple exam... | stackexchange/codereview |
Suppose I have a hash_map and a code like
// i is an iterator
i = hash_map.erase(i)
But GCC's STL doesn't return iterator in erase, but a void. Now is a code like
hash_map.erase(i++)
safe (i.e. does not invalidate the iterator or does any other unexpected or unpleasant things)? Please note this is a hash_map.
| stackexchange/codereview |
I need to round a value up to the nearest multiple of 2.5.
For example:
6 --> 7.5
7.6 --> 10
etc.
This seems like the best way to do this?
Function RoundToIncrement(ByVal originalNumber As Decimal, ByVal increment As Decimal) As Decimal
Dim num = Math.Round(originalNumber / increment, MidpointRounding.Awa... | stackexchange/codereview |
Consider the following code:
abstract class SomeClassX<T>
{
// blah
}
class SomeClassY: SomeClassX<int>
{
// blah
}
class SomeClassZ: SomeClassX<long>
{
// blah
}
I want a collection of SomeClassX<T>'s, however, this isn't possible since SomeClassX<int> != SomeClassX<long> and List<SomeClassX<>> isn't allowed.... | stackexchange/codereview |
I am trying to take a shapefile of subdivisions within a county that I have created and line it up with another shapefile that was given to me by the County Appraisal District (parcel data). When I try to get them to line up then my streets shapefiles is not aligned with everything else. They are all on the same coor... | stackexchange/codereview |
How do I programmatically return the maximum of two integers without using any comparison operators and without using if, else, etc?
| stackexchange/codereview |
In the following snippet, using XmlReader, when I encounter an element. I would like to read it as-is, including all attributes and namespace decoration in the element. Using the oXml.Name property, I am only able to get the tag name. Is there a function to get the tag itself?
oXml = XmlReader.Create(path, oXmlSettings... | stackexchange/codereview |
A rather odd experience. Using the latest PDK (v7.3) from ActiveState, I used perlctrl to build a COM DLL. Perlctrl ran without a hitch. OLEView read the typelib okay. RegSvr32 registered it okay. However ... there's no sign of it in registry, and anything that tries to use it fails. I hunted for the various UIDs using... | stackexchange/codereview |
I am currently working on a project which requires migration of content from different content management Systems to SharePoint. Are there any good, preferably open source, tools that would help me do this? Also, what are the best practices that I would have to keep in mind when it comes to such projects. One more thin... | stackexchange/codereview |
I would like to be able to know, in run-time in my code, how much memory a certain object is taking (a Dataset in this case, but i'm looking for a "general" solution).
Is this possible through reflection?
This is for .Net 2.0.
Thanks!
| stackexchange/codereview |
First post, so here goes. I'm writing a script that does intelligent search and replace on a file tree. Essentially, the script gets each file's contents into a buffer string and performs a match with a pre-defined pattern, in this case the pattern is /^[^\r\n]*(vendor)[^\r\n]*$/im. The pattern should find any case-ins... | stackexchange/codereview |
I'm trying to make a simple blackjack program. Sadly, I'm having problems right off the bat with generating a deck of cards.
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<char> deck;
char suit[] = {'h','d','c','s'};
char card[] = {'2','3','4','5','6','7','8','9','10','J','... | stackexchange/codereview |
I have a nice little file upload control I wrote for ASP.NET webforms that utilizes an IFrame and ASP.NET AJAX.
However, on large uploads, the browser times out before it can finish posting the form.
Is there a way I can increase this?
I'm not really interesting in alternative solutions, so don't suggest changing the e... | stackexchange/codereview |
I'm pretty sure stackoverflow.com is created with ASP.NET, but no matter where I click I see no .aspx extension in the address bar.
How it is done and is there a particular reason for this?
| stackexchange/codereview |
Does anyone know the API call I can use to change the keyboard layout on a windows machine to Dvorak? Doing it through the UI is easy but I'd like to have a script that I can run on new VM's to automate the process.
| stackexchange/codereview |
Possible Duplicate:
“const correctness” in C#
I have programmed C++ for many years but am fairly new to C#. While learning C# I found that the use of the const keyword is much more limited than in C++. AFAIK, there is, for example, no way to declare arguments to a function const. I feel uncomfortable with the idea t... | stackexchange/codereview |
I have a maven POM file for a web service. For one of the dependencies I have to specify several exclusions for jar files that are already kept at a higher-level in the web-application server (accessible to all web-applications, not just this particular one). One example of such exclusion is the JAR containing my JDBC ... | stackexchange/codereview |
I'm using CSS Filters to modify images on the fly within the browser. These work perfectly in Internet Explorer, but aren't supported in Firefox.
Does anyone know what the CSS Filter equivalent for these is for Firefox? An answer that would work cross browser (Safari, WebKit, Firefox, etc.) would be preferred.
<style t... | stackexchange/codereview |
This posting here (How do you manage database revisions on a medium sized project with branches?) got me wondering how best to work on a web project using branching and deploying to dev, staging, and production (along with local copies).
We don't have "releases" per se: if a feature is big enough to be noticeable, we p... | stackexchange/codereview |
I've personally always used some type of external application for my SCM work; these days, that means tortoiseSVN on windows and versions.app on the mac. However, I keep running up against developers (namely eclipse users) who argue that SCM is better done within the IDE itself. I've yet to hear any really compelling... | stackexchange/codereview |
I have a project that dynamically loads in unknown assemblies implementing a specified interface. I don't know the contents or purposes of the assembly, other than it implementing my interface.
I need to somehow restrict the amount of processing power available to these assemblies. Processor priority is not what I'm lo... | stackexchange/codereview |
I have an API consisting of ASP.NET webservices callable through GET/POST/SOAP.
A new functionality will require me to accept files through this webservice. Basically I'm allowing users to upload files to a file archive through the API, which they'd otherwise do by logging into our browser based administration system.
... | stackexchange/codereview |
Using .NET 1.1, I have a DataGrid that contains three columns for each row.
Row one has a label with some text.
Row three will always have two radio buttons and two checkboxes and those are in the HTML side of the page.
Row two will have dynamically generated controls (just textboxes for now) and there can be 1 or mor... | stackexchange/codereview |
Ok, so it's almost as easy as pie already. But it really should be as easier than it is.
I think I should be able to connect to another database just by putting a JDBC connection string into TNSNAMES. Every database vendor has a type-4 JDBC driver and there's usually a good, free alternative.
With Oracle being such kee... | stackexchange/codereview |
In my MEF usage, I have a bunch of imports that I want to make available in many other parts of my code. Something like:
[Export (typeof (IBarProvider))]
class MyBarFactory : IBarPovider
{
[Import]
public IFoo1Service IFoo1Service { get; set; }
[Import]
public IFoo2Service IFoo2Service { get; set; }
... | stackexchange/codereview |
What's the best way to store tags for a record? Just use a varchar field? What about when selecting rows that contains tag x? Use the like operator?
thanks!
| stackexchange/codereview |
I'm trying to come up with a way to estimate the number of English words a translation from Japanese will turn into. Japanese has three main scripts -- Kanji, Hiragana, and Katakana -- and each has a different average character-to-word ratio (Kanji being the lowest, Katakana the highest).
Examples:
computer: コンピュータ (K... | stackexchange/codereview |
I'm looking for recommendations on books about MVC on the desktop. If they use Java, that is a bonus.
Some background:
I'm writing a desktop application in Java. It's an audio application that has a number of views and a central model called a Library with playlists, effects lists and a folder structure to organize t... | stackexchange/codereview |
I've built an installer for my application by hand (don't ask why). And I set up the registry keys for its entry in the add/remove control panel under HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall. And it works fine. I need it to be under HKCU so my installer will run on Vista without asking to be elevated.... | stackexchange/codereview |
i want to write code for unit test to test my application code. I have different methods and now want to test these methods one by one in python script.
but i do not how to i write. can any one give me example of small code for unit testing in python.
i am thankful
| stackexchange/codereview |
Below are lines from "the c++ programming language"
template<class T > T sqrt(T );
template<class T > complex<T> sqrt(complex<T>);
double sqrt(double);
void f(complex<double> z )
{
s q r t (2 ); // sqrt<int>(int)
sqrt(2.0) ; // sqrt(double)
sqrt(z) ; // sqrt<double>(complex<double>)
}
I dont understand why sqrt(z) ; c... | stackexchange/codereview |
Is there any class in the .NET framework that can read/write standard .ini files:
[Section]
<keyname>=<value>
...
Delphi has the TIniFile component and I want to know if there is anything similar for C#?
| stackexchange/codereview |
I've run across the following line in a VB6 application.
mobjParentWrkBk.ExcelWorkBook.Application.Selection.Insert Shift:=xlToRight
Unfortunately Google and other search engines have not been very useful as they seem to omit the := part.
What would be a C# equivalent?
| stackexchange/codereview |
So, no matter what I seem to do, I cannot seem to avoid having Dev C++ spew out numerous Multiple Definition errors as a result of me including the same header file in multiple source code files in the same project. I'd strongly prefer to avoid having to dump all my source code into one file and only include the heade... | stackexchange/codereview |
Note: I found this "Creating a Word Doc in C#.NET", but that is not what I want.
Do you know how to create a .odt to create file from C# .NET?
Is there a .NET component or wrapper for an OpenOffice.org library to do this?
| stackexchange/codereview |
What are the main reasons for having ridiculously long export times for a simple flash movie to swf? I have no unnecessary images or symbols, everything possible is set to lower than low and it still takes 10 minutes and upwards to export a 30 second animation at 24 fps. I have even created a new fla and pasted everyth... | stackexchange/codereview |
I am trying to learn how to use MSBuild so we can use it to build our project. There's what seems to be a very big hole in the documentation, and I find the hole everywhere I look, the hole being how do you name or otherwise designate the MSBuild project file?
For example, the tutorial on MSBuild that can be downloa... | stackexchange/codereview |
As a workaround for a problem, I think I have to handle KeyDown events to get the printable character the user actually typed.
KeyDown supplies me with a KeyEventArgs object with the properities KeyCode, KeyData, KeyValue, Modifiers, Alt, Shift, Control.
My first attempt was just to consider the KeyCode to be the ascii... | stackexchange/codereview |
Alright, I'm trying to read a comma delimited file and then put that into a ListView (or any grid, really). I have the delimiting part of the job taken care of, with the fields of the file being put into a multidimensional string array. The problem is trying to get it into the ListView.
It appears that there isn't a ... | stackexchange/codereview |
In a previous question, I asked about various ORM libraries. It turns out Kohana looks very clean yet functional for the purposes of ORM. I already have an MVC framework that I am working in though. If I don't want to run it as a framework, what is the right fileset to include to just give me the DB and ORM base class ... | stackexchange/codereview |
I am planning a PHP application that needs to store date/times in an MSSQL database. (For the curious, it is a calendar application.) What is the preferred format to store this information?
MSSQL has its own datetime data type, which works well in the database itself and is very readable. However, there aren't any MSSQ... | stackexchange/codereview |
Here is my function (updated):
Public Shared Function shortenUrl(ByVal URL As String) As String
Return shortenUrl(URL, 32)
End Function
Public Shared Function shortenUrl(ByVal URL As String, ByVal maxLength As Integer) As String
If URL.Length > maxLength Then
String.Format("{0}...{1}", URL.Substring(0, ... | stackexchange/codereview |
If I have added/removed/modified a large number of files in my local ClearCase view, how can I be certain that all the files have been added to source control?
| stackexchange/codereview |
Is there a way to merge two primary keys into one and then cascade update all affected relationships? Here's the scenario:
Customers (idCustomer int PK, Company varchar(50), etc)
CustomerContacts (idCustomerContact int PK, idCustomer int FK, Name varchar(50), etc)
CustomerNotes (idCustomerNote int PK, idCustomer int F... | stackexchange/codereview |
My MFC application using the "ESRI MapObjects LT2" ActiveX plugin throws an ASSERT at me when closing it.
The error occurs in cmdtarg.cpp:
CCmdTarget::~CCmdTarget()
{
#ifndef _AFX_NO_OLE_SUPPORT
if (m_xDispatch.m_vtbl != 0)
((COleDispatchImpl*)&m_xDispatch)->Disconnect();
ASSERT(m_dwRef <= 1); //<--- Fa... | stackexchange/codereview |
I've recently begun evaluating a few project management projects for the company I work for. It's the classic case - growing company looking for the right solution (meaning, free or really cheap). It's a combination shop - Windows, Macs, and Linux on the desktop. The tech savviness, of course, ranges from newbie to ... | stackexchange/codereview |
If I have a maven profile activated by the presence of a property, how can I define another profile that is only activated when the other profile is not activated?
e.g.
<profile>
<activation>
<property>
<name>myproperty</name>
<value>value</value>
</pr... | stackexchange/codereview |
I am a big fan of letting the compiler do as much work for you as possible. When writing a simple class the compiler can give you the following for 'free':
A default (empty) constructor
A copy and move constructor
A destructor
Assignment operators (operator=)
But it cannot seem to give you any comparison operators -... | stackexchange/codereview |
I have a Delphi COM Add-in for Outlook (2000-2007) and am trying to find a way to register an event when an MailItem in Outlook is marked as read. I want to add an additional property to the item as/just after it is marked as read.
Does anyone have any idea how to do this using the Outlook Object Model? I am also usi... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.