unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
What methods get called when you resize a JFrame? === I'm using a JFrame in which the CENTER portion of the BorderLayout is occupied by a JScrollPane that wraps around a JPanel. What I'm finding is that when I initiate the action that actually causes the JPanel to be displayed, the display doesn't change. But when I resize the JFrame, the new JScrollPane has now magically appeared. So what methods are called when you resize a JFrame? If I know, then I can call it in the code and avoid having to resize the frame just to see the results of the operation.
0
[ 2, 98, 3195, 164, 227, 76, 42, 302, 10454, 21, 487, 8361, 60, 800, 3726, 3726, 31, 22, 79, 568, 21, 487, 8361, 19, 56, 14, 459, 2980, 16, 14, 1862, 4414, 1320, 25, 3197, 34, 21, 487, 3862, 8694, 16660, 30, 8118, 18, 140, 21, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I redistribute Windows Imaging Component with .NET Framework 2.0? === I have a .NET Framework 2.0 app and would like to use the Windows Imaging Component. Since my application is a WinForms app and will be redistributed to users via an MSI installer I'm trying to figure out the best way to do this. I see a couple of options: 1) Skip .NET 2.0 and build on .NET 3.0 which includes the Windows Imaging Component 2) Figure out a way to include the WIC component with my installer Thoughts?
0
[ 2, 184, 107, 31, 402, 403, 14755, 1936, 13090, 5912, 29, 13, 9, 2328, 6596, 172, 9, 387, 60, 800, 3726, 3726, 31, 57, 21, 13, 9, 2328, 6596, 172, 9, 387, 4865, 17, 83, 101, 20, 275, 14, 1936, 13090, 5912, 9, 179, 51, 3010, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Java: Easiest way to replace strings with random strings === Lets say we have an array of strings. Each string will be made up of certain symbols (ax,bx,dx,c,acc for example) and numbers. ex: ax 5 5 dx 3 acc c ax bx I want to replace one or all of the symbols (randomly) with another symbol of the same set. ie, replace with one of ax,bx,dx,c,and acc, for example. replacement example: acc 5 5 dx 3 acc c ax bx or c 5 5 dx 3 acc c ax ax Is there a way to do this with regexes? In Java? If so, which methods should I use?
0
[ 2, 8247, 45, 27237, 161, 20, 3934, 7887, 29, 5477, 7887, 800, 3726, 3726, 6884, 395, 95, 57, 40, 7718, 16, 7887, 9, 206, 3724, 129, 44, 117, 71, 16, 1200, 9794, 13, 5, 7522, 15, 220, 396, 15, 43, 396, 15, 150, 15, 58, 3384, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using Regular Expressions to Extract a Value in Java === I have several strings in the rough form: [some text] [somenumber] [some more text] I want to extract the text in [somenumber] using the Java Regex classes. I know roughly what regular expression I want to use (though all suggestions are welcome). What I'm really interested in are the Java calls to take the regex string and use it on the source data to produce the value of [somenumber].
0
[ 2, 568, 1290, 13832, 20, 10962, 21, 1923, 19, 8247, 800, 3726, 3726, 31, 57, 238, 7887, 19, 14, 4182, 505, 45, 636, 3220, 1854, 500, 636, 3220, 16299, 500, 636, 3220, 91, 1854, 500, 31, 259, 20, 10962, 14, 1854, 19, 636, 3220, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to add a SqlMetal build step in VS2008? === I've created a one-line batch file to run SqlMetal to regenerate a LINQ to SQL DataContext for my database; this works great. *Refresh_DataContext.bat*: "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\sqlmetal.exe" /server:.\sqlexpress /database:MyDatabaseName /code:"%~dp0\DataContext.vb" /context:DataContext /views /functions /sprocs /pluralize So far I can run this by opening the enclosing folder in Explorer and running the batch file, and I've also added it to the Tools menu (`Tools/External Tools.../Add`). Now I'd like to run this batch file whenever I build (in certain configurations). How do I do this?
0
[ 2, 184, 20, 3547, 21, 4444, 255, 13651, 1895, 1424, 19, 4611, 2753, 60, 800, 3726, 3726, 31, 22, 195, 679, 21, 53, 8, 1143, 13064, 3893, 20, 485, 4444, 255, 13651, 20, 29608, 21, 6294, 1251, 20, 4444, 255, 1054, 1126, 11969, 26, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
C++ Nested classes driving me crazy... === i am trying to compile this very simple piece of code class myList { public: std::vector<std::string> vec; class Items { public: void Add(std::string str) { myList::vec.push_back(str); }; }items; }; int main() { myList newList; newList.items.Add("A"); } what can i do to make this work without creating more objects that needed or overcomplicating stuff...
0
[ 2, 272, 20512, 5618, 69, 2684, 2891, 55, 3328, 9, 9, 9, 800, 3726, 3726, 31, 589, 749, 20, 26561, 48, 253, 1935, 1855, 16, 1797, 718, 51, 5739, 13, 1, 317, 45, 354, 43, 45, 45, 28033, 1, 384, 43, 45, 45, 11130, 1, 13, 195, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Simple, manual-start user instructions in case Windows CD fails to autostart === Our CD autostarts, but occasionally customers have that disabled (by a CD burner, etc.). As a backup, we include instructions on the back of our CD (below). I'm trying to find better instructions, for Windows XP and above. (Ideally for Windows 98 and above) **CURRENT** If it does not auto-start: Repeat instructions (above) once. If that fails again: 1. Click **Start** | **My Computer** or double-click **My Computer** on your Windows® desktop. 2. Double-click CD drive. Looks like: OurCompany CD (D:) 3. CD Contents are listed, usually to the right. 4. Double-click **Start**, in the list. But the My Computer option isn't always on the Desktop and when it is customers have trouble finding it. And Vista doesn't label the start button **ALTERNATIVE** Click "Start" | "Run" In the box in front of "Open:" type : d:start (where 'd' is drive letter for your CD-ROM. Problem here is that some people won't know what their CD ROM drive letter is. Any better suggestions?
0
[ 2, 1935, 15, 5132, 8, 13680, 4155, 7650, 19, 610, 1936, 1745, 13614, 20, 3108, 13680, 800, 3726, 3726, 318, 1745, 3108, 13680, 18, 15, 47, 4533, 5279, 57, 30, 10154, 13, 5, 779, 21, 1745, 4306, 106, 15, 2722, 9, 6, 9, 28, 21, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why does a SSRS report time out when the Stored Procedure it is based on returns results within a few seconds? === I have a report that renders data returned from a stored procedure. Using profiler I can catch the call to the stored procedure from the reporting services. The report fails stating the report timed out yet I can execute the stored procedure from SSMS and it returns the data back in five to six seconds. Note, in the example test run only two rows are returned to the report for rendering though within the stored procedure it may have been working over thousands or even millions of records in order to collate the result passed back to reporting services. I know the stored procedure could be optimised more but I do not understand why SSRS would be timing out when the execution only seems to take a few seconds to execute from SSMS. Also another issue has surfaced. If I recreate the stored procedure, the report starts to render perfectly fine again. That is fine except after a short period of time, the report starts timing out again. The return of the time out seems to be related to new data being added into the main table the report is running against. In the example I was testing, just one hundred new records being inserted was enough to screw up the report. I imagine more correctly its not the report that is the root cause. It is the stored procedure that is causing the time out when executed from SSRS. Once it is timeing out again, I best fix I have so far is to recreate the stored procedure. This doesn't seem to be an ideal solution. The problem also only seems to be occuring on our production environment. Our test and development platforms do not seem to be exhibiting the same problem. Though dev and test do not have the same volume of records as production.
0
[ 2, 483, 630, 21, 22118, 18, 1330, 85, 70, 76, 14, 8214, 7004, 32, 25, 432, 27, 4815, 1736, 363, 21, 310, 2582, 60, 800, 3726, 3726, 31, 57, 21, 1330, 30, 16535, 18, 1054, 587, 37, 21, 8214, 7004, 9, 568, 5296, 139, 31, 92, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to get file creation & modification date/times in Python? === I have a script that needs to do some stuff based on file creation & modification dates but has to run on Linux & Windows. What's the best **cross-platform** way to get file creation & modification date/times in Python?
0
[ 2, 184, 20, 164, 3893, 2502, 279, 16135, 1231, 118, 891, 18, 19, 20059, 60, 800, 3726, 3726, 31, 57, 21, 3884, 30, 2274, 20, 107, 109, 3217, 432, 27, 3893, 2502, 279, 16135, 4076, 47, 63, 20, 485, 27, 13024, 279, 1936, 9, 98, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Markdown validation === It's possible to write [Markdown][1] content with invalid syntax. Invalid means that the [BlueCloth][2] library fails to parse the content and throws an exception. The `markdown` helper in Rails doesn't catch any BlueCloth exceptions and because of that the complete page fails to render (500 Server Error page is rendered instead). In my case, users are allowed to write Markdown content and save it to the database. If someone used invalid syntax, all successive rendering attempts of that content fail (Status Code 500 - Internal Server Error). How do you get around this issue? Is it possible to validate the Markdown syntax at the Model-level before saving to the database? [1]: http://en.wikipedia.org/wiki/Markdown [2]: http://www.deveiate.org/projects/BlueCloth
0
[ 2, 943, 2968, 27999, 800, 3726, 3726, 32, 22, 18, 938, 20, 2757, 636, 4527, 2968, 500, 2558, 165, 500, 2331, 29, 16671, 22649, 9, 16671, 1108, 30, 14, 636, 6997, 15549, 500, 2558, 135, 500, 1248, 13614, 20, 2017, 870, 14, 2331, 17...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to get BIDS for Visual Studio 2008 SP1? === I currently use Visual Studio 2008 SP1 and have been migrating older projects into VS2008 but existing SSIS and SSRS (2005) projects have not been compatible with VS2008. It has been a pain to maintain those BIDS projects as a separate solution. I have been considering upgrading to SQL2008 but because our dev, test and production platforms are all SQL2005 Enterprise Edition I do not like the idea of deviating my local environment from the current standard. Despite wanting BIDS for VS2008. I just installed Sql Express 2008 with all the bits and something occurred to me... Did Sql Express 2008 just install all the BIDS bits I need without requiring me to upgrade my local version of Sql Server? Is this a viable methods of installing BIDS for VS2008 or am I missing something?
0
[ 2, 184, 20, 164, 4458, 18, 26, 3458, 1120, 570, 3782, 165, 60, 800, 3726, 3726, 31, 871, 275, 3458, 1120, 570, 3782, 165, 17, 57, 74, 28749, 1234, 2314, 77, 4611, 2753, 47, 3149, 13, 18, 4557, 17, 22118, 18, 13, 5, 2835, 6, 23...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Send administrative commands to a Windows Service using Powershell CmdLets === I have a C# Windows application which runs a service. I would like to leverage PowerShell in order to offer a command line management interface for administering my running service. From my point of view, I am trying to offer the same administrative interface a la Exchange 2007. Do you have any suggestion or sample code on how to start/design the management cmdlets in order "connect" to the running service to query or send administrative commands? How can I access service's internal runtime state from powershell command line? For example I would like to implement a cmdlet called Get-ConnectionsInfo to find out how many outbound connections my Windows service is using when the cmdlet is executed. A practical example or web link to an example would be more than welcomed. Thanks, Robert
0
[ 2, 2660, 2168, 14294, 20, 21, 1936, 365, 568, 414, 15984, 2390, 43, 11045, 800, 3726, 3726, 31, 57, 21, 272, 5910, 1936, 3010, 56, 1461, 21, 365, 9, 31, 83, 101, 20, 19414, 414, 15984, 19, 389, 20, 1994, 21, 1202, 293, 1097, 657...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Javascript - array.contains(obj) === What is most concise/efficient way to find out if a javascript array contains an obj? This is the only way I know to do it: contains(a, obj){ for(var i = 0; i < a.length; i++) { if(a[i] === obj){ return true; } } return false; } Is there a better/more concise way to accomplish this?
0
[ 2, 8247, 8741, 13, 8, 7718, 9, 1126, 5851, 18, 5, 111, 11741, 6, 800, 3726, 3726, 98, 25, 127, 29455, 118, 23702, 161, 20, 477, 70, 100, 21, 8247, 8741, 7718, 1588, 40, 5122, 728, 60, 48, 25, 14, 104, 161, 31, 143, 20, 107, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Get string return value from C DLL in Delphi === I have a legacy DLL written in C that contains a function that returns a string, and I need to access this function from Delphi. The only info I have about the DLL is the VB declare for accessing the function: Public Declare Function DecryptStr Lib "strlib" (Str As String) As String I've tried the following without success: Declaration: function DecryptStr(s: PChar): PChar; cdecl; external 'strlib.dll'; Usage: var p1, p2 : pchar; begin GetMem( p1, 255 ); StrPCopy( p2, 'some string to decrypt' ); p1 := DecryptStr( p2 ); end; This consistently crashes the DLL with an Access Violation. I'm at a loss. Any suggestions ?
0
[ 2, 164, 3724, 788, 1923, 37, 272, 13, 43, 211, 19, 23030, 800, 3726, 3726, 31, 57, 21, 7780, 13, 43, 211, 642, 19, 272, 30, 1588, 21, 1990, 30, 4815, 21, 3724, 15, 17, 31, 376, 20, 1381, 48, 1990, 37, 23030, 9, 14, 104, 1540...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Simplest way to send mail with Ruby on Rails === What is the simplest way to send mail using Ruby on Rails? Is there a way to send mail directly via ruby and skip all the rails models and complexity, just like php's mail() function? Thanks for your help.
0
[ 2, 24384, 161, 20, 2660, 4216, 29, 10811, 27, 2240, 18, 800, 3726, 3726, 98, 25, 14, 24384, 161, 20, 2660, 4216, 568, 10811, 27, 2240, 18, 60, 25, 80, 21, 161, 20, 2660, 4216, 1703, 1197, 10811, 17, 12532, 65, 14, 2240, 18, 2761...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the best way to execute sequential methods? === Working on a project where a sequential set of methods must be run every x seconds. Right now I have the methods contained within another "parent method", and just sequentially call them right after another. class DoTheseThings() { DoThis(); NowDoThat(); NowDoThis(); MoreWork(); AndImSpent(); } Each method must run successfully without throwing an exception before the next step can be done. So now I wrapped each of those methods with a while and try try catch, then in the catch re execute that method again. while( !hadError ) { try { DoThis(); } catch(Exception doThisException ) { hadError = true; } } This seems smelly and not very dry. Is there a better way to do this so I'm not wrapping any new functionality in the same methods. Isn't some kind of Delegate collection the proper way to implement this? Is there a more "proper" solution?
0
[ 2, 98, 25, 14, 246, 161, 20, 15644, 1353, 5495, 10107, 3195, 60, 800, 3726, 3726, 638, 27, 21, 669, 113, 21, 1353, 5495, 10107, 309, 16, 3195, 491, 44, 485, 352, 993, 2582, 9, 193, 130, 31, 57, 14, 3195, 3437, 363, 226, 13, 7,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Could "attach source" be made easier for popular Java libraries? === I run into this obstacle when my debugger steps into some classfile without corresponding source. Finding it is often difficult: * You have to search for the site hosting the respective project, and find its ``download source'' page (for instance, last time I searched for the JPA API, and it took me hours to obtain the sources). Or, you might be required to check it out from revision control. * You need to know the exact version you are using. Otherwise the debugger might step into comments and empty lines :) * There is no convention for packaging source code&mdash;some projects include it in the jar itself; some provide a separate zip file; others put it in a `src/` subfolder within the zip. I know Maven has the capability of downloading source from its repository and including it in the src paths when an IDE config file is generated. But Maven's repo is so poor in terms of content&mdash;few libs actually have their source uploaded. Why is it so complicated when it can be made straightforward? We could have some central repo which relates a classfile (or a hash thereof) to the source file it was compiled from (or a link to it). Maybe a rather huge repo, but pretty simply structured. An IDE plugin could query it to fetch what's needed automatically. Have you, guys, experienced the same? How do you obtain the sources to attach?
0
[ 2, 110, 13, 7, 14986, 673, 1267, 7, 44, 117, 4950, 26, 844, 8247, 8649, 60, 800, 3726, 3726, 31, 485, 77, 48, 21394, 76, 51, 121, 2345, 11356, 2382, 77, 109, 718, 16877, 366, 7265, 1267, 9, 3007, 32, 25, 478, 1956, 45, 1637, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Accessing members of the other half of a partial class === I'm just learning to work with partial classes in VB.NET and VS2008. Specifically, I'm trying to extend a LINQ to SQL class that was automatically created by SqlMetal. The automatically generated class looks like this: Partial Public Class DataContext Inherits System.Data.Linq.DataContext ... <Table(Name:="dbo.Concessions")> _ Partial Public Class Concession ... <Column(Storage:="_Country", DbType:="Char(2)")> _ Public Property Country() As String ... End Property ... End Class In a separate file, here's what I'm trying to do: Partial Public Class DataContext Partial Public Class Concession Public Function Foo() as String Return DoSomeProcessing(Me.Country) End Function End Class End Class ... but I get blue jaggies under '`Me.Country`' and the message **`'Country' is not a member of 'DataContext.Concession'`**. Both halves of the partial class are in the same namespace. So how do I access the properties of the automatically-generated half of the partial class, from my half of the partial class?
0
[ 2, 1381, 68, 443, 16, 14, 89, 519, 16, 21, 7284, 718, 800, 3726, 3726, 31, 22, 79, 114, 2477, 20, 170, 29, 7284, 2684, 19, 13, 20468, 9, 2328, 17, 4611, 2753, 9, 3524, 15, 31, 22, 79, 749, 20, 7206, 21, 6294, 1251, 20, 4444,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do craigslist mashups get data? === I'm doing some research work into content aggregators, and I'm curious how some of the current craigslist aggregators get data into their mashups. For example, www.housingmaps.com and the now closed www.chicagocrime.org If there is a URL that can be used for reference, that would be perfect!
4
[ 2, 184, 107, 5500, 18, 5739, 13333, 15699, 164, 1054, 60, 800, 3726, 3726, 31, 22, 79, 845, 109, 527, 170, 77, 2331, 24755, 18, 15, 17, 31, 22, 79, 7686, 184, 109, 16, 14, 866, 5500, 18, 5739, 24755, 18, 164, 1054, 77, 66, 133...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a reason Python strings don't have a string length method? === I know that python has a len function that is used to determine the size of a string, but I was wondering why its not a method of the string object.
0
[ 2, 25, 80, 21, 1215, 20059, 7887, 221, 22, 38, 57, 21, 3724, 1476, 2109, 60, 800, 3726, 3726, 31, 143, 30, 20059, 63, 21, 10655, 1990, 30, 25, 147, 20, 3746, 14, 1072, 16, 21, 3724, 15, 47, 31, 23, 5712, 483, 82, 52, 21, 210...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How do I create a custom JPanel extension and use it from the NetBeans palette? === I have a JPanel extension that I've written and would like to be able to use it in the NetBeans designer. The component is simply adds some custom painting and continues to function as a container to be customised on each use. I have properties to expose in addition to the standard JPanel ones and have a custom paintComponent() method that I'd like to be able to see in use when building up GUIs. Ideally I'd like to associate an icon with the component as well so that its easily recognisable for my colleagues to work with. What's the best way of achieving this?
0
[ 2, 184, 107, 31, 1600, 21, 5816, 487, 3206, 532, 3896, 17, 275, 32, 37, 14, 4275, 863, 5950, 27349, 60, 800, 3726, 3726, 31, 57, 21, 487, 3206, 532, 3896, 30, 31, 22, 195, 642, 17, 83, 101, 20, 44, 777, 20, 275, 32, 19, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
abstract methods in skeletal implementations of interfaces === I was re-reading Effective Java (2nd edition) item 18, <a href="http://my.safaribooksonline.com/9780137150021/ch04lev1sec6">prefer interfaces to abstract classes</a>. In that item Josh Bloch provides an example of a skeletal implementation of the `Map.Entry<K,V>` interface: // Skeletal Implementation public abstract class AbstractMapEntry<K,V> implements Map.Entry<K,V> { // Primitive operations public abstract K getKey(); public abstract V getValue(); // ... remainder omitted } Two questions stem from this example: 1. Why are getKey and getValue explicitly declared here as abstract methods? They are part of the <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.Entry.html">Map.Entry</a> interface, so I don't see a reason for the redundant declaration in the abstract class. 2. Why use the idiom of leaving these primitives methods, as Mr. Bloch refers to them, as abstract? Why not just do this: // Skeletal Implementation public abstract class AbstractMapEntry<K,V> implements Map.Entry<K,V> { private K key; private V value; // Primitive operations public K getKey() {return key;} public V getValue() {return value;} // ... remainder omitted } The benefits of this are that each subclass doesn't have to define its own set of fields, and can still access the key and value by their accessors. If a subclass truly needs to define its own behavior for the accessors, it can implement the Map.Entry interface directly. The other downside is that in the equals method provided by the skeletal implementation, the abstract accessors are called: // Implements the general contract of Map.Entry.equals @Override public boolean equals(Object o) { if (o == this) return true; if (! (o instanceof Map.Entry)) return false; Map.Entry<?,?> arg = (Map.Entry) o; return equals(getKey(), arg.getKey()) && equals(getValue(), arg.getValue()); } Bloch warns against calling overridable methods (item 17) from classes designed for inheritance as it leaves the superclass vulnerable to changes made by subclasses. Maybe this is a matter of opinion, but I was hoping to determine whether there's more to the story, as Bloch doesn't really elaborate on this in the book.
0
[ 2, 8502, 3195, 19, 23185, 6123, 18, 16, 6573, 18, 800, 3726, 3726, 31, 23, 302, 8, 22883, 3140, 8247, 13, 5, 135, 706, 1322, 6, 9101, 474, 15, 13, 1, 58, 746, 14057, 3726, 7, 21127, 6903, 915, 9, 18, 2565, 2905, 5199, 528, 114...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to determine if radioButton.Checked is set programatically or via a mouse click? === I have a radio button on my Windows Form. How can I determine if the CheckChanged event occurred due to a user clicking or selecting the radio button vs programatically setting the event with this.radioButtonAdd.Checked = true; I would like some code to take a different action depending on if the user clicked the button or I raised the event myself. Or maybe the better question is how do I handle the event when a user clicks vs when the state is changed in my code.
0
[ 2, 184, 20, 3746, 100, 603, 811, 444, 9, 12542, 69, 25, 309, 625, 721, 8438, 54, 1197, 21, 7567, 10840, 60, 800, 3726, 3726, 31, 57, 21, 603, 5167, 27, 51, 1936, 505, 9, 184, 92, 31, 3746, 100, 14, 2631, 16229, 43, 807, 2437, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
I Want to know more about array linkedlist . === I'm learning c# , and i reached the array linkedlist and i stil need to know more like when I use it, how to create one how to use it I just want information . If any one know a good article , about this subject. Or if you can show me some examples with explanation. like how to creat how to add and remove and how to deal with nods and elements. thanx in advance I really enjoy asking questions around here with all the pro answering and helping
0
[ 2, 31, 259, 20, 143, 91, 88, 7718, 4727, 5739, 13, 9, 800, 3726, 3726, 31, 22, 79, 2477, 272, 5910, 13, 15, 17, 31, 664, 14, 7718, 4727, 5739, 17, 31, 13146, 376, 20, 143, 91, 101, 76, 31, 275, 32, 15, 184, 20, 1600, 53, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Windows scripting to email using TLS === I'm trying to make an SVN post-commit script that makes backups to a Gmail drive. Blat doesn't seem to support TLS. Are there any good scripting programs on windows that can send an email via TLS?
0
[ 2, 1936, 3884, 68, 20, 8517, 568, 13, 7786, 18, 800, 3726, 3726, 31, 22, 79, 749, 20, 233, 40, 13, 18, 16578, 678, 8, 960, 5130, 3884, 30, 1364, 10119, 18, 20, 21, 489, 8079, 1493, 9, 4768, 38, 1437, 22, 38, 2260, 20, 555, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Multiple mouse pointers? === Is there a way to accept input from more than one mouse separately? I'm interested in making a multi-user application and I thought it would be great if I could have 2 or more users holding wireless mice each interacting with the app individually with a separate mouse arrow. Is this something I should try to farm out to some other application/driver/os_magic? or is there a library I can use to accomplish this? Language isn't a *HUGE* deal, but C, C++, and Python are preferrable. Thanks :)
0
[ 2, 1886, 7567, 454, 445, 60, 800, 3726, 3726, 25, 80, 21, 161, 20, 3440, 6367, 37, 91, 119, 53, 7567, 10714, 60, 31, 22, 79, 3158, 19, 544, 21, 1889, 8, 16704, 3010, 17, 31, 289, 32, 83, 44, 374, 100, 31, 110, 57, 172, 54, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to assign a Gmail drive to a drive letter? === I would like to assign a drive letter to a GMail drive so that I could script some output to it. Are they any hacks to get this to work?
0
[ 2, 184, 20, 13952, 21, 489, 8079, 1493, 20, 21, 1493, 1748, 60, 800, 3726, 3726, 31, 83, 101, 20, 13952, 21, 1493, 1748, 20, 21, 489, 8079, 1493, 86, 30, 31, 110, 3884, 109, 5196, 20, 32, 9, 50, 59, 186, 11835, 18, 20, 164, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
What's the best way to check to see if a String represents an integer in Java? === I normally use the following idiom to check if a String can be converted to an integer. public boolean isInteger( String input ) { try { Integer.parseInt( input ); return true; } catch( Exception ) { return false; } } Is it just me, or does this seem a bit hackish? What's a better way?
0
[ 2, 98, 22, 18, 14, 246, 161, 20, 2631, 20, 196, 100, 21, 3724, 4719, 40, 13820, 19, 8247, 60, 800, 3726, 3726, 31, 4147, 275, 14, 249, 28380, 20, 2631, 100, 21, 3724, 92, 44, 3494, 20, 40, 13820, 9, 317, 9827, 413, 210, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Generate Linq DataContext === Does anyone know if an API exists for Linq's DataContext generator? I reflected SqlMetal.exe, but every class was marked internal. I would like to generate a datacontext .cs like sqlmetal, but from my own assembly. Thanks! James
0
[ 2, 7920, 6294, 1251, 1054, 1126, 11969, 800, 3726, 3726, 630, 1276, 143, 100, 40, 21, 2159, 5636, 26, 6294, 1251, 22, 18, 1054, 1126, 11969, 15286, 60, 31, 7037, 4444, 255, 13651, 9, 1706, 62, 15, 47, 352, 718, 23, 2739, 3117, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I remove the status bar from a UIViewController on iPhone? === I'm experimenting with the NavBar sample project for iPhone. When I tap on one of the rows in the table in the default view a new view slides in (so far so good). I want to remove the status bar at the top of the new view that slides in. How can I do this?
0
[ 2, 184, 107, 31, 4681, 14, 1782, 748, 37, 21, 13, 5661, 4725, 12898, 1252, 27, 21024, 60, 800, 3726, 3726, 31, 22, 79, 5737, 68, 29, 14, 16048, 1850, 5717, 669, 26, 21024, 9, 76, 31, 5526, 27, 53, 16, 14, 11295, 19, 14, 859, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Showing a view controller from an opengl view === I have created an iPhone application based on an OpenGL view. Now, I would like to show a ``settings'' form. Since my code runs in UIView, I have no pushViewController. How do I show a view controller on screen? Thanks!
0
[ 2, 3187, 21, 1418, 9919, 37, 40, 368, 8430, 1418, 800, 3726, 3726, 31, 57, 679, 40, 21024, 3010, 432, 27, 40, 368, 8430, 1418, 9, 130, 15, 31, 83, 101, 20, 298, 21, 13, 7, 19831, 18, 7, 505, 9, 179, 51, 1797, 1461, 19, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Querying DataColumnCollection with LINQ === I'm trying to perform a simple LINQ query on the Columns property of a DataTable: from c in myDataTable.Columns.AsQueryable() select c.ColumnName However, what I get is this: >Could not find an implementation of the query pattern for source type 'System.Linq.IQueryable'. 'Select' not found. Consider explicitly specifying the type of the range variable 'c'. How can I get the DataColumnCollection to play nice with LINQ?
0
[ 2, 25597, 68, 1054, 716, 4404, 103, 15015, 872, 29, 6294, 1251, 800, 3726, 3726, 31, 22, 79, 749, 20, 2985, 21, 1935, 6294, 1251, 25597, 27, 14, 7498, 1354, 16, 21, 1054, 5924, 45, 37, 272, 19, 51, 18768, 5924, 9, 716, 4404, 217...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Accessing AddressBook without picker or UI === I have read somewhere that Aurora Feint managed to access the Address Book without using the picker. Is it possible to iterate through all records? Aurora Feint is available on AppStore, so I assume they are using SDK with no private frameworks. Thanks!
0
[ 2, 1381, 68, 3218, 5199, 366, 2036, 106, 54, 13, 5661, 800, 3726, 3726, 31, 57, 1302, 3493, 30, 14610, 17953, 38, 1471, 20, 1381, 14, 3218, 360, 366, 568, 14, 2036, 106, 9, 25, 32, 938, 20, 32, 106, 1373, 120, 65, 742, 60, 146...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Any python libs for parsing apache config files? === Any python libs for parsing apache config files or if not python anyone aware of such thing in other languages (perl, php, java, c#)? As i'll be able to rewrite them in python.
0
[ 2, 186, 20059, 13, 8326, 18, 26, 2017, 18, 68, 17140, 13, 14093, 2816, 6488, 60, 800, 3726, 3726, 186, 20059, 13, 8326, 18, 26, 2017, 18, 68, 17140, 13, 14093, 2816, 6488, 54, 100, 52, 20059, 1276, 3854, 16, 145, 584, 19, 89, 25...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you programmatically reorder children of an ATFolder subclass? === I have Plone product that uses a custom folder type for containing a set of custom content objects. The folder type was created by subclassing BaseFolder and it has a schema with a couple of text fields. Currently, when custom objects are added to the custom folder, the objects are sorted alphabetically by their id. How can I override this behavior and allow my users to sort the custom folders manually, say through the "Contents" view?
0
[ 2, 184, 107, 42, 625, 6732, 1326, 302, 7861, 391, 16, 40, 35, 8814, 106, 972, 1898, 60, 800, 3726, 3726, 31, 57, 351, 16285, 2374, 30, 2027, 21, 5816, 19294, 1001, 26, 3503, 21, 309, 16, 5816, 2331, 3916, 9, 14, 19294, 1001, 23,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Silverlight 2 and large canvases? === I am working on an application that uses several large canvas controls (several thousand pixels across), layered on top of each other. The canvas controls themselves are completely invisible, but each contains a number of controls, mainly images. My question is, is there a recommended maximum size for a canvas, or is it purely a memory issue? And also, are we better off setting the Canvas size to (0, 0) and making use of the fact that we can happily render controls outside of the bounds of the canvas? Thanks, G
0
[ 2, 1172, 3130, 172, 17, 370, 9696, 160, 60, 800, 3726, 3726, 31, 589, 638, 27, 40, 3010, 30, 2027, 238, 370, 9696, 8671, 13, 5, 29807, 2996, 18146, 18, 464, 6, 15, 5385, 69, 27, 371, 16, 206, 89, 9, 14, 9696, 8671, 1366, 50, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Tickmark algorithm for a graph axis === I'm looking for an algorithm that places tick marks on an axis, given a range to display, a width to display it in, and a function to measure a string width for a tick mark. For example, given that I need to display between 1e-6 and 5e-6 and a width to display in pixels, the algorithm would determine that I should put tickmarks (for example) at 1e-6, 2e-6, 3e-6, 4e-6, and 5e-6. Given a smaller width, it might decide that the optimal placement is only at the even positions, i.e. 2e-6 and 4e-6 (since putting more tickmarks would cause them to overlap). A smart algorithm would give preference to tickmarks at multiples of 10, 5, and 2. Also, a smart algorithm would be symmetric around zero.
0
[ 2, 8809, 4527, 9083, 26, 21, 7210, 8577, 800, 3726, 3726, 31, 22, 79, 699, 26, 40, 9083, 30, 1489, 8809, 4872, 27, 40, 8577, 15, 504, 21, 978, 20, 3042, 15, 21, 9456, 20, 3042, 32, 19, 15, 17, 21, 1990, 20, 4058, 21, 3724, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Calling a WSE web-service though a proxy === I'm using Web Services Enhancements 3.0 to call a web-service from an ASP.NET application written in C# with Visual Studio 2005. I can call the web-service in Internet Explorer if I change the network connection settings to use a specific SOCKS5 proxy but from the .ASPX page I get an error message that tells me that I should be using the proxy. Do you know how to configure the web-service client to use the proxy? Thanks
0
[ 2, 2555, 21, 619, 870, 2741, 8, 11449, 362, 21, 27188, 800, 3726, 3726, 31, 22, 79, 568, 2741, 687, 19415, 18, 203, 9, 387, 20, 645, 21, 2741, 8, 11449, 37, 40, 28, 306, 9, 2328, 3010, 642, 19, 272, 5910, 29, 3458, 1120, 812, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
DRYing up object instantiation in C# === This code: public class WidgetPlatform { public Widget LeftmostWidget { get; set; } public Widget RightmostWidget { get; set; } public String GetWidgetNames() { return LeftmostWidget.Name + " " + RightmostWidget.Name; } } doesn't contain any repetition worth worrying about, but it isn't particularly robust. Because the Widgets aren't null-checked, we're leaving an opening for a bug. We could do a null check, but that feels like work. Here's what I really want: public class WidgetPlatform { [Required] public Widget LeftmostWidget { get; set; } [Required] public Widget RightmostWidget { get; set; } public String GetWidgetNames() { return LeftmostWidget.Name + " " + RightmostWidget.Name; } } Ideally, it would cause a compile error (the best sort of error) if the object was instantiated without setting the Widgets, but that seems like a tall order. Is there a way to make this syntax work that at least throws an error on instantiation? There's a (relatively) obvious way to do it with reflection if all of the null-checked objects inherit from the same type, but without multiple inheritance that will get ugly pretty fast.
0
[ 2, 21473, 71, 3095, 6322, 49, 857, 19, 272, 5910, 800, 3726, 3726, 48, 1797, 45, 317, 718, 4807, 43, 3060, 27035, 13, 1, 317, 4807, 43, 3060, 225, 4630, 3976, 43, 3060, 13, 1, 164, 73, 309, 73, 13, 1, 317, 4807, 43, 3060, 193,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SQL - Table Design - DateCreated and DateUpdated columns === For my application there are several entity classes, User, Customer, Post, and so on I'm about to design the database and I want to store the date when the entities were created and updated. This is where it gets tricky. Sure one option is to add created_timestamp and update_timestamp columns for each of the entity tables but that isn't that redudant? Another possibility could be to create a log table that stores this information, and it could be made to contain keep track of updates for **any** entity. Any thoughts? I'm leaning on implementing the latter.
0
[ 2, 4444, 255, 13, 8, 859, 704, 13, 8, 1231, 18475, 17, 1231, 576, 43, 1669, 7498, 800, 3726, 3726, 26, 51, 3010, 80, 50, 238, 9252, 2684, 15, 4155, 15, 7705, 15, 678, 15, 17, 86, 27, 31, 22, 79, 88, 20, 704, 14, 6018, 17, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to disable HTML encoding when using Context in django === In my django application I am using a template to construct email body, one of the parameters is url, note there are two parametes separated by ampersand in the url. <html> <pre> t = loader.get_template("sometemplate") c = Context({ 'foo': 'bar', 'url': 'http://127.0.0.1/test?a=1&b=2', }) print t.render(c) </pre> </html> After rendering it produces: http://127.0.0.1/test?a=1&amp;amp;b=2 Note the ampersand is HTML encoded as "&amp;amp;". One way around the problem is to pass each parameter separately to my template and construct the url in the template, however I'd like to avoid doing that. Is there a way to disable HTML encoding of context parameters or at the very least avoid encoding of ampersands?
0
[ 2, 184, 20, 1460, 579, 13, 15895, 19608, 76, 568, 4141, 19, 3857, 14541, 800, 3726, 3726, 19, 51, 3857, 14541, 3010, 31, 589, 568, 21, 22894, 20, 6960, 8517, 358, 15, 53, 16, 14, 12905, 25, 287, 6362, 15, 1945, 80, 50, 81, 2258,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ASP.NET MVC Account Controller usage guidelines? === another newbie question on ASP.NET MVC ( since I'm don't normally do web apps... ) I'm looking at the MVC account controller.... it seems to be from asp.net? Is there any good background information on how to use it? Can you map it to a user database table? or is it better to simply role your own user management? How do you make use of it in MVC to restrict what pages a logged in user can view? Do you have to roll all of that on your own? any links to anything that might help me? or books that might be useul? ( I have safari books online so have access to a lot of books...)
0
[ 2, 28, 306, 9, 2328, 307, 8990, 2176, 9919, 7514, 12629, 60, 800, 3726, 3726, 226, 78, 5893, 1301, 27, 28, 306, 9, 2328, 307, 8990, 13, 5, 179, 31, 22, 79, 221, 22, 38, 4147, 107, 2741, 4865, 18, 9, 9, 9, 13, 6, 31, 22, 79...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you handle oncut, oncopy, and onpaste in jQuery? === The [jQuery documentation][1] says the library has built-in support for the following events: blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, and error. I need to handle cut, copy, and paste events. How best to do that? FWIW, I only need to worry about WebKit (lucky me!). [1]: http://docs.jquery.com/Events/bind#typedatafn
0
[ 2, 184, 107, 42, 3053, 27, 4118, 15, 27, 19625, 15, 17, 27, 19802, 62, 19, 487, 8190, 93, 60, 800, 3726, 3726, 14, 636, 728, 8190, 93, 13945, 500, 2558, 165, 500, 898, 14, 1248, 63, 392, 8, 108, 555, 26, 14, 249, 963, 45, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I find all the public fields of an object in C#? === I'm constructing a method to take in an ArrayList(presumably full of objects) and then list all the fields(and their values) for each object in the ArrayList. Currently my code is as follows: public static void ListArrayListMembers(ArrayList list) { foreach (Object obj in list) { Type type = obj.GetType(); string field = type.GetFields().ToString(); Console.WriteLine(field); } } Of course, I understand the immediate issue with this code: if it worked it'd only print one field per object in the ArrayList. I'll fix this later - right now I'm just curious how to get all of the public fields associated with an object.
0
[ 2, 184, 92, 31, 477, 65, 14, 317, 2861, 16, 40, 3095, 19, 272, 5910, 60, 800, 3726, 3726, 31, 22, 79, 18660, 21, 2109, 20, 247, 19, 40, 7718, 5739, 5, 11973, 723, 4801, 503, 16, 3916, 6, 17, 94, 968, 65, 14, 2861, 5, 290, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Where are Outlook's mail accounts settings stored and how to read them? === If OL is installed on a PC, I need to read mail account settings using .NET but without using the OL object model.
0
[ 2, 113, 50, 19837, 22, 18, 4216, 5310, 12410, 8214, 17, 184, 20, 1302, 105, 60, 800, 3726, 3726, 100, 6304, 25, 4066, 27, 21, 5168, 15, 31, 376, 20, 1302, 4216, 2176, 12410, 568, 13, 9, 2328, 47, 366, 568, 14, 6304, 3095, 1061, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
What is the optimal algorithm design for a water-saving urinal? === At work, we have one of those nasty communal urinals. There is no flush handle. Rather, it has a motion sensor that sometimes triggers when you stand in front of it and sometimes doesn't. When it triggers, a tank fills, which when full is used to flush the urinal. In my many trips before this nastraption, I have pondered both what the algorithm is the box uses to determine when to turn on and what would be the optimal algorithm, in terms of conserving water while still maintaining a relatively pleasant urinal experience. I'll share my answer once folks have had a chance to share their ideas.
0
[ 2, 98, 25, 14, 17586, 9083, 704, 26, 21, 308, 8, 25102, 13, 3594, 5025, 60, 800, 3726, 3726, 35, 170, 15, 95, 57, 53, 16, 273, 13077, 16576, 13, 3594, 5025, 18, 9, 80, 25, 90, 15017, 3053, 9, 864, 15, 32, 63, 21, 2422, 14865...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Where do you find templates useful === At my workplace, we tend to use **iostream**, **string**, **vector**, **map**, and the odd **algorithm** or two. We haven't actually found many situations where template techniques were a best solution to a problem. What I am looking for here are ideas, and optionally sample code that shows how you used a template technique to create a new solution to a problem that you encountered in real life. As a bribe, expect an up vote for your answer.
0
[ 2, 113, 107, 42, 477, 22894, 18, 4811, 800, 3726, 3726, 35, 51, 16932, 15, 95, 5480, 20, 275, 13, 1409, 1963, 11260, 1409, 15, 13, 1409, 11130, 1409, 15, 13, 1409, 28033, 1409, 15, 13, 1409, 15022, 1409, 15, 17, 14, 4210, 13, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Vim Configure Line Number Coloring === I'm looking for a way to configure the color used for line numbering (as in: `:set nu`) in Vim. The default on most platforms seems to be yellow (which is also used for some highlighted tokens). I would *like* to color the line numbers a dim gray; somewhere in the vicinity of `#555`. I'm not picky though, any subdued color would be acceptable.
0
[ 2, 1790, 79, 1065, 15951, 293, 234, 1665, 68, 800, 3726, 3726, 31, 22, 79, 699, 26, 21, 161, 20, 1065, 15951, 14, 1665, 147, 26, 293, 18404, 13, 5, 472, 19, 45, 13, 1, 45, 3554, 3152, 1, 6, 19, 1790, 79, 9, 14, 12838, 27, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Are there any emacs or vim editors with code completion plugins for C#? === It would be nice if it did both a list of methods to choose from and the list of potential input parameters. This was done for powershell and I was curious if there was any similar functionality implemented for emacs or vim?
0
[ 2, 50, 80, 186, 13, 62, 6893, 18, 54, 1790, 79, 12149, 29, 1797, 5392, 10922, 108, 18, 26, 272, 5910, 60, 800, 3726, 3726, 32, 83, 44, 2210, 100, 32, 144, 156, 21, 968, 16, 3195, 20, 3538, 37, 17, 14, 968, 16, 2222, 6367, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
.NET Microframework SDK with VS 2008 === I am trying to get started developing using the .NET Micro Framework but appear to have hit a road block. I am using Visual Studio 2008 and it will not let me install the SDK because I do not have Visual Studio 2005. I downloaded the SDK from [this][1] link. I know this is not truly a programming question but it is definitely holding me back from getting started. Thank you for your help. [1]: http://www.microsoft.com/downloads/details.aspx?FamilyId=EB0EF2A6-03E2-402C-89A4-A636BD0080C5&displaylang=en
0
[ 2, 13, 9, 2328, 2899, 8361, 3783, 13, 18, 43, 197, 29, 4611, 570, 800, 3726, 3726, 31, 589, 749, 20, 164, 373, 3561, 568, 14, 13, 9, 2328, 2899, 6596, 47, 1893, 20, 57, 770, 21, 383, 1921, 9, 31, 589, 568, 3458, 1120, 570, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to count unique records and get number of these uniques in table using SQL? === Imagine I have table like this: **id:Product:shop_id** 1:Basketball:41 2:Football:41 3:Rocket:45 4:Car:86 5:Plane:86 Now, this is an example of large internet mall, where there are shops which sell to one customer, so customer can choose more products from each shop and buy it in one basket. However, I am not sure if there is any SQL syntax which allows me to simply get unique shop_ids and total number of those shops' products in customer basket. So I'd get something like: Shop 41 has 2 products Shop 45 one product Shop 86 two product I can make SQL queries to scoop through table to make some kind of ['shop_id']['number_of_products'] array variable that would store all products' shop_ids, then "unique them" - up and count how many times I had to cut one more shop_id out to have some remaining but that just seems as a lot of useless scripting. If you got some nice and neat idea, please, let me know.
0
[ 2, 184, 20, 2468, 2619, 742, 17, 164, 234, 16, 158, 2619, 18, 19, 859, 568, 4444, 255, 60, 800, 3726, 3726, 4382, 31, 57, 859, 101, 48, 45, 13, 1409, 1340, 45, 14086, 45, 18, 5347, 1, 1340, 1409, 6352, 6093, 7572, 3610, 23007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
prototypes versus classes === Steve Yeggie recently posted an [interesting blog post][1] on what he calls the universal design pattern. In there he details using prototypes as a modelling tool, instead of classes. I like the way this introduces less coupling compared to inheritance. But that is something one can get with classes as well, by implementing classes in terms of other classes, instead of inheritance. Does anyone else have success stories of using prototypes, and can maybe help explain where using prototypes is advantageous compared to classes. I guess it comes down to static modelling versus dynamic modelling, but more examples would be very welcome. [1]: http://steve-yegge.blogspot.com/2008/10/universal-design-pattern.html
0
[ 2, 7063, 18, 5706, 2684, 800, 3726, 3726, 2228, 3617, 19086, 62, 1989, 6054, 40, 636, 16208, 68, 8146, 678, 500, 2558, 165, 500, 27, 98, 24, 3029, 14, 4172, 704, 3732, 9, 19, 80, 24, 3289, 568, 7063, 18, 28, 21, 23089, 5607, 15,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How does the JVM handle a primitive "long", which is 64bits, on a 32bit processor? === ###How does the JVM handle a primitive "long", which is 64bits, on a 32bit processor? <br> I hope my Question is phrased sensibly... Also, does it somehow utilise mulitple cores in parallel when on a Dual-Core 32bit machine?
0
[ 2, 184, 630, 14, 487, 20147, 3053, 21, 11473, 13, 7, 2701, 7, 15, 56, 25, 4384, 3326, 18, 15, 27, 21, 2512, 3326, 14762, 60, 800, 3726, 3726, 6926, 5910, 5910, 1544, 630, 14, 487, 20147, 3053, 21, 11473, 13, 7, 2701, 7, 15, 56...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I change the animation style of a UIViewController in an iPhone app? === I'm currently displaying a UIViewController like this: [[self navigationController] presentModalViewController:modalViewController animated:YES]; and hiding it like this: [self.navigationController dismissModalViewControllerAnimated:YES]; The animation is "slide up from the bottom"... then slide back down. How can I change the animation style? Can I made it fade in/out? Cheers!
0
[ 2, 184, 92, 31, 753, 14, 6236, 1034, 16, 21, 13, 5661, 4725, 12898, 1252, 19, 40, 21024, 4865, 60, 800, 3726, 3726, 31, 22, 79, 871, 17418, 21, 13, 5661, 4725, 12898, 1252, 101, 48, 45, 636, 2558, 8411, 8368, 12898, 1252, 500, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
.net/exchange: add email addresses dynamically? === I'm building a .NET application where I want to dynamically add an email address for users when they create an account, so that they can email themselves things to their account and see it in the app. The email address would be something like [account_name]@[site.com]. Is there a good reference URL to read which explains how to do this? I'm in a ASP.NET/Exchange environment, but I'm willing to read articles dealing with other mail servers.
0
[ 2, 13, 9, 2328, 118, 1706, 16229, 45, 3547, 8517, 12636, 7782, 1326, 60, 800, 3726, 3726, 31, 22, 79, 353, 21, 13, 9, 2328, 3010, 113, 31, 259, 20, 7782, 1326, 3547, 40, 8517, 3218, 26, 3878, 76, 59, 1600, 40, 2176, 15, 86, 30...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I change the background color of a resizable handle of a JQuery UI Dialog? === You'd think it would be easy, but keep reading. I can change many of the styles associated with a resizable JQuery Dialog, but not the handles. The code below isolates the problem. Why does the handle disappear entirely? There must be some logic I'm interfering with in ui.resizable.js, but I don't see it. <script type="text/javascript" language="JavaScript" src="jquery126.js"></script> <script type="text/javascript" language="JavaScript" src="ui/ui.core.js"></script> <script type="text/javascript" language="JavaScript" src="ui/ui.dialog.js"></script> <script type="text/javascript" language="JavaScript" src="ui/ui.resizable.js"></script> <script type="text/javascript" language="JavaScript" src="ui/ui.draggable.js"></script> <script> $(document).ready(foo); function foo() { $("#dlg").dialog() } </script> <style type="text/css"> .ui-resizable-n { background: green; } </style> <div id=dlg title="my title">this is<br>my text</div>
0
[ 2, 184, 107, 31, 753, 14, 2395, 1665, 16, 21, 10719, 3186, 579, 3053, 16, 21, 487, 8190, 93, 13, 5661, 28223, 60, 800, 3726, 3726, 42, 22, 43, 277, 32, 83, 44, 2010, 15, 47, 643, 1876, 9, 31, 92, 753, 151, 16, 14, 6443, 1598...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is metaprogramming possible in C#? === In particular, would it be possible to have **code similar to this c++ code executed at compile time in c#**? template <int N> struct Factorial { enum { value = N * Factorial<N - 1>::value }; }; template <> struct Factorial<0> { enum { value = 1 }; }; // Factorial<4>::value == 24 // Factorial<0>::value == 1 void foo() { int x = Factorial<4>::value; // == 24 int y = Factorial<0>::value; // == 1 }
0
[ 2, 25, 7618, 19746, 3863, 938, 19, 272, 5910, 60, 800, 3726, 3726, 19, 1498, 15, 83, 32, 44, 938, 20, 57, 13, 1409, 9375, 835, 20, 48, 272, 20512, 1797, 5557, 35, 26561, 85, 19, 272, 5910, 1409, 60, 22894, 13, 1, 6391, 13, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Oracle: how to UPSERT (update or insert into a table?) === The UPSERT operation either updates or inserts a row in a table, depending if the table already has a row that matches the data: if table t has a row exists that has key X: update t set mystuff... where mykey=X else insert into t mystuff... Since Oracle doesn't have a specific UPSERT statement, what's the best way to do this?
0
[ 2, 15759, 45, 184, 20, 71, 18, 6767, 13, 5, 576, 8209, 54, 14692, 77, 21, 859, 60, 6, 800, 3726, 3726, 14, 71, 18, 6767, 1453, 694, 16779, 54, 14692, 18, 21, 3131, 19, 21, 859, 15, 4758, 100, 14, 859, 614, 63, 21, 3131, 30, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What knowledge do you need to create a patch for your game or application? === I've always been mystified how software vendors can ship their application or game, and then later provide a different set of executables that change the behaviors of the previous build. How is this done? Do the original application and the patch have to adhere to some kind of rule? Or does the patch crawl into the original executable and change its assembly information? Would that require knowledge of the binary file to the byte level?
0
[ 2, 98, 1918, 107, 42, 376, 20, 1600, 21, 7331, 26, 154, 250, 54, 3010, 60, 800, 3726, 3726, 31, 22, 195, 550, 74, 51, 384, 4462, 184, 2306, 19787, 92, 995, 66, 3010, 54, 250, 15, 17, 94, 138, 1181, 21, 421, 309, 16, 1396, 17...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Does partial page caching exist outside of asp.net? === I use partial page caching with ASP.NET. I find it to be particularly helpful with large volume sites, where I need only certain sections of a page to cache. Do other web application platforms have this type of technology?
0
[ 2, 630, 7284, 2478, 1658, 7192, 3182, 719, 16, 28, 306, 9, 2328, 60, 800, 3726, 3726, 31, 275, 7284, 2478, 1658, 7192, 29, 28, 306, 9, 2328, 9, 31, 477, 32, 20, 44, 1653, 15600, 29, 370, 2310, 3259, 15, 113, 31, 376, 104, 1200...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[Javascript] How to combine setInterval and setTimeout? === I am trying to call a setTimeout from within a setInterval callback: function callback() { //do stuff //... //now wait 2 secs then call someFunction setTimeout("someFunction();", 2000); } setInterval("callback();", 10000); setInterval works as expected but setTimeout call is failing.
0
[ 2, 636, 1004, 1385, 8741, 500, 184, 20, 12287, 309, 6280, 3377, 17, 309, 891, 1320, 60, 800, 3726, 3726, 31, 589, 749, 20, 645, 21, 309, 891, 1320, 37, 363, 21, 309, 6280, 3377, 645, 1958, 45, 1990, 645, 1958, 5, 6, 13, 1, 128...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Does WPF have an easy way to display a navigable series of images? === I'm making my first WPF application, and its purpose is to generate 6 images from some data. Ideally I'd like to display them in the window, with little "forward" and "back" buttons, and a text indicator for where we are in the image-stack. Kind of like a "mini Windows Photo Gallery." I think the way to do this might be some kind of customization of the `ListView` styles, but there was also the possibility of using `Frame` with custom WPF pages or something? I dunno, it seems like there should be a canonical way of doing this. My current best approach is to customize `ListView` following the guidelines of one of my WPF books. If someone's already done this, or if there's a better way, please let me know!
0
[ 2, 630, 619, 7721, 57, 40, 2010, 161, 20, 3042, 21, 29076, 231, 16, 3502, 60, 800, 3726, 3726, 31, 22, 79, 544, 51, 64, 619, 7721, 3010, 15, 17, 82, 2131, 25, 20, 7920, 400, 3502, 37, 109, 1054, 9, 5628, 102, 31, 22, 43, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What's your favorite feature in .NET? === There are lots of features in .NET. Some language related, others will be related to the framework itself and having the ability to access/do/perform xyz. So for fun, I was wondering what the *community's* favorite features in **.NET or ASP.NET** include? *This is a community wiki question as its mainly for polling purposes to see what kind of a response there is for all aspects of **.NET*** Be specific, try to include something about it like a code sample.
0
[ 2, 98, 22, 18, 154, 3839, 1580, 19, 13, 9, 2328, 60, 800, 3726, 3726, 80, 50, 7503, 16, 967, 19, 13, 9, 2328, 9, 109, 816, 1597, 15, 654, 129, 44, 1597, 20, 14, 6596, 1145, 17, 452, 14, 2165, 20, 1381, 118, 537, 118, 1432, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why is PHP PDO DSN a different format for MySQL versus PostgreSQL? === When I connect to a MySQL database using PDO, the way I need to connect is: $pdoConnection = new PDO("mysql:host=hostname;dbname=databasename",user,password); But, for PostgreSQL, the DSN is more standard (IMO): $pdoConnection = new PDO("pgsql:host=hostname;dbname=databasename;user=username;password=thepassword"); Is there any reason why MySQL cannot use a single string? Or is this just because of the versions I am using (PHP 5.2, MySQL 5.0, PostgreSQL 8.1)?
0
[ 2, 483, 25, 13, 26120, 351, 537, 13, 43, 18, 103, 21, 421, 2595, 26, 51, 18, 22402, 5706, 678, 6879, 18, 22402, 60, 800, 3726, 3726, 76, 31, 6379, 20, 21, 51, 18, 22402, 6018, 568, 351, 537, 15, 14, 161, 31, 376, 20, 6379, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Does "std::size_t" make sense in C++? === In some code I've inherited, I see frequent use of `size_t` with the `std` namespace qualifier. For example: std::size_t n = sizeof( long ); It compiles and runs fine, of course. But it seems like bad practice to me (perhaps carried over from C?). Isn't it true that `size_t` is built into C++ and therefore in the global namespace? After all no header file includes are needed to use `size_t` in C++.
0
[ 2, 630, 13, 7, 384, 43, 45, 45, 10454, 1, 38, 7, 233, 1259, 19, 272, 20512, 60, 800, 3726, 3726, 19, 109, 1797, 31, 22, 195, 7179, 15, 31, 196, 5408, 275, 16, 13, 1, 10454, 1, 38, 1, 29, 14, 13, 1, 384, 43, 1, 204, 5582,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How is the photoshop cutout filter implemented? === Photoshop has a lot of cool [artistic filters](http://alanwho.com/photoshop/photoshop-artistic-filters/), and I'd love to understand the underlying algorithms. One algorithm that's particularly interesting is the Cutout filter (number 2 at the link above). It has three tunable parameters, Number of Levels, Edge Simplicity, and Edge Fidelity. Number of levels appears to drive a straightforward posterization algorithm, but what the other sliders do technically eludes me. I would think that they're doing something related to Vornoi diagrams or k-means partitionion, but poking around on wikipedia hasn't resulted in anything that maps obviously to what Photoshop is doing, especially considering how fast the filter renders itself. Is there any source for technical descriptions of the Photoshop filters? Alternatively, do you have any thoughts about how this particular filter might be implemented?
0
[ 2, 184, 25, 14, 7064, 5347, 1077, 1320, 11945, 6807, 60, 800, 3726, 3726, 7064, 5347, 63, 21, 865, 16, 2700, 636, 2900, 3771, 21062, 500, 5, 21127, 6903, 17095, 1924, 9, 960, 118, 25445, 18, 5347, 118, 25445, 18, 5347, 8, 2900, 37...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to best visualize a "permission Matrix" in an UML class diagram? === For the sake of simplicity: There is a permission based system in place with different kinds of user levels and actions (think: UNIX file system permissions) What would be the best approach to visualize this in UML?
0
[ 2, 184, 20, 246, 3458, 2952, 21, 13, 7, 1432, 12385, 8187, 7, 19, 40, 13, 723, 255, 718, 14161, 60, 800, 3726, 3726, 26, 14, 8132, 16, 20595, 45, 80, 25, 21, 5572, 432, 329, 19, 209, 29, 421, 8623, 16, 4155, 2216, 17, 3078, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Getting a collection of index values using a LINQ query === Is there a better way to do this? string[] s = {"zero", "one", "two", "three", "four", "five"}; var x = s .Select((a,i) => new {Value = a, Index = i}) .Where(b => b.Value.StartsWith("t")) .Select(c => c.Index); i.e. I'm looking for a more efficient or more elegant way to get the positions of the items matching the criteria.
0
[ 2, 1017, 21, 1206, 16, 4348, 4070, 568, 21, 6294, 1251, 25597, 800, 3726, 3726, 25, 80, 21, 574, 161, 20, 107, 48, 60, 3724, 2558, 500, 13, 18, 800, 13, 1, 7, 15938, 7, 15, 13, 7, 849, 7, 15, 13, 7, 3734, 7, 15, 13, 7, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to reset svn-properties according to new SVN config? === Recently I made a bunch of changes to my local svn config file. Mainly I corrected svn:mime-type properties of about 15 different file types. Now I need reset all previously checked in files according to this new configuration. SVN seems to trigger auto-prop only for ADDs and IMPORTs. So how do I do this without going individually and specifying new mime types? Thanks! - dt
0
[ 2, 184, 20, 23422, 13, 18, 16578, 8, 10890, 106, 3915, 496, 20, 78, 13, 18, 16578, 13, 14093, 2816, 60, 800, 3726, 3726, 1989, 31, 117, 21, 7653, 16, 1693, 20, 51, 375, 13, 18, 16578, 13, 14093, 2816, 3893, 9, 2011, 31, 15642, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I insert a linebreak where the cursor is without entering into insert mode in Vim? === Is possible to insert a linebreak where the cursor is in Vim without entering into insert mode? Here's an example ([x] means cursor is on x): if (some_condition) {[ ]return; } Occasionally, I might want to enter some more code. So I'd press 'i' to get into insert mode, press enter to insert the linebreak and then delete the extra space. Next, I'd enter normal mode and position the cursor before the closing brace and then do the same thing to get it on its own line. I've been doing this a while, but there's surely a better way to do it?
0
[ 2, 184, 107, 31, 14692, 21, 293, 12008, 113, 14, 29588, 25, 366, 4604, 77, 14692, 3740, 19, 1790, 79, 60, 800, 3726, 3726, 25, 938, 20, 14692, 21, 293, 12008, 113, 14, 29588, 25, 19, 1790, 79, 366, 4604, 77, 14692, 3740, 60, 235...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to interpret the memory usage figures? === Can someone explain this in a practical way? Sample represents usage for one, low-traffic Rails site using Nginx and 3 Mongrel clusters. I ask because I am aiming to learn about page caching, wondering if these figures have significant meaning to that process. Thank you. Great site! me@vps:~$ free -m total used free shared buffers cached Mem: 512 506 6 0 15 103 -/+ buffers/cache: 387 124 Swap: 1023 113 910
0
[ 2, 184, 20, 11584, 14, 1912, 7514, 2957, 60, 800, 3726, 3726, 92, 737, 3271, 48, 19, 21, 5713, 161, 60, 5717, 4719, 7514, 26, 53, 15, 708, 8, 1939, 2460, 596, 2240, 18, 689, 568, 13, 2723, 108, 396, 17, 203, 21028, 7256, 14497, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Pushing an existing Git repository to Github only sends about half the commits? === I have a local Git repository I've been developing under for a few days: it has eighteen commits so far. Tonight, I created a private Github repository I was hoping to push it to; however, when I did so, it only ended up pushing eight of the eighteen commits to Github. I deleted the Github repo and retried, with the same result. Any thoughts on why this might be happening? I've done this procedure before without a few times successfully, so I'm a bit stumped.
0
[ 2, 5076, 40, 3149, 13, 10404, 24869, 20, 13, 10404, 20926, 104, 11350, 88, 519, 14, 9686, 18, 60, 800, 3726, 3726, 31, 57, 21, 375, 13, 10404, 24869, 31, 22, 195, 74, 3561, 131, 26, 21, 310, 509, 45, 32, 63, 6787, 9686, 18, 86...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why do some installers need to restart the computer before you run the program? === I'm fairly new to deploying desktop applications, so this is the first time I'm building an installer for my software. Currently, the first time I run my software after installing it, it crashes. After that, it runs fine. I'm still in the process of debugging this issue, but I've noticed that a reboot immediately after installing and before running the software seems to fix this crash. What are common reasons that some installers ask you to reboot before running the software? Also, why do some installers need to restart before finishing the installation? Thanks in advance!
0
[ 2, 483, 107, 109, 16146, 445, 376, 20, 22767, 14, 1428, 115, 42, 485, 14, 625, 60, 800, 3726, 3726, 31, 22, 79, 6647, 78, 20, 17617, 68, 17404, 3767, 15, 86, 48, 25, 14, 64, 85, 31, 22, 79, 353, 40, 16146, 106, 26, 51, 2306,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Where can I find JQuery UI themes besides "flora"? === Is there a repository for JQuery UI themes?
0
[ 2, 113, 92, 31, 477, 487, 8190, 93, 13, 5661, 6876, 3410, 13, 7, 12355, 58, 7, 60, 800, 3726, 3726, 25, 80, 21, 24869, 26, 487, 8190, 93, 13, 5661, 6876, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Rails generator m.directory returns can't convert nil into String === I have written this generator code but it returns 'can't convert nil into String' when I call m.directory inside the manifest. Anyone know what had happened? class AuthGenerator < Rails::Generator::NamedBase attr_reader :user_class_name def initialize(runtime_args, runtime_options={}) @user_class_name="User" @controller_class_name="AccountController" @user_class_file_name="#{@user_class_name}.rb" @controller_class_file_name="#{@controller_class_name}.rb" end def manifest record do |m| m.class_collisions @controller_class_name, @user_class puts @user_class_name m.directory File.join('app/models', @user_class_name) # m.directory File.join('app/controllers', @controller_class_file_name) =begin m.directory 'lib' m.directory 'app/helpers' m.directory 'app/views' m.directory 'test/functional' m.directory 'test/unit' m.template "#{@user_class_name.downcase}.rb", "app/models" =end end end end
0
[ 2, 2240, 18, 15286, 307, 9, 10197, 93, 4815, 92, 22, 38, 8406, 1781, 255, 77, 3724, 800, 3726, 3726, 31, 57, 642, 48, 15286, 1797, 47, 32, 4815, 13, 22, 1245, 22, 38, 8406, 1781, 255, 77, 3724, 22, 76, 31, 645, 307, 9, 10197, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What are the coolest examples of metaprogramming that you've seen in C++? === What are the coolest examples of metaprogramming that you've seen in C++? What are some practical uses of metaprogramming that you've seen in C++?
0
[ 2, 98, 50, 14, 2700, 1430, 3770, 16, 7618, 19746, 3863, 30, 42, 22, 195, 541, 19, 272, 20512, 60, 800, 3726, 3726, 98, 50, 14, 2700, 1430, 3770, 16, 7618, 19746, 3863, 30, 42, 22, 195, 541, 19, 272, 20512, 60, 98, 50, 109, 571...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
python properties and inheritance === I have a base class with a property which (the get method) I want to overwrite in the subclass. My first thought was something like: class Foo(object): def _get_age(self): return 11 age = property(_get_age) class Bar(Foo): def _get_age(self): return 44 This does not work (subclass bar.age returns 11). I found a solution with an lambda expression which works: age = property(lambda self: self._get_age()) So is this the right solution for using properties and overwrite them in a subclass, or are there other preferred ways to do this?
0
[ 2, 20059, 3704, 17, 13852, 800, 3726, 3726, 31, 57, 21, 1000, 718, 29, 21, 1354, 56, 13, 5, 124, 164, 2109, 6, 31, 259, 20, 84, 23716, 19, 14, 972, 1898, 9, 51, 64, 289, 23, 301, 101, 45, 718, 4310, 111, 5, 23793, 6, 45, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
RAID vs LVM === If I were to consider between LVM (Logical Volume Management) and RAID, would I have to choose between the two, or would they go hand in hand? Which one would should I choose over the other (comparison would be great)
2
[ 2, 6847, 4611, 13, 8916, 79, 800, 3726, 3726, 100, 31, 46, 20, 3563, 128, 13, 8916, 79, 13, 5, 14126, 2310, 1097, 6, 17, 6847, 15, 83, 31, 57, 20, 3538, 128, 14, 81, 15, 54, 83, 59, 162, 224, 19, 224, 60, 56, 53, 83, 378, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
Redirect to controller (but with a different master) using a catchall wildcard === I have a problem whereby I want to display a view differently (a different master page), depending on where it came from, but don't know where to start... I have several routes which catch various different types of urls that contain different structures. In the code snippet below, I have a product route, and then I have a partner site route which could also go to a product page, but let's say that this partner is Pepsi, and they want their branding on the master page, rather than our own default styling. Lets say I go to <a href="http://mysite.com/products/cola.htm">products/cola.htm</a>. This should go to the same url as <a href="http://mysite.com/partners/pepsi/products/cola.htm">partners/pepsi/products/cola.htm</a>, and the PartnerRedirect would be able to handle the url based on the wildcard, by translating the url wildcard (in this case, "products/cola.htm") into a controller action, and forward the user on, (but simply change the master page in the view). routes.MapRoute( "Product", "products/{product}.htm", new { controller = "Product", action = "ShowProduct" } ); routes.MapRoute( "ProductReview", "products/{product}/reviews.htm", new { controller = "Product", action = "ShowProductReview" } ); routes.MapRoute( "Partner", "partners/{partner}/{*wildcard}", new { controller = "Partners", action = "PartnerRedirect" } ); Is this possible? And if so, how? Many thanks in advance.
0
[ 2, 302, 14706, 20, 9919, 13, 5, 811, 29, 21, 421, 1129, 6, 568, 21, 2949, 1233, 23003, 800, 3726, 3726, 31, 57, 21, 1448, 15630, 31, 259, 20, 3042, 21, 1418, 12670, 13, 5, 58, 421, 1129, 2478, 6, 15, 4758, 27, 113, 32, 281, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can I use subversion on my home computer? === Related to: [Suggestions please for a home version control system][1] and [Best Subversion clients for Windows Vista (64bit)][2]. But different. This is more of a request to learn how to set up subversion at home. As I just completed the process, I will share my answer below. Sweeet. It's free and it's easy. [1]: http://stackoverflow.com/questions/218507/suggestions-please-for-a-home-version-control-system [2]: http://stackoverflow.com/questions/108/best-subversion-clients-for-windows-vista-64bit
0
[ 2, 92, 31, 275, 972, 10898, 27, 51, 213, 1428, 60, 800, 3726, 3726, 1597, 20, 45, 636, 18, 21606, 1430, 5757, 2247, 26, 21, 213, 615, 569, 329, 500, 2558, 165, 500, 17, 636, 4936, 972, 10898, 7421, 26, 1936, 13520, 13, 5, 3470, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Code Golf: Factorials === Since the palindrome code golf was a big hit, here is one that doesn't rely on built in functions. What is the shortest (in characters) way to write a factorial function?
0
[ 2, 1797, 4034, 45, 3932, 2815, 18, 800, 3726, 3726, 179, 14, 4370, 108, 22264, 1797, 4034, 23, 21, 580, 770, 15, 235, 25, 53, 30, 1437, 22, 38, 12139, 27, 392, 19, 3719, 9, 98, 25, 14, 23576, 13, 5, 108, 1766, 6, 161, 20, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How do you handle bandwidth billing on shared servers in apache? === What solutions do you have in place for handling bandwidth billing for your vhosts on a shared environment in apache? If you are using log parsing, does your solution scale well when the logs become very very large? Anyone using any sort of module out there for this?
0
[ 2, 184, 107, 42, 3053, 23392, 1071, 68, 27, 2592, 17595, 19, 17140, 60, 800, 3726, 3726, 98, 6776, 107, 42, 57, 19, 209, 26, 7988, 23392, 1071, 68, 26, 154, 566, 11694, 18, 27, 21, 2592, 2307, 19, 17140, 60, 100, 42, 50, 568, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
WPF databinding/validation for URIs? === My current setup binds the `Text` property of my `TextBox` to a certain `Uri` object. I'd love to use WPF's inbuilt validation to detect invalid URIs, and proceed from there. But this doesn't seem to be working? I would imagine that it would throw an exception if I entered, e.g., "aaaa" as a URI. Thus, triggering my current setup, which is supposed to detect exceptions like so: <TextBox Grid.Column="1" Name="txtHouseListFile" DockPanel.Dock="Right" Margin="3"> <TextBox.Text> <Binding Source="{StaticResource Settings}" Path="Default.HouseListFile" Mode="TwoWay"> <Binding.ValidationRules> <ExceptionValidationRule /> </Binding.ValidationRules> </Binding> </TextBox.Text> </TextBox> Then I would imagine I could check the various Validation properties, like so? Validation.GetHasError(this.txtHouseListFile) But, this appears to not work. Maybe it doesn't throw exceptions when trying to convert? Or maybe my setup's wrong? Corrections to either would be great.
0
[ 2, 619, 7721, 1054, 22260, 118, 18506, 43, 857, 26, 13, 3594, 18, 60, 800, 3726, 3726, 51, 866, 18161, 10193, 18, 14, 13, 1, 11969, 1, 1354, 16, 51, 13, 1, 11969, 5309, 1, 20, 21, 1200, 13, 1, 3594, 1, 3095, 9, 31, 22, 43, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Google Chrome and Streaming HTTP connections? === Google chrome doesn't behave the same as other browsers when encountering this nugget: <?php while (true) { echo "<script type='text/javascript'>\n"; echo "alert('hello');\n"; echo "</script>"; flush(); sleep(5); } ?> It seems that it's waiting for the connection to terminate before doing anything. Other than polling how can I do a similar thing in Google Chrome?
0
[ 2, 8144, 13, 12985, 17, 11920, 7775, 6760, 60, 800, 3726, 3726, 8144, 13, 12985, 1437, 22, 38, 14149, 14, 205, 28, 89, 16495, 18, 76, 7007, 68, 48, 3152, 263, 3060, 45, 13, 1, 60, 26120, 133, 13, 5, 13398, 6, 13, 1, 8117, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Java Vector Field (private member) accumulator doesn't store my Cows! === In the **pseudo code** below, I'm trying to parse the XML shown. A silly example maybe but my code was too large/specific for anyone to get any real value out of seeing it and learning from answers posted. So, this is more entertaining and hopefully others can learn from the answer as well as me. I'm new to Java but an experienced C++ programmer which makes me believe my problem lies in my understanding of the Java language. Problem: When the parser finishes, my Vector is full of uninitialized Cows. I create the Vector of Cows with a default capacity (which shouldn't effect it's "size" if it's anything like C++ STL Vector). When I print the contents of the Cow Vector out after the parse, it gives the right size of Vector but all the values appear never to have been set. Info: I have successfully done this with other parsers that don't have Vector *fields* but in this case, I'd like to use a Vector to accumulate Cow properties. MoreInfo: I can't use generics (Vector< Cow >) so please don't point me there. :) Thanks in advance. <pluralcow> <cow> <color>black</color> <age>1</age> </cow> <cow> <color>brown</color> <age>2</age> </cow> <cow> <color>blue</color> <age>3</age> </cow> </pluralcow> public class Handler extends DefaultHandler{ // vector to store all the cow knowledge private Vector m_CowVec; // temp variable to store cow knowledge until // we're ready to add it to the vector private Cow m_WorkingCow; // flags to indicate when to look at char data private boolean m_bColor; private boolean m_bAge; public void startElement(...tag...) { if(tag == pluralcow){ // rule: there is only 1 pluralcow tag in the doc // I happen to magically know how many cows there are here. m_CowVec = new Vector(numcows); }else if(tag == cow ){ // rule: multiple cow tags exist m_WorkingCow = new Cow(); }else if(tag == color){ // rule: single color within cow m_bColor = true; }else if(tag == age){ // rule: single age within cow m_bAge = true; } } public void characters(...chars...) { if(m_bColor){ m_WorkingCow.setColor(chars); }else if(m_bAge){ m_WorkingCow.setAge(chars); } } public void endElement(...tag...) { if(tag == pluralcow){ // that's all the cows }else if(tag == cow ){ m_CowVec.addElement(m_WorkingCow); }else if(tag == color){ m_bColor = false; }else if(tag == age){ m_bAge = false; } } }
0
[ 2, 8247, 7497, 575, 13, 5, 20181, 322, 6, 7602, 723, 14868, 1437, 22, 38, 1718, 51, 4539, 18, 187, 800, 3726, 3726, 19, 14, 13, 1409, 1919, 62, 18601, 1797, 1409, 1021, 15, 31, 22, 79, 749, 20, 2017, 870, 14, 23504, 1721, 9, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
java.lang.Exception vs. rolling your own exception === At what point would you create your own exception class vs. using java.lang.Exception? (All the time? Only if it will be used outside the package? Only if it must contain advanced logic? etc...)
0
[ 2, 8247, 9, 9949, 9, 10066, 872, 4611, 9, 3929, 154, 258, 5391, 800, 3726, 3726, 35, 98, 454, 83, 42, 1600, 154, 258, 5391, 718, 4611, 9, 568, 8247, 9, 9949, 9, 10066, 872, 60, 13, 5, 1233, 14, 85, 60, 104, 100, 32, 129, 44,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SQL Server 2005: Wrapping Tables by Views - Pros and Cons === ## Background ## I am working on a legacy small-business automation system (inventory, sales, procurement, etc.) that has a single database hosted by SQL Server 2005 and a bunch of client applications. The main client (used by all users) is an MS Access 2003 application (ADP), and other clients include various VB/VBA applications like Excel add-ins and command-line utilities. In addition to 60 or so tables (mostly in 3NF), the database contains about 200 views, about 170 UDFs (mostly scalar and table-valued inline ones), and about 50 stored procedures. As you might have guessed, some portion of so-called "business logic" is encapsulated in this mass of T-SQL code (and thus is shared by all clients). Overall, the system's code (including the T-SQL code) is not very well organized and is very refactoring-resistant, so to speak. In particular, schemata of most of the tables cry for all kinds of refactorings, small (like column renamings) and large (like normalization). FWIW, I have pretty long and decent application development experience (C/C++, Java, VB, and whatnot), but I am not a DBA. So, if the question will look silly to you, now you know why it is so. :-) ## Question ## While thinking about refactoring all this mess (in a peacemeal fashion of course), I've come up with the following idea: 1. For each table, create a "wrapper" view that (a) has all the columns that the table has; and (b) in some cases, has some additional computed columns based on the table's "real" columns. A typical (albeit simplistic) example of such additional computed column would be sale price of a product derived from the product's regular price and discount. 2. Reorganize all the code (both T-SQL and VB/VBA client code) so that only the "wrapper" views refer to tables directly. So, for example, even if an application or a stored procedure needed to insert/update/delete records from a table, they'd do that against the corresponding "table wrapper" view, not against the table directly. So, essentially this is about **isolating all the tables by views from the rest of the system**. This approach seems to provide a lot of benefits, especially from maintainability viewpoint. For example: - When a table column is to be renamed, it can be done without rewriting all the affected client code at once. - It is easier to implement derived attributes (easier than using computed columns). - You can effectively have aliases for column names. Obviously, there must be some price for all these benefits, but I am not sure that I am seeing all the catches lurking out there. Did anybody try this approach in practice? What are the major pitfalls? One obvious disadvantage is the cost of maintaining "wrapper" views in sync with their corresponding tables (a new column in a table has to be added to a view too; a column deleted from a table has to be deleted from the view too; etc.). But this price seems to be small and fair for making the overall codebase more resilient. Does anyone know any other, stronger drawbacks? For example, usage of all those "wrapper" views instead of tables is very likely to have some adverse performance impact, but is this impact going to be substantial enough to worry about it? Also, while using ADODB, it is very easy to get a recordset that is not updateable even when it is based just on a few joined tables; so, are the "wrapper" views going to make things substantially worse? And so on, and so forth... Any comments (especially shared real experience) would be greatly appreciated. Thank you! ---------- P.S. I stepped on the following old article that discusses the idea of "wrapper" views: [The Big View Myth][1] The article advises to avoid the approach described above. But... I do not really see any good reasons against this idea in the article. Quite the contrary, in its list of good reasons to create a view, almost each item is exactly why it is so tempting to create a "wrapper" view for each and every table (especially in a legacy system, as a part of refactoring process). The article is really old (1999), so whatever reasons were good then may be no longer good now (and vice versa). It would be really interesting to hear from someone who considered or even tried this idea recently, with the latest versions of SQL Server and MS Access... [1]: http://www.craigsmullins.com/cnr_0299b.htm
0
[ 2, 4444, 255, 8128, 18228, 13437, 7484, 34, 4146, 13, 8, 895, 18, 17, 11608, 800, 3726, 3726, 6926, 5910, 2395, 6926, 5910, 31, 589, 638, 27, 21, 7780, 284, 8, 18717, 23217, 329, 13, 5, 108, 6645, 7159, 15, 2598, 15, 23377, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Obj-C -> Incrementing a number (and showing steps on a Cocoa label) === I'm new with Objective-C, so there probably is a simple solution to this. I want a number to increment, but each iteration to be show on a label. (for example, it shows 1, 2, 3, 4, 5... displayed apart by an amount of time). I tried: #import "testNums.h" @implementation testNums - (IBAction)start:(id)sender { int i; for(i = 0; i < 10; ++i) { [outputNum setIntValue:i]; sleep(1); } } @end and all it did was wait for 9 seconds (apparently frozen) and then displayed 9 in the text box.
0
[ 2, 5122, 728, 8, 150, 13, 8, 1, 13, 28461, 68, 21, 234, 13, 5, 290, 3187, 2382, 27, 21, 24507, 1899, 6, 800, 3726, 3726, 31, 22, 79, 78, 29, 7038, 8, 150, 15, 86, 80, 910, 25, 21, 1935, 4295, 20, 48, 9, 31, 259, 21, 234,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I link files in PHP? === I have two PHP files that I need to link. How can I link the files together using PHP? The effect I want is to have the user click a button, some information is proccessed on the page, and then the result is displayed in a different page, depending on the button the user clicked.Thanks
0
[ 2, 184, 107, 31, 3508, 6488, 19, 13, 26120, 60, 800, 3726, 3726, 31, 57, 81, 13, 26120, 6488, 30, 31, 376, 20, 3508, 9, 184, 92, 31, 3508, 14, 6488, 429, 568, 13, 26120, 60, 14, 1590, 31, 259, 25, 20, 57, 14, 4155, 10840, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What to do if there are two programmers that have different preferences for a programming language. === I am hired in one of the electricity providers in our country and will start next month. There are three existing programmers, and each of them are assigned in the different departments. They do have an IT department but no head. The result is that the development of the software systems is not centralized because each programmer is on his own. And they are competing each other, in fact not sharing ideas, as one of the programmers told me after my interview. My question is how should I conduct in such situation. I am taking this job because the salary is way, way much higher than my current salary, and the opportunities for the trainings and seminars are great.
0
[ 2, 98, 20, 107, 100, 80, 50, 81, 17968, 18, 30, 57, 421, 9808, 18, 26, 21, 3143, 816, 9, 800, 3726, 3726, 31, 589, 3658, 19, 53, 16, 14, 5592, 13488, 19, 318, 475, 17, 129, 799, 328, 1617, 9, 80, 50, 132, 3149, 17968, 18, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Amazon notwithstanding, are there any good programming book review websites? === Despite the trend that <a href="http://www.codinghorror.com/blog/archives/001108.html"> programmers don't read books,</a> I still prefer to read books over "random" websites when learning a new language, etc. (It helps that I have access to <a href="http://www.safaribooksonline.com/">Safari Books Online</a> through my former college and <a href="http://books24x7.com"</a>Books24x7</a> through work) The problem I have is separating the good books from the bad, and evaluating what would be a good introductory text vs. an advanced text. Are there any good websites, excluding Amazon reviews, with good book reviews? - preferably showing required experience levels - introduction, intermediate, advanced, reference, etc.
4
[ 2, 8059, 28177, 15, 50, 80, 186, 254, 3143, 360, 1487, 13931, 60, 800, 3726, 3726, 869, 14, 8703, 30, 13, 1, 58, 746, 14057, 3726, 7, 21127, 6903, 6483, 9, 15458, 6778, 139, 248, 9, 960, 118, 220, 5567, 118, 23941, 18, 118, 1895...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Asp.net MVC Beta upgrade problem. === I been waiting for sometime now to bring my Asp.net Preview 4 project up to snuff, totally skipping Preview 5 just because I knew I would have some issues. Anyhow, here is the question and dilemma. I have a few areas on the site which I have an ajax update type panel that renders content from a view using this technique found here. [AJAX Panels with ASP.NET MVC][1] [1]: http://www.singingeels.com/Articles/AJAX_Panels_with_ASPNET_MVC.aspx This worked fine in preview 4 but now in the beta I keep getting this .. Sys.ArgumentNullException: Value cannot be null Parameter name eventObject It has been driving me nuts... My code looks like this <% using (this.Ajax.BeginForm("ReportOne", "Reports", null, new AjaxOptions { UpdateTargetId = "panel1" }, new { id = "panelOneForm" })) { } %> <div class="panel" id="panel1"><img src="/Content/ajax-loader.gif" /></div> <script type="text/javascript"> $get("panelOneForm").onsubmit(); </script> so basically what its doing is forcing the submit on the form, which updates panel1 with the contents from the view ReportOne. What am I missing? Why am I getting this error? Why did they go and change things? I love MVC but this is making me crazy.
0
[ 2, 28, 306, 9, 2328, 307, 8990, 8434, 9483, 1448, 9, 800, 3726, 3726, 31, 74, 1672, 26, 8530, 130, 20, 1499, 51, 28, 306, 9, 2328, 16121, 268, 669, 71, 20, 27579, 15, 5139, 27225, 16121, 331, 114, 185, 31, 404, 31, 83, 57, 109...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I parse a listing of files to get just the filenames in python? === So lets say I'm using Python's [ftplib][1] to retrieve a list of log files from an FTP server. How would I parse that list of files to get just the file names (the last column) inside a list? See the link above for example output. [1]: http://www.python.org/doc/2.5.2/lib/module-ftplib.html
0
[ 2, 184, 107, 31, 2017, 870, 21, 9554, 16, 6488, 20, 164, 114, 14, 3893, 7259, 18, 19, 20059, 60, 800, 3726, 3726, 86, 6884, 395, 31, 22, 79, 568, 20059, 22, 18, 636, 3072, 306, 8326, 500, 2558, 165, 500, 20, 11917, 21, 968, 16...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Delphi to .NET + C# === I've been a Delphi (D7) developers for many sometime already, I've always been wondering about the .NET + C# stuffs. What I mean are about not the "Delphi for .NET" or "Oxygene" tech/plugin, but clean .NET/C#. How much different is it from Delphi? And some other questions... - Is Mono/SharpDevelop (any others that I should know of?) as capable as the Non-Free Visual Studio? - In terms of deployment, how does it work? The Assembly + Framework + Executable? - The Framework (3.5 latest?) works something like the JVM for the Java world, correct? Does it take care of the supporting/making use of techs like Multi-Cores or Windows specific optimizations? - C# has some similarities to Object Pascal, shouldn't be too tough to adapt, right? Thanks.
0
[ 2, 23030, 20, 13, 9, 2328, 2754, 272, 5910, 800, 3726, 3726, 31, 22, 195, 74, 21, 23030, 13, 5, 43, 465, 6, 10168, 26, 151, 8530, 614, 15, 31, 22, 195, 550, 74, 5712, 88, 14, 13, 9, 2328, 2754, 272, 5910, 3217, 18, 9, 98, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it possible to write a function like next_permutation but that only permutes r values, instead of n? === std::next\_permutation (and std::prev\_permutation) permute all values in the range `[first, last)` given for a total of n! permutations (assuming that all elements are unique). is it possible to write a function like this: template<class Iter> bool next_permutation(Iter first, Iter last, Iter choice_last); That permutes the elements in the range `[first, last)` but only chooses elements in the range `[first, choice_last)`. ie we have maybe 20 elements and want to iterate through all permutations of 10 choices of them, 20 P 10 options vs 20 P 20. - Iter is a random access iterator for my purposes, but if it can be implemented as a bidirectional iterator, then great! - The less amount of external memory needed the better, but for my purposes it doesn't matter. - The chosen elements on each iteration are input to the first elements of the sequence. Is such a function possible to implement? Does anyone know of any existing implementations?
0
[ 2, 25, 32, 938, 20, 2757, 21, 1990, 101, 328, 1, 1432, 7903, 857, 47, 30, 104, 416, 7903, 160, 761, 4070, 15, 700, 16, 13, 103, 60, 800, 3726, 3726, 354, 43, 45, 45, 20021, 1, 1432, 7903, 857, 13, 5, 290, 354, 43, 45, 45, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to begin with Ruby/RAILS (windows) === I've tried download the RAILS package and installing it on windows, but have no idea to make it work. I have had some experience with this commbination: - PHP 4.x + 5.x (Windows) - LIGHTTPD (Windows) - Connecting to a Firebird Database (Windows) Can anybody enlighten me?
0
[ 2, 184, 20, 2348, 29, 10811, 118, 7301, 18, 13, 5, 27508, 18, 6, 800, 3726, 3726, 31, 22, 195, 794, 7121, 14, 2240, 18, 6030, 17, 25429, 32, 27, 1936, 15, 47, 57, 90, 882, 20, 233, 32, 170, 9, 31, 57, 41, 109, 1496, 29, 48...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Daylight savings time change affecting the outcome of saving and loading an icalendar file ? === I have some unit tests that started failing today after a switch in daylight savings time. We're using the [iCalendar python module][1] to load and save ics files. The following script is a simplified version of our test. The script works fine in 'summer' and fails in 'winter', as of this morning. The failure can be reproduced by setting the clock back manually. Here's the output of the script: [root@ana icalendar]# date 10250855 Sat Oct 25 08:55:00 CEST 2008 [root@ana icalendar]# python dst.py DTSTART should represent datetime.datetime(2015, 4, 4, 8, 0, tzinfo=tzfile('/usr/share/zoneinfo/Europe/Brussels')) Brussels time DTSTART should represent datetime.datetime(2015, 4, 4, 6, 0, tzinfo=<icalendar.prop.UTC object at 0x956b5cc>) UTC DTSTART represents datetime.datetime(2015, 4, 4, 6, 0, tzinfo=<icalendar.prop.UTC object at 0x956b5cc>) Brussels time [root@ana icalendar]# date 10260855 Sun Oct 26 08:55:00 CET 2008 [root@ana icalendar]# python dst.py DTSTART should represent datetime.datetime(2015, 4, 4, 8, 0, tzinfo=tzfile('/usr/share/zoneinfo/Europe/Brussels')) Brussels time DTSTART should represent datetime.datetime(2015, 4, 4, 6, 0, tzinfo=<icalendar.prop.UTC object at 0x96615cc>) UTC DTSTART represents datetime.datetime(2015, 4, 4, 7, 0, tzinfo=<icalendar.prop.UTC object at 0x96615cc>) Brussels time Traceback (most recent call last): File "dst.py", line 58, in <module> start.dt, startUTCExpected) AssertionError: calendar's datetime.datetime(2015, 4, 4, 7, 0, tzinfo=<icalendar.prop.UTC object at 0x96615cc>) != expected datetime.datetime(2015, 4, 4, 6, 0, tzinfo=<icalendar.prop.UTC object at 0x96615cc>) And here is the [whole script][2]. So, questions: - why would my current time (and which part of DST I'm in) affect the loading/saving/parsing of timestamps ? I would expect it not to. - how would you unit test this kind of bug, if it is a bug ? Obviously, I don't want my unit tests to reset the clock on my computer. [1]: http://codespeak.net/icalendar/ [2]: https://thomas.apestaart.org/thomas/trac/browser/tests/icalendar/dst.py
0
[ 2, 12344, 12135, 85, 753, 13808, 14, 9774, 16, 7599, 17, 12797, 40, 13, 4272, 219, 2542, 3893, 13, 60, 800, 3726, 3726, 31, 57, 109, 1237, 4894, 30, 373, 7250, 786, 75, 21, 5521, 19, 12344, 12135, 85, 9, 95, 22, 99, 568, 14, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do programmers practice code reuse. === I've been a bad programmer because I am doing a copy and paste. An example is that everytime i connect to a database and retrieve a recordset, I will copy the previous code and edit, copy the code that sets the datagridview and edit. I am aware of the phrase code reuse, but I have not actually used it. How can i utilize code reuse so that I don't have to copy and paste the database code and the datagridview code.,
0
[ 2, 184, 107, 17968, 18, 1345, 1797, 302, 3699, 9, 800, 3726, 3726, 31, 22, 195, 74, 21, 896, 17968, 185, 31, 589, 845, 21, 4344, 17, 640, 62, 9, 40, 823, 25, 30, 352, 891, 31, 6379, 20, 21, 6018, 17, 11917, 21, 742, 1198, 15...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Customizing the Places Bar in Visual Studio 2008 === Has anybody succeeded in customizing the Places Bar for VS 2008? My customizations from VS 2005 did not transfer to 2008 (obviously), and no matter what I do with the registry, I cannot make my custom places appear on the Open dialogs. I have read and applied the relevant MS KB article, to no avail. This used to work fine with VS 2005, so it may well be a VS 2008 bug, but I may be wrong trying the same approach.
0
[ 2, 5816, 3335, 14, 1489, 748, 19, 3458, 1120, 570, 800, 3726, 3726, 63, 11181, 2914, 19, 5816, 3335, 14, 1489, 748, 26, 4611, 570, 60, 51, 5816, 1829, 18, 37, 4611, 812, 144, 52, 2617, 20, 570, 13, 5, 4995, 710, 18190, 6, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How in .Net do I Importing Values from a CSV in the format I want using OleDB? === I have a CSV file that has a column that contains strings that look like integers. That is they should be dealt with as strings, but since they are numbers they appear to be imported as integers (dropping off the leading zeroes). Example Data: - 0000000000079 - 0000999000012 - 0001002000005 - 0004100000007 The problem I'm seeing is that the last example data point comes through as DBNull.Value. I'm assuming this is because OleDB is treating that column as an integer (the data points come through without their leading zeroes also) and that 0004100000007 is greater than the largest integer value. Is there some way to say "column [0] is a string, don't read it as an integer"? When reading the data? The code I am currently using is: OleDbConnection dbConn = new OleDbConnection(SourceConnectionString); OleDbCommand dbCommand = new OleDbCommand("SELECT * FROM test.csv", dbConn); dbConn.Open(); OleDbDataReader dbReader = dbCommand.ExecuteReader(); while (dbReader.Read()) { if (dbReader[0] != DBNull.Value) { // do some work } }
0
[ 2, 184, 19, 13, 9, 2328, 107, 31, 9010, 68, 4070, 37, 21, 272, 18, 710, 19, 14, 2595, 31, 259, 568, 12116, 9007, 60, 800, 3726, 3726, 31, 57, 21, 272, 18, 710, 3893, 30, 63, 21, 4698, 30, 1588, 7887, 30, 361, 101, 13820, 18,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...